|  |  | 
 |  |  | 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; | 
 |  |  | 
 |  |  |                             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); | 
 |  |  | 
 |  |  |     @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()); | 
 |  |  |         } | 
 |  |  | 
 |  |  |          * rechargeTime     充值时间 | 
 |  |  |          */ | 
 |  |  |         Long cardId = 0L; | 
 |  |  |         String cardNum = po.getCardNum(); | 
 |  |  |         Long cardNum = po.getCardNum(); | 
 |  |  |         String clientNum = ""; | 
 |  |  |         //Long clientId = po.getClientId(); | 
 |  |  |         Long clientId = 0L; | 
 |  |  | 
 |  |  |          */ | 
 |  |  |         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); | 
 |  |  | 
 |  |  |         if(rec_history == 0) { | 
 |  |  |             return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL_WRITE_RECHARGE_HISTORY_ERROR.getMessage()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return BaseResponseUtils.buildSuccess(true) ; | 
 |  |  |         Map returnMap = new HashMap(); | 
 |  |  |         returnMap.put("orderNumber",rec+"");//返回充值ID | 
 |  |  |         return BaseResponseUtils.buildSuccess(returnMap) ; | 
 |  |  |     } | 
 |  |  | } |