会员积分问题修复

This commit is contained in:
Tankaikai 2025-03-17 17:00:21 +08:00
parent 7a5882ed38
commit da21bf5e8f
2 changed files with 7 additions and 7 deletions

View File

@ -43,7 +43,7 @@ public class MemberPointsController {
* 001-会员积分账户信息
*/
@GetMapping("userPoints")
public CzgResult<MemberPoints> getMemberPoints(@RequestParam Long shopUserId) {
public CzgResult<MemberPoints> getMemberPoints(@RequestParam("userId") 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 Long shopUserId, @RequestParam BigDecimal orderAmount) {
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam("userId") 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 Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
public CzgResult<Integer> calcUsedPoints(@RequestParam("userId") 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 Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
BigDecimal deductionAmount = memberPointsService.calcDeductionAmount(shopUserId, orderAmount, points);
return CzgResult.success(deductionAmount);
}

View File

@ -59,7 +59,7 @@ public class UMemberPointsController {
* @param orderAmount 订单金额
*/
@GetMapping("calcUsablePoints")
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount) {
public CzgResult<OrderDeductionPointsDTO> getMemberUsablePoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount) {
OrderDeductionPointsDTO usablePoints = memberPointsService.getMemberUsablePoints(shopUserId, orderAmount);
return CzgResult.success(usablePoints);
}
@ -72,7 +72,7 @@ public class UMemberPointsController {
* @param deductionAmount 抵扣金额
*/
@GetMapping("calcUsedPoints")
public CzgResult<Integer> calcUsedPoints(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
public CzgResult<Integer> calcUsedPoints(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam BigDecimal deductionAmount) {
int points = memberPointsService.calcUsedPoints(shopUserId, orderAmount, deductionAmount);
return CzgResult.success(points);
}
@ -85,7 +85,7 @@ public class UMemberPointsController {
* @param points 使用积分
*/
@GetMapping("calcDeductionAmount")
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
public CzgResult<BigDecimal> calcDeductionAmount(@RequestParam("userId") Long shopUserId, @RequestParam BigDecimal orderAmount, @RequestParam Integer points) {
BigDecimal deductionAmount = memberPointsService.calcDeductionAmount(shopUserId, orderAmount, points);
return CzgResult.success(deductionAmount);
}