|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | @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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|