From 06d79b2339046e2028bb32f72b93d729e1130523 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 05 十一月 2024 15:45:13 +0800 Subject: [PATCH] Merge remote-tracking branch 'git-pipIrr/master' --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java index 5af9f24..f035d06 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java @@ -12,7 +12,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; @@ -54,9 +53,9 @@ schema = @Schema(implementation = VoUnlock.class))} ) }) - @GetMapping(path = "/getUnlocks", consumes = MediaType.APPLICATION_JSON_VALUE) - @SsoAop("-1") - public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){ + @GetMapping(path = "/getUnlocks") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(QueryVo vo){ try { QueryResultVo<List<VoUnlock>> res = unlockSv.getUnlocks(vo); return BaseResponseUtils.buildSuccess(res); @@ -77,8 +76,8 @@ }) @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) @Transactional(rollbackFor = Exception.class) - @SsoAop("-1")//@SsoAop(power = "-1") - public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoUnlock po, @Parameter(hidden = true) BindingResult bindingResult){ + @SsoAop() + public BaseResponse<Boolean> add(@RequestBody @Valid DtoUnlock po, BindingResult bindingResult){ DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); if(bindingResult != null && bindingResult.hasErrors()){ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); @@ -86,16 +85,16 @@ /** * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛屼慨鏀瑰啘鎴峰崱浣跨敤锛� + * clientId 鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛� * cardNum 姘村崱鍦板潃 - * clientNum 鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛屾坊鍔犺В閿佷娇鐢級 * money 浣欓 * remarks 澶囨敞 * operator 鎿嶄綔浜虹紪鍙� * unlockTime 瑙i攣鏃堕棿 */ Long cardId = 0L; - String cardNum = po.getCardNum(); - String clientNum = ""; + Long cardNum = po.getCardNum(); + Long clientId = 0L; Float money = po.getMoney(); String remarks = po.getRemarks(); Long operator = po.getOperator(); @@ -109,7 +108,7 @@ return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); } cardId = Long.parseLong(map.get("cardId").toString()); - clientNum = map.get("clientNum").toString(); + clientId = Long.parseLong(map.get("clientId").toString()); /** * 淇敼鍐滄埛鍗′俊鎭細 @@ -119,6 +118,7 @@ SeClientCard seClientCard = new SeClientCard(); seClientCard.setId(cardId); seClientCard.setUnlockdt(unlockTime); + seClientCard.setMoney(money); seClientCard.setLastoper(LastOperateENUM.UNLOCK.getCode()); Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0); if(rec_updateClientCard == 0) { @@ -129,8 +129,10 @@ * 娣诲姞瑙i攣璁板綍 */ SeUnlock seUnlock = new SeUnlock(); - seUnlock.setCardnum(cardNum); - seUnlock.setClientnum(clientNum); + //seUnlock.setCardnum(cardNum); + //seUnlock.setClientnum(clientNum); + seUnlock.setCardid(cardId); + seUnlock.setClientid(clientId); seUnlock.setMoney(money); seUnlock.setRemarks(remarks); seUnlock.setOperator(operator); -- Gitblit v1.8.0