cloudroam
3 天以前 8b02c916fec8819f4f1b27b21a26cca6c41b5f5d
add:定时任务配置,热门城市
已添加1个文件
53 ■■■■■ 文件已修改
src/main/java/com/mzl/flower/mapper/film/AiContentTaskConfigMapper.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mzl/flower/mapper/film/AiContentTaskConfigMapper.java
对比新文件
@@ -0,0 +1,53 @@
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();
}