From 5320225880ad8446100c04a897a9208b03790c55 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期五, 02 二月 2024 21:00:13 +0800 Subject: [PATCH] 2024-02-02 朱宝民 重构IC卡操作表,调整补扣接口及充值记录查询接口,重构开卡明细记录查询接口 --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 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 a9242eb..51956dd 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) + @GetMapping(path = "/getUnlocks") @SsoAop() - public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(@RequestBody @Parameter(description = "鏌ヨform琛ㄥ崟json鏁版嵁", required = true) QueryVo vo){ + public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(QueryVo vo){ try { QueryResultVo<List<VoUnlock>> res = unlockSv.getUnlocks(vo); return BaseResponseUtils.buildSuccess(res); @@ -78,7 +77,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 DtoUnlock po, @Parameter(hidden = true) BindingResult bindingResult){ + 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,8 +85,8 @@ /** * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛屼慨鏀瑰啘鎴峰崱浣跨敤锛� + * clientId 鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛� * cardNum 姘村崱鍦板潃 - * clientNum 鍐滄埛缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardNum鍙嶆煡锛屾坊鍔犺В閿佷娇鐢級 * money 浣欓 * remarks 澶囨敞 * operator 鎿嶄綔浜虹紪鍙� @@ -95,7 +94,7 @@ */ Long cardId = 0L; String cardNum = po.getCardNum(); - String clientNum = ""; + 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