| | |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | |
| | | ExcelUtil.exportExcel(saasClientPayExcel, null, "支付导出", SaasClientPayExcel.class, "saas_client_pay", response); |
| | | return ResultBody.ok().msg("导出成功"); |
| | | } |
| | | /** |
| | | * 获取微信和支付宝的二维码 |
| | | */ |
| | | @ApiOperation(value = "获取微信和支付宝的二维码") |
| | | @PostMapping("/getCode") |
| | | public ResultBody getCode(@Valid @RequestBody SaasClientPay saasClientPay, BindingResult bindingResult, HttpServletRequest request) throws Exception { |
| | | List<String> errMsg= new ArrayList<>(); |
| | | if (bindingResult.hasErrors()) { |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | | errMsg.add(error.getDefaultMessage()); |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } |
| | | return saasClientPayService.getCode(saasClientPay,request); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |