package cn.com.ctop.kuaishou.modules.ai.mapper;

import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouDirectionalaPckageRel;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 自动投放-定向包详情关系表
 *
 * @author: jeecg-boot
 * @date: 2021-04-25
 * @cersion: V1.0
 */
public interface KuaishouDirectionalPckageRelMapper extends BaseMapper<KuaishouDirectionalaPckageRel> {

    void replace(KuaishouDirectionalaPckageRel rel);

    List<JSONObject> queryPushResults(@Param("id") String id, @Param("accountIds") JSONArray accountIds, @Param("status") String status);

    List<JSONObject> getAccountByProjectId(@Param("projectId") Long projectId, @Param("id") String id);

    List<JSONObject> queryRelId(@Param("projectId") Long projectId, @Param("id") String id, @Param("type") String type);

    List<JSONObject> queryUnitIdByAccountId(@Param("id") String id, @Param("accountId") Long accountId);

    void updateTemName(@Param("id") String id, @Param("templateName") String templateName);

    Long selectTemplateId(@Param("dirId") String id,@Param("accountId")Long accountId);
}
