package com.persagy.dmp.rwd.digital.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.persagy.dmp.basic.dto.RelationCalDTO;
import com.persagy.dmp.digital.entity.ObjectDigital;
import com.persagy.dmp.digital.entity.ObjectRelation;
import com.persagy.dmp.rwd.digital.domain.CalculatingDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 关系数据 DAO
 * @author Charlie Yu
 * @date 2021-07-08
 */
public interface ObjectRelationMapper extends BaseMapper<ObjectRelation> {
    /***
     * Description: 根据对象id查询关系
     * @param objIds : 对象id
     * @param relCode : 关系code
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectDigital>
     * @author : lijie
     * @date :2021/8/26 12:07
     * Update By lijie 2021/8/26 12:07
     */
    List<ObjectDigital> selectRelCodesByObjToIdsAndRelCode(@Param("objIds") Set<String> objIds,@Param("relCode") String relCode);
    /***
     * Description: 根据对象id查询关系
     * @param objIds : 对象id
     * @param relCodes : 关系code集合
     * @return : java.util.List<com.persagy.dmp.digital.entity.ObjectDigital>
     * @author : lijie
     * @date :2021/8/26 12:07
     * Update By lijie 2021/8/26 12:07
     */
    List<ObjectDigital> selectRelCodesByObjIdsAndRelCodes(@Param("objIds") Set<String> objIds,@Param("relCodes") Set<String> relCodes);
    /***
     * Description: 根据关系链新增对象关系
     * @param calculating : 请求参数
     * @return : void
     * @author : lijie
     * @date :2021/9/9 10:09
     * Update By lijie 2021/9/9 10:09
     */
    void insertObjectRelationByRelChain(@Param("param") CalculatingDTO calculating);
}
