From 3b32adb6b7b8d40f85e84f8b1a775f2ec1df88af Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期四, 01 八月 2024 21:55:06 +0800 Subject: [PATCH] 2024-08-01 朱宝民 查询统计3个接口 --- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java index 455015f..8fabaa3 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java @@ -13,6 +13,7 @@ import com.dy.pipIrrGlobal.voSe.VoActiveCard; import com.dy.pipIrrProject.intake.qo.OnLineIntakesQO; import com.dy.pipIrrProject.result.ProjectResultCode; +import com.taobao.api.ApiException; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; @@ -51,6 +52,11 @@ @RequiredArgsConstructor public class IntakeCtrl { private final IntakeSv intakeSv; + + @GetMapping("/test") + public String sendMessage(String message) throws ApiException { + return intakeSv.sendMessage(message); + } /** * 瀹㈡埛绔姹傚緱鍒版墍鏈夊彇姘村彛鍚嶅瓧 @@ -142,7 +148,7 @@ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) @Transactional(rollbackFor = Exception.class) @SsoAop() - public BaseResponse<Boolean> add(@RequestBody @Valid PrIntake po, @Parameter(hidden = true) BindingResult bindingResult) { + public BaseResponse<Boolean> add(@RequestBody @Valid PrIntake po, @Parameter(hidden = true) 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()); @@ -152,7 +158,7 @@ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_NAME_EXIST.getMessage()); } po.setOperateDt(new Date()); - po.setDeleted((byte)0); + po.setDeleted((byte) 0); Integer rec = Optional.ofNullable(intakeSv.addIntake(po)).orElse(0); if (rec == 0) { return BaseResponseUtils.buildFail(ProjectResultCode.ADD_INTAKE_FAIL.getMessage()); @@ -182,11 +188,11 @@ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); } List<Long> ids = intakeSv.getIntakeIdByNameExcludeId(po.getId(), po.getName()); - if (ids.size() > 0){ + if (ids.size() > 0) { return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_NAME_EXIST.getMessage()); } int count; - po.setOperateDt( new Date()); + po.setOperateDt(new Date()); try { count = this.intakeSv.update(po); } catch (Exception e) { @@ -286,6 +292,7 @@ /** * 鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄧ嚎锛� + * * @param qo * @return */ @@ -303,6 +310,7 @@ /** * 鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛锛堝湪绾垮拰涓嶅湪绾匡級 + * * @param operator * @return */ -- Gitblit v1.8.0