package cn.com.ctop.common.module.mapper;

import cn.com.ctop.common.module.entity.Project;
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;
import java.util.Map;

/**
 * 项目
 *
 * @author: jeecg-boot
 * @date: 2019-11-19
 * @cersion: V1.0
 */
public interface ProjectMapper extends BaseMapper<Project> {

    String getNameByAccountId(@Param("accountId") Long accountId);

    JSONObject getWarningInfoByProjectId(@Param("projectId") Long projectId);

    String querySupplierCodeById(@Param("projectId") Long projectId);

    List<JSONObject> getProjectListByIds(@Param("ids") JSONArray projectIdArray);

    List<JSONObject> getListByMap(@Param("ids") Map<Long, Long> projectIdMap);

    List<Long> getProjectIdsByProductId(@Param("productId") Long productId);

    List<Long> getProjectIdsByProductIdAndNotIn(@Param("productId") Long productId, @Param("partakeProjectIds") List<Long> partakeProjectIds);

    JSONObject getProjectByAccountId(@Param("accountId") Long accountId);

    List<Long> getProjectIdsByMediaId(String mediaId);
}
