From 6aa342cc662b3bfb81c3f58b6e6890a7c420ac23 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 14 十二月 2023 11:24:00 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeHistory.java | 124 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeLossMapper.xml | 76 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/DtoCancel.java | 64 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardMapper.java | 21
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/DtoUnlock.java | 57 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeHistoryMapper.xml | 186 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockSv.java | 13
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoLoss.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java | 94 ++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/DtoReversal.java | 64 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeMapper.java | 20
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeHistoryMapper.java | 23
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalSv.java | 13
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java | 64 -
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeUnlockMapper.java | 6
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoCancel.java | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeReversalMapper.java | 6
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/DtoActiveCard.java | 10
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java | 45 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/OperateTypeENUM.java | 21
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCard.java | 33
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java | 132 ++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeLoss.java | 55
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReversal.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java | 97 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardMapper.xml | 91 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/CardStateENUM.java | 22
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeUnlockMapper.xml | 70 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeUnlock.java | 44
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCancelMapper.java | 9
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/LastOperateENUM.java | 29
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoUnlock.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java | 97 ++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossSv.java | 14
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeReversal.java | 46
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRecharge.java | 170 +--
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml | 43
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardSv.java | 12
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoActiveCard.java | 2
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeReversalMapper.xml | 70 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelSv.java | 13
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRecharge.java | 2
/dev/null | 33
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeLossMapper.java | 9
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/DtoRecharge.java | 91 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeMapper.xml | 129 +-
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeCancel.java | 48
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/DtoLoss.java | 64 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java | 97 ++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCancelMapper.xml | 86 +
50 files changed, 1,970 insertions(+), 553 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardHistoryMapper.java
deleted file mode 100644
index 5a912ca..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardHistoryMapper.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.dy.pipIrrGlobal.daoSe;
-
-import com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory;
-
-/**
- * @author ZhuBaoMin
- * @date 2023/12/7 9:06
- * @LastEditTime 2023/12/7 9:06
- * @Description
- */
-public interface SeActiveCardHistoryMapper {
- int deleteByPrimaryKey(Long id);
-
- int insert(SeActiveCardHistory record);
-
- int insertSelective(SeActiveCardHistory record);
-
- SeActiveCardHistory selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(SeActiveCardHistory record);
-
- int updateByPrimaryKey(SeActiveCardHistory record);
-}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardMapper.java
index c4d266f..76fe002 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeActiveCardMapper.java
@@ -1,22 +1,19 @@
package com.dy.pipIrrGlobal.daoSe;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoSe.SeActiveCard;
-import com.dy.pipIrrGlobal.pojoSe.VoActiveCard;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import java.util.List;
import java.util.Map;
/**
* @author ZhuBaoMin
- * @date 2023/12/5 17:39
- * @LastEditTime 2023/12/5 17:39
+ * @date 2023/12/8 16:53
+ * @LastEditTime 2023/12/8 16:53
* @Description
*/
-
-@Mapper
-public interface SeActiveCardMapper {
+public interface SeActiveCardMapper extends BaseMapper<SeActiveCard> {
int deleteByPrimaryKey(Long id);
int insert(SeActiveCard record);
@@ -42,12 +39,4 @@
* @return
*/
List<VoActiveCard> getActiveCards(Map<?, ?> params);
-
- /**
- * 鏍规嵁姘村崱缂栧彿鍜屾搷浣滅被鍨嬪垹闄ゆ煇鍗¤ˉ鍗¤褰�
- * @param cardId
- * @param operateType
- * @return
- */
- Integer deleteByIdAndOperateType(@Param("cardId") Long cardId, @Param("operateType") Byte operateType);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCancelMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCancelMapper.java
index a90f3be..b6a0fc8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCancelMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeCancelMapper.java
@@ -1,20 +1,17 @@
package com.dy.pipIrrGlobal.daoSe;
import com.dy.pipIrrGlobal.pojoSe.SeCancel;
-import com.dy.pipIrrGlobal.pojoSe.VoCancel;
-import org.apache.ibatis.annotations.Mapper;
+import com.dy.pipIrrGlobal.voSe.VoCancel;
import java.util.List;
import java.util.Map;
/**
* @author ZhuBaoMin
- * @date 2023/12/6 13:38
- * @LastEditTime 2023/12/6 13:38
+ * @date 2023/12/9 10:14
+ * @LastEditTime 2023/12/9 10:14
* @Description
*/
-
-@Mapper
public interface SeCancelMapper {
int deleteByPrimaryKey(Long id);
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeLossMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeLossMapper.java
index 4e23861..7ea6e04 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeLossMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeLossMapper.java
@@ -1,20 +1,17 @@
package com.dy.pipIrrGlobal.daoSe;
import com.dy.pipIrrGlobal.pojoSe.SeLoss;
-import com.dy.pipIrrGlobal.pojoSe.VoLoss;
-import org.apache.ibatis.annotations.Mapper;
+import com.dy.pipIrrGlobal.voSe.VoLoss;
import java.util.List;
import java.util.Map;
/**
* @author ZhuBaoMin
- * @date 2023/12/6 9:09
- * @LastEditTime 2023/12/6 9:09
+ * @date 2023/12/9 8:55
+ * @LastEditTime 2023/12/9 8:55
* @Description
*/
-
-@Mapper
public interface SeLossMapper {
int deleteByPrimaryKey(Long id);
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeHistoryMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeHistoryMapper.java
new file mode 100644
index 0000000..762650a
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeHistoryMapper.java
@@ -0,0 +1,23 @@
+package com.dy.pipIrrGlobal.daoSe;
+
+import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 15:25
+ * @LastEditTime 2023/12/8 15:25
+ * @Description
+ */
+public interface SeRechargeHistoryMapper {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(SeRechargeHistory record);
+
+ int insertSelective(SeRechargeHistory record);
+
+ SeRechargeHistory selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(SeRechargeHistory record);
+
+ int updateByPrimaryKey(SeRechargeHistory record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeMapper.java
index 44cd6dc..800666b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeRechargeMapper.java
@@ -1,13 +1,18 @@
package com.dy.pipIrrGlobal.daoSe;
import com.dy.pipIrrGlobal.pojoSe.SeRecharge;
-import com.dy.pipIrrGlobal.pojoSe.VoRecharge;
-import org.apache.ibatis.annotations.Mapper;
+import com.dy.pipIrrGlobal.voSe.VoRecharge;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
-@Mapper
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 15:25
+ * @LastEditTime 2023/12/8 15:25
+ * @Description
+ */
public interface SeRechargeMapper {
int deleteByPrimaryKey(Long id);
@@ -15,7 +20,7 @@
int insertSelective(SeRecharge record);
- //SeRecharge selectByPrimaryKey(Long id);
+ SeRecharge selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(SeRecharge record);
@@ -24,4 +29,11 @@
Long getRecordCount(Map<?, ?> params);
List<VoRecharge> getRecharges(Map<?, ?> params);
+
+ /**
+ * 鏍规嵁姘村崱缂栧彿鍒犻櫎鍏呭�艰褰�
+ * @param cardId
+ * @return
+ */
+ Integer deleteByCardId(@Param("cardId") Long cardId);
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeReversalMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeReversalMapper.java
index 23e4db1..6ccbf70 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeReversalMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeReversalMapper.java
@@ -1,15 +1,15 @@
package com.dy.pipIrrGlobal.daoSe;
import com.dy.pipIrrGlobal.pojoSe.SeReversal;
-import com.dy.pipIrrGlobal.pojoSe.VoReversal;
+import com.dy.pipIrrGlobal.voSe.VoReversal;
import java.util.List;
import java.util.Map;
/**
* @author ZhuBaoMin
- * @date 2023/12/6 15:41
- * @LastEditTime 2023/12/6 15:41
+ * @date 2023/12/11 9:17
+ * @LastEditTime 2023/12/11 9:17
* @Description
*/
public interface SeReversalMapper {
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeUnlockMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeUnlockMapper.java
index 6fe1b9a..c011843 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeUnlockMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeUnlockMapper.java
@@ -1,15 +1,15 @@
package com.dy.pipIrrGlobal.daoSe;
import com.dy.pipIrrGlobal.pojoSe.SeUnlock;
-import com.dy.pipIrrGlobal.pojoSe.VoUnlock;
+import com.dy.pipIrrGlobal.voSe.VoUnlock;
import java.util.List;
import java.util.Map;
/**
* @author ZhuBaoMin
- * @date 2023/12/6 14:40
- * @LastEditTime 2023/12/6 14:40
+ * @date 2023/12/11 9:11
+ * @LastEditTime 2023/12/11 9:11
* @Description
*/
public interface SeUnlockMapper {
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCard.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCard.java
index 623b668..3f2e028 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCard.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCard.java
@@ -17,8 +17,8 @@
/**
* @author ZhuBaoMin
- * @date 2023/12/5 17:39
- * @LastEditTime 2023/12/5 17:39
+ * @date 2023/12/8 16:53
+ * @LastEditTime 2023/12/8 16:53
* @Description
*/
@@ -34,22 +34,29 @@
@AllArgsConstructor
@Schema(name = "寮�鍗�/琛ュ崱瀹炰綋")
public class SeActiveCard implements BaseEntity {
- public static final long serialVersionUID = 20231191728001L;
+ public static final long serialVersionUID = 202312071927001L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
@Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "姘村崱缂栧彿涓嶅皬浜巤min}", min = 1)
private Long cardid;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
/**
* 鍗$墖璐圭敤
@@ -81,22 +88,22 @@
private Byte operatetype;
/**
- * 澶囨敞淇℃伅
- */
+ * 澶囨敞淇℃伅
+ */
@Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCardHistory.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCardHistory.java
deleted file mode 100644
index 78e578a..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeActiveCardHistory.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.dy.pipIrrGlobal.pojoSe;
-
-import com.alibaba.fastjson2.annotation.JSONField;
-import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.dy.common.po.BaseEntity;
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.Max;
-import jakarta.validation.constraints.Min;
-import jakarta.validation.constraints.Positive;
-import lombok.*;
-import org.hibernate.validator.constraints.Length;
-
-import java.util.Date;
-
-/**
- * @author ZhuBaoMin
- * @date 2023/12/7 9:06
- * @LastEditTime 2023/12/7 9:06
- * @Description
- */
-
-/**
- * 寮�鍗�/琛ュ崱鍘嗗彶琛�
- */
-
-@TableName(value="se_active_card_history", autoResultMap = true)
-@Data
-@Builder
-@ToString
-@NoArgsConstructor
-@AllArgsConstructor
-@Schema(name = "寮�鍗�/琛ュ崱鍘嗗彶瀹炰綋")
-public class SeActiveCardHistory implements BaseEntity {
- public static final long serialVersionUID = 1L;
-
- /**
- * 涓婚敭
- */
- @JSONField(serializeUsing= ObjectWriterImplToString.class)
- @TableId(type = IdType.INPUT)
- @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- private Long id;
-
- /**
- * 姘村崱缂栧彿
- */
- @Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Length(message = "姘村崱缂栧彿涓嶅皬浜巤min}", min = 1)
- private Long cardid;
-
- /**
- * 鍗$墖璐圭敤
- */
- @Schema(description = "鍗$墖璐圭敤", requiredMode = Schema.RequiredMode.REQUIRED)
- @Length(message = "鍗$墖璐圭敤涓嶅皬浜巤min}瀛�", min = 1)
- private Integer cardcost;
-
- /**
- * 浠樻鏂瑰紡缂栧彿
- */
- @Schema(description = "浠樻鏂瑰紡缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Length(message = "浠樻鏂瑰紡缂栧彿涓嶅ぇ浜巤max}锛屼笉灏忎簬{min}", min = 1, max = 4)
- private Long paymentid;
-
- /**
- * 琛ュ崱閲戦
- */
- @Schema(description = "琛ュ崱閲戦", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Length(message = "琛ュ崱閲戦涓嶅皬浜巤min}", min = 0)
- private Double reissueamount;
-
- /**
- * 鎿嶄綔绫诲瀷;1-寮�鍗★紝2-琛ュ崱
- */
- @Schema(description = "鎿嶄綔绫诲瀷", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Max(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2", value = 2)
- @Min(message = "鎿嶄綔绫诲瀷鍙兘1鎴�2",value = 1)
- private Byte operatetype;
-
- /**
- * 澶囨敞淇℃伅
- */
- @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
- private String remarks;
-
- /**
- * 鎿嶄綔浜虹紪鍙�
- */
- @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
- private Long operator;
-
- /**
- * 鎿嶄綔鏃堕棿
- */
- @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- private Date operatedt;
-}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeCancel.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeCancel.java
index edc7060..3a900b1 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeCancel.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeCancel.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.*;
@@ -14,8 +15,8 @@
/**
* @author ZhuBaoMin
- * @date 2023/12/6 13:38
- * @LastEditTime 2023/12/6 13:38
+ * @date 2023/12/9 10:14
+ * @LastEditTime 2023/12/9 10:14
* @Description
*/
@@ -30,11 +31,11 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "姘村崱娉ㄩ攢瀹炰綋")
-public class SeCancel {
+public class SeCancel implements BaseEntity {
public static final long serialVersionUID = 1L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@@ -42,43 +43,50 @@
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
@Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "姘村崱缂栧彿蹇呴』涓哄ぇ浜�0鐨勬暣鏁�")
private Long cardid;
/**
- * 閫�娆鹃噾棰�
- */
- @Schema(description = "閫�娆鹃噾棰�", requiredMode = Schema.RequiredMode.REQUIRED)
- @Length(message = "閫�娆鹃噾棰濅笉灏忎簬{min}瀛�", min = 1)
- private Double refund;
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
/**
- * 閫�娆炬柟寮�;1-鐜伴噾
- */
+ * 閫�娆鹃噾棰�
+ */
+ @Schema(description = "閫�娆鹃噾棰�", requiredMode = Schema.RequiredMode.REQUIRED)
+ @Length(message = "閫�娆鹃噾棰濅笉灏忎簬{min}瀛�", min = 1)
+ private Float refund;
+
+ /**
+ * 閫�娆炬柟寮�;1-鐜伴噾
+ */
@Schema(description = "閫�娆炬柟寮�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "閫�娆炬柟寮忓繀椤讳负澶т簬0鐨勬暣鏁�")
private Byte refundtype;
/**
- * 澶囨敞淇℃伅
- */
+ * 澶囨敞淇℃伅
+ */
@Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeLoss.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeLoss.java
index 3b2ad09..c5d1a82 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeLoss.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeLoss.java
@@ -1,17 +1,11 @@
package com.dy.pipIrrGlobal.pojoSe;
-/**
- * @author ZhuBaoMin
- * @date 2023/12/6 9:09
- * @LastEditTime 2023/12/6 9:09
- * @Description
- */
-
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.*;
@@ -19,6 +13,12 @@
import java.util.Date;
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/9 8:55
+ * @LastEditTime 2023/12/9 8:55
+ * @Description
+ */
/**
* 姘村崱鎸傚け琛�
@@ -31,11 +31,11 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "鎸傚け瀹炰綋")
-public class SeLoss {
+public class SeLoss implements BaseEntity {
public static final long serialVersionUID = 20231191728001L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@@ -43,43 +43,50 @@
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
@Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "姘村崱缂栧彿涓嶅皬浜巤min}", min = 1)
private Long cardid;
/**
- * 浣欓
- */
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
+
+ /**
+ * 浣欓
+ */
@Schema(description = "浣欓", requiredMode = Schema.RequiredMode.REQUIRED)
@Length(message = "鍗$墖浣欓涓嶅皬浜巤min}", min = 0)
- private Double money;
+ private Float money;
/**
- * 閫�娆鹃噾棰�
- */
+ * 閫�娆鹃噾棰�
+ */
@Schema(description = "閫�娆鹃噾棰�", requiredMode = Schema.RequiredMode.REQUIRED)
@Length(message = "閫�娆鹃噾棰濅笉灏忎簬{min}", min = 0)
- private Double refund;
+ private Float refund;
/**
- * 澶囨敞淇℃伅
- */
+ * 澶囨敞淇℃伅
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRecharge.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRecharge.java
index f204414..f6a5237 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRecharge.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRecharge.java
@@ -1,15 +1,22 @@
package com.dy.pipIrrGlobal.pojoSe;
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
import lombok.*;
+import org.hibernate.validator.constraints.Length;
import java.util.Date;
/**
- * 姘村崱鍏呭�艰〃;
- */
+ * 姘村崱鍏呭�艰〃;
+ */
@TableName(value="se_recharge", autoResultMap = true)
@Data
@@ -23,137 +30,88 @@
public static final long serialVersionUID = 20231191728001L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
+ @Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "姘村崱缂栧彿涓嶅皬浜巤min}", min = 1)
private Long cardid;
/**
- * 鍗$墖浣欓
- */
- private Double money;
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
/**
- * 鍏呭�奸噾棰�
- */
- private Double amount;
+ * 鍗$墖浣欓
+ */
+ @Schema(description = "鍗$墖浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鍗$墖浣欓涓嶈兘涓虹┖")
+ @Length(message = "鍗$墖浣欓涓嶅皬浜巤min}", min = 0)
+ private Float money;
/**
- * 璧犻�侀噾棰�
- */
- private Double gift;
+ * 鍏呭�奸噾棰�
+ */
+ @Schema(description = "鍏呭�奸噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鍏呭�奸噾棰濅笉鑳戒负绌�")
+ @Length(message = "鍏呭�奸噾棰濅笉灏忎簬{min}", min = 0)
+ private Float amount;
/**
- * 鍏呭�煎悗浣欓
- */
- private Double afterrecharge;
+ * 璧犻�侀噾棰�
+ */
+ @Schema(description = "璧犻�侀噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "璧犻�侀噾棰濅笉灏忎簬{min}", min = 0)
+ private Float gift;
/**
- * 浠樻鏂瑰紡缂栧彿
- */
+ * 鍏呭�煎悗浣欓
+ */
+ @Schema(description = "鍏呭�煎悗浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍏呭�煎悗浣欓涓嶅皬浜巤min}", min = 0)
+ private Float afterrecharge;
+
+ /**
+ * 浠樻鏂瑰紡缂栧彿
+ */
+ @Schema(description = "浠樻鏂瑰紡缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "浠樻鏂瑰紡缂栧彿涓嶅ぇ浜巤max}锛屼笉灏忎簬{min}", min = 1, max = 4)
private Long paymentid;
/**
* 姘翠环
*/
+ @Schema(description = "姘翠环", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "姘翠环涓嶅皬浜巤min}", min = 0)
private Float price;
/**
- * 澶囨敞淇℃伅
- */
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public Long getCardid() {
- return cardid;
- }
-
- public void setCardid(Long cardid) {
- this.cardid = cardid;
- }
-
- public Double getMoney() {
- return money;
- }
-
- public void setMoney(Double money) {
- this.money = money;
- }
-
- public Double getAmount() {
- return amount;
- }
-
- public void setAmount(Double amount) {
- this.amount = amount;
- }
-
- public Double getGift() {
- return gift;
- }
-
- public void setGift(Double gift) {
- this.gift = gift;
- }
-
- public Double getAfterrecharge() {
- return afterrecharge;
- }
-
- public void setAfterrecharge(Double afterrecharge) {
- this.afterrecharge = afterrecharge;
- }
-
- public Long getPaymentid() {
- return paymentid;
- }
-
- public void setPaymentid(Long paymentid) {
- this.paymentid = paymentid;
- }
-
- public String getRemarks() {
- return remarks;
- }
-
- public void setRemarks(String remarks) {
- this.remarks = remarks;
- }
-
- public Long getOperator() {
- return operator;
- }
-
- public void setOperator(Long operator) {
- this.operator = operator;
- }
-
- public Date getOperatedt() {
- return operatedt;
- }
-
- public void setOperatedt(Date operatedt) {
- this.operatedt = operatedt;
- }
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeHistory.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeHistory.java
new file mode 100644
index 0000000..680d892
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeRechargeHistory.java
@@ -0,0 +1,124 @@
+package com.dy.pipIrrGlobal.pojoSe;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/7 20:33
+ * @LastEditTime 2023/12/7 20:33
+ * @Description
+ */
+
+/**
+ * 鍏呭�煎巻鍙茶〃
+ */
+
+@TableName(value="se_recharge_history", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "姘村崱鍏呭�煎巻鍙插疄浣�")
+public class SeRechargeHistory implements BaseEntity {
+ public static final long serialVersionUID = 202312080812001L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ @Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long id;
+
+ /**
+ * 姘村崱缂栧彿
+ */
+ @Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "姘村崱缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long cardid;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
+
+ /**
+ * 鍗$墖浣欓
+ */
+ @Schema(description = "鍗$墖浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鍗$墖浣欓涓嶈兘涓虹┖")
+ @Length(message = "鍗$墖浣欓涓嶅皬浜巤min}", min = 0)
+ private Float money;
+
+ /**
+ * 鍏呭�奸噾棰�
+ */
+ @Schema(description = "鍏呭�奸噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotNull(message = "鍏呭�奸噾棰濅笉鑳戒负绌�")
+ @Length(message = "鍏呭�奸噾棰濅笉灏忎簬{min}", min = 0)
+ private Float amount;
+
+ /**
+ * 璧犻�侀噾棰�
+ */
+ @Schema(description = "璧犻�侀噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "璧犻�侀噾棰濅笉灏忎簬{min}", min = 0)
+ private Float gift;
+
+ /**
+ * 鍏呭�煎悗浣欓
+ */
+ @Schema(description = "鍏呭�煎悗浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍏呭�煎悗浣欓涓嶅皬浜巤min}", min = 0)
+ private Float afterrecharge;
+
+ /**
+ * 浠樻鏂瑰紡缂栧彿
+ */
+ @Schema(description = "浠樻鏂瑰紡缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "浠樻鏂瑰紡缂栧彿涓嶅ぇ浜巤max}锛屼笉灏忎簬{min}", min = 1, max = 4)
+ private Long paymentid;
+
+ /**
+ * 姘翠环
+ */
+ @Schema(description = "姘翠环", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "姘翠环涓嶅皬浜巤min}", min = 0)
+ private Float price;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+
+ /**
+ * 鎿嶄綔鏃堕棿
+ */
+ @Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Date operatedt;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeReversal.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeReversal.java
index b13294e..843327c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeReversal.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeReversal.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.*;
@@ -14,8 +15,8 @@
/**
* @author ZhuBaoMin
- * @date 2023/12/6 15:41
- * @LastEditTime 2023/12/6 15:41
+ * @date 2023/12/11 9:17
+ * @LastEditTime 2023/12/11 9:17
* @Description
*/
@@ -30,12 +31,12 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "姘村崱鍐叉瀹炰綋")
-public class SeReversal {
+public class SeReversal implements BaseEntity {
public static final long serialVersionUID = 1L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@@ -43,43 +44,50 @@
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
@Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "姘村崱缂栧彿蹇呴』涓哄ぇ浜�0鐨勬暣鏁�")
private Long cardid;
/**
- * 鍗$墖浣欓
- */
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
+
+ /**
+ * 鍗$墖浣欓
+ */
@Schema(description = "鍗$墖浣欓", requiredMode = Schema.RequiredMode.REQUIRED)
@Length(message = "鍗$墖浣欓涓嶅皬浜巤min}瀛�", min = 1)
- private Double cardbalance;
+ private Float cardbalance;
/**
- * 绯荤粺浣欓
- */
+ * 绯荤粺浣欓
+ */
@Schema(description = "绯荤粺浣欓", requiredMode = Schema.RequiredMode.REQUIRED)
@Length(message = "绯荤粺浣欓涓嶅皬浜巤min}瀛�", min = 1)
- private Double systembalance;
+ private Float systembalance;
/**
- * 澶囨敞淇℃伅
- */
+ * 澶囨敞淇℃伅
+ */
@Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeUnlock.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeUnlock.java
index 3300986..a5c0464 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeUnlock.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeUnlock.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.*;
@@ -14,8 +15,8 @@
/**
* @author ZhuBaoMin
- * @date 2023/12/6 14:40
- * @LastEditTime 2023/12/6 14:40
+ * @date 2023/12/11 9:11
+ * @LastEditTime 2023/12/11 9:11
* @Description
*/
@@ -30,12 +31,12 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "姘村崱瑙i攣瀹炰綋")
-public class SeUnlock {
+public class SeUnlock implements BaseEntity {
public static final long serialVersionUID = 1L;
/**
- * 涓婚敭
- */
+ * 涓婚敭
+ */
@JSONField(serializeUsing= ObjectWriterImplToString.class)
@TableId(type = IdType.INPUT)
@Schema(description = "瀹炰綋id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@@ -43,36 +44,43 @@
private Long id;
/**
- * 姘村崱缂栧彿
- */
+ * 姘村崱缂栧彿
+ */
@Schema(description = "姘村崱缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "姘村崱缂栧彿蹇呴』涓哄ぇ浜�0鐨勬暣鏁�")
private Long cardid;
/**
- * 鍓╀綑閲戦
- */
- @Schema(description = "鍓╀綑閲戦", requiredMode = Schema.RequiredMode.REQUIRED)
- @Length(message = "鍓╀綑閲戦涓嶅皬浜巤min}瀛�", min = 1)
- private Double money;
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Length(message = "鍐滄埛缂栧彿涓嶅皬浜巤min}", min = 1)
+ private Long clientid;
/**
- * 澶囨敞淇℃伅
- */
+ * 鍓╀綑閲戦
+ */
+ @Schema(description = "鍓╀綑閲戦", requiredMode = Schema.RequiredMode.REQUIRED)
+ @Length(message = "鍓╀綑閲戦涓嶅皬浜巤min}瀛�", min = 1)
+ private Float money;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
@Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Length(message = "澶囨敞闀垮害灏忎簬{max}瀛�", min = 1, max = 200)
private String remarks;
/**
- * 鎿嶄綔浜虹紪鍙�
- */
+ * 鎿嶄綔浜虹紪鍙�
+ */
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
private Long operator;
/**
- * 鎿嶄綔鏃堕棿
- */
+ * 鎿嶄綔鏃堕棿
+ */
@Schema(description = "鎿嶄綔鏃堕棿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Date operatedt;
}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoActiveCard.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoActiveCard.java
similarity index 97%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoActiveCard.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoActiveCard.java
index bf8c8a5..cad9d4a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoActiveCard.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoActiveCard.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoCancel.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoCancel.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoCancel.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoCancel.java
index d03d71b..d324c92 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoCancel.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoCancel.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoLoss.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoLoss.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoLoss.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoLoss.java
index 7365c3a..93c2dd0 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoLoss.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoLoss.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.dy.common.po.BaseEntity;
import com.dy.pipIrrGlobal.util.Double2Serializer;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoRecharge.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRecharge.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoRecharge.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRecharge.java
index 5ef33eb..1994e6a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoRecharge.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoRecharge.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoReversal.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReversal.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoReversal.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReversal.java
index 6e7a2cd..af5bc58 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoReversal.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReversal.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoUnlock.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoUnlock.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoUnlock.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoUnlock.java
index f0c6e56..9101f4c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/VoUnlock.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoUnlock.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrGlobal.voSe;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardHistoryMapper.xml
deleted file mode 100644
index 6e7118c..0000000
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardHistoryMapper.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.dy.pipIrrGlobal.daoSe.SeActiveCardHistoryMapper">
- <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory">
- <!--@mbg.generated-->
- <!--@Table se_active_card_history-->
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="cardId" jdbcType="BIGINT" property="cardid" />
- <result column="cardCost" jdbcType="INTEGER" property="cardcost" />
- <result column="paymentId" jdbcType="BIGINT" property="paymentid" />
- <result column="reissueAmount" jdbcType="DOUBLE" property="reissueamount" />
- <result column="operateType" jdbcType="TINYINT" property="operatetype" />
- <result column="remarks" jdbcType="VARCHAR" property="remarks" />
- <result column="operator" jdbcType="BIGINT" property="operator" />
- <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, cardId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`,
- operateDt
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from se_active_card_history
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- <!--@mbg.generated-->
- delete from se_active_card_history
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into se_active_card_history (cardId, cardCost, paymentId,
- reissueAmount, operateType, remarks,
- `operator`, operateDt)
- values (#{cardid,jdbcType=BIGINT}, #{cardcost,jdbcType=INTEGER}, #{paymentid,jdbcType=BIGINT},
- #{reissueamount,jdbcType=DOUBLE}, #{operatetype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
- #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into se_active_card_history
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="cardid != null">
- cardId,
- </if>
- <if test="cardcost != null">
- cardCost,
- </if>
- <if test="paymentid != null">
- paymentId,
- </if>
- <if test="reissueamount != null">
- reissueAmount,
- </if>
- <if test="operatetype != null">
- operateType,
- </if>
- <if test="remarks != null">
- remarks,
- </if>
- <if test="operator != null">
- `operator`,
- </if>
- <if test="operatedt != null">
- operateDt,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="cardid != null">
- #{cardid,jdbcType=BIGINT},
- </if>
- <if test="cardcost != null">
- #{cardcost,jdbcType=INTEGER},
- </if>
- <if test="paymentid != null">
- #{paymentid,jdbcType=BIGINT},
- </if>
- <if test="reissueamount != null">
- #{reissueamount,jdbcType=DOUBLE},
- </if>
- <if test="operatetype != null">
- #{operatetype,jdbcType=TINYINT},
- </if>
- <if test="remarks != null">
- #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="operator != null">
- #{operator,jdbcType=BIGINT},
- </if>
- <if test="operatedt != null">
- #{operatedt,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory">
- <!--@mbg.generated-->
- update se_active_card_history
- <set>
- <if test="cardid != null">
- cardId = #{cardid,jdbcType=BIGINT},
- </if>
- <if test="cardcost != null">
- cardCost = #{cardcost,jdbcType=INTEGER},
- </if>
- <if test="paymentid != null">
- paymentId = #{paymentid,jdbcType=BIGINT},
- </if>
- <if test="reissueamount != null">
- reissueAmount = #{reissueamount,jdbcType=DOUBLE},
- </if>
- <if test="operatetype != null">
- operateType = #{operatetype,jdbcType=TINYINT},
- </if>
- <if test="remarks != null">
- remarks = #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="operator != null">
- `operator` = #{operator,jdbcType=BIGINT},
- </if>
- <if test="operatedt != null">
- operateDt = #{operatedt,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory">
- <!--@mbg.generated-->
- update se_active_card_history
- set cardId = #{cardid,jdbcType=BIGINT},
- cardCost = #{cardcost,jdbcType=INTEGER},
- paymentId = #{paymentid,jdbcType=BIGINT},
- reissueAmount = #{reissueamount,jdbcType=DOUBLE},
- operateType = #{operatetype,jdbcType=TINYINT},
- remarks = #{remarks,jdbcType=VARCHAR},
- `operator` = #{operator,jdbcType=BIGINT},
- operateDt = #{operatedt,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardMapper.xml
index a98cfd4..6ca1504 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeActiveCardMapper.xml
@@ -6,6 +6,7 @@
<!--@Table se_active_card-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="cardCost" jdbcType="INTEGER" property="cardcost" />
<result column="paymentId" jdbcType="BIGINT" property="paymentid" />
<result column="reissueAmount" jdbcType="DOUBLE" property="reissueamount" />
@@ -16,7 +17,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`,
+ id, cardId, clientId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`,
operateDt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -32,26 +33,42 @@
where id = #{id,jdbcType=BIGINT}
</delete>
- <!--鏍规嵁姘村崱缂栧彿鍜屾搷浣滅被鍨嬪垹闄ゆ煇鍗¤ˉ鍗¤褰�-->
- <delete id="deleteByIdAndOperateType">
- DELETE FROM se_active_card WHERE id = ${cardId} AND operateType = ${operateType}
- </delete>
-
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true">
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard">
<!--@mbg.generated-->
- insert into se_active_card (cardId, cardCost, paymentId,
- reissueAmount, operateType, remarks,
- `operator`, operateDt)
- values (#{cardid,jdbcType=BIGINT}, #{cardcost,jdbcType=INTEGER}, #{paymentid,jdbcType=BIGINT},
- #{reissueamount,jdbcType=DOUBLE}, #{operatetype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
- #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP})
+ insert into se_active_card (id, cardId, clientId, cardCost, paymentId, reissueAmount, operateType, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{cardcost,jdbcType=INTEGER},
+ #{paymentid,jdbcType=BIGINT},
+ #{reissueamount,jdbcType=DOUBLE},
+ #{operatetype,jdbcType=TINYINT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_active_card (cardId, clientId, cardCost, -->
+<!-- paymentId, reissueAmount, operateType, -->
+<!-- remarks, `operator`, operateDt-->
+<!-- )-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardcost,jdbcType=INTEGER}, -->
+<!-- #{paymentid,jdbcType=BIGINT}, #{reissueamount,jdbcType=DOUBLE}, #{operatetype,jdbcType=TINYINT}, -->
+<!-- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}-->
+<!-- )-->
+<!-- </insert>-->
+
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeActiveCard" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_active_card
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="cardcost != null">
cardCost,
@@ -78,6 +95,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="cardcost != null">
#{cardcost,jdbcType=INTEGER},
@@ -109,6 +129,9 @@
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
</if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
<if test="cardcost != null">
cardCost = #{cardcost,jdbcType=INTEGER},
</if>
@@ -137,6 +160,7 @@
<!--@mbg.generated-->
update se_active_card
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
cardCost = #{cardcost,jdbcType=INTEGER},
paymentId = #{paymentid,jdbcType=BIGINT},
reissueAmount = #{reissueamount,jdbcType=DOUBLE},
@@ -151,9 +175,9 @@
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT
COUNT(*) AS recordCount
- FROM se_client_card card
- INNER JOIN se_active_card act ON act.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ FROM se_active_card act
+ INNER JOIN ba_client cli ON act.clientId = cli.id
+ INNER JOIN se_client_card card ON act.cardId = card.id
, (SELECT @i:=0) AS itable
<where>
<if test = "operateType != null and operateType > 0">
@@ -173,35 +197,32 @@
</if>
<if test = "activeTimeStart != null and activeTimeStop != null">
- AND card.createDt BETWEEN #{activeTimeStart} AND #{activeTimeStop}
+ AND act.operateDt BETWEEN #{activeTimeStart} AND #{activeTimeStop}
</if>
</where>
</select>
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栧紑鍗¤褰�-->
- <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.pojoSe.VoActiveCard">
+ <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.voSe.VoActiveCard">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- card.state,
- (CASE
- WHEN card.state = 1 THEN
- "姝e父"
- WHEN card.state = 2 THEN
- "宸叉敞閿�"
- ELSE
- "宸叉寕澶�"
- END) AS stateName,
+ (@i:=@i+1) AS id,
+ cli.`name` AS clientName,
+ cli.id AS clientId,
+ card.cardAddr,
+ card.state,
+ (CASE
+ WHEN card.state = 1 THEN "姝e父"
+ WHEN card.state = 2 THEN "宸叉敞閿�"
+ ELSE "宸叉寕澶�"
+ END) AS stateName,
act.reissueAmount,
act.cardCost,
act.paymentId,
(SELECT `name` FROM ba_user WHERE id = act.operator) AS operator,
act.operateDt
- FROM se_client_card card
- INNER JOIN se_active_card act ON act.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ FROM se_active_card act
+ INNER JOIN ba_client cli ON act.clientId = cli.id
+ INNER JOIN se_client_card card ON act.cardId = card.id
, (SELECT @i:=0) AS itable
<where>
<if test = "operateType != null and operateType > 0">
@@ -221,7 +242,7 @@
</if>
<if test = "activeTimeStart != null and activeTimeStop != null">
- AND card.createDt BETWEEN #{activeTimeStart} AND #{activeTimeStop}
+ AND act.operateDt BETWEEN #{activeTimeStart} AND #{activeTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCancelMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCancelMapper.xml
index b551e3d..0aee3e7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCancelMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCancelMapper.xml
@@ -6,6 +6,7 @@
<!--@Table se_cancel-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="refund" jdbcType="FLOAT" property="refund" />
<result column="refundType" jdbcType="TINYINT" property="refundtype" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
@@ -14,7 +15,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, refund, refundType, remarks, `operator`, operateDt
+ id, cardId, clientId, refund, refundType, remarks, `operator`, operateDt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -28,21 +29,40 @@
delete from se_cancel
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true">
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel">
<!--@mbg.generated-->
- insert into se_cancel (cardId, refund, refundType,
- remarks, `operator`, operateDt
- )
- values (#{cardid,jdbcType=BIGINT}, #{refund,jdbcType=FLOAT}, #{refundtype,jdbcType=TINYINT},
- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}
- )
+ insert into se_cancel (id, cardId, clientId, refund, refundType, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{refund,jdbcType=FLOAT},
+ #{refundtype,jdbcType=TINYINT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_cancel (cardId, clientId, refund, -->
+<!-- refundType, remarks, `operator`, -->
+<!-- operateDt)-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{refund,jdbcType=FLOAT}, -->
+<!-- #{refundtype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, -->
+<!-- #{operatedt,jdbcType=TIMESTAMP})-->
+<!-- </insert>-->
+
+
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_cancel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="refund != null">
refund,
@@ -63,6 +83,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="refund != null">
#{refund,jdbcType=FLOAT},
@@ -88,6 +111,9 @@
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
</if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
<if test="refund != null">
refund = #{refund,jdbcType=FLOAT},
</if>
@@ -110,6 +136,7 @@
<!--@mbg.generated-->
update se_cancel
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
refund = #{refund,jdbcType=FLOAT},
refundType = #{refundtype,jdbcType=TINYINT},
remarks = #{remarks,jdbcType=VARCHAR},
@@ -122,9 +149,9 @@
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT
COUNT(*) AS recordCount
- FROM se_client_card card
- INNER JOIN se_cancel cancel ON cancel.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ FROM se_cancel can
+ INNER JOIN se_client_card card ON can.cardId = card.id
+ INNER JOIN ba_client cli ON can.clientId = cli.id
, (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
@@ -136,30 +163,29 @@
</if>
<if test = "cancelTimeStart != null and cancelTimeStop != null">
- AND card.cancelDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop}
+ AND can.operateDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop}
</if>
</where>
</select>
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栨敞閿�璁板綍-->
- <select id="getCancels" resultType="com.dy.pipIrrGlobal.pojoSe.VoCancel">
+ <select id="getCancels" resultType="com.dy.pipIrrGlobal.voSe.VoCancel">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- cancel.refund,
- (CASE
- WHEN cancel.refundType = 1 THEN
- "鐜伴噾"
- END) AS refundTypeName,
- cancel.refundType,
- (SELECT `name` FROM ba_user WHERE id = cancel.operator) AS operator,
- cancel.operateDt
- FROM se_client_card card
- INNER JOIN se_cancel cancel ON cancel.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
- , (SELECT @i:=0) AS itable
+ (@i:=@i+1) AS id,
+ cli.`name` AS clientName,
+ cli.id AS clientId,
+ card.cardAddr,
+ can.refund,
+ (CASE
+ WHEN can.refundType = 1 THEN "鐜伴噾"
+ END) AS refundTypeName,
+ can.refundType,
+ (SELECT `name` FROM ba_user WHERE id = can.operator) AS operator,
+ can.operateDt
+ FROM se_cancel can
+ INNER JOIN se_client_card card ON can.cardId = card.id
+ INNER JOIN ba_client cli ON can.clientId = cli.id
+ , (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
AND cli.name like CONCAT('%',#{clientName},'%')
@@ -170,7 +196,7 @@
</if>
<if test = "cancelTimeStart != null and cancelTimeStop != null">
- AND card.cancelDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop}
+ AND can.operateDt BETWEEN #{cancelTimeStart} AND #{cancelTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
index 7b03575..8acacf5 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
@@ -43,19 +43,40 @@
SELECT id AS cardId FROM se_client_card WHERE cardAddr = #{cardAddr}
</select>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard">
<!--@mbg.generated-->
- insert into se_client_card (cardAddr, clientId, money,
- `state`, createDt, replaceDt,
- rechargeDt, lossDtDt, cancelDt,
- unlockDt, reversalDt, consumeDt,
- lastOper, remarks)
- values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT},
- #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP},
- #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP},
- #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP},
- #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR})
+ insert into se_client_card (id, cardAddr, clientId, money, `state`, createDt, replaceDt, rechargeDt, lossDtDt, cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks)
+ values (#{id,jdbcType=BIGINT},
+ #{cardaddr,jdbcType=VARCHAR},
+ #{clientid,jdbcType=BIGINT},
+ #{money,jdbcType=FLOAT},
+ #{state,jdbcType=TINYINT},
+ #{createdt,jdbcType=TIMESTAMP},
+ #{replacedt,jdbcType=TIMESTAMP},
+ #{rechargedt,jdbcType=TIMESTAMP},
+ #{lossdtdt,jdbcType=TIMESTAMP},
+ #{canceldt,jdbcType=TIMESTAMP},
+ #{unlockdt,jdbcType=TIMESTAMP},
+ #{reversaldt,jdbcType=TIMESTAMP},
+ #{consumedt,jdbcType=TIMESTAMP},
+ #{lastoper,jdbcType=TINYINT},
+ #{remarks,jdbcType=VARCHAR})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_client_card (cardAddr, clientId, money, -->
+<!-- `state`, createDt, replaceDt, -->
+<!-- rechargeDt, lossDtDt, cancelDt, -->
+<!-- unlockDt, reversalDt, consumeDt, -->
+<!-- lastOper, remarks)-->
+<!-- values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, -->
+<!-- #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP}, -->
+<!-- #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP}, -->
+<!-- #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP}, -->
+<!-- #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR})-->
+<!-- </insert>-->
+
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_client_card
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeLossMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeLossMapper.xml
index e1465ce..c52b5ea 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeLossMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeLossMapper.xml
@@ -6,6 +6,7 @@
<!--@Table se_loss-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="money" jdbcType="FLOAT" property="money" />
<result column="refund" jdbcType="FLOAT" property="refund" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
@@ -14,7 +15,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, money, refund, remarks, `operator`, operateDt
+ id, cardId, clientId, money, refund, remarks, `operator`, operateDt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -28,21 +29,39 @@
delete from se_loss
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true">
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss">
<!--@mbg.generated-->
- insert into se_loss (cardId, money, refund,
- remarks, `operator`, operateDt
- )
- values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{refund,jdbcType=FLOAT},
- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}
- )
+ insert into se_loss (id, cardId, clientId, money, refund, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{money,jdbcType=FLOAT},
+ #{refund,jdbcType=FLOAT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_loss (cardId, clientId, money, -->
+<!-- refund, remarks, `operator`, -->
+<!-- operateDt)-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, -->
+<!-- #{refund,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, -->
+<!-- #{operatedt,jdbcType=TIMESTAMP})-->
+<!-- </insert>-->
+
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_loss
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="money != null">
money,
@@ -63,6 +82,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="money != null">
#{money,jdbcType=FLOAT},
@@ -88,6 +110,9 @@
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
</if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
<if test="money != null">
money = #{money,jdbcType=FLOAT},
</if>
@@ -110,6 +135,7 @@
<!--@mbg.generated-->
update se_loss
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
money = #{money,jdbcType=FLOAT},
refund = #{refund,jdbcType=FLOAT},
remarks = #{remarks,jdbcType=VARCHAR},
@@ -122,9 +148,9 @@
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT
COUNT(*) AS recordCount
- FROM se_client_card card
- INNER JOIN se_loss loss ON loss.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ FROM se_loss loss
+ INNER JOIN se_client_card card ON loss.cardId = card.id
+ INNER JOIN ba_client cli ON loss.clientId = cli.id
, (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
@@ -136,25 +162,25 @@
</if>
<if test = "lossTimeStart != null and lossTimeStop != null">
- AND card.lossDtDt BETWEEN #{lossTimeStart} AND #{lossTimeStop}
+ AND loss.operateDt BETWEEN #{lossTimeStart} AND #{lossTimeStop}
</if>
</where>
</select>
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栨寕澶辫褰�-->
- <select id="getLosses" resultType="com.dy.pipIrrGlobal.pojoSe.VoLoss">
+ <select id="getLosses" resultType="com.dy.pipIrrGlobal.voSe.VoLoss">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- loss.money,
- (SELECT `name` FROM ba_user WHERE id = loss.operator) AS operator,
- loss.operateDt
- FROM se_client_card card
- INNER JOIN se_loss loss ON loss.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
- , (SELECT @i:=0) AS itable
+ (@i:=@i+1) AS id,
+ cli.`name` AS clientName,
+ cli.id AS clientId,
+ card.cardAddr,
+ loss.money,
+ (SELECT `name` FROM ba_user WHERE id = loss.operator) AS operator,
+ loss.operateDt
+ FROM se_loss loss
+ INNER JOIN se_client_card card ON loss.cardId = card.id
+ INNER JOIN ba_client cli ON loss.clientId = cli.id
+ , (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
AND cli.name like CONCAT('%',#{clientName},'%')
@@ -165,7 +191,7 @@
</if>
<if test = "lossTimeStart != null and lossTimeStop != null">
- AND card.lossDtDt BETWEEN #{lossTimeStart} AND #{lossTimeStop}
+ AND loss.operateDt BETWEEN #{lossTimeStart} AND #{lossTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeHistoryMapper.xml
new file mode 100644
index 0000000..6ef17f6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeHistoryMapper.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dy.pipIrrGlobal.daoSe.SeRechargeHistoryMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory">
+ <!--@mbg.generated-->
+ <!--@Table se_recharge_history-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
+ <result column="money" jdbcType="FLOAT" property="money" />
+ <result column="amount" jdbcType="FLOAT" property="amount" />
+ <result column="gift" jdbcType="FLOAT" property="gift" />
+ <result column="afterRecharge" jdbcType="FLOAT" property="afterrecharge" />
+ <result column="paymentId" jdbcType="BIGINT" property="paymentid" />
+ <result column="price" jdbcType="FLOAT" property="price" />
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks,
+ `operator`, operateDt
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from se_recharge_history
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from se_recharge_history
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+
+
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory" useGeneratedKeys="true">
+ <!--@mbg.generated-->
+ insert into se_recharge_history (id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{money,jdbcType=FLOAT},
+ #{amount,jdbcType=FLOAT},
+ #{gift,jdbcType=FLOAT},
+ #{afterrecharge,jdbcType=FLOAT},
+ #{paymentid,jdbcType=BIGINT},
+ #{price,jdbcType=FLOAT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
+ </insert>
+
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory" useGeneratedKeys="true">
+ <!--@mbg.generated-->
+ insert into se_recharge_history
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="cardid != null">
+ cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
+ </if>
+ <if test="money != null">
+ money,
+ </if>
+ <if test="amount != null">
+ amount,
+ </if>
+ <if test="gift != null">
+ gift,
+ </if>
+ <if test="afterrecharge != null">
+ afterRecharge,
+ </if>
+ <if test="paymentid != null">
+ paymentId,
+ </if>
+ <if test="price != null">
+ price,
+ </if>
+ <if test="remarks != null">
+ remarks,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operatedt != null">
+ operateDt,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="cardid != null">
+ #{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
+ </if>
+ <if test="money != null">
+ #{money,jdbcType=FLOAT},
+ </if>
+ <if test="amount != null">
+ #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="gift != null">
+ #{gift,jdbcType=FLOAT},
+ </if>
+ <if test="afterrecharge != null">
+ #{afterrecharge,jdbcType=FLOAT},
+ </if>
+ <if test="paymentid != null">
+ #{paymentid,jdbcType=BIGINT},
+ </if>
+ <if test="price != null">
+ #{price,jdbcType=FLOAT},
+ </if>
+ <if test="remarks != null">
+ #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory">
+ <!--@mbg.generated-->
+ update se_recharge_history
+ <set>
+ <if test="cardid != null">
+ cardId = #{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
+ <if test="money != null">
+ money = #{money,jdbcType=FLOAT},
+ </if>
+ <if test="amount != null">
+ amount = #{amount,jdbcType=FLOAT},
+ </if>
+ <if test="gift != null">
+ gift = #{gift,jdbcType=FLOAT},
+ </if>
+ <if test="afterrecharge != null">
+ afterRecharge = #{afterrecharge,jdbcType=FLOAT},
+ </if>
+ <if test="paymentid != null">
+ paymentId = #{paymentid,jdbcType=BIGINT},
+ </if>
+ <if test="price != null">
+ price = #{price,jdbcType=FLOAT},
+ </if>
+ <if test="remarks != null">
+ remarks = #{remarks,jdbcType=VARCHAR},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operatedt != null">
+ operateDt = #{operatedt,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory">
+ <!--@mbg.generated-->
+ update se_recharge_history
+ set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
+ money = #{money,jdbcType=FLOAT},
+ amount = #{amount,jdbcType=FLOAT},
+ gift = #{gift,jdbcType=FLOAT},
+ afterRecharge = #{afterrecharge,jdbcType=FLOAT},
+ paymentId = #{paymentid,jdbcType=BIGINT},
+ price = #{price,jdbcType=FLOAT},
+ remarks = #{remarks,jdbcType=VARCHAR},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operateDt = #{operatedt,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeMapper.xml
index b0bea0e..7ebcb09 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeRechargeMapper.xml
@@ -1,52 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoSe.SeRechargeMapper">
-
<resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeRecharge">
<!--@mbg.generated-->
<!--@Table se_recharge-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="money" jdbcType="FLOAT" property="money" />
<result column="amount" jdbcType="FLOAT" property="amount" />
<result column="gift" jdbcType="FLOAT" property="gift" />
<result column="afterRecharge" jdbcType="FLOAT" property="afterrecharge" />
<result column="paymentId" jdbcType="BIGINT" property="paymentid" />
+ <result column="price" jdbcType="FLOAT" property="price" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" />
</resultMap>
-
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, money, amount, gift, afterRecharge, paymentId, remarks, `operator`, operateDt
+ id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks,
+ `operator`, operateDt
</sql>
-
-<!-- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">-->
-<!-- <!–@mbg.generated–>-->
-<!-- select -->
-<!-- <include refid="Base_Column_List" />-->
-<!-- from se_recharge-->
-<!-- where id = #{id,jdbcType=BIGINT}-->
-<!-- </select>-->
-
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from se_recharge
+ where id = #{id,jdbcType=BIGINT}
+ </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from se_recharge
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true">
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge">
<!--@mbg.generated-->
- insert into se_recharge (cardId, money, amount,
- gift, afterRecharge, paymentId,
- remarks, `operator`, operateDt
- )
- values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{amount,jdbcType=FLOAT},
- #{gift,jdbcType=FLOAT}, #{afterrecharge,jdbcType=FLOAT}, #{paymentid,jdbcType=BIGINT},
- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}
- )
+ insert into se_recharge (id, cardId, clientId, money, amount, gift, afterRecharge, paymentId, price, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{money,jdbcType=FLOAT},
+ #{amount,jdbcType=FLOAT},
+ #{gift,jdbcType=FLOAT},
+ #{afterrecharge,jdbcType=FLOAT},
+ #{paymentid,jdbcType=BIGINT},
+ #{price,jdbcType=FLOAT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_recharge (cardId, clientId, money, -->
+<!-- amount, gift, afterRecharge, -->
+<!-- paymentId, price, remarks, -->
+<!-- `operator`, operateDt)-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, -->
+<!-- #{amount,jdbcType=FLOAT}, #{gift,jdbcType=FLOAT}, #{afterrecharge,jdbcType=FLOAT}, -->
+<!-- #{paymentid,jdbcType=BIGINT}, #{price,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, -->
+<!-- #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP})-->
+<!-- </insert>-->
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge" useGeneratedKeys="true">
<!--@mbg.generated-->
@@ -54,6 +70,9 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="money != null">
money,
@@ -70,6 +89,9 @@
<if test="paymentid != null">
paymentId,
</if>
+ <if test="price != null">
+ price,
+ </if>
<if test="remarks != null">
remarks,
</if>
@@ -83,6 +105,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="money != null">
#{money,jdbcType=FLOAT},
@@ -99,6 +124,9 @@
<if test="paymentid != null">
#{paymentid,jdbcType=BIGINT},
</if>
+ <if test="price != null">
+ #{price,jdbcType=FLOAT},
+ </if>
<if test="remarks != null">
#{remarks,jdbcType=VARCHAR},
</if>
@@ -110,13 +138,15 @@
</if>
</trim>
</insert>
-
<update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge">
<!--@mbg.generated-->
update se_recharge
<set>
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
</if>
<if test="money != null">
money = #{money,jdbcType=FLOAT},
@@ -133,6 +163,9 @@
<if test="paymentid != null">
paymentId = #{paymentid,jdbcType=BIGINT},
</if>
+ <if test="price != null">
+ price = #{price,jdbcType=FLOAT},
+ </if>
<if test="remarks != null">
remarks = #{remarks,jdbcType=VARCHAR},
</if>
@@ -145,29 +178,36 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
-
<update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeRecharge">
<!--@mbg.generated-->
update se_recharge
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
money = #{money,jdbcType=FLOAT},
amount = #{amount,jdbcType=FLOAT},
gift = #{gift,jdbcType=FLOAT},
afterRecharge = #{afterrecharge,jdbcType=FLOAT},
paymentId = #{paymentid,jdbcType=BIGINT},
+ price = #{price,jdbcType=FLOAT},
remarks = #{remarks,jdbcType=VARCHAR},
`operator` = #{operator,jdbcType=BIGINT},
operateDt = #{operatedt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
+ <!--鏍规嵁姘村崱缂栧彿鍒犻櫎鍏呭�艰褰�-->
+ <delete id="deleteByCardId" parameterType="java.lang.Long">
+ DELETE FROM se_recharge WHERE cardId = ${cardId}
+ </delete>
+ <!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栧厖鍊艰褰�-->
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
select
- COUNT(*) AS recordCount
- FROM se_client_card card
- INNER JOIN se_recharge rec ON card.id = rec.cardId
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ COUNT(*) AS recordCount
+ FROM se_recharge_history rec
+ INNER JOIN se_client_card card ON rec.cardId = card.id
+ INNER JOIN ba_client cli ON rec.clientId = cli.id
+ , (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
AND cli.name like CONCAT('%',#{clientName},'%')
@@ -182,27 +222,28 @@
</if>
<if test = "rechargeTimeStart != null and rechargeTimeStop != null">
- AND card.rechargeDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop}
+ AND rec.operateDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop}
</if>
</where>
</select>
- <!--鏍规嵁鍒跺畾鐨勬潯浠惰幏鍙栧厖鍊艰褰�-->
- <select id="getRecharges" resultType="com.dy.pipIrrGlobal.pojoSe.VoRecharge">
+ <!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栧厖鍊艰褰�-->
+ <select id="getRecharges" resultType="com.dy.pipIrrGlobal.voSe.VoRecharge">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- rec.amount,
- rec.afterRecharge,
- rec.paymentId,
- rec.price,
- (SELECT `name` FROM ba_user WHERE id = rec.operator) AS operator, rec.operateDt
- FROM se_client_card card
- INNER JOIN se_recharge rec ON card.id = rec.cardId
- INNER JOIN ba_client cli ON card.clientId = cli.id
- , (SELECT @i:=0) AS itable
+ (@i:=@i+1) AS id,
+ cli.name AS clientName,
+ rec.clientId,
+ card.cardAddr,
+ rec.amount,
+ rec.afterRecharge,
+ rec.paymentId,
+ rec.price,
+ (SELECT `name` FROM ba_user WHERE id = rec.operator) AS operator,
+ rec.operateDt
+ FROM se_recharge_history rec
+ INNER JOIN se_client_card card ON rec.cardId = card.id
+ INNER JOIN ba_client cli ON rec.clientId = cli.id
+ , (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
AND cli.name like CONCAT('%',#{clientName},'%')
@@ -217,7 +258,7 @@
</if>
<if test = "rechargeTimeStart != null and rechargeTimeStop != null">
- AND card.rechargeDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop}
+ AND rec.operateDt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeReversalMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeReversalMapper.xml
index 7323638..0f5d2e2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeReversalMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeReversalMapper.xml
@@ -6,6 +6,7 @@
<!--@Table se_reversal-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="cardBalance" jdbcType="FLOAT" property="cardbalance" />
<result column="systemBalance" jdbcType="FLOAT" property="systembalance" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
@@ -14,7 +15,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, cardBalance, systemBalance, remarks, `operator`, operateDt
+ id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -28,21 +29,39 @@
delete from se_reversal
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true">
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal">
<!--@mbg.generated-->
- insert into se_reversal (cardId, cardBalance, systemBalance,
- remarks, `operator`, operateDt
- )
- values (#{cardid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, #{systembalance,jdbcType=FLOAT},
- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}
- )
+ insert into se_reversal (id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{cardbalance,jdbcType=FLOAT},
+ #{systembalance,jdbcType=FLOAT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_reversal (cardId, clientId, cardBalance, -->
+<!-- systemBalance, remarks, `operator`, -->
+<!-- operateDt)-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, -->
+<!-- #{systembalance,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, -->
+<!-- #{operatedt,jdbcType=TIMESTAMP})-->
+<!-- </insert>-->
+
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_reversal
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="cardbalance != null">
cardBalance,
@@ -63,6 +82,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="cardbalance != null">
#{cardbalance,jdbcType=FLOAT},
@@ -88,6 +110,9 @@
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
</if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
<if test="cardbalance != null">
cardBalance = #{cardbalance,jdbcType=FLOAT},
</if>
@@ -110,6 +135,7 @@
<!--@mbg.generated-->
update se_reversal
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
cardBalance = #{cardbalance,jdbcType=FLOAT},
systemBalance = #{systembalance,jdbcType=FLOAT},
remarks = #{remarks,jdbcType=VARCHAR},
@@ -121,7 +147,7 @@
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栧啿姝h褰曟暟-->
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT
- COUNT(*) AS recordCount
+ COUNT(*) AS recordCount
FROM se_client_card card
INNER JOIN se_reversal rev ON rev.cardId = card.id
INNER JOIN ba_client cli ON card.clientId = cli.id
@@ -142,19 +168,19 @@
</select>
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栧啿姝h褰�-->
- <select id="getReversals" resultType="com.dy.pipIrrGlobal.pojoSe.VoReversal">
+ <select id="getReversals" resultType="com.dy.pipIrrGlobal.voSe.VoReversal">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- rev.cardBalance,
- (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator,
- rev.operateDt
- FROM se_client_card card
- INNER JOIN se_reversal rev ON rev.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
- , (SELECT @i:=0) AS itable
+ (@i:=@i+1) AS id,
+ cli.`name` AS clientName,
+ cli.id AS clientId,
+ card.cardAddr,
+ rev.cardBalance,
+ (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator,
+ rev.operateDt
+ FROM se_reversal rev
+ INNER JOIN se_client_card card ON rev.cardId = card.id
+ INNER JOIN ba_client cli ON rev.clientId = cli.id
+ , (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
AND cli.name like CONCAT('%',#{clientName},'%')
@@ -165,7 +191,7 @@
</if>
<if test = "reversalTimeStart != null and reversalTimeStop != null">
- AND card.unlockDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop}
+ AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeUnlockMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeUnlockMapper.xml
index 39f5d36..0642219 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeUnlockMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeUnlockMapper.xml
@@ -6,6 +6,7 @@
<!--@Table se_unlock-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cardId" jdbcType="BIGINT" property="cardid" />
+ <result column="clientId" jdbcType="BIGINT" property="clientid" />
<result column="money" jdbcType="FLOAT" property="money" />
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
<result column="operator" jdbcType="BIGINT" property="operator" />
@@ -13,7 +14,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardId, money, remarks, `operator`, operateDt
+ id, cardId, clientId, money, remarks, `operator`, operateDt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -27,19 +28,37 @@
delete from se_unlock
where id = #{id,jdbcType=BIGINT}
</delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true">
+
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock">
<!--@mbg.generated-->
- insert into se_unlock (cardId, money, remarks,
- `operator`, operateDt)
- values (#{cardid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR},
- #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP})
+ insert into se_unlock (id, cardId, clientId, money, remarks, `operator`, operateDt)
+ values (#{id,jdbcType=BIGINT},
+ #{cardid,jdbcType=BIGINT},
+ #{clientid,jdbcType=BIGINT},
+ #{money,jdbcType=FLOAT},
+ #{remarks,jdbcType=VARCHAR},
+ #{operator,jdbcType=BIGINT},
+ #{operatedt,jdbcType=TIMESTAMP})
</insert>
+
+<!-- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true">-->
+<!-- <!–@mbg.generated–>-->
+<!-- insert into se_unlock (cardId, clientId, money, -->
+<!-- remarks, `operator`, operateDt-->
+<!-- )-->
+<!-- values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, -->
+<!-- #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}-->
+<!-- )-->
+<!-- </insert>-->
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into se_unlock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cardid != null">
cardId,
+ </if>
+ <if test="clientid != null">
+ clientId,
</if>
<if test="money != null">
money,
@@ -57,6 +76,9 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cardid != null">
#{cardid,jdbcType=BIGINT},
+ </if>
+ <if test="clientid != null">
+ #{clientid,jdbcType=BIGINT},
</if>
<if test="money != null">
#{money,jdbcType=FLOAT},
@@ -79,6 +101,9 @@
<if test="cardid != null">
cardId = #{cardid,jdbcType=BIGINT},
</if>
+ <if test="clientid != null">
+ clientId = #{clientid,jdbcType=BIGINT},
+ </if>
<if test="money != null">
money = #{money,jdbcType=FLOAT},
</if>
@@ -98,6 +123,7 @@
<!--@mbg.generated-->
update se_unlock
set cardId = #{cardid,jdbcType=BIGINT},
+ clientId = #{clientid,jdbcType=BIGINT},
money = #{money,jdbcType=FLOAT},
remarks = #{remarks,jdbcType=VARCHAR},
`operator` = #{operator,jdbcType=BIGINT},
@@ -109,9 +135,9 @@
<select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
SELECT
COUNT(*) AS recordCount
- FROM se_client_card card
- INNER JOIN se_unlock unl ON unl.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ FROM se_unlock unl
+ INNER JOIN se_client_card card ON unl.cardId = card.id
+ INNER JOIN ba_client cli ON unl.clientId = cli.id
, (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
@@ -123,24 +149,24 @@
</if>
<if test = "unlocklTimeStart != null and unlockTimeStop != null">
- AND card.unlockDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop}
+ AND unl.operateDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop}
</if>
</where>
</select>
<!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栬В閿佽褰�-->
- <select id="getUnlocks" resultType="com.dy.pipIrrGlobal.pojoSe.VoUnlock">
+ <select id="getUnlocks" resultType="com.dy.pipIrrGlobal.voSe.VoUnlock">
SELECT
- (@i:=@i+1) AS id,
- cli.`name` AS clientName,
- cli.id AS clientId,
- card.cardAddr,
- unl.money,
- (SELECT `name` FROM ba_user WHERE id = unl.operator) AS operator,
- unl.operateDt
- FROM se_client_card card
- INNER JOIN se_unlock unl ON unl.cardId = card.id
- INNER JOIN ba_client cli ON card.clientId = cli.id
+ (@i:=@i+1) AS id,
+ cli.`name` AS clientName,
+ cli.id AS clientId,
+ card.cardAddr,
+ unl.money,
+ (SELECT `name` FROM ba_user WHERE id = unl.operator) AS operator,
+ unl.operateDt
+ FROM se_unlock unl
+ INNER JOIN se_client_card card ON unl.cardId = card.id
+ INNER JOIN ba_client cli ON unl.clientId = cli.id
, (SELECT @i:=0) AS itable
<where>
<if test = "clientName != null and clientName !=''">
@@ -152,7 +178,7 @@
</if>
<if test = "unlocklTimeStart != null and unlockTimeStop != null">
- AND card.unlockDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop}
+ AND unl.operateDt BETWEEN #{unlocklTimeStart} AND #{unlockTimeStop}
</if>
</where>
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
index f7d841d..67fb839 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardCtrl.java
@@ -6,8 +6,10 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoSe.*;
-import com.dy.pipIrrSell.activeCardHistory.ActiveCardHistorySv;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import com.dy.pipIrrSell.clientCard.CardStateENUM;
import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -44,7 +46,6 @@
public class ActiveCardCtrl {
private final ActiveCardSv activeCardSv;
private final ClientCardSv clientCardSv;
- private final ActiveCardHistorySv activeCardHistorySv;
@Operation(summary = "鑾峰緱涓�椤靛紑鍗¤褰�", description = "杩斿洖涓�椤靛紑鍗℃暟鎹�")
@ApiResponses(value = {
@@ -79,7 +80,7 @@
@PostMapping(path = "add_active", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop("-1")//@SsoAop(power = "-1")
- public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PO_ActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add_active(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoActiveCard 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());
@@ -92,6 +93,7 @@
* cardCost 鍗$墖璐圭敤
* reissueAmount 琛ュ崱閲戦锛岃ˉ鍗℃椂浣跨敤
* paymentId 鏀粯鏂瑰紡缂栧彿
+ * remarks 澶囨敞
* operator 鎿嶄綔浜虹紪鍙�
* activeTime 寮�鍗℃椂闂�
*/
@@ -100,6 +102,7 @@
Long clientId = po.getClientId();
Integer cardCost = po.getCardCost();
Long paymentId = po.getPaymentId();
+ String remarks = po.getRemarks();
Long operator = po.getOperator();
Date activeTime = new Date();
//LocalDateTime activeTime = LocalDateTime.parse(dtf.format(LocalDateTime.now()), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
@@ -111,9 +114,9 @@
clientCard.setCardaddr(cardAddr);
clientCard.setClientid(clientId);
clientCard.setMoney(0.0);
- clientCard.setState((byte) 1);
+ clientCard.setState(CardStateENUM.NORMAL.getCode());
clientCard.setCreatedt(activeTime);
- clientCard.setLastoper((byte) 1);
+ clientCard.setLastoper(LastOperateENUM.ACTIVE.getCode());
cardId = Optional.ofNullable(clientCardSv.add(clientCard)).orElse(0L) ;
if(cardId == 0) {
@@ -125,29 +128,16 @@
*/
SeActiveCard activeCard = new SeActiveCard();
activeCard.setCardid(cardId);
+ activeCard.setClientid(clientId);
activeCard.setCardcost(cardCost);
activeCard.setPaymentid(paymentId);
- activeCard.setOperatetype((byte)1);
+ activeCard.setOperatetype(OperateTypeENUM.ACTIVE.getCode());
+ activeCard.setRemarks(remarks);
activeCard.setOperator(operator);
activeCard.setOperatedt(activeTime);
Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L);
if(rec == 0) {
return BaseResponseUtils.buildFail("寮�鍗″け璐�-寮�鍗¤褰曞啓鍏ュ紓甯�");
- }
-
- /**
- * 娣诲姞寮�鍗″巻鍙茶褰�
- */
- SeActiveCardHistory activeCardHistory = new SeActiveCardHistory();
- activeCardHistory.setCardid(cardId);
- activeCardHistory.setCardcost(cardCost);
- activeCardHistory.setPaymentid(paymentId);
- activeCardHistory.setOperatetype((byte)1);
- activeCardHistory.setOperator(operator);
- activeCardHistory.setOperatedt(activeTime);
- Long rec_history = Optional.ofNullable(activeCardHistorySv.add(activeCardHistory)).orElse(0L);
- if(rec_history == 0) {
- return BaseResponseUtils.buildFail("寮�鍗″け璐�-寮�鍗″巻鍙茶褰曞啓鍏ュ紓甯�");
}
return BaseResponseUtils.buildSuccess(true) ;
@@ -165,7 +155,7 @@
@PostMapping(path = "add_reissue", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop("-1")//@SsoAop(power = "-1")
- public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid PO_ActiveCard po, @Parameter(hidden = true) BindingResult bindingResult){
+ public BaseResponse<Boolean> add_reissue(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoActiveCard 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());
@@ -174,17 +164,21 @@
/**
* cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
* cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
* cardCost 鍗$墖璐圭敤
* reissueAmount 琛ュ崱閲戦锛岃ˉ鍗℃椂浣跨敤
* paymentId 鏀粯鏂瑰紡缂栧彿
+ * remarks 澶囨敞
* operator 鎿嶄綔浜虹紪鍙�
* activeTime 琛ュ崱鏃堕棿
*/
Long cardId = 0L;
String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
Integer cardCost = po.getCardCost();
Double reissueAmount = po.getReissueAmount();
Long paymentId = po.getPaymentId();
+ String remarks = po.getRemarks();
Long operator = po.getOperator();
Date activeTime = new Date();
@@ -204,46 +198,28 @@
SeClientCard seClientCard = new SeClientCard();
seClientCard.setId(cardId);
seClientCard.setReplacedt(activeTime);
- seClientCard.setLastoper((byte)2);
+ seClientCard.setLastoper(LastOperateENUM.REPLACE.getCode());
Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
if(rec_updateClientCard == 0) {
return BaseResponseUtils.buildFail("琛ュ崱澶辫触-鍐滄埛鍗′慨鏀瑰紓甯�");
}
/**
- * 鍒犻櫎寮�鍗�/琛ュ崱琛ㄨ鍗$殑琛ュ崱璁板綍
- */
- Integer rec_deleteActiveCard = Optional.ofNullable(activeCardSv.deleteByIdAndOperateType(cardId, (byte)2)).orElse(0);
- /**
* 娣诲姞琛ュ崱璁板綍
*/
SeActiveCard activeCard = new SeActiveCard();
activeCard.setCardid(cardId);
+ activeCard.setClientid(clientId);
activeCard.setCardcost(cardCost);
activeCard.setPaymentid(paymentId);
activeCard.setReissueamount(reissueAmount);
- activeCard.setOperatetype((byte)2);
+ activeCard.setOperatetype(OperateTypeENUM.REPLACE.getCode());
+ activeCard.setRemarks(remarks);
activeCard.setOperator(operator);
activeCard.setOperatedt(activeTime);
Long rec = Optional.ofNullable(activeCardSv.add(activeCard)).orElse(0L);
if(rec == 0) {
return BaseResponseUtils.buildFail("琛ュ崱澶辫触-琛ュ崱璁板綍鍐欏叆寮傚父");
- }
-
- /**
- * 娣诲姞琛ュ崱鍘嗗彶璁板綍
- */
- SeActiveCardHistory activeCardHistory = new SeActiveCardHistory();
- activeCardHistory.setCardid(cardId);
- activeCardHistory.setCardcost(cardCost);
- activeCardHistory.setPaymentid(paymentId);
- activeCard.setReissueamount(reissueAmount);
- activeCardHistory.setOperatetype((byte)2);
- activeCardHistory.setOperator(operator);
- activeCardHistory.setOperatedt(activeTime);
- Long rec_history = Optional.ofNullable(activeCardHistorySv.add(activeCardHistory)).orElse(0L);
- if(rec_history == 0) {
- return BaseResponseUtils.buildFail("琛ュ崱澶辫触-琛ュ崱鍘嗗彶璁板綍鍐欏叆寮傚父");
}
return BaseResponseUtils.buildSuccess(true) ;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardSv.java
index b6e2f3a..c653047 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/ActiveCardSv.java
@@ -3,7 +3,7 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeActiveCardMapper;
import com.dy.pipIrrGlobal.pojoSe.SeActiveCard;
-import com.dy.pipIrrGlobal.pojoSe.VoActiveCard;
+import com.dy.pipIrrGlobal.voSe.VoActiveCard;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,15 +58,5 @@
public Long add(SeActiveCard po) {
seActiveCardMapper.insert(po);
return po.getId();
- }
-
- /**
- * 鏍规嵁姘村崱缂栧彿鍜屾搷浣滅被鍨嬪垹闄ゆ煇鍗¤ˉ鍗¤褰�
- * @param cardId
- * @param operateType
- * @return
- */
- public Integer deleteByIdAndOperateType(Long cardId, Byte operateType) {
- return seActiveCardMapper.deleteByIdAndOperateType(cardId, operateType);
}
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/PO_ActiveCard.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/DtoActiveCard.java
similarity index 88%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/PO_ActiveCard.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/DtoActiveCard.java
index ae73309..75b6535 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/PO_ActiveCard.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/DtoActiveCard.java
@@ -1,4 +1,4 @@
-package com.dy.pipIrrGlobal.pojoSe;
+package com.dy.pipIrrSell.activeCard;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
@@ -17,7 +17,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "寮�鍗�/琛ュ崱浼犲叆瀵硅薄")
-public class PO_ActiveCard {
+public class DtoActiveCard {
public static final long serialVersionUID = 20231191728001L;
/**
@@ -56,6 +56,12 @@
private Long paymentId;
/**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
* 鎿嶄綔浜虹紪鍙�
*/
@Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/OperateTypeENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/OperateTypeENUM.java
new file mode 100644
index 0000000..a4012fb
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCard/OperateTypeENUM.java
@@ -0,0 +1,21 @@
+package com.dy.pipIrrSell.activeCard;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 10:56
+ * @LastEditTime 2023/12/8 10:56
+ * @Description 寮�鍗�/琛ュ崱绫诲瀷鏋氫妇
+ */
+
+@Getter
+@AllArgsConstructor
+public enum OperateTypeENUM {
+ ACTIVE((byte)1, "寮�鍗�"),
+ REPLACE((byte)2, "琛ュ崱");
+
+ private final Byte code;
+ private final String message;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCardHistory/ActiveCardHistorySv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCardHistory/ActiveCardHistorySv.java
deleted file mode 100644
index b45e6c3..0000000
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/activeCardHistory/ActiveCardHistorySv.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.dy.pipIrrSell.activeCardHistory;
-
-import com.dy.pipIrrGlobal.daoSe.SeActiveCardHistoryMapper;
-import com.dy.pipIrrGlobal.pojoSe.SeActiveCardHistory;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * @author ZhuBaoMin
- * @date 2023/12/7 10:35
- * @LastEditTime 2023/12/7 10:35
- * @Description
- */
-
-@Slf4j
-@Service
-public class ActiveCardHistorySv {
- @Autowired
- private SeActiveCardHistoryMapper seActiveCardHistoryMapper;
-
- /**
- * 娣诲姞寮�鍗�/琛ュ崱鍘嗗彶璁板綍
- * @param po
- * @return
- */
- public Long add(SeActiveCardHistory po){
- seActiveCardHistoryMapper.insert(po);
- return po.getId();
- }
-
-
-}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
index 2e31570..7d054f5 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelCtrl.java
@@ -5,7 +5,11 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.VoCancel;
+import com.dy.pipIrrGlobal.pojoSe.SeCancel;
+import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.voSe.VoCancel;
+import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -13,15 +17,19 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
/**
* @author ZhuBaoMin
@@ -37,6 +45,7 @@
@RequiredArgsConstructor
public class CancelCtrl {
private final CancelSv cancelSv;
+ private final ClientCardSv clientCardSv;
@Operation(summary = "鑾峰緱涓�椤垫敞閿�璁板綍", description = "杩斿洖涓�椤垫敞閿�鏁版嵁")
@ApiResponses(value = {
@@ -58,4 +67,82 @@
return BaseResponseUtils.buildException(e.getMessage()) ;
}
}
+
+ @Operation(summary = "娣诲姞娉ㄩ攢璁板綍", description = "娣诲姞娉ㄩ攢璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop("-1")//@SsoAop(power = "-1")
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoCancel 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());
+ }
+
+ /**
+ * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
+ * cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
+ * refund 閫�娆鹃噾棰�
+ * refundType 閫�娆炬柟寮�
+ * remarks 澶囨敞
+ * operator 鎿嶄綔浜虹紪鍙�
+ * cancelTime 鎸傚け鏃堕棿
+ */
+ Long cardId = 0L;
+ String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
+ Float refund = po.getRefund();
+ Byte refundType = po.getRefundType();
+ String remarks = po.getRemarks();
+ Long operator = po.getOperator();
+ Date cancelTime = new Date();
+
+ /**
+ * 渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級
+ */
+ cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L);
+ if(cardId == 0) {
+ return BaseResponseUtils.buildFail("鍗″彿閿欒锛岃鍗′笉瀛樺湪");
+ }
+
+ /**
+ * 淇敼鍐滄埛鍗′俊鎭細
+ * 鎸傚け鏃堕棿
+ * 鏈�鍚庢搷浣滅被鍨�-4
+ */
+ SeClientCard seClientCard = new SeClientCard();
+ seClientCard.setId(cardId);
+ seClientCard.setCanceldt(cancelTime);
+ seClientCard.setLastoper(LastOperateENUM.CANCEL.getCode());
+ Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
+ if(rec_updateClientCard == 0) {
+ return BaseResponseUtils.buildFail("娉ㄩ攢澶辫触-鍐滄埛鍗℃敞閿�寮傚父");
+ }
+
+ /**
+ * 娣诲姞鎸傚け璁板綍
+ */
+ SeCancel seCancel = new SeCancel();
+ seCancel.setCardid(cardId);
+ seCancel.setClientid(clientId);
+ seCancel.setRefund(refund);
+ seCancel.setRefundtype(refundType);
+ seCancel.setRemarks(remarks);
+ seCancel.setOperator(operator);
+ seCancel.setOperatedt(cancelTime);
+ Long rec = Optional.ofNullable(cancelSv.add(seCancel)).orElse(0L);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("娉ㄩ攢澶辫触-娉ㄩ攢璁板綍鍐欏叆寮傚父");
+ }
+
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelSv.java
index 77b580d..e7474bf 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/CancelSv.java
@@ -2,7 +2,8 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeCancelMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoCancel;
+import com.dy.pipIrrGlobal.pojoSe.SeCancel;
+import com.dy.pipIrrGlobal.voSe.VoCancel;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,4 +54,14 @@
rsVo.obj = seCancelMapper.getCancels(params);
return rsVo ;
}
+
+ /**
+ * 娣诲姞娉ㄩ攢璁板綍
+ * @param po
+ * @return
+ */
+ public Long add(SeCancel po) {
+ seCancelMapper.insert(po);
+ return po.getId();
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/DtoCancel.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/DtoCancel.java
new file mode 100644
index 0000000..5b6a43e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cancel/DtoCancel.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrSell.cancel;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/9 10:28
+ * @LastEditTime 2023/12/9 10:28
+ * @Description
+ */
+
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "娉ㄩ攢浼犲叆瀵硅薄")
+public class DtoCancel {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 姘村崱鍦板潃
+ */
+ @Schema(description = "姘村崱鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long clientId;
+
+ /**
+ * 閫�娆鹃噾棰�
+ */
+ @Schema(description = "閫�娆鹃噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="閫�娆鹃噾棰濅笉鑳藉皬浜�0")
+ private Float refund;
+
+ /**
+ * 閫�娆炬柟寮�;1-鐜伴噾
+ */
+ @Schema(description = "閫�娆炬柟寮�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "閫�娆炬柟寮忓繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Byte refundType;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/CardStateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/CardStateENUM.java
new file mode 100644
index 0000000..09ef48d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/CardStateENUM.java
@@ -0,0 +1,22 @@
+package com.dy.pipIrrSell.clientCard;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 10:50
+ * @LastEditTime 2023/12/8 10:50
+ * @Description 鍐滄埛姘村崱鐘舵�佹灇涓�
+ */
+
+@Getter
+@AllArgsConstructor
+public enum CardStateENUM {
+ NORMAL((byte)1, "姝e父"),
+ CANCELLED((byte)2, "宸叉敞閿�"),
+ LOSS((byte)3, "宸叉寕澶�");
+
+ private final Byte code;
+ private final String message;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/LastOperateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/LastOperateENUM.java
new file mode 100644
index 0000000..46ee9d6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/clientCard/LastOperateENUM.java
@@ -0,0 +1,29 @@
+package com.dy.pipIrrSell.clientCard;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 9:30
+ * @LastEditTime 2023/12/8 9:30
+ * @Description 鍐滄埛姘村崱鏈�鍚庢搷浣滄柟寮忔灇涓�
+ */
+
+@Getter
+@AllArgsConstructor
+public enum LastOperateENUM {
+ ACTIVE((byte)1, "寮�鍗�"),
+ REPLACE((byte)2, "琛ュ崱"),
+ RECHARGE((byte)3, "鍏呭��"),
+ LOSS((byte)4, "鎸傚け"),
+ CANCEL((byte)5, "娉ㄩ攢"),
+ UNLOCK((byte)6, "瑙i攣"),
+ REVERSAL((byte)7, "鍐叉"),
+ CONSUME((byte)8, "娑堣垂");
+
+ private final Byte code;
+ private final String message;
+
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/DtoLoss.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/DtoLoss.java
new file mode 100644
index 0000000..576af15
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/DtoLoss.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrSell.loss;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/9 9:03
+ * @LastEditTime 2023/12/9 9:03
+ * @Description
+ */
+
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鎸傚け浼犲叆瀵硅薄")
+public class DtoLoss {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 姘村崱鍦板潃
+ */
+ @Schema(description = "姘村崱鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long clientId;
+
+ /**
+ * 浣欓
+ */
+ @Schema(description = "浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="浣欓涓嶈兘灏忎簬0")
+ private Float money;
+
+ /**
+ * 閫�娆鹃噾棰�
+ */
+ @Schema(description = "閫�娆鹃噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="閫�娆鹃噾棰濅笉鑳藉皬浜�0")
+ private Float refund;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
index 2c0cfcc..300456f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossCtrl.java
@@ -5,7 +5,11 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.VoLoss;
+import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.pojoSe.SeLoss;
+import com.dy.pipIrrGlobal.voSe.VoLoss;
+import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -13,15 +17,19 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
/**
* @author ZhuBaoMin
@@ -37,6 +45,7 @@
@RequiredArgsConstructor
public class LossCtrl {
private final LossSv lossSv;
+ private final ClientCardSv clientCardSv;
@Operation(summary = "鑾峰緱涓�椤垫寕澶辫褰�", description = "杩斿洖涓�椤垫寕澶辨暟鎹�")
@ApiResponses(value = {
@@ -58,4 +67,82 @@
return BaseResponseUtils.buildException(e.getMessage()) ;
}
}
+
+ @Operation(summary = "娣诲姞鎸傚け璁板綍", description = "娣诲姞鎸傚け璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop("-1")//@SsoAop(power = "-1")
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoLoss 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());
+ }
+
+ /**
+ * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
+ * cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
+ * money 浣欓
+ * refund 閫�娆鹃噾棰�
+ * remarks 澶囨敞
+ * operator 鎿嶄綔浜虹紪鍙�
+ * lossTime 鎸傚け鏃堕棿
+ */
+ Long cardId = 0L;
+ String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
+ Float money = po.getMoney();
+ Float refund = po.getRefund();
+ String remarks = po.getRemarks();
+ Long operator = po.getOperator();
+ Date lossTime = new Date();
+
+ /**
+ * 渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級
+ */
+ cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L);
+ if(cardId == 0) {
+ return BaseResponseUtils.buildFail("鍗″彿閿欒锛岃鍗′笉瀛樺湪");
+ }
+
+ /**
+ * 淇敼鍐滄埛鍗′俊鎭細
+ * 鎸傚け鏃堕棿
+ * 鏈�鍚庢搷浣滅被鍨�-4
+ */
+ SeClientCard seClientCard = new SeClientCard();
+ seClientCard.setId(cardId);
+ seClientCard.setLossdtdt(lossTime);
+ seClientCard.setLastoper(LastOperateENUM.LOSS.getCode());
+ Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
+ if(rec_updateClientCard == 0) {
+ return BaseResponseUtils.buildFail("鎸傚け澶辫触-鍐滄埛鍗℃寕澶卞紓甯�");
+ }
+
+ /**
+ * 娣诲姞鎸傚け璁板綍
+ */
+ SeLoss seLoss = new SeLoss();
+ seLoss.setCardid(cardId);
+ seLoss.setClientid(clientId);
+ seLoss.setMoney(money);
+ seLoss.setRefund(refund);
+ seLoss.setRemarks(remarks);
+ seLoss.setOperator(operator);
+ seLoss.setOperatedt(lossTime);
+ Long rec = Optional.ofNullable(lossSv.add(seLoss)).orElse(0L);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("鎸傚け澶辫触-鎸傚け璁板綍鍐欏叆寮傚父");
+ }
+
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossSv.java
index ea00e34..4d0f386 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/loss/LossSv.java
@@ -2,7 +2,8 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeLossMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoLoss;
+import com.dy.pipIrrGlobal.pojoSe.SeLoss;
+import com.dy.pipIrrGlobal.voSe.VoLoss;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,4 +54,15 @@
rsVo.obj = seLossMapper.getLosses(params);
return rsVo ;
}
+
+ /**
+ * 娣诲姞鎸傚け璁板綍
+ * @param po
+ * @return
+ */
+ public Long add(SeLoss po) {
+ seLossMapper.insert(po);
+ return po.getId();
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/DtoRecharge.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/DtoRecharge.java
new file mode 100644
index 0000000..fc37f9e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/DtoRecharge.java
@@ -0,0 +1,91 @@
+package com.dy.pipIrrSell.recharge;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/8 8:57
+ * @LastEditTime 2023/12/8 8:57
+ * @Description
+ */
+
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍏呭�间紶鍏ュ璞�")
+public class DtoRecharge {
+ public static final long serialVersionUID = 20231191728001L;
+
+ /**
+ * 姘村崱鍦板潃
+ */
+ @Schema(description = "姘村崱鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long clientId;
+
+ /**
+ * 鍗$墖浣欓
+ */
+ @Schema(description = "鍗$墖浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="鍗$墖浣欓涓嶈兘灏忎簬0")
+ private Float money;
+
+ /**
+ * 鍏呭�奸噾棰�
+ */
+ @Schema(description = "鍏呭�奸噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="鍏呭�奸噾棰濅笉鑳藉皬浜�0")
+ private Float amount;
+
+ /**
+ * 璧犻�侀噾棰�
+ */
+ @Schema(description = "璧犻�侀噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="璧犻�侀噾棰濅笉鑳藉皬浜�0")
+ private Float gift;
+
+ /**
+ * 鍏呭�煎悗浣欓
+ */
+ @Schema(description = "鍏呭�煎悗浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="鍏呭�煎悗浣欓涓嶈兘灏忎簬0")
+ private Float afterRecharge;
+
+ /**
+ * 浠樻鏂瑰紡缂栧彿
+ */
+ @Schema(description = "浠樻鏂瑰紡缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long paymentId;
+
+ /**
+ * 姘翠环
+ */
+ @Schema(description = "姘翠环", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="姘翠环涓嶈兘灏忎簬0")
+ private Float price;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
index d4b5e3a..321d450 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeCtrl.java
@@ -5,7 +5,10 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.VoRecharge;
+import com.dy.pipIrrGlobal.pojoSe.*;
+import com.dy.pipIrrGlobal.voSe.VoRecharge;
+import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -13,15 +16,19 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
@Slf4j
@Tag(name = "鍏呭�肩鐞�", description = "鍏呭�兼搷浣�")
@@ -30,6 +37,7 @@
@RequiredArgsConstructor
public class RechargeCtrl {
private final RechargeSv rechargeSv;
+ private final ClientCardSv clientCardSv;
@Operation(summary = "鑾峰緱涓�椤靛厖鍊艰褰�", description = "杩斿洖涓�椤靛厖鍊兼暟鎹�")
@ApiResponses(value = {
@@ -52,4 +60,118 @@
}
}
+ @Operation(summary = "鍏呭��", description = "鍏呭��")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop("-1")//@SsoAop(power = "-1")
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoRecharge 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());
+ }
+
+ /**
+ * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
+ * cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
+ * money 鍗$墖浣欓
+ * amount 鍏呭�奸噾棰�
+ * gift 璧犻�侀噾棰�
+ * afterRecharge 鍏呭�煎悗浣欓
+ * paymentId 鏀粯鏂瑰紡缂栧彿
+ * price 姘翠环
+ * remarks 澶囨敞
+ * operator 鎿嶄綔浜虹紪鍙�
+ * rechargeTime 鍏呭�兼椂闂�
+ */
+ Long cardId = 0L;
+ String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
+ Float money = po.getMoney();
+ Float amount = po.getAmount();
+ Float gift = po.getGift();
+ Float afterRecharge = po.getAfterRecharge();
+ Long paymentId = po.getPaymentId();
+ Float price = po.getPrice();
+ String remarks = po.getRemarks();
+ Long operator = po.getOperator();
+ Date rechargeTime = new Date();
+
+ /**
+ * 渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級
+ */
+ cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L);
+ if(cardId == 0) {
+ return BaseResponseUtils.buildFail("鍗″彿閿欒锛岃鍗′笉瀛樺湪");
+ }
+
+ /**
+ * 淇敼鍐滄埛鍗′俊鎭細
+ * 琛ュ崱鏃堕棿
+ * 鏈�鍚庢搷浣滅被鍨�-2
+ */
+ SeClientCard seClientCard = new SeClientCard();
+ seClientCard.setId(cardId);
+ seClientCard.setRechargedt(rechargeTime);
+ seClientCard.setLastoper(LastOperateENUM.RECHARGE.getCode ());
+ Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
+ if(rec_updateClientCard == 0) {
+ return BaseResponseUtils.buildFail("鍏呭�煎け璐�-鍐滄埛鍗′慨鏀瑰紓甯�");
+ }
+
+ /**
+ * 鍒犻櫎鍏呭�艰〃璇ュ崱鐨勫厖鍊艰褰�
+ */
+ Integer rec_deleteRecharge = Optional.ofNullable(rechargeSv.deleteByCardId(cardId)).orElse(0);
+ /**
+ * 娣诲姞鍏呭�艰褰�
+ */
+ SeRecharge seRecharge = new SeRecharge();
+ seRecharge.setCardid(cardId);
+ seRecharge.setClientid(clientId);
+ seRecharge.setMoney(money);
+ seRecharge.setAmount(amount);
+ seRecharge.setGift(gift);
+ seRecharge.setAfterrecharge(afterRecharge);
+ seRecharge.setPaymentid(paymentId);
+ seRecharge.setPrice(price);
+ seRecharge.setRemarks(remarks);
+ seRecharge.setOperator(operator);
+ seRecharge.setOperatedt(rechargeTime);
+ Long rec = Optional.ofNullable(rechargeSv.add(seRecharge)).orElse(0L);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("鍏呭�煎け璐�-鍏呭�艰褰曞啓鍏ュ紓甯�");
+ }
+
+ /**
+ * 娣诲姞琛ュ崱鍘嗗彶璁板綍
+ */
+ SeRechargeHistory seRechargeHistory = new SeRechargeHistory();
+ seRechargeHistory.setCardid(cardId);
+ seRechargeHistory.setClientid(clientId);
+ seRechargeHistory.setMoney(money);
+ seRechargeHistory.setAmount(amount);
+ seRechargeHistory.setGift(gift);
+ seRechargeHistory.setAfterrecharge(afterRecharge);
+ seRechargeHistory.setPaymentid(paymentId);
+ seRechargeHistory.setPrice(price);
+ seRechargeHistory.setRemarks(remarks);
+ seRechargeHistory.setOperator(operator);
+ seRechargeHistory.setOperatedt(rechargeTime);
+
+ Long rec_history = Optional.ofNullable(rechargeSv.addHistory(seRechargeHistory)).orElse(0L);
+ if(rec_history == 0) {
+ return BaseResponseUtils.buildFail("鍏呭�煎け璐�-鍏呭�煎巻鍙茶褰曞啓鍏ュ紓甯�");
+ }
+
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
index a82ee98..9c574cb 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
@@ -1,8 +1,11 @@
package com.dy.pipIrrSell.recharge;
import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoSe.SeRechargeHistoryMapper;
import com.dy.pipIrrGlobal.daoSe.SeRechargeMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoRecharge;
+import com.dy.pipIrrGlobal.pojoSe.SeRecharge;
+import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory;
+import com.dy.pipIrrGlobal.voSe.VoRecharge;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +28,9 @@
public class RechargeSv {
@Autowired
private SeRechargeMapper seRechargeMapper;
+
+ @Autowired
+ private SeRechargeHistoryMapper seRechargeHistoryMapper;
public QueryResultVo<List<VoRecharge>> getRecharges(QueryVo queryVo) {
//瀹屽杽鏌ヨ鍏呭�艰褰曠殑璧锋鏃堕棿
@@ -55,5 +61,42 @@
return rsVo ;
}
+ /**
+ * 鏍规嵁姘村崱缂栧彿锛堜富閿級鍒犻櫎鍏呭�艰褰�
+ * @param cardId
+ * @return
+ */
+ public Integer deleteByPrimaryKey(Long cardId) {
+ return seRechargeMapper.deleteByPrimaryKey(cardId);
+ }
+
+ /**
+ * 娣诲姞鍏呭�艰褰�
+ * @param po
+ * @return
+ */
+ public Long add(SeRecharge po) {
+ seRechargeMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 鏍规嵁姘村崱缂栧彿鍒犻櫎鍏呭�艰褰�
+ * @param cardId
+ * @return
+ */
+ public Integer deleteByCardId(Long cardId) {
+ return seRechargeMapper.deleteByCardId(cardId);
+ }
+
+ /**
+ * 娣诲姞鍏呭�煎巻鍙茶〃
+ * @param po
+ * @return
+ */
+ public Long addHistory(SeRechargeHistory po){
+ seRechargeHistoryMapper.insert(po);
+ return po.getId();
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/DtoReversal.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/DtoReversal.java
new file mode 100644
index 0000000..8c2a766
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/DtoReversal.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrSell.reversal;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/11 9:36
+ * @LastEditTime 2023/12/11 9:36
+ * @Description
+ */
+
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鍐叉浼犲叆瀵硅薄")
+public class DtoReversal {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 姘村崱鍦板潃
+ */
+ @Schema(description = "姘村崱鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long clientId;
+
+ /**
+ * 鍗$墖浣欓
+ */
+ @Schema(description = "鍗$墖浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="鍗$墖浣欓涓嶈兘灏忎簬0")
+ private Float cardBalance;
+
+ /**
+ * 绯荤粺浣欓
+ */
+ @Schema(description = "绯荤粺浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="绯荤粺浣欓涓嶈兘灏忎簬0")
+ private Float systemBalance;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
index 58cccda..4756804 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalCtrl.java
@@ -5,7 +5,11 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.VoReversal;
+import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.pojoSe.SeReversal;
+import com.dy.pipIrrGlobal.voSe.VoReversal;
+import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -13,15 +17,19 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
/**
* @author ZhuBaoMin
@@ -37,6 +45,7 @@
@RequiredArgsConstructor
public class ReversalCtrl {
private final ReversalSv reversalSv;
+ private final ClientCardSv clientCardSv;
@Operation(summary = "鑾峰緱涓�椤靛啿姝h褰�", description = "杩斿洖涓�椤靛啿姝f暟鎹�")
@ApiResponses(value = {
@@ -58,4 +67,82 @@
return BaseResponseUtils.buildException(e.getMessage()) ;
}
}
+
+ @Operation(summary = "娣诲姞鍐叉璁板綍", description = "娣诲姞鍐叉璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop("-1")//@SsoAop(power = "-1")
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoReversal 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());
+ }
+
+ /**
+ * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
+ * cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
+ * cardBalance 鍗$墖浣欓
+ * systemBalance 绯荤粺浣欓
+ * remarks 澶囨敞
+ * operator 鎿嶄綔浜虹紪鍙�
+ * reversalTime 鍐叉
+ */
+ Long cardId = 0L;
+ String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
+ Float cardBalance = po.getCardBalance();
+ Float systemBalance = po.getSystemBalance();
+ String remarks = po.getRemarks();
+ Long operator = po.getOperator();
+ Date reversalTime = new Date();
+
+ /**
+ * 渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級
+ */
+ cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L);
+ if(cardId == 0) {
+ return BaseResponseUtils.buildFail("鍗″彿閿欒锛岃鍗′笉瀛樺湪");
+ }
+
+ /**
+ * 淇敼鍐滄埛鍗′俊鎭細
+ * 鎸傚け鏃堕棿
+ * 鏈�鍚庢搷浣滅被鍨�-4
+ */
+ SeClientCard seClientCard = new SeClientCard();
+ seClientCard.setId(cardId);
+ seClientCard.setReversaldt(reversalTime);
+ seClientCard.setLastoper(LastOperateENUM.REVERSAL.getCode());
+ Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
+ if(rec_updateClientCard == 0) {
+ return BaseResponseUtils.buildFail("鍐叉澶辫触-鍐滄埛鍗″啿姝e紓甯�");
+ }
+
+ /**
+ * 娣诲姞瑙i攣璁板綍
+ */
+ SeReversal reversal = new SeReversal();
+ reversal.setCardid(cardId);
+ reversal.setClientid(clientId);
+ reversal.setCardbalance(cardBalance);
+ reversal.setSystembalance(systemBalance);
+ reversal.setRemarks(remarks);
+ reversal.setOperator(operator);
+ reversal.setOperatedt(reversalTime);
+ Long rec = Optional.ofNullable(reversalSv.add(reversal)).orElse(0L);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("瑙i攣澶辫触-瑙i攣璁板綍鍐欏叆寮傚父");
+ }
+
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalSv.java
index e678c37..42d00be 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/reversal/ReversalSv.java
@@ -2,7 +2,8 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeReversalMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoReversal;
+import com.dy.pipIrrGlobal.pojoSe.SeReversal;
+import com.dy.pipIrrGlobal.voSe.VoReversal;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,4 +54,14 @@
rsVo.obj = seReversalMapper.getReversals(params);
return rsVo ;
}
+
+ /**
+ * 娣诲姞鍐叉璁板綍
+ * @param po
+ * @return
+ */
+ public Long add(SeReversal po) {
+ seReversalMapper.insert(po);
+ return po.getId();
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/DtoUnlock.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/DtoUnlock.java
new file mode 100644
index 0000000..4c311b3
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/DtoUnlock.java
@@ -0,0 +1,57 @@
+package com.dy.pipIrrSell.unlock;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Positive;
+import lombok.*;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2023/12/11 9:34
+ * @LastEditTime 2023/12/11 9:34
+ * @Description
+ */
+
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "瑙i攣浼犲叆瀵硅薄")
+public class DtoUnlock {
+ public static final long serialVersionUID = 1L;
+
+ /**
+ * 姘村崱鍦板潃
+ */
+ @Schema(description = "姘村崱鍦板潃", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @NotBlank
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛缂栧彿
+ */
+ @Schema(description = "鍐滄埛缂栧彿", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long clientId;
+
+ /**
+ * 浣欓
+ */
+ @Schema(description = "浣欓", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Min(value = 0, message="浣欓涓嶈兘灏忎簬0")
+ private Float money;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ @Schema(description = "澶囨敞", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ @Schema(description = "鎿嶄綔浜虹紪鍙�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Positive(message = "鎿嶄綔浜虹紪鍙峰繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
index a3003f9..c4684c6 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockCtrl.java
@@ -5,7 +5,11 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoSe.VoUnlock;
+import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.pojoSe.SeUnlock;
+import com.dy.pipIrrGlobal.voSe.VoUnlock;
+import com.dy.pipIrrSell.clientCard.ClientCardSv;
+import com.dy.pipIrrSell.clientCard.LastOperateENUM;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
@@ -13,15 +17,19 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.*;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
/**
* @author ZhuBaoMin
@@ -37,6 +45,7 @@
@RequiredArgsConstructor
public class UnlockCtrl {
private final UnlockSv unlockSv;
+ private final ClientCardSv clientCardSv;
@Operation(summary = "鑾峰緱涓�椤佃В閿佽褰�", description = "杩斿洖涓�椤佃В閿佹暟鎹�")
@ApiResponses(value = {
@@ -58,4 +67,79 @@
return BaseResponseUtils.buildException(e.getMessage()) ;
}
}
+
+ @Operation(summary = "娣诲姞瑙i攣璁板綍", description = "娣诲姞瑙i攣璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = Boolean.class))}
+ )
+ })
+ @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop("-1")//@SsoAop(power = "-1")
+ public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form琛ㄥ崟json鏁版嵁", required = true) @Valid DtoUnlock 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());
+ }
+
+ /**
+ * cardId 姘村崱缂栧彿锛堥潪浼犲叆鍙傛暟锛岀敱cardAddr鍙嶆煡锛�
+ * cardAddr 姘村崱鍦板潃
+ * clientId 鍐滄埛缂栧彿
+ * money 浣欓
+ * remarks 澶囨敞
+ * operator 鎿嶄綔浜虹紪鍙�
+ * unlockTime 瑙i攣鏃堕棿
+ */
+ Long cardId = 0L;
+ String cardAddr = po.getCardAddr();
+ Long clientId = po.getClientId();
+ Float money = po.getMoney();
+ String remarks = po.getRemarks();
+ Long operator = po.getOperator();
+ Date unlockTime = new Date();
+
+ /**
+ * 渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級
+ */
+ cardId = Optional.ofNullable(clientCardSv.getCardIdByAddr(cardAddr)).orElse(0L);
+ if(cardId == 0) {
+ return BaseResponseUtils.buildFail("鍗″彿閿欒锛岃鍗′笉瀛樺湪");
+ }
+
+ /**
+ * 淇敼鍐滄埛鍗′俊鎭細
+ * 鎸傚け鏃堕棿
+ * 鏈�鍚庢搷浣滅被鍨�-4
+ */
+ SeClientCard seClientCard = new SeClientCard();
+ seClientCard.setId(cardId);
+ seClientCard.setUnlockdt(unlockTime);
+ seClientCard.setLastoper(LastOperateENUM.UNLOCK.getCode());
+ Integer rec_updateClientCard = Optional.ofNullable(clientCardSv.UpdateClientCard(seClientCard)).orElse(0);
+ if(rec_updateClientCard == 0) {
+ return BaseResponseUtils.buildFail("瑙i攣澶辫触-鍐滄埛鍗¤В閿佸紓甯�");
+ }
+
+ /**
+ * 娣诲姞瑙i攣璁板綍
+ */
+ SeUnlock seUnlock = new SeUnlock();
+ seUnlock.setCardid(cardId);
+ seUnlock.setClientid(clientId);
+ seUnlock.setMoney(money);
+ seUnlock.setRemarks(remarks);
+ seUnlock.setOperator(operator);
+ seUnlock.setOperatedt(unlockTime);
+ Long rec = Optional.ofNullable(unlockSv.add(seUnlock)).orElse(0L);
+ if(rec == 0) {
+ return BaseResponseUtils.buildFail("瑙i攣澶辫触-瑙i攣璁板綍鍐欏叆寮傚父");
+ }
+
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockSv.java
index c048c3e..85d1754 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/unlock/UnlockSv.java
@@ -2,7 +2,8 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoSe.SeUnlockMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoUnlock;
+import com.dy.pipIrrGlobal.pojoSe.SeUnlock;
+import com.dy.pipIrrGlobal.voSe.VoUnlock;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -53,4 +54,14 @@
rsVo.obj = seUnlockMapper.getUnlocks(params);
return rsVo ;
}
+
+ /**
+ * 娣诲姞瑙i攣璁板綍
+ * @param po
+ * @return
+ */
+ public Long add(SeUnlock po) {
+ seUnlockMapper.insert(po);
+ return po.getId();
+ }
}
--
Gitblit v1.8.0