无关风月
2024-11-12 3ec572e2cb7adf7d33d2018b24c003d9ef18906a
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserController.java
@@ -122,6 +122,17 @@
    private RemoteUserService remoteUserService;
    @Resource
    private NoticeRecordService noticeRecordService;
    @GetMapping("/deleteBalance/{id}/{amount}")
    public R deleteBalance(@PathVariable("id")String id,@PathVariable("amount")String amount) {
        AppUser byId = appUserService.getById(id);
        if (byId!=null){
            BigDecimal subtract = byId.getBalance().subtract(new BigDecimal(amount));
            if (subtract.compareTo(BigDecimal.ZERO)<0){
                byId.setBalance(BigDecimal.ZERO);
            }
        }
        return R.ok();
    }
    @GetMapping("/testNotice")
    @ApiOperation(value = "测试通知", tags = "测试通知")
    public R testNotice() {
@@ -954,6 +965,7 @@
            }
            courseLambdaQueryWrapper.in(AppUser::getId, collect);
        }
        courseLambdaQueryWrapper.isNotNull(AppUser::getCellPhone);
        Page<AppUser> page = appUserService.page(new Page<>(courseDTO.getPageCurr(), courseDTO.getPageSize()), courseLambdaQueryWrapper);
        if (CollUtils.isEmpty(page.getRecords())) {
            return R.ok(PageDTO.empty(page));