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

import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouDirectionalPackage;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;

import java.util.List;

/**
 * @Description: 自动投放-定向包详情
 * @Author: jeecg-boot
 * @Date: 2021-04-20
 * @Version: V1.0
 */
public interface IKuaishouDirectionalPackageService extends IService<KuaishouDirectionalPackage> {

    Result<Object> createDirectionalPackage(JSONObject requestJson);

    Result<Object> updateDirectionalPackage(JSONObject requestJson) throws InterruptedException;

    Result<Object> queryList(KuaishouDirectionalPackage directionalPackage, Integer pageNo, Integer pageSize);

    Result<Object> getRelatedAccountGroup(String id, Integer type,Long accountId, Integer pageNo, Integer pageSize);

    Result<Object> pushDirectionalPackage(String id, JSONArray datas,JSONObject requestJson);

    void createDirectionalPackage2(JSONObject data, JSONObject request);

    Result<Object> queryPushResults(String id, JSONArray accountIds,String status);

    Result<Object> editPopulation(JSONObject requestJson);

    Result<Object> getAccountByProjectId(Long projectId, String id);

    /**
     * 添加广告组和定向模板绑定关系
     *
     * @param unitId            广告组Id
     * @param templateId        模板Id
     * @param population        定向人群包
     * @param paidAudience      付费人群包
     * @param excludePopulation 排除人群包
     * @return void
     * @throws
     * @author ZHAOXA
     */
    void createUnitAndTemplate(JSONObject request) throws Exception;

    Result<Object> queryPopulationById(Long templateId, Long accountId);

    Result<Object> getProjectTarget(Long projectId, String templateName,Integer pageNo, Integer pageSize);

    List<KuaishouDirectionalPackage> getProjectTargetByIds(List<String> list);

    Long selectTemplateId(String id, Long accountId);
}
