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