自动逻辑修改
This commit is contained in:
parent
eaf16c48c4
commit
bf5fdeb95c
@ -13,6 +13,7 @@ import lombok.Data;
|
||||
public class GoodsReqQuery {
|
||||
@ApiModelProperty("是否已购买 0否 1是")
|
||||
private Integer isBuy;
|
||||
private Long faceId;
|
||||
@ApiModelProperty(value = "用户id", hidden = true)
|
||||
private Long memberId;
|
||||
@ApiModelProperty("景区id")
|
||||
|
@ -103,10 +103,10 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
public ApiResponse<List<GoodsDetailVO>> sourceGoodsList(GoodsReqQuery query) {
|
||||
Integer sourceType = query.getSourceType();
|
||||
SourceReqQuery sourceReqQuery = new SourceReqQuery();
|
||||
sourceReqQuery.setScenicId(query.getScenicId());
|
||||
sourceReqQuery.setIsBuy(query.getIsBuy());
|
||||
sourceReqQuery.setMemberId(query.getMemberId());
|
||||
sourceReqQuery.setType(sourceType);
|
||||
sourceReqQuery.setScenicId(query.getScenicId());
|
||||
sourceReqQuery.setIsBuy(query.getIsBuy());
|
||||
sourceReqQuery.setMemberId(query.getMemberId());
|
||||
sourceReqQuery.setType(sourceType);
|
||||
List<SourceRespVO> list = sourceMapper.list(sourceReqQuery);
|
||||
List<GoodsDetailVO> goodsDetailVOList = new ArrayList<>();
|
||||
|
||||
|
@ -20,6 +20,7 @@ import com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity;
|
||||
import com.ycwl.basic.model.pc.source.entity.SourceEntity;
|
||||
import com.ycwl.basic.model.pc.source.resp.SourceRespVO;
|
||||
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.model.pc.template.entity.TemplateEntity;
|
||||
import com.ycwl.basic.model.pc.template.req.TemplateReqQuery;
|
||||
@ -191,8 +192,12 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
@Override
|
||||
public void autoCreateTaskByFaceId(Long id) {
|
||||
FaceRespVO faceRespVO = faceMapper.getById(id);
|
||||
List<FaceSampleRespVO> faceSampleList = faceSampleMapper.listByIds(Arrays.stream(faceRespVO.getMatchSampleIds().split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
||||
if (faceSampleList.isEmpty()) {
|
||||
if (StringUtils.isNotBlank(faceRespVO.getMatchSampleIds())) {
|
||||
List<FaceSampleRespVO> faceSampleList = faceSampleMapper.listByIds(Arrays.stream(faceRespVO.getMatchSampleIds().split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
||||
if (faceSampleList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
List<TemplateEntity> templateList = templateMapper.listByScenicId(faceRespVO.getScenicId());
|
||||
@ -221,6 +226,15 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
if (sourceList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (automatic > 0) {
|
||||
TaskReqQuery taskReqQuery = new TaskReqQuery();
|
||||
taskReqQuery.setFaceId(faceId);
|
||||
taskReqQuery.setTemplateId(templateId);
|
||||
List<TaskRespVO> list = taskMapper.list(taskReqQuery);
|
||||
if (!list.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Thread taskThread = new Thread(() -> {
|
||||
List<SourceEntity> vSourceList = sourceMapper.listVideoBySampleIds(faceSampleList.stream().map(FaceSampleRespVO::getId).collect(Collectors.toList()));
|
||||
List<VideoPieceGetter.Task> tasks = faceSampleList.stream().map(sample -> {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} (%-5level) (%-40.40(%logger{40})) : %msg%n</pattern>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level --- [%15.15(%thread)] %-40.40(%logger{40}) : %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
@ -20,15 +20,9 @@
|
||||
<if test="faceUrl!= null and faceUrl!= ''">
|
||||
face_url = #{faceUrl},
|
||||
</if>
|
||||
<if test="matchSampleIds!= null and matchSampleIds!= ''">
|
||||
match_sample_ids = #{matchSampleIds},
|
||||
</if>
|
||||
<if test="firstMatchRate!= null ">
|
||||
first_match_rate = #{firstMatchRate},
|
||||
</if>
|
||||
<if test="matchResult!= null and matchResult!= ''">
|
||||
match_result = #{matchResult},
|
||||
</if>
|
||||
match_sample_ids = #{matchSampleIds},
|
||||
first_match_rate = #{firstMatchRate},
|
||||
match_result = #{matchResult},
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -37,6 +37,7 @@
|
||||
and is_buy = #{isBuy}
|
||||
</if>
|
||||
<if test="type!=null">and so.type = #{type} </if>
|
||||
<if test="faceId!=null">and FIND_IN_SET(so.face_sample_id, (select face.match_sample_ids from face where id = #{faceId})) </if>
|
||||
<if test="startTime!= null">and so.create_time >= #{startTime} </if>
|
||||
<if test="endTime!= null">and so.create_time <= #{endTime} </if>
|
||||
</where>
|
||||
|
Loading…
x
Reference in New Issue
Block a user