You've already forked FrameTour-BE
- 添加ClickHouse数据源配置和相关依赖 - 实现ClickHouse统计查询服务和MySQL兜底方案 - 新增扫码统计、订单统计等数据查询接口 - 重构分销员数据统计逻辑,整合MySQL和ClickHouse数据源 - 更新应用配置文件以支持ClickHouse启用开关 - 修改分布式任务统计以支持跨库查询场景
75 lines
2.0 KiB
Java
75 lines
2.0 KiB
Java
package com.ycwl.basic.mapper;
|
|
|
|
import com.ycwl.basic.model.pc.task.entity.TaskEntity;
|
|
import com.ycwl.basic.model.pc.task.req.TaskReqQuery;
|
|
import com.ycwl.basic.model.pc.task.resp.TaskRespVO;
|
|
import com.ycwl.basic.utils.ApiResponse;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/2 14:06
|
|
* 任务列表
|
|
*/
|
|
@Mapper
|
|
public interface TaskMapper {
|
|
List<TaskRespVO> list(TaskReqQuery taskReqQuery);
|
|
|
|
TaskRespVO getById(Long id);
|
|
|
|
int add(TaskEntity task);
|
|
|
|
int deleteById(Long id);
|
|
|
|
int update(TaskEntity task);
|
|
|
|
int updateStatus(Long id, Integer status);
|
|
/**
|
|
* 用户合成的视频
|
|
*
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
int countByMemberIdStauFinish(String userId);
|
|
|
|
List<TaskRespVO> selectNotRunning();
|
|
List<TaskEntity> selectAllNotRunning();
|
|
List<TaskEntity> selectAllRunning();
|
|
|
|
void assignToWorker(@Param("taskId") Long taskId, @Param("workerId") Long workerId);
|
|
void deassign(@Param("taskId") Long taskId);
|
|
|
|
int countTask(TaskReqQuery taskReqQuery);
|
|
|
|
int setStart(TaskEntity taskUpdate);
|
|
int setSuccess(TaskEntity taskUpdate);
|
|
int setFail(TaskEntity taskUpdate);
|
|
|
|
TaskEntity getFaceAutomaticTask(Long faceId);
|
|
|
|
TaskEntity get(Long taskId);
|
|
|
|
List<TaskEntity> listEntity(TaskReqQuery taskReqQuery);
|
|
|
|
List<TaskRespVO> selectNotRunningByScenicList(String scenicOnly);
|
|
|
|
List<TaskEntity> selectAllFailed();
|
|
|
|
TaskEntity listLastFaceTemplateTask(Long faceId, Long templateId);
|
|
|
|
/**
|
|
* 根据 face_id 列表统计已完成任务的用户数
|
|
* 用于 ClickHouse 迁移后的跨库统计
|
|
*/
|
|
Integer countCompletedTaskMembersByFaceIds(@Param("faceIds") List<String> faceIds);
|
|
|
|
/**
|
|
* 根据 face_id 列表统计已完成任务数
|
|
* 用于 ClickHouse 迁移后的跨库统计
|
|
*/
|
|
Integer countCompletedTasksByFaceIds(@Param("faceIds") List<String> faceIds);
|
|
}
|