package com.mzl.flower.mapper.film;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.mzl.flower.dto.request.film.AiContentTaskConfigQueryDTO;
|
import com.mzl.flower.dto.response.film.AiContentTaskConfigVO;
|
import com.mzl.flower.entity.film.AiContentTaskConfig;
|
import com.mzl.flower.entity.film.FilmWorks;
|
import org.apache.ibatis.annotations.MapKey;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 模型任务配置表 Mapper 接口
|
* </p>
|
* @author generator@Fang
|
*/
|
public interface AiContentTaskConfigMapper extends BaseMapper<AiContentTaskConfig> {
|
|
|
@Select("select * from ai_content_task_config where deleted = '0' ")
|
List<AiContentTaskConfig> getAiContentTaskConfigAll();
|
|
@Select("select * from ai_content_task_config where deleted = '0' ")
|
List<AiContentTaskConfigVO> getAiContentTaskConfigAllInfo();
|
|
List<AiContentTaskConfigVO> queryPage(@Param("dto") AiContentTaskConfigQueryDTO dto, Page page);
|
AiContentTaskConfigVO selectInfoById(@Param("id") Long id, @Param("userId") String userId);
|
|
//获取权重最高的数据
|
@Select("select * from film_works where sticky_weight = (select max(sticky_weight) from film_works) limit 1")
|
FilmWorks getTopStickyWeight();
|
|
@Select("select * from film_works where deleted = '0' and status = 'pending_create'")
|
List<AiContentTaskConfigVO> pendingCreate();
|
|
|
@Select("<script>" +
|
"select * from film_works where deleted = '0' " +
|
"and id IN " +
|
"<foreach item='id' collection='list' open='(' separator=',' close=')'>" +
|
"#{id}" +
|
"</foreach>" +
|
"</script>")
|
@MapKey("id")
|
List<AiContentTaskConfigVO> getFilmWorksByIds(@Param("list") List<Long> ids);
|
|
@Select("select * from ai_content_task_config where deleted = '0' and type ='film_content' and is_enabled = '1' ")
|
List<AiContentTaskConfigVO> getEnabledAiContentTaskConfig();
|
}
|