取消退款问题

This commit is contained in:
2025-12-11 17:45:37 +08:00
parent 105e683382
commit 15264625d6
4 changed files with 5 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ public class PointsGoodsRecordController {
*/
@PostMapping("/rejectRefund")
public CzgResult<Boolean> rejectRefund(@RequestBody @Validated PointGoodsRefundDTO param) {
return CzgResult.success(pointsGoodsService.cancelRefund(param, StpKit.USER.getLoginIdAsLong()));
return CzgResult.success(pointsGoodsService.cancelRefund(param, null, StpKit.USER.getShopId()));
}
}

View File

@@ -76,7 +76,7 @@ public class UPointGoodsController {
*/
@PostMapping("/cancelRefund")
public CzgResult<Boolean> cancelRefund(@RequestBody @Validated PointGoodsRefundDTO param) {
return CzgResult.success(pointsGoodsService.cancelRefund(param, StpKit.USER.getLoginIdAsLong()));
return CzgResult.success(pointsGoodsService.cancelRefund(param, StpKit.USER.getLoginIdAsLong(), null));
}
/**

View File

@@ -26,7 +26,7 @@ public interface MkPointsGoodsService extends IService<MkPointsGoods> {
//用户申请退款
boolean applyRefund(PointGoodsRefundDTO param, Long userId);
boolean cancelRefund(PointGoodsRefundDTO param, Long userId);
boolean cancelRefund(PointGoodsRefundDTO param, Long userId, Long shopId);
/**
* 更新商品数量

View File

@@ -125,7 +125,7 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
}
@Override
public boolean cancelRefund(PointGoodsRefundDTO param, Long userId) {
public boolean cancelRefund(PointGoodsRefundDTO param, Long userId, Long shopId) {
MkPointsGoodsRecord record1 = goodsRecordService.getById(param.getRecordId());
if (record1 == null) {
throw new CzgException("取消失败,订单不存在");
@@ -146,6 +146,7 @@ public class MkPointsGoodsServiceImpl extends ServiceImpl<MkPointsGoodsMapper, M
.eq(MkPointsGoodsRecord::getId, param.getRecordId())
.eq(MkPointsGoodsRecord::getOrderNo, param.getOrderNo())
.eq(MkPointsGoodsRecord::getUserId, userId)
.eq(MkPointsGoodsRecord::getShopId, shopId)
);
}