修改
This commit is contained in:
parent
b51048ddfa
commit
25d563cb2b
@ -222,7 +222,7 @@ public class FaceServiceImpl implements FaceService {
|
|||||||
memberSourceEntity.setMemberId(face.getMemberId());
|
memberSourceEntity.setMemberId(face.getMemberId());
|
||||||
memberSourceEntity.setSourceId(sourceEntity.getId());
|
memberSourceEntity.setSourceId(sourceEntity.getId());
|
||||||
memberSourceEntity.setType(sourceEntity.getType());
|
memberSourceEntity.setType(sourceEntity.getType());
|
||||||
IsBuyRespVO isBuy = orderBiz.isBuy(face.getMemberId(), face.getScenicId(), sourceEntity.getType(), sourceEntity.getId());
|
IsBuyRespVO isBuy = orderBiz.isBuy(face.getMemberId(), face.getScenicId(), sourceEntity.getType(), faceEntity.getId());
|
||||||
if (isBuy.isBuy()) { // 如果用户买过
|
if (isBuy.isBuy()) { // 如果用户买过
|
||||||
memberSourceEntity.setIsBuy(1);
|
memberSourceEntity.setIsBuy(1);
|
||||||
} else if (isBuy.isFree()) { // 全免费逻辑
|
} else if (isBuy.isFree()) { // 全免费逻辑
|
||||||
@ -235,11 +235,11 @@ public class FaceServiceImpl implements FaceService {
|
|||||||
if (!memberSourceEntityList.isEmpty()) {
|
if (!memberSourceEntityList.isEmpty()) {
|
||||||
sourceMapper.addRelations(memberSourceEntityList);
|
sourceMapper.addRelations(memberSourceEntityList);
|
||||||
taskTaskService.autoCreateTaskByFaceId(face.getId());
|
taskTaskService.autoCreateTaskByFaceId(face.getId());
|
||||||
VideoPieceGetter.Task task = new VideoPieceGetter.Task();
|
// VideoPieceGetter.Task task = new VideoPieceGetter.Task();
|
||||||
task.faceId = face.getId();
|
// task.faceId = face.getId();
|
||||||
task.faceSampleIds = sampleListIds;
|
// task.faceSampleIds = sampleListIds;
|
||||||
task.memberId = face.getMemberId();
|
// task.memberId = face.getMemberId();
|
||||||
VideoPieceGetter.addTask(task);
|
// VideoPieceGetter.addTask(task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return scenicDbSearchResult;
|
return scenicDbSearchResult;
|
||||||
|
@ -14,6 +14,7 @@ import com.ycwl.basic.utils.SnowFlakeUtil;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,6 +81,7 @@ public class TemplateServiceImpl implements TemplateService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApiResponse<Boolean> update(TemplateEntity template) {
|
public ApiResponse<Boolean> update(TemplateEntity template) {
|
||||||
|
template.setUpdateTime(new Date());
|
||||||
int i = templateMapper.update(template);
|
int i = templateMapper.update(template);
|
||||||
if (template.getChildren() != null) {
|
if (template.getChildren() != null) {
|
||||||
templateMapper.deleteByPid(template.getId());
|
templateMapper.deleteByPid(template.getId());
|
||||||
|
@ -217,7 +217,7 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
log.info("faceId:{} matchSampleIds is empty", faceId);
|
log.info("faceId:{} matchSampleIds is empty", faceId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<FaceSampleEntity> faceSampleList = faceSampleMapper.listByIds(Arrays.stream(faceRespVO.getMatchSampleIds().split(",")).map(Long::valueOf).collect(Collectors.toList()));
|
List<FaceSampleEntity> faceSampleList = faceSampleMapper.listByIds(Arrays.stream(faceRespVO.getMatchSampleIds().split(",")).filter(StringUtils::isNumeric).map(Long::valueOf).collect(Collectors.toList()));
|
||||||
if (faceSampleList.isEmpty()) {
|
if (faceSampleList.isEmpty()) {
|
||||||
log.info("faceId:{} faceSampleList is empty", faceId);
|
log.info("faceId:{} faceSampleList is empty", faceId);
|
||||||
return;
|
return;
|
||||||
@ -253,10 +253,6 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
}
|
}
|
||||||
List<Long> faceSampleIds = faceSampleList.stream().map(FaceSampleEntity::getId).collect(Collectors.toList());
|
List<Long> faceSampleIds = faceSampleList.stream().map(FaceSampleEntity::getId).collect(Collectors.toList());
|
||||||
List<SourceEntity> sourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
List<SourceEntity> sourceList = sourceMapper.listVideoByScenicFaceRelation(face.getScenicId(), faceId);
|
||||||
if (sourceList.isEmpty()) {
|
|
||||||
log.info("faceId:{} source list not exist", faceId);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(face.getScenicId());
|
// ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(face.getScenicId());
|
||||||
// if (automatic > 0) {
|
// if (automatic > 0) {
|
||||||
// TaskReqQuery taskReqQuery = new TaskReqQuery();
|
// TaskReqQuery taskReqQuery = new TaskReqQuery();
|
||||||
@ -307,6 +303,11 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
Map<String, List<SourceEntity>> sourcesMap = videoSourceList.stream()
|
||||||
.peek(item -> item.setUrl(item.getVideoUrl()))
|
.peek(item -> item.setUrl(item.getVideoUrl()))
|
||||||
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
.collect(Collectors.groupingBy(item -> item.getDeviceId().toString()));
|
||||||
|
if (sourcesMap.isEmpty()) {
|
||||||
|
// 主动禁止没有视频源视频生成
|
||||||
|
log.info("task callback: 没有视频源");
|
||||||
|
return;
|
||||||
|
}
|
||||||
sourcesMap.forEach((key, value) -> {
|
sourcesMap.forEach((key, value) -> {
|
||||||
// 每个value只保留第一个
|
// 每个value只保留第一个
|
||||||
value.removeIf(item -> !value.get(0).equals(item));
|
value.removeIf(item -> !value.get(0).equals(item));
|
||||||
|
@ -103,6 +103,10 @@ public class DynamicTaskGenerator {
|
|||||||
log.info("人脸样本ID{}不存在", task.getFaceSampleId());
|
log.info("人脸样本ID{}不存在", task.getFaceSampleId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (faceSample.getScore() == null) {
|
||||||
|
log.info("人脸样本ID{}人脸质量为空", task.getFaceSampleId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(faceSample.getScenicId());
|
ScenicConfigEntity scenicConfig = scenicRepository.getScenicConfig(faceSample.getScenicId());
|
||||||
if (scenicConfig == null) {
|
if (scenicConfig == null) {
|
||||||
log.info("当前景区{},无配置", faceSample.getScenicId());
|
log.info("当前景区{},无配置", faceSample.getScenicId());
|
||||||
|
@ -87,8 +87,8 @@
|
|||||||
oi.goods_type,
|
oi.goods_type,
|
||||||
CASE oi.goods_type
|
CASE oi.goods_type
|
||||||
WHEN '0' THEN mvd.name
|
WHEN '0' THEN mvd.name
|
||||||
WHEN '1' THEN '原片包'
|
WHEN '1' THEN '原片集'
|
||||||
WHEN '2' THEN '照片包'
|
WHEN '2' THEN '照片集'
|
||||||
ELSE '其他'
|
ELSE '其他'
|
||||||
END AS goods_name,
|
END AS goods_name,
|
||||||
CASE oi.goods_type
|
CASE oi.goods_type
|
||||||
@ -113,7 +113,7 @@
|
|||||||
LEFT JOIN `order` o ON oi.order_id = o.id
|
LEFT JOIN `order` o ON oi.order_id = o.id
|
||||||
LEFT JOIN scenic sc ON o.scenic_id = sc.id
|
LEFT JOIN scenic sc ON o.scenic_id = sc.id
|
||||||
LEFT JOIN member_video_data mvd ON o.member_id = mvd.member_id AND oi.goods_id = mvd.video_id
|
LEFT JOIN member_video_data mvd ON o.member_id = mvd.member_id AND oi.goods_id = mvd.video_id
|
||||||
LEFT JOIN member_source_data msd ON o.member_id = msd.member_id AND oi.goods_id = msd.source_id
|
LEFT JOIN member_source_data msd ON o.member_id = msd.member_id AND oi.goods_id = msd.face_id
|
||||||
WHERE oi.order_id = #{id};
|
WHERE oi.order_id = #{id};
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user