From 10a0b0ca34824307aa7d23b0ad6679b36bd57842 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期二, 10 六月 2025 19:59:49 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java | 143 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 136 insertions(+), 7 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java
index 1c6cc15..4cbafbc 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/java/com/dy/pipIrrTerminal/card/CardCtrl.java
@@ -3,14 +3,13 @@
import com.dy.common.aop.SsoAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
-import com.dy.pipIrrGlobal.voSe.VoTermRecharge;
-import com.dy.pipIrrTerminal.card.dto.ActiveCard;
-import io.swagger.v3.oas.annotations.tags.Tag;
+import com.dy.pipIrrGlobal.voSe.VoTermActiveCard;
+import com.dy.pipIrrGlobal.voSe.VoTermCommon;
+import com.dy.pipIrrTerminal.card.dto.*;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -34,10 +33,15 @@
public class CardCtrl {
private final CardSv cardSv;
- @PostMapping(path = "activeTermCard", consumes = MediaType.APPLICATION_JSON_VALUE)
- @Transactional(rollbackFor = Exception.class)
+ /**
+ * 寮�鍗★紙鍚厖鍊硷級
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "termActiveCard", consumes = MediaType.APPLICATION_JSON_VALUE)
@SsoAop()
- public BaseResponse<VoTermRecharge> activeTermCard(@RequestBody @Valid ActiveCard po, BindingResult bindingResult) {
+ public BaseResponse<VoTermActiveCard> termActiveCard(@RequestBody @Valid ActiveCard po, BindingResult bindingResult) {
if (bindingResult != null && bindingResult.hasErrors()) {
return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
@@ -49,4 +53,129 @@
return BaseResponseUtils.buildSuccess(map_result.get("content")) ;
}
+
+ /**
+ * 鍏呭��
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "termRecharge", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<VoTermCommon> termRecharge(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Map map_result = cardSv.addRecharge(po, null);
+ 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
+ * @return
+ */
+ @PostMapping(path = "termReportLoss", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> termReportLoss(@RequestBody @Valid DtoLoss po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Map map_result = cardSv.reportLoss(po);
+ if(map_result.get("success").equals(false)) {
+ return BaseResponseUtils.buildErrorMsg(map_result.get("msg").toString());
+ }
+ return BaseResponseUtils.buildSuccess(map_result.get("content")) ;
+
+ }
+
+ /**
+ * 瑙i攣
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "termUnlock", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> termUnlock(@RequestBody @Valid DtoUnlock po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Map map_result = cardSv.unlock(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
+ * @return
+ */
+ @PostMapping(path = "termReissue", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<VoTermCommon> termReissue(@RequestBody @Valid DtoReissue po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Map map_result = cardSv.reissue(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
+ * @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
+ * @return
+ */
+ @PostMapping(path = "termCallBack", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @SsoAop()
+ public BaseResponse<Boolean> termCallBack(@RequestBody @Valid DtoCallBack po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+
+ Map map_result = cardSv.callBack(po);
+ if(map_result.get("success").equals(false)) {
+ return BaseResponseUtils.buildErrorMsg(map_result.get("msg").toString());
+ }
+ return BaseResponseUtils.buildSuccess(map_result.get("content")) ;
+ }
}
--
Gitblit v1.8.0