refactor(MemberController.java): 会员ID命名修改

This commit is contained in:
郝先瑞 2022-02-26 23:24:34 +08:00
parent f8aa83539e
commit c290c13a8a

View File

@ -59,10 +59,10 @@ public class MemberController {
@ApiOperation(value = "扣减会员余额")
@PutMapping("/current/balances/_deduct")
public <T> Result<T> deductBalance(@RequestParam Long balances) {
Long userId = MemberUtils.getMemberId();
Long memberId = MemberUtils.getMemberId();
boolean result = memberService.update(new LambdaUpdateWrapper<UmsMember>()
.setSql("balance = balance - " + balances)
.eq(UmsMember::getId, userId)
.eq(UmsMember::getId, memberId)
);
return Result.judge(result);
}