You've already forked FrameTour-BE
refactor(order): 重构订单购买逻辑并优化接口参数
- 调整 isBuy 方法参数顺序,增加 faceId 参数支持 - 删除冗余的购买检查方法和旧版 isBuy 重载方法 - 简化购买状态判断逻辑,移除重复代码 - 更新视频查看权限服务中的购买检查调用 - 修改人脸服务中景区 ID 类型为 Long - 调整打印机服务中人脸查询方法参数类型 - 统一订单业务类中方法签名和调用方式 - 移除订单请求模型中无用字段注释 - 增加人脸 ID 列表字段支持批量查询 - 优化任务服务中购买状态检查逻辑
This commit is contained in:
@@ -401,7 +401,7 @@ public class VideoPieceGetter {
|
||||
videoSource.setFaceId(task.getFaceId());
|
||||
videoSource.setScenicId(deviceV2.getScenicId());
|
||||
videoSource.setSourceId(sourceEntity.getId());
|
||||
IsBuyRespVO isBuy = orderBiz.isBuy(task.getMemberId(), deviceV2.getScenicId(), 1, task.getFaceId());
|
||||
IsBuyRespVO isBuy = orderBiz.isBuy(deviceV2.getScenicId(), task.getMemberId(), task.getFaceId(), 1, task.getFaceId());
|
||||
if (isBuy.isBuy()) { // 如果用户买过
|
||||
videoSource.setIsBuy(1);
|
||||
} else if (isBuy.isFree()) { // 全免费逻辑
|
||||
@@ -432,7 +432,7 @@ public class VideoPieceGetter {
|
||||
// 有原视频,source已存在,可以直接添加关联关系
|
||||
if (task.memberId != null && task.faceId != null) {
|
||||
List<MemberSourceEntity> memberSourceEntities = memberRelationRepository.listSourceByFaceRelation(task.faceId, 1);
|
||||
IsBuyRespVO isBuy = orderBiz.isBuy(task.getMemberId(), deviceV2.getScenicId(), 1, task.getFaceId());
|
||||
IsBuyRespVO isBuy = orderBiz.isBuy(deviceV2.getScenicId(), task.getMemberId(), task.getFaceId(), 1, task.getFaceId());
|
||||
MemberSourceEntity videoSource = new MemberSourceEntity();
|
||||
videoSource.setId(SnowFlakeUtil.getLongId());
|
||||
videoSource.setScenicId(deviceV2.getScenicId());
|
||||
|
||||
Reference in New Issue
Block a user