| | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrGlobal.voSe.VoTermActiveCard; |
| | | import com.dy.pipIrrGlobal.voSe.VoTermRecharge; |
| | | import com.dy.pipIrrGlobal.voSe.VoTermCommon; |
| | | import com.dy.pipIrrTerminal.card.dto.*; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | */ |
| | | @PostMapping(path = "termRecharge", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<VoTermRecharge> termRecharge(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult) { |
| | | public BaseResponse<VoTermCommon> termRecharge(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(path = "termReissue", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<VoTermRecharge> termReissue(@RequestBody @Valid DtoReissue po, BindingResult bindingResult) { |
| | | public BaseResponse<VoTermCommon> termReissue(@RequestBody @Valid DtoReissue po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 销卡 |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @PostMapping(path = "termCancel", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<VoTermCommon> termCancel(@RequestBody @Valid DtoCancel po, BindingResult bindingResult) { |
| | | if (bindingResult != null && bindingResult.hasErrors()) { |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | Map map_result = cardSv.cancel(po); |
| | | if(map_result.get("success").equals(false)) { |
| | | return BaseResponseUtils.buildErrorMsg(map_result.get("msg").toString()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(map_result.get("content")) ; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 操作执行回调 |
| | | * @param po |
| | | * @param bindingResult |