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

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

    void replaceBatch(@Param("appList") List<KuaishouAppPackage> appList);

    List<String> queryAppVersions(@Param("projectId") Long projectId);

    List<Long> queryByAppVersion(@Param("projectId") Long projectId, @Param("appVersion") String appVersion, @Param("dataStatus") Integer dataStatus);

    List<JSONObject> queryPageList(@Param("userId") String userId, @Param("appName") String appName, @Param("appVersion") String appVersion, @Param("projectId") Long projectId, @Param("platform") Integer platform);

    Long queryUnitCount(@Param("id") Long id);

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

    String getUrlByMd5(@Param("md5") String md5);

    List<KuaishouAppPackage> getProjectAppList(@Param("projectId") Long projectId);
}
