会员积分代码提交

This commit is contained in:
Tankaikai
2025-03-05 17:14:36 +08:00
parent e5d6bd058d
commit a0bc070395
4 changed files with 26 additions and 35 deletions

View File

@@ -87,8 +87,8 @@ public class MemberPointsController {
*/
@PostMapping("payedDeductPoints")
public CzgResult<Boolean> deductPoints(@RequestBody PayedDeductPointsParam param) {
boolean ret = memberPointsService.deductPoints(param.getUserId(), param.getPoints(), param.getContent(), param.getOrderId());
return CzgResult.success(ret);
//boolean ret = memberPointsService.deductPoints(param.getUserId(), param.getPoints(), param.getContent(), param.getOrderId());
return CzgResult.success();
}
/**
@@ -96,7 +96,7 @@ public class MemberPointsController {
*/
@PostMapping("consumeAwardPoints")
public CzgResult<Void> consumeAwardPoints(@RequestBody ConsumeAwardPointsParam param) {
memberPointsService.consumeAwardPoints(param.getUserId(), param.getOrderId());
//memberPointsService.consumeAwardPoints(param.getUserId(), param.getOrderId());
return CzgResult.success();
}

View File

@@ -79,9 +79,10 @@ public class UMemberPointsController {
/**
* 003-根据积分计算可抵扣金额
* @param userId 用户id
* @param orderAmount 订单金额
* @param points 使用积分
*
* @param userId 用户id
* @param orderAmount 订单金额
* @param points 使用积分
*/
@GetMapping("calcDeductionAmount")
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam Long userId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
@@ -94,8 +95,8 @@ public class UMemberPointsController {
*/
@PostMapping("payedDeductPoints")
public CzgResult<Boolean> deductPoints(@RequestBody PayedDeductPointsParam param) {
boolean ret = memberPointsService.deductPoints(param.getUserId(), param.getPoints(), param.getContent(), param.getOrderId());
return CzgResult.success(ret);
//boolean ret = memberPointsService.deductPoints(param.getUserId(), param.getPoints(), param.getContent(), param.getOrderId());
return CzgResult.success();
}
/**
@@ -103,7 +104,7 @@ public class UMemberPointsController {
*/
@PostMapping("consumeAwardPoints")
public CzgResult<Void> consumeAwardPoints(@RequestBody ConsumeAwardPointsParam param) {
memberPointsService.consumeAwardPoints(param.getUserId(), param.getOrderId());
//memberPointsService.consumeAwardPoints(param.getUserId(), param.getOrderId());
return CzgResult.success();
}
}