消费送积分

This commit is contained in:
Tankaikai 2025-03-19 14:35:10 +08:00
parent 10eeb00a0f
commit 0afee43e90
1 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ public class MemberPointsController {
* 001-会员积分账户信息
*/
@GetMapping("userPoints")
public CzgResult<MemberPoints> getMemberPoints(@RequestParam("userId") Long shopUserId) {
public CzgResult<MemberPoints> getMemberPoints(@RequestParam Long shopUserId) {
MemberPoints data = memberPointsService.getMemberPoints(shopUserId);
return CzgResult.success(data);
}
@ -55,7 +55,7 @@ public class MemberPointsController {
* @param orderAmount 订单金额
*/
@GetMapping("calcUsablePoints")
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount) {
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount) {
OrderDeductionPointsDTO usablePoints = memberPointsService.getMemberUsablePoints(shopUserId, orderAmount);
return CzgResult.success(usablePoints);
}
@ -68,7 +68,7 @@ public class MemberPointsController {
* @param deductionAmount 抵扣金额
*/
@GetMapping("calcUsedPoints")
public CzgResult<Integer> calcUsedPoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
public CzgResult<Integer> calcUsedPoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
int points = memberPointsService.calcUsedPoints(shopUserId, orderAmount, deductionAmount);
return CzgResult.success(points);
}
@ -77,7 +77,7 @@ public class MemberPointsController {
* 003-根据积分计算可抵扣金额
*/
@GetMapping("calcDeductionAmount")
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
BigDecimal deductionAmount = memberPointsService.calcDeductionAmount(shopUserId, orderAmount, points);
return CzgResult.success(deductionAmount);
}