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

import cn.com.ctop.kuaishou.modules.ai.entity.KuaishouAppPackageRel;
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-05-13
 * @cersion: V1.0
 */
public interface KuaishouAppPackageRelMapper extends BaseMapper<KuaishouAppPackageRel> {

    void replaceBatch(@Param("relList") List<KuaishouAppPackageRel> relList);

    KuaishouAppPackageRel queryEntityByAccountId(@Param("accountId") Long accountId, @Param("appVersion") String appVersion);

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

    List<JSONObject> getRelatedAccounts(@Param("id") Long id);

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

    List<JSONObject> getAppsDetail(@Param("ids") List<Long> ids);

    JSONObject queryAppId(@Param("appTemId") Long appTemId, @Param("accountId") Long accountId);
}
