From 48d64c07ea643e1b1199828f6ac36c12c05cd535 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期一, 15 一月 2024 22:03:46 +0800 Subject: [PATCH] 2024-01-15 朱宝民 优化获取用户信息接口 --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java index ac8c55a..449dc2d 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java @@ -13,7 +13,6 @@ import com.dy.pipIrrSell.clientCard.LastOperateENUM; import com.dy.pipIrrSell.result.SellResultCode; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -47,9 +46,10 @@ schema = @Schema(implementation = VoRecharge.class))} ) }) - @GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE) + //@GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(path = "/getRecharges") @SsoAop() - public BaseResponse<QueryResultVo<List<VoRecharge>>> get(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){ + public BaseResponse<QueryResultVo<List<VoRecharge>>> get(QueryVo vo){ try { QueryResultVo<List<VoRecharge>> res = rechargeSv.getRecharges(vo); return BaseResponseUtils.buildSuccess(res); @@ -71,7 +71,7 @@ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) @Transactional(rollbackFor = Exception.class) @SsoAop() - public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoRecharge po, @Parameter(hidden = true) BindingResult bindingResult){ + public BaseResponse<Boolean> add(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult){ if(bindingResult != null && bindingResult.hasErrors()){ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); } @@ -131,6 +131,7 @@ */ SeClientCard seClientCard = new SeClientCard(); seClientCard.setId(cardId); + seClientCard.setMoney(afterRecharge); seClientCard.setRechargedt(rechargeTime); seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ()); Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); -- Gitblit v1.8.0