You've already forked FrameTour-BE
refactor(order): 重构订单购买逻辑并优化接口参数
- 调整 isBuy 方法参数顺序,增加 faceId 参数支持 - 删除冗余的购买检查方法和旧版 isBuy 重载方法 - 简化购买状态判断逻辑,移除重复代码 - 更新视频查看权限服务中的购买检查调用 - 修改人脸服务中景区 ID 类型为 Long - 调整打印机服务中人脸查询方法参数类型 - 统一订单业务类中方法签名和调用方式 - 移除订单请求模型中无用字段注释 - 增加人脸 ID 列表字段支持批量查询 - 优化任务服务中购买状态检查逻辑
This commit is contained in:
@@ -86,22 +86,6 @@ public class OrderRepository {
|
||||
return orderMapper.getUserBuyItem(userId, goodsType, goodsId);
|
||||
}
|
||||
|
||||
public boolean checkUserBuyFaceSourceImage(Long userId, Long faceId) {
|
||||
return checkUserBuyItem(userId, 2, faceId);
|
||||
}
|
||||
|
||||
public boolean checkUserBuyFaceSourceVideo(Long userId, Long faceId) {
|
||||
return checkUserBuyItem(userId, 1, faceId);
|
||||
}
|
||||
|
||||
public boolean checkUserBuyVideo(Long userId, Long videoId) {
|
||||
return checkUserBuyItem(userId, 0, videoId);
|
||||
}
|
||||
|
||||
public boolean checkUserBuyTemplate(Long userId, Long templateId) {
|
||||
return checkUserBuyItem(userId, -1, templateId);
|
||||
}
|
||||
|
||||
public void clearUserBuyItemCache(Long userId, int goodsType, Long goodsId) {
|
||||
redisTemplate.delete(String.format(ORDER_USER_TYPE_BUY_ITEM_CACHE_KEY, userId, goodsType, goodsId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user