From c7df3e9db6003f90d9dbfb62db3153e2f14306bd Mon Sep 17 00:00:00 2001 From: phpcjl <phpcjl@gmail.com> Date: 星期三, 04 十二月 2024 11:17:50 +0800 Subject: [PATCH] 1.补充文档 --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java | 2 +- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java | 19 ++++++++++++++++++- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java | 16 ++++++++-------- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java | 4 ++-- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java index cb8e4e0..780c330 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java @@ -29,7 +29,7 @@ */ @RestController @RequestMapping("/user-point") -@Api("用户积分") +@Api(tags = "个人积分") public class UserPointController extends BaseController { @Resource private UserPointService userPointService; diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java index 06de246..20578c8 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java @@ -12,11 +12,16 @@ import com.ruoyi.system.api.model.LoginUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; import java.util.List; @Api(tags = "小程序-个人中心-我的钱包") @@ -46,9 +51,21 @@ */ @ApiOperation(value = "变更明细", notes = "变更明细") @GetMapping("change") - public R<List<BalanceChangeRecord>> change() { + public R<List<BalanceChangeRecord>> change(@ApiParam(value = "变更类型", required = false) + @RequestParam(required = false) Integer changeType, + @ApiParam(value = "创建时间", required = false) + @RequestParam(required = false) LocalDate createTime) { Long userId = SecurityUtils.getUserId(); + + LocalDateTime localDateTime = null; + if (createTime != null) { + LocalTime specificTime = LocalTime.of(0, 0); + localDateTime = createTime.atTime(specificTime); + } + return R.ok(balanceChangeRecordService.list(new LambdaQueryWrapper<BalanceChangeRecord>() + .eq(changeType != null, BalanceChangeRecord::getChangeType, changeType) + .eq(createTime != null, BalanceChangeRecord::getCreateTime, localDateTime) .eq(BalanceChangeRecord::getAppUserId, userId))); } diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java index fb1ef6c..f28c7ca 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java @@ -75,12 +75,12 @@ } /** - * 跟新技师预约状态 + * 更新技师预约状态 * * @param status */ @PutMapping("/updateStatus") - @ApiOperation(value = "跟新技师预约状态", notes = "跟新技师预约状态", tags = {"后台-技师预约管理-跟新技师预约状态"}) + @ApiOperation(value = "更新技师预约状态", notes = "更新技师预约状态", tags = {"后台-技师预约管理-更新技师预约状态"}) public R<Void> updateStatus(@ApiParam @RequestParam Integer status, @ApiParam @RequestParam Long subscribeId) { boolean update = technicianSubscribeService.update(new LambdaUpdateWrapper<TechnicianSubscribe>() .eq(TechnicianSubscribe::getId, subscribeId) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java index 4c042e0..710c44d 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java @@ -43,15 +43,15 @@ } @Override - @DistributedLock(lockNamePre = "#technician_subscribe_lock", lockNamePost = "#technicianId") +// @DistributedLock(lockNamePre = "#technician_subscribe_lock", lockNamePost = "#technicianId") public void subscribe(TechnicianSubscribe subscribe, Long technicianId) { - Long count = technicianSubscribeMapper.selectCount(new LambdaQueryWrapper<TechnicianSubscribe>() - .eq(TechnicianSubscribe::getTechnicianId, technicianId) - .eq(TechnicianSubscribe::getSubscribeTime, subscribe.getSubscribeTime()) - .eq(TechnicianSubscribe::getStatus, TechnicianStatus.UNSUBSCRIBE.getCode())); - if (count > 0) { - throw new ServiceException("当前时间段已被预约", TechnicianErrorCode.TECHNICIAN_ALREADY_SUBSCRIBED.getCode()); - } +// Long count = technicianSubscribeMapper.selectCount(new LambdaQueryWrapper<TechnicianSubscribe>() +// .eq(TechnicianSubscribe::getTechnicianId, technicianId) +// .eq(TechnicianSubscribe::getSubscribeTime, subscribe.getSubscribeTime()) +// .eq(TechnicianSubscribe::getStatus, TechnicianStatus.UNSUBSCRIBE.getCode())); +// if (count > 0) { +// throw new ServiceException("当前时间段已被预约", TechnicianErrorCode.TECHNICIAN_ALREADY_SUBSCRIBED.getCode()); +// } // 创建技师预约单 Long userId = SecurityUtils.getUserId(); subscribe.setAppUserId(userId); -- Gitblit v1.7.1