From f4e7f658fa5260b93740d26ba813c2f30d0961a1 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期四, 08 八月 2024 14:57:05 +0800
Subject: [PATCH] 指定时间段内挂失总数量(物理卡) 指定时间段内充值总数量(物理卡)
---
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 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 6d73906..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,15 +148,17 @@
@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());
}
-
- Date operateTime = new Date();
- po.setOperateDt(operateTime);
- po.setDeleted((byte)0);
+ List<Long> ids = intakeSv.getIntakeIdsByName(po.getName());
+ if (ids.size() > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_NAME_EXIST.getMessage());
+ }
+ po.setOperateDt(new Date());
+ po.setDeleted((byte) 0);
Integer rec = Optional.ofNullable(intakeSv.addIntake(po)).orElse(0);
if (rec == 0) {
return BaseResponseUtils.buildFail(ProjectResultCode.ADD_INTAKE_FAIL.getMessage());
@@ -179,13 +187,16 @@
if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
+ List<Long> ids = intakeSv.getIntakeIdByNameExcludeId(po.getId(), po.getName());
+ if (ids.size() > 0) {
+ return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_NAME_EXIST.getMessage());
+ }
int count;
- Date operateTime = new Date();
- po.setOperateDt(operateTime);
+ po.setOperateDt(new Date());
try {
count = this.intakeSv.update(po);
} catch (Exception e) {
- log.error("淇濆瓨鍒嗘按鍙e紓甯�", e);
+ log.error("淇濆瓨鍙栨按鍙e紓甯�", e);
return BaseResponseUtils.buildException(e.getMessage());
}
if (count <= 0) {
@@ -281,6 +292,7 @@
/**
* 鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄧ嚎锛�
+ *
* @param qo
* @return
*/
@@ -298,6 +310,7 @@
/**
* 鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛锛堝湪绾垮拰涓嶅湪绾匡級
+ *
* @param operator
* @return
*/
--
Gitblit v1.8.0