You've already forked FrameTour-BE
refactor(face): 优化人脸识别服务中的购买验证逻辑
- 移除多余的空格格式 - 删除重复的购买验证逻辑 - 移除临时解决方案代码 - 简化条件判断流程
This commit is contained in:
@@ -451,7 +451,7 @@ public class FaceServiceImpl implements FaceService {
|
||||
contentPageVO.setContentType(1);
|
||||
contentPageVO.setSort(contentPageVO.getSort());
|
||||
if (!memberVideoEntityList.isEmpty()) {
|
||||
boolean isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, 0, contentPageVO.getContentId());
|
||||
boolean isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, 0, contentPageVO.getContentId());
|
||||
if (!isBuy) {
|
||||
isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, -1, contentPageVO.getTemplateId()); // 购买模板
|
||||
}
|
||||
@@ -484,12 +484,6 @@ public class FaceServiceImpl implements FaceService {
|
||||
contentPageVO.setLockType(1);
|
||||
}
|
||||
}
|
||||
boolean buy = orderRepository.checkUserBuyFaceItem(userId, faceId, contentPageVO.getGoodsType(), contentPageVO.getContentId());
|
||||
if (buy) {
|
||||
contentPageVO.setIsBuy(1);
|
||||
} else {
|
||||
contentPageVO.setIsBuy(0);
|
||||
}
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
List<PuzzleTemplateEntity> puzzleTemplateEntityList = puzzleTemplateMapper.list(face.getScenicId(), null, 1);
|
||||
|
||||
@@ -415,8 +415,6 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
memberVideoEntity.setIsBuy(taskVideoRelation.getIsBuy());
|
||||
memberVideoEntity.setOrderId(taskVideoRelation.getOrderId());
|
||||
}
|
||||
// TODO: FIXME 临时解决
|
||||
taskMapper.updateStatus(taskEntity.getId(), taskEntity.getStatus() + 10);
|
||||
}
|
||||
}
|
||||
if (taskEntity == null) {
|
||||
|
||||
Reference in New Issue
Block a user