From 436ac360430bad4c0563dab24337a43a980a8bff Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期四, 11 七月 2024 20:15:03 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml | 3
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardCtrl.java | 3
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitSv.java | 27
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java | 6
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java | 21
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrGroupClient.java | 69 ++
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVcRecharge.java | 15
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/OrderStateENUM.java | 21
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java | 119 +---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java | 2
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundStateENUM.java | 22
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java | 27 +
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitCtrl.java | 65 ++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/ActiveCard.java | 64 ++
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java | 5
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrUnitClientMapper.java | 28 +
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrUnitClient.java | 68 ++
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/dto/UnitClient.java | 34 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoRecharge.java | 1
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/LastOperateENUM.java | 27 +
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoActiveCard.java | 6
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoAudit.java | 35 +
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/result/IrrigateResultCode.java | 14
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java | 4
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRefund.java | 30 +
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml | 102 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundItemStateENUM.java | 21
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/qo/QoSummary.java | 5
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVirtualCard.java | 41 +
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java | 355 ++++++++++++++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrUnitClientMapper.xml | 102 ++++
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java | 37 +
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/dto/GroupClient.java | 34 +
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRegist.java | 23
34 files changed, 1,326 insertions(+), 110 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
index e7606f5..95bcee8 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/BaseResponseUtils.java
@@ -44,6 +44,10 @@
return buildResult(ResultCodeMsg.RsCode.ERROR_CODE, msg, null);
}
+ public static BaseResponse buildCodeMsg(Integer code, String msg) {
+ return buildResult(String.valueOf(code), msg, null);
+ }
+
public static BaseResponse buildError(Object obj){
return buildResult(ResultCodeMsg.RsCode.ERROR_CODE,ResultCodeMsg.RsMsg.ERROR_MESSAGE, obj);
}
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java
new file mode 100644
index 0000000..cd16d9d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrGroupClientMapper.java
@@ -0,0 +1,27 @@
+package com.dy.pipIrrGlobal.daoIr;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoIr.IrGroupClient;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 14:48
+ * @LastEditTime 2024-07-10 14:48
+ * @Description
+ */
+
+@Mapper
+public interface IrGroupClientMapper extends BaseMapper<IrGroupClient> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(IrGroupClient record);
+
+ int insertSelective(IrGroupClient record);
+
+ IrGroupClient selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(IrGroupClient record);
+
+ int updateByPrimaryKey(IrGroupClient record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrUnitClientMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrUnitClientMapper.java
new file mode 100644
index 0000000..2721de6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrUnitClientMapper.java
@@ -0,0 +1,28 @@
+package com.dy.pipIrrGlobal.daoIr;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoIr.IrUnitClient;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 14:47
+ * @LastEditTime 2024-07-10 14:47
+ * @Description
+ */
+
+@Mapper
+public interface IrUnitClientMapper extends BaseMapper<IrUnitClient> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(IrUnitClient record);
+
+ int insertSelective(IrUnitClient record);
+
+ IrUnitClient selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(IrUnitClient record);
+
+ int updateByPrimaryKey(IrUnitClient record);
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrGroupClient.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrGroupClient.java
new file mode 100644
index 0000000..d285396
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrGroupClient.java
@@ -0,0 +1,69 @@
+package com.dy.pipIrrGlobal.pojoIr;
+
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 14:48
+ * @LastEditTime 2024-07-10 14:48
+ * @Description
+ */
+/**
+ * 杞亴缁勫啘鎴峰叧鑱旇〃
+ */
+
+@TableName(value="ir_group_client", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "杞亴缁勫啘鎴峰叧鑱斿疄浣�")
+public class IrGroupClient implements BaseEntity {
+ public static final long serialVersionUID = 202407101455001L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ private Long id;
+
+ /**
+ * 杞亴缁処D
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @NotNull(message = "杞亴缁勪笉鑳戒负绌�")
+ private Long groupId;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @NotNull(message = "鍐滄埛涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 鍒涘缓浜�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ private Long operator;
+
+ /**
+ * 鍒涘缓鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date operateTime;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrUnitClient.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrUnitClient.java
new file mode 100644
index 0000000..d8f97e9
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrUnitClient.java
@@ -0,0 +1,68 @@
+package com.dy.pipIrrGlobal.pojoIr;
+
+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 com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.*;
+
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 14:47
+ * @LastEditTime 2024-07-10 14:47
+ * @Description
+ */
+/**
+ * 鐏屾簤鍗曞厓鍐滄埛鍏宠仈琛�
+ */
+
+@TableName(value="ir_unit_client", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+@Schema(name = "鐏屾簤鍗曞厓鍐滄埛鍏宠仈瀹炰綋")
+public class IrUnitClient implements BaseEntity {
+ public static final long serialVersionUID = 202407101454001L;
+
+ /**
+ * 涓婚敭
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @TableId(type = IdType.INPUT)
+ private Long id;
+
+ /**
+ * 鐏屾簤鍗曞厓ID
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @NotNull(message = "鐏屾簤鍗曞厓涓嶈兘涓虹┖")
+ private Long unitId;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ @NotNull(message = "鍐滄埛涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 鍒涘缓浜�
+ */
+ @JSONField(serializeUsing= ObjectWriterImplToString.class)
+ private Long operator;
+
+ /**
+ * 鍒涘缓鏃堕棿
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date operateTime;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
new file mode 100644
index 0000000..6a2a9a7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
@@ -0,0 +1,102 @@
+<?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.daoIr.IrGroupClientMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoIr.IrGroupClient">
+ <!--@mbg.generated-->
+ <!--@Table ir_group_client-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="group_id" jdbcType="BIGINT" property="groupId" />
+ <result column="client_id" jdbcType="BIGINT" property="clientId" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, group_id, client_id, `operator`, operate_time
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from ir_group_client
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from ir_group_client
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupClient">
+ <!--@mbg.generated-->
+ insert into ir_group_client (id, group_id, client_id,
+ `operator`, operate_time)
+ values (#{id,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT},
+ #{operator,jdbcType=BIGINT}, #{operateTime,jdbcType=TIMESTAMP})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupClient">
+ <!--@mbg.generated-->
+ insert into ir_group_client
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="groupId != null">
+ group_id,
+ </if>
+ <if test="clientId != null">
+ client_id,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operateTime != null">
+ operate_time,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="groupId != null">
+ #{groupId,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateTime != null">
+ #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupClient">
+ <!--@mbg.generated-->
+ update ir_group_client
+ <set>
+ <if test="groupId != null">
+ group_id = #{groupId,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ client_id = #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateTime != null">
+ operate_time = #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupClient">
+ <!--@mbg.generated-->
+ update ir_group_client
+ set group_id = #{groupId,jdbcType=BIGINT},
+ client_id = #{clientId,jdbcType=BIGINT},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operate_time = #{operateTime,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/IrUnitClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrUnitClientMapper.xml
new file mode 100644
index 0000000..6d74a8b
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrUnitClientMapper.xml
@@ -0,0 +1,102 @@
+<?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.daoIr.IrUnitClientMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoIr.IrUnitClient">
+ <!--@mbg.generated-->
+ <!--@Table ir_unit_client-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="unit_id" jdbcType="BIGINT" property="unitId" />
+ <result column="client_id" jdbcType="BIGINT" property="clientId" />
+ <result column="operator" jdbcType="BIGINT" property="operator" />
+ <result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, unit_id, client_id, `operator`, operate_time
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from ir_unit_client
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from ir_unit_client
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoIr.IrUnitClient">
+ <!--@mbg.generated-->
+ insert into ir_unit_client (id, unit_id, client_id,
+ `operator`, operate_time)
+ values (#{id,jdbcType=BIGINT}, #{unitId,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT},
+ #{operator,jdbcType=BIGINT}, #{operateTime,jdbcType=TIMESTAMP})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrUnitClient">
+ <!--@mbg.generated-->
+ insert into ir_unit_client
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="unitId != null">
+ unit_id,
+ </if>
+ <if test="clientId != null">
+ client_id,
+ </if>
+ <if test="operator != null">
+ `operator`,
+ </if>
+ <if test="operateTime != null">
+ operate_time,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="unitId != null">
+ #{unitId,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateTime != null">
+ #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrUnitClient">
+ <!--@mbg.generated-->
+ update ir_unit_client
+ <set>
+ <if test="unitId != null">
+ unit_id = #{unitId,jdbcType=BIGINT},
+ </if>
+ <if test="clientId != null">
+ client_id = #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="operator != null">
+ `operator` = #{operator,jdbcType=BIGINT},
+ </if>
+ <if test="operateTime != null">
+ operate_time = #{operateTime,jdbcType=TIMESTAMP},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoIr.IrUnitClient">
+ <!--@mbg.generated-->
+ update ir_unit_client
+ set unit_id = #{unitId,jdbcType=BIGINT},
+ client_id = #{clientId,jdbcType=BIGINT},
+ `operator` = #{operator,jdbcType=BIGINT},
+ operate_time = #{operateTime,jdbcType=TIMESTAMP}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
index 1523ef4..c0c22f6 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/application-database.yml
@@ -3,7 +3,8 @@
datasource: #閰嶇疆鏁版嵁婧�
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+# url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
+ url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
username: root
password: dysql,;.abc!@#
druid:
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java
index f94e15f..e3d4abe 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java
@@ -5,16 +5,13 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.pojoIr.IrGroupClient;
import com.dy.pipIrrGlobal.pojoIr.IrGroupUnit;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigateGroup;
-import com.dy.pipIrrGlobal.pojoIr.IrIrrigateUnit;
import com.dy.pipIrrGlobal.voIr.VoGroup;
import com.dy.pipIrrGlobal.voIr.VoGroupOne;
-import com.dy.pipIrrGlobal.voIr.VoUnit;
-import com.dy.pipIrrGlobal.voIr.VoUnitOne;
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
-import com.dy.pipIrrIrrigate.irrigateUnit.IrrigateUnitSv;
-import com.dy.pipIrrIrrigate.irrigateGroup.QueryVo;
+import com.dy.pipIrrIrrigate.irrigateGroup.dto.GroupClient;
import com.dy.pipIrrIrrigate.result.IrrigateResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -415,4 +412,34 @@
}
return BaseResponseUtils.buildSuccess(true);
}
+
+ /**
+ * 杞亴缁勫叧鑱斿啘鎴�
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "add_group_client", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> addGroupClient(@RequestBody @Valid GroupClient po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ IrGroupClient irGroupClient = new IrGroupClient();
+ irGroupClient.setGroupId(po.getGroupId());
+ irGroupClient.setClientId(po.getClientId());
+ irGroupClient.setOperator(po.getOperator());
+ irGroupClient.setOperateTime(new Date());
+
+ try {
+ Long rec = Optional.ofNullable(irrigateGroupSv.addGroupClient(irGroupClient)).orElse(0L);
+ if (rec == 0) {
+ return BaseResponseUtils.buildErrorMsg(IrrigateResultCode.GRPUP_ASSOCIATE_CLIENT_FAIL.getMessage());
+ }
+ } catch (Exception e) {
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true);
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java
index d1e3e50..76dd797 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java
@@ -1,8 +1,10 @@
package com.dy.pipIrrIrrigate.irrigateGroup;
import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoIr.IrGroupClientMapper;
import com.dy.pipIrrGlobal.daoIr.IrGroupUnitMapper;
import com.dy.pipIrrGlobal.daoIr.IrIrrigateGroupMapper;
+import com.dy.pipIrrGlobal.pojoIr.IrGroupClient;
import com.dy.pipIrrGlobal.pojoIr.IrGroupUnit;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigateGroup;
import com.dy.pipIrrGlobal.voIr.VoGroup;
@@ -25,11 +27,13 @@
@Slf4j
@Service
public class IrrigateGroupSv {
-
@Autowired
private IrIrrigateGroupMapper irIrrigateGroupMapper;
@Autowired
private IrGroupUnitMapper irGroupUnitMapper;
+
+ @Autowired
+ private IrGroupClientMapper irGroupClientMapper;
/**
* 鍒涘缓杞亴缁�
@@ -149,4 +153,19 @@
List<Long> notBindUnits = irGroupUnitMapper.getNotBindUnits();
return notBindUnits;
}
+
+ //杞亴缁勫叧鑱斿啘鎴�
+ public Long addGroupClient(IrGroupClient po) {
+ irGroupClientMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 鍒犻櫎杞亴缁勪笌鍐滄埛绠$悊
+ * @param id
+ * @return
+ */
+ public Integer deleteGroupClient (Long id) {
+ return irGroupClientMapper.deleteByPrimaryKey(id);
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/dto/GroupClient.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/dto/GroupClient.java
new file mode 100644
index 0000000..05d6708
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/dto/GroupClient.java
@@ -0,0 +1,34 @@
+package com.dy.pipIrrIrrigate.irrigateGroup.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 16:37
+ * @LastEditTime 2024-07-10 16:37
+ * @Description 杞亴缁勫啘鎴峰叧鑱斿璞�
+ */
+
+@Data
+public class GroupClient {
+ public static final long serialVersionUID = 202407101638001L;
+
+ /**
+ * 杞亴缁処D
+ */
+ @NotNull(message = "杞亴缁勪笉鑳戒负绌�")
+ private Long groupId;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @NotNull(message = "鍐滄埛涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 鎿嶄綔鍛�
+ */
+ @NotNull(message = "鎿嶄綔鍛樹笉鑳戒负绌�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitCtrl.java
index 2688634..496e055 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitCtrl.java
@@ -7,13 +7,11 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigateUnit;
-import com.dy.pipIrrGlobal.pojoIr.IrProject;
-import com.dy.pipIrrGlobal.voIr.VoProject;
-import com.dy.pipIrrGlobal.voIr.VoProjectOne;
+import com.dy.pipIrrGlobal.pojoIr.IrUnitClient;
import com.dy.pipIrrGlobal.voIr.VoUnit;
import com.dy.pipIrrGlobal.voIr.VoUnitOne;
import com.dy.pipIrrGlobal.voSe.VoActiveCard;
-import com.dy.pipIrrIrrigate.irrigateUnit.QueryVo;
+import com.dy.pipIrrIrrigate.irrigateUnit.dto.UnitClient;
import com.dy.pipIrrIrrigate.result.IrrigateResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -30,10 +28,7 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
/**
* @author :WuZeYu
@@ -229,4 +224,58 @@
return BaseResponseUtils.buildException(e.getMessage());
}
}
+
+ /**
+ * 鐏屾簤鍗曞厓鍒嗛厤锛堝啘鎴风鍦帮級
+ * @param po
+ * @param bindingResult
+ * @return
+ */
+ @PostMapping(path = "add_unit_client", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> addUnitClient(@RequestBody @Valid UnitClient po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ IrUnitClient irUnitClient = new IrUnitClient();
+ irUnitClient.setUnitId(po.getUnitId());
+ irUnitClient.setClientId(po.getClientId());
+ irUnitClient.setOperator(po.getOperator());
+ irUnitClient.setOperateTime(new Date());
+
+ try {
+ Long rec = Optional.ofNullable(irrigateUnitSv.addUnitClient(irUnitClient)).orElse(0L);
+ if (rec == 0) {
+ return BaseResponseUtils.buildErrorMsg(IrrigateResultCode.UNIT_ASSOCIATE_CLIENT_FAIL.getMessage());
+ }
+ } catch (Exception e) {
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true);
+ }
+
+ @PostMapping(path = "delete_unit_client", consumes = MediaType.APPLICATION_JSON_VALUE)
+ @Transactional(rollbackFor = Exception.class)
+ @SsoAop()
+ public BaseResponse<Boolean> deleteUnitClient(@RequestBody @Valid UnitClient po, BindingResult bindingResult) {
+ if (bindingResult != null && bindingResult.hasErrors()) {
+ return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ }
+ IrUnitClient irUnitClient = new IrUnitClient();
+ irUnitClient.setUnitId(po.getUnitId());
+ irUnitClient.setClientId(po.getClientId());
+ irUnitClient.setOperator(po.getOperator());
+ irUnitClient.setOperateTime(new Date());
+
+ try {
+ Long rec = Optional.ofNullable(irrigateUnitSv.addUnitClient(irUnitClient)).orElse(0L);
+ if (rec == 0) {
+ return BaseResponseUtils.buildErrorMsg(IrrigateResultCode.UNIT_ASSOCIATE_CLIENT_FAIL.getMessage());
+ }
+ } catch (Exception e) {
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true);
+ }
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitSv.java
index 195f8cb..3ad9207 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/IrrigateUnitSv.java
@@ -3,14 +3,11 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoIr.IrGroupUnitMapper;
import com.dy.pipIrrGlobal.daoIr.IrIrrigateUnitMapper;
-import com.dy.pipIrrGlobal.daoIr.IrProjectMapper;
+import com.dy.pipIrrGlobal.daoIr.IrUnitClientMapper;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigateUnit;
-import com.dy.pipIrrGlobal.pojoIr.IrProject;
-import com.dy.pipIrrGlobal.voIr.VoProject;
-import com.dy.pipIrrGlobal.voIr.VoProjectOne;
+import com.dy.pipIrrGlobal.pojoIr.IrUnitClient;
import com.dy.pipIrrGlobal.voIr.VoUnit;
import com.dy.pipIrrGlobal.voIr.VoUnitOne;
-import com.dy.pipIrrIrrigate.irrigateUnit.QueryVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -29,11 +26,13 @@
@Slf4j
@Service
public class IrrigateUnitSv {
-
@Autowired
private IrIrrigateUnitMapper irIrrigateUnitMapper;
@Autowired
private IrGroupUnitMapper irGroupUnitMapper;
+
+ @Autowired
+ private IrUnitClientMapper irUnitClientMapper;
/**
* 鍒涘缓鐏屾簤鍗曞厓
@@ -105,4 +104,20 @@
rsVo.obj = irIrrigateUnitMapper.getUnits(params);
return rsVo;
}
+
+ //鐏屾簤鍗曞厓鍒嗛厤锛堝啘鎴风鍦帮級
+ public Long addUnitClient(IrUnitClient po) {
+ irUnitClientMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 鍒犻櫎鐏屾簤鍗曞厓涓庡啘鎴峰叧鑱�
+ * @param id
+ * @return
+ */
+ public Integer deleteUnitClient(Long id) {
+ return irUnitClientMapper.deleteByPrimaryKey(id);
+ }
+
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/dto/UnitClient.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/dto/UnitClient.java
new file mode 100644
index 0000000..72d435d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateUnit/dto/UnitClient.java
@@ -0,0 +1,34 @@
+package com.dy.pipIrrIrrigate.irrigateUnit.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-10 15:35
+ * @LastEditTime 2024-07-10 15:35
+ * @Description 鐏屾簤鍗曞厓鍐滄埛鍏宠仈瀵硅薄
+ */
+
+@Data
+public class UnitClient {
+ public static final long serialVersionUID = 202407101536001L;
+
+ /**
+ * 鐏屾簤鍗曞厓ID
+ */
+ @NotNull(message = "鐏屾簤鍗曞厓涓嶈兘涓虹┖")
+ private Long unitId;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @NotNull(message = "鍐滄埛涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 鎿嶄綔鍛�
+ */
+ @NotNull(message = "鎿嶄綔鍛樹笉鑳戒负绌�")
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/result/IrrigateResultCode.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/result/IrrigateResultCode.java
index 2dec946..da259a9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/result/IrrigateResultCode.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/result/IrrigateResultCode.java
@@ -20,12 +20,18 @@
PLEASE_INPUT_PROJECT_ID(10002, "璇疯緭鍏ラ」鐩甀D"),
DELETE_PROJECT_FAIL(10003, "椤圭洰鍒犻櫎澶辫触"),
UPDATE_PROJECT_FAIL(10004, "椤圭洰淇敼澶辫触"),
- NO_PROJECT(10005, "鏃犵鍚堟潯浠剁殑椤圭洰璁板綍");
+ NO_PROJECT(10005, "鏃犵鍚堟潯浠剁殑椤圭洰璁板綍"),
+ /**
+ * 鐏屾簤鍗曞厓
+ */
+ UNIT_ASSOCIATE_CLIENT_FAIL(20001, "鐏屾簤鍗曞厓鍒嗛厤澶辫触"),
-// /**
-// * 鐏屾簤鍗曞厓
-// */
+ /**
+ * 杞亴缁�
+ */
+ GRPUP_ASSOCIATE_CLIENT_FAIL(30001, "杞亴缁勫叧鑱斿啘鎴峰け璐�");
+
// ADD_IRRIGATE_UNIT_FAIL(20001, "鍒涘缓鐏屾簤鍗曞厓澶辫触"),
private final Integer code;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
index c42f2a8..b607fb5 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
@@ -15,7 +15,6 @@
import com.dy.pipIrrGlobal.voSe.VoOperate;
import com.dy.pipIrrGlobal.voSe.VoRecharge;
import com.dy.pipIrrGlobal.voSe.VoReissueCard;
-import com.dy.pipIrrSell.cardOperate.converter.RechargeDtoMapper;
import com.dy.pipIrrSell.cardOperate.dto.*;
import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM;
import com.dy.pipIrrSell.cardOperate.qo.*;
@@ -65,21 +64,19 @@
@PostMapping(path = "active", consumes = MediaType.APPLICATION_JSON_VALUE)
@Transactional(rollbackFor = Exception.class)
@SsoAop()
- public BaseResponse<Boolean> add_active(@RequestBody @Valid DtoActiveCard po, BindingResult bindingResult){
+ public BaseResponse<Boolean> add_active(@RequestBody @Valid ActiveCard po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
+
+ Long clientId = po.getClientId();
// 鑾峰彇5绾ц鏀垮尯鍒掍覆areaCode
- String areaCode = cardOperateSv.getAreaCodeByNum(po.getClientNum());
- if(areaCode.trim().length() == 0) {
+ Long areaCodeL = cardOperateSv.getAreaCodeById(clientId);
+ if(areaCodeL == null) {
return BaseResponseUtils.buildErrorMsg(SellResultCode.AREA_CODE_MISTAKE.getMessage());
}
-
- // p206V1_0_1鍗忚锛屽彇琛屾斂鍖哄垝鐨勫悗6浣�
- if(po.getProtocol() != null && po.getProtocol().trim().equals("p206V1_0_1")) {
- areaCode = areaCode.substring(6);
- }
+ String areaCode = String.valueOf(areaCodeL);
/**
* 鏍规嵁琛屾斂鍖哄垝涓诧紙areaCode锛夊湪姘村崱琛ㄤ腑閽堝姘村崱缂栧彿锛坈ardNum锛夎繘琛屾ā绯婃煡璇�
@@ -88,34 +85,21 @@
* cardNum涓烘柊鐨勫崱鍙�
*/
String cardNum = Optional.ofNullable(cardOperateSv.getCardNumOfMax(areaCode)).orElse("");
- if(po.getProtocol().trim().equals("p206V1_0_1")) {
- if(cardNum != null && cardNum.trim().length() > 0) {
- Integer number = Integer.parseInt(cardNum.substring(6));
- number = number + 1;
- if(number > 9999) {
- return BaseResponseUtils.buildErrorMsg(SellResultCode.CARD_NUMBER_OVERRUN.getMessage());
- }
- cardNum = cardNum.substring(0, 6) + String.format("%04d", number);
- } else {
- cardNum = areaCode + "0001";
+ if(cardNum != null && cardNum.trim().length() > 0) {
+ Integer number = Integer.parseInt(cardNum.substring(12));
+ number = number + 1;
+ if(number > 65535) {
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.CARD_NUMBER_OVERRUN.getMessage());
}
- }else {
- if(cardNum != null && cardNum.trim().length() > 0) {
- Integer number = Integer.parseInt(cardNum.substring(12));
- number = number + 1;
- if(number > 65535) {
- return BaseResponseUtils.buildErrorMsg(SellResultCode.CARD_NUMBER_OVERRUN.getMessage());
- }
- cardNum = cardNum.substring(0, 12) + String.format("%05d", number);
- } else {
- cardNum = areaCode + "00001";
- }
+ cardNum = cardNum.substring(0, 12) + String.format("%05d", number);
+ } else {
+ cardNum = areaCode + "00001";
}
/**
* cardAddr 姘村崱鍦板潃锛堜粎浠呭啓鍏ワ紝鏃犱笟鍔★級
- * clientNum 鍐滄埛缂栧彿
* cardCost 鍗$墖璐圭敤
+ * originalCardId 鍘熸按鍗D
* amount 鍏呭�奸噾棰濓紝鍏呭�兼帴鍙d负杈撳叆鍙傛暟锛岃ˉ鍗℃帴鍙d负鍘熷崱閫�杩橀噾棰�
* reissueAmount 琛ュ崱閲戦锛岃ˉ鍗℃椂浣跨敤
* paymentId 鏀粯鏂瑰紡缂栧彿
@@ -124,7 +108,6 @@
* activeTime 寮�鍗℃椂闂�
*/
String cardAddr = po.getCardAddr();
- String clientNum = po.getClientNum();
Integer cardCost = po.getCardCost();
Long originalCardId = po.getOriginalCardId();
Float amount = po.getAmount();
@@ -132,14 +115,6 @@
String remarks = po.getRemarks();
Long operator = po.getOperator();
Date activeTime = new Date();
-
- /**
- * 鏍规嵁鍐滄埛缂栧彿鑾峰彇鍐滄埛ID
- */
- Long clientId = cardOperateSv.getClientIdByNum(clientNum);
- if(clientId == null) {
- return BaseResponseUtils.buildErrorMsg(SellResultCode.CLIENT_NUM_ERROR.getMessage());
- }
/**
* 娣诲姞鍐滄埛鍗¤褰曪紝閫�杩橀噾棰濅綔涓哄綋鍓嶄綑棰�
@@ -166,7 +141,7 @@
SeCardOperate seCardOperate = new SeCardOperate();
seCardOperate.setCardId(cardId);
seCardOperate.setClientId(clientId);
- seCardOperate.setMoney(amount);
+ seCardOperate.setMoney(0f);
seCardOperate.setCardCost(cardCost);
seCardOperate.setPaymentId(paymentId);
seCardOperate.setOperateType(OperateTypeENUM.ACTIVE.getCode());
@@ -182,10 +157,13 @@
* 濡傛灉鎿嶄綔浜哄憳寮�鍗℃椂杈撳叆浜嗗厖鍊奸噾棰濓紝鍒欏紑鍗″悗璋冪敤鍏呭�煎姛鑳�
* 琛ュ崱闄ゅ锛岃ˉ鍗$殑閫�杩橀噾棰濇槸浠庢寕澶卞崱涓浆绉昏繃鏉ョ殑锛屾病鏈夊疄闄呴噾閽变氦鏄�
*/
- po.setCardNum(Long.parseLong(cardNum));
if(amount != null && amount > 0 && originalCardId == null) {
- po.setClientId(clientId);
- DtoRecharge dtoRecharge = RechargeDtoMapper.INSTANCT.po2vo(po);
+ DtoRecharge dtoRecharge = new DtoRecharge();
+ dtoRecharge.setCardNum(Long.parseLong(cardNum));
+ dtoRecharge.setAmount(amount);
+ dtoRecharge.setPaymentId(paymentId);
+ dtoRecharge.setRemarks(remarks);
+ dtoRecharge.setOperator(operator);
dtoRecharge.setMoney(0f);
dtoRecharge.setGift(0f);
dtoRecharge.setPrice(0f);
@@ -213,7 +191,7 @@
@SsoAop()
public BaseResponse<Boolean> add_reissue(@RequestBody @Valid DtoReissue po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -231,6 +209,7 @@
String cardAddr = po.getCardAddr();
String clientNum = "";
+ Long clientId = 0L;
Long cardNum = po.getCardNum();
Long cardId = 0L;
Integer cardCost = Optional.ofNullable(po.getCardCost()).orElse(0);
@@ -238,7 +217,6 @@
Long paymentId = po.getPaymentId();
String remarks = po.getRemarks();
Long operator = po.getOperator();
- String protocol = null;
// 鍒ゆ柇褰撳墠姘村崱鏄惁涓烘寕澶辩姸鎬佷笖鏈ˉ鍗★紝浠呭凡缁忔寕澶变笖鏈ˉ鍗$殑鍙互琛ュ崱
if(!cardOperateSv.isLostAndUnreplaced(cardNum)) {
@@ -262,6 +240,7 @@
}
clientNum = map.get("clientNum").toString();
cardId = Long.parseLong(map.get("cardId").toString());
+ clientId = Long.parseLong(map.get("clientId").toString());
/**
* 濡傛灉鏄ˉ鍗¤皟鐢ㄧ殑寮�鍗′笖杞Щ浜嗛��杩橀噾棰濓紝闇�淇敼鎸傚け鍗′綑棰濅负0
@@ -276,20 +255,16 @@
/**
* 娣诲姞寮�鍗¤褰曪紝閫�杩橀噾棰濆啿鍒版柊鍗′腑
*/
- if(String.valueOf(cardNum).trim().length() == 10) {
- protocol = "p206V1_0_1";
- }
- DtoActiveCard dtoActiveCard = new DtoActiveCard();
- dtoActiveCard.setProtocol(protocol);
- dtoActiveCard.setCardAddr(cardAddr);
- dtoActiveCard.setClientNum(clientNum);
- dtoActiveCard.setOriginalCardId(cardId);
- dtoActiveCard.setCardCost(cardCost);
- dtoActiveCard.setAmount(reissueAmount);
- dtoActiveCard.setPaymentId(paymentId);
- dtoActiveCard.setRemarks(remarks);
- dtoActiveCard.setOperator(operator);
- BaseResponse<java.lang.Boolean> baseResponse_addActive = add_active(dtoActiveCard, null);
+ ActiveCard activeCard = new ActiveCard();
+ activeCard.setCardAddr(cardAddr);
+ activeCard.setClientId(clientId);
+ activeCard.setOriginalCardId(cardId);
+ activeCard.setCardCost(cardCost);
+ activeCard.setAmount(reissueAmount);
+ activeCard.setPaymentId(paymentId);
+ activeCard.setRemarks(remarks);
+ activeCard.setOperator(operator);
+ BaseResponse<java.lang.Boolean> baseResponse_addActive = add_active(activeCard, null);
if(!baseResponse_addActive.getCode().equals("0001")) {
return BaseResponseUtils.buildErrorMsg(SellResultCode.REPLACE_FAIL_WRITE_RECHARGE_ERROR.getMessage());
@@ -318,7 +293,7 @@
@SsoAop()
public BaseResponse<Boolean> add_recharge(@RequestBody @Valid DtoRecharge po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
return cardOperateSv.addRecharge(po);
}
@@ -334,7 +309,7 @@
@SsoAop()
public BaseResponse<Boolean> add_cancel(@RequestBody @Valid DtoCancel po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -425,7 +400,7 @@
@SsoAop()
public BaseResponse<Boolean> add_loss(@RequestBody @Valid DtoLoss po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -518,7 +493,7 @@
@SsoAop()
public BaseResponse<Boolean> add_reversal(@RequestBody @Valid DtoReversal po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -607,7 +582,7 @@
@SsoAop()
public BaseResponse<Boolean> add_refund(@RequestBody @Valid DtoRefund po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -691,7 +666,7 @@
@SsoAop()
public BaseResponse<Boolean> add_unlock(@RequestBody @Valid DtoUnlock po, BindingResult bindingResult){
if(bindingResult != null && bindingResult.hasErrors()){
- return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+ return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
/**
@@ -838,7 +813,7 @@
try {
QueryResultVo<List<VoActiveCard>> res = cardOperateSv.getActiveCards(vo);
if(res.itemTotal == 0) {
- return BaseResponseUtils.buildFail(SellResultCode.No_ActiveCards.getMessage());
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.No_ActiveCards.getMessage());
}
return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
@@ -867,7 +842,7 @@
try {
QueryResultVo<List<VoReissueCard>> res = cardOperateSv.getReissueCards(vo);
if(res.itemTotal == 0) {
- return BaseResponseUtils.buildFail(SellResultCode.No_ReissueCards.getMessage());
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.No_ReissueCards.getMessage());
}
return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
@@ -898,13 +873,13 @@
// 楠岃瘉鎿嶄綔绫诲瀷鏄惁姝g‘
Integer operateType = Optional.ofNullable(vo.getOperateType()).orElse(0);
if(operateType != 3 && operateType != 6 && operateType != 7 && operateType != 8) {
- return BaseResponseUtils.buildFail(SellResultCode.PARAMS_ERROR.getMessage());
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.PARAMS_ERROR.getMessage());
}
try {
QueryResultVo<List<VoOperate>> res = cardOperateSv.getCommonOperations(vo);
if(res.itemTotal == 0) {
- return BaseResponseUtils.buildFail(SellResultCode.No_CANCELS.getMessage());
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.No_CANCELS.getMessage());
}
return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
@@ -933,7 +908,7 @@
try {
Map res = Optional.ofNullable(cardOperateSv.getReceipts(vo)).orElse(new HashMap());
if(res.size() == 0) {
- return BaseResponseUtils.buildFail(SellResultCode.No_RECEIPTS.getMessage());
+ return BaseResponseUtils.buildErrorMsg(SellResultCode.No_RECEIPTS.getMessage());
}
return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/ActiveCard.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/ActiveCard.java
new file mode 100644
index 0000000..2cbc5a0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/ActiveCard.java
@@ -0,0 +1,64 @@
+package com.dy.pipIrrSell.cardOperate.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 11:27
+ * @LastEditTime 2024-07-11 11:27
+ * @Description 寮�鍗′紶鍏ュ璞�
+ */
+
+@Data
+public class ActiveCard {
+ public static final long serialVersionUID = 202407111129001L;
+
+ /**
+ * 姘村崱鍦板潃锛屼粎淇濆瓨锛屾棤涓氬姟
+ */
+ @NotBlank(message = "姘村崱鍦板潃涓嶈兘涓虹┖")
+ private String cardAddr;
+
+ /**
+ * 鍐滄埛ID锛堜富閿級
+ */
+ @NotNull(message = "鍐滄埛涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 鍘熸寕澶卞崱ID锛岃ˉ鍗¤繃绋嬪紑鍗¢渶瑕�
+ */
+ @Schema(description = "鍘熸寕澶卞崱ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ private Long originalCardId;
+
+ /**
+ * 鍗$墖璐圭敤
+ */
+ @NotNull(message = "鍗$墖璐圭敤涓嶈兘涓虹┖")
+ private Integer cardCost;
+
+ /**
+ * 鍏呭�奸噾棰�
+ */
+ private Float amount;
+
+
+ /**
+ * 鏀粯鏂瑰紡缂栧彿
+ */
+ @NotNull(message = "浠樻柟寮忎笉鑳戒负绌�")
+ private Long paymentId;
+
+ /**
+ * 澶囨敞淇℃伅
+ */
+ private String remarks;
+
+ /**
+ * 鎿嶄綔浜虹紪鍙�
+ */
+ private Long operator;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoActiveCard.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoActiveCard.java
index 0a5e3a5..d17a0fa 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoActiveCard.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoActiveCard.java
@@ -10,7 +10,7 @@
* @author ZhuBaoMin
* @date 2024-01-18 19:44
* @LastEditTime 2024-01-18 19:44
- * @Description
+ * @Description 寮�鍗″強琛ュ崱浼犲叆瀵硅薄
*/
@Data
@@ -18,7 +18,7 @@
@ToString
@NoArgsConstructor
@AllArgsConstructor
-@Schema(name = "寮�鍗′紶鍏ュ璞�")
+@Schema(name = "寮�鍗″強琛ュ崱浼犲叆瀵硅薄")
public class DtoActiveCard {
public static final long serialVersionUID = 202401181945001L;
@@ -43,7 +43,7 @@
private String clientNum;
/**
- * 鍐滄埛ID锛堜富閿級锛屼笉鏄紑鍗℃帴鍙d紶鍏ワ紝鐢卞啘鎴风紪鍙疯幏寰楋紝淇濆瓨寮�鍗¤褰曞拰鍏呭�艰褰曢兘闇�瑕�
+ * 鍐滄埛ID锛堜富閿級
*/
@Schema(description = "鍐滄埛ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private Long clientId;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoRecharge.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoRecharge.java
index 84da9eb..948c855 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoRecharge.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/dto/DtoRecharge.java
@@ -46,7 +46,6 @@
* 鍏呭�奸噾棰�
*/
@Schema(description = "鍏呭�奸噾棰�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
- @Min(value = 0, message="鍏呭�奸噾棰濅笉鑳藉皬浜�0")
private Float amount;
/**
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
index 38061cc..447a341 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
@@ -143,6 +143,9 @@
String district8 = String.format("%02d", Integer.parseInt(countyNum)) + String.format("%03d", Integer.parseInt(townNum)) + String.format("%03d", Integer.parseInt(villageNum));
// 鐢熸垚鍐滄埛缂栧彿
String clientNum = generateClientNum(district8);
+ if(clientNum == null) {
+ return BaseResponseUtils.buildErrorMsg("鍐滄埛缂栧彿瓒呴檺");
+ }
// 鐢熸垚12浣�5绾ц鏀垮尯鍒掔紪鐮佷覆鍙婂悕绉颁覆
Long districtNum = Long.parseLong(provinceNum + cityNum + district8);
String districtTitle = countryName + townName + villageName;
@@ -195,7 +198,7 @@
Integer number = Integer.parseInt(clientNum.substring(8));
number = number + 1;
if(number > 9999) {
- return "鍐滄埛缂栧彿瓒呴檺";
+ return null;
}
clientNum = clientNum.substring(0, 8) + String.format("%04d", number);
} else {
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
index 7c177b2..caeca6b 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
@@ -193,11 +193,7 @@
public BaseResponse<Map> getSummaries(QoSummary vo){
try {
Map res = generalSv.getSummaries(vo);
- if(res.size() > 0) {
- return BaseResponseUtils.buildSuccess(res);
- }else {
- return BaseResponseUtils.buildFail(SellResultCode.No_TRADE_SUMMARIES.getMessage());
- }
+ return BaseResponseUtils.buildSuccess(res);
} catch (Exception e) {
log.error("鏌ヨ浜ゆ槗姹囨�昏褰曞紓甯�", e);
return BaseResponseUtils.buildException(e.getMessage()) ;
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/qo/QoSummary.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/qo/QoSummary.java
index 313d0db..765888d 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/qo/QoSummary.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/qo/QoSummary.java
@@ -2,6 +2,8 @@
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
import lombok.*;
/**
@@ -20,11 +22,14 @@
@Schema(name = "浜ゆ槗姹囨�绘煡璇㈡潯浠�")
public class QoSummary extends QueryConditionVo {
@Schema(description = "鏌ヨ璧峰鏃ユ湡")
+ @NotBlank(message = "鏌ヨ璧峰鏃ユ湡涓嶈兘涓虹┖")
public String timeStart;
@Schema(description = "鏌ヨ鎴鏃ユ湡")
+ @NotBlank(message = "鏌ヨ鎴鏃ユ湡涓嶈兘涓虹┖")
public String timeStop;
@Schema(description = "鏀堕摱鍛業D")
+ @NotNull(message = "鏀堕摱鍛樹笉鑳戒负绌�")
public Long cashierId;
}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardCtrl.java
index 8c2b4a6..c695e7c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/virtualCard/VirtualCardCtrl.java
@@ -5,7 +5,6 @@
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
-import com.dy.pipIrrGlobal.voPr.VoController;
import com.dy.pipIrrGlobal.voSe.VoVcRecharge;
import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
import com.dy.pipIrrSell.result.SellResultCode;
@@ -101,7 +100,7 @@
if(vcNum != null && vcNum.trim().length() > 0) {
Integer number = Integer.parseInt(vcNum.substring(12));
number = number + 1;
- if(number > 99999) {
+ if(number > 65535) {
return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_OVERRUN.getMessage());
}
vcNum = vcNum.substring(0, 12) + String.format("%05d", number);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
index 7a7f9c4..6ad9ae6 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/ValveCtrl.java
@@ -113,7 +113,7 @@
// 铏氭嫙鍗$姸鎬佷负浣跨敤涓紝涓斾笉鏄己鍒跺紑闃�鏃舵彁绀�
if (vc.getInUse() == 1 && !forceOpen) {
- return BaseResponseUtils.buildErrorMsg(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage());
+ return BaseResponseUtils.buildCodeMsg(WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getCode(), WechatResultCode.IN_USE_VC_CANNOT_OPEN_VALVE.getMessage());
}
// 鑾峰彇姘翠环
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java
new file mode 100644
index 0000000..1b25e36
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/VirtualCardSv.java
@@ -0,0 +1,355 @@
+package com.dy.pipIrrWechat.virtualCard;
+
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoSe.*;
+import com.dy.pipIrrGlobal.pojoSe.SeVcRecharge;
+import com.dy.pipIrrGlobal.pojoSe.SeVcRefund;
+import com.dy.pipIrrGlobal.pojoSe.SeVcRefundItem;
+import com.dy.pipIrrGlobal.pojoSe.SeVirtualCard;
+import com.dy.pipIrrGlobal.voSe.VoOrders;
+import com.dy.pipIrrGlobal.voSe.VoVcRecharge;
+import com.dy.pipIrrGlobal.voSe.VoVirtualCard;
+
+import com.dy.pipIrrSell.result.SellResultCode;
+import com.dy.pipIrrSell.virtualCard.dto.DtoVcRecharge;
+import com.dy.pipIrrSell.virtualCard.dto.DtoVirtualCard;
+import com.dy.pipIrrSell.virtualCard.enums.LastOperateENUM;
+import com.dy.pipIrrSell.virtualCard.enums.OrderStateENUM;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:49
+ * @LastEditTime 2024-07-11 15:49
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class VirtualCardSv {
+ @Autowired
+ private SeVirtualCardMapper seVirtualCardMapper;
+
+ @Autowired
+ private SeVcRechargeMapper seVcRechargeMapper;
+
+ @Autowired
+ private SeVcRefundMapper seVcRefundMapper;
+
+ @Autowired
+ private SeVcRefundItemMapper seVcRefundItemMapper;
+
+ @Autowired
+ private SeClientMapper seClientMapper;
+
+ /**
+ * 鏍规嵁鍐滄埛ID鑾峰彇5绾ц鏀垮尯鍒掍唬鐮侊紝娉ㄥ唽铏氭嫙鍗′娇鐢�
+ * @param clientId 鍐滄埛ID
+ * @return 5绾ц鏀垮尯鍒掍唬鐮�
+ */
+ public Long getAreaCodeById(Long clientId) {
+ return seClientMapper.getAreaCodeById(clientId);
+ }
+
+ /**
+ * 鑾峰彇鍐滄埛鍏ㄩ儴铏氭嫙鍗�
+ * @return
+ */
+ public List<VoVirtualCard> getVCs(Long clientId) {
+ return seVirtualCardMapper.getVCs(clientId);
+ }
+
+ /**
+ * 鏍规嵁铏氭嫙鍗D鑾峰彇铏氭嫙鍗″璞�
+ * @param vcId
+ * @return
+ */
+ public VoVirtualCard getVcById(Long vcId) {
+ return seVirtualCardMapper.getVcById(vcId);
+ }
+
+ /**
+ * 娉ㄥ唽铏氭嫙鍗�
+ * @param po
+ * @return
+ */
+ public Long insertVirtualCard(SeVirtualCard po) {
+ seVirtualCardMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 鏍规嵁琛屾斂鍖哄垝涓叉ā绯婃煡璇㈣櫄鎷熷崱缂栧彿锛屾敞鍐岃櫄鎷熷崱浣跨敤
+ * @param areaCode
+ * @return
+ */
+ String getVcCardNumOfMax(String areaCode) {
+ return seVirtualCardMapper.getVcCardNumOfMax(areaCode);
+ }
+
+ /** 搴熷純
+ * 楠岃瘉鍐滄埛鏄惁鎷ユ湁鎸囧畾鍚嶇О鐨勮櫄鎷熷崱
+ * @param po
+ * @return
+ */
+ //public Integer getRecordCountByName(DtoRegist po) {
+ // return seVirtualCardMapper.getRecordCountByName(po.getClientId(), po.getVcName());
+ //}
+
+ /**
+ * 淇敼铏氭嫙鍗�
+ * 鍏呭�笺�佹秷璐广�佺敵璇烽��娆俱�佸鏍搁��娆炬椂闇�瑕佷慨鏀硅櫄鎷熷崱鐨勶細浣欓銆佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
+ * @param po
+ * @return
+ */
+ public Integer updateVirtualCard(SeVirtualCard po) {
+ return seVirtualCardMapper.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 鏍规嵁铏氭嫙鍗$紪鍙疯幏鍙栬櫄鎷熷崱瀵硅薄
+ * @param virtualId
+ * @return
+ */
+ public SeVirtualCard selectVirtuCardById(Long virtualId) {
+ return seVirtualCardMapper.selectByPrimaryKey(virtualId);
+ }
+
+ /**
+ * 娣诲姞铏氭嫙鍗″厖鍊艰褰�
+ * JSAPI涓嬪崟鍚庣敓鎴愰儴鍒嗗厖鍊艰褰�
+ * @param po
+ * @return
+ */
+ public BaseResponse<Boolean> insertVCRecharge(DtoVirtualCard po) {
+ String orderNumber = po.getOrderNumber();
+ Long virtualId = po.getVirtualId();
+ Long clientId = po.getClientId();
+ Integer rechargeAmount = po.getRechargeAmount();
+
+ // 楠岃瘉璇ヨ櫄鎷熷崱璐︽埛鏄惁瀛樺湪骞跺彇鍑哄綋鍓嶈处鎴蜂綑棰�
+ SeVirtualCard seVirtualCard = seVirtualCardMapper.selectByPrimaryKey(virtualId);
+ if(seVirtualCard == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.NO_ACCOUNT.getMessage());
+ }
+ Double money = seVirtualCard.getMoney();
+
+ // 娣诲姞鍏呭�艰褰�
+ SeVcRecharge seVcRecharge = new SeVcRecharge();
+ seVcRecharge.setVcId(virtualId);
+ seVcRecharge.setClientId(clientId);
+ seVcRecharge.setMoney(money);
+ seVcRecharge.setOrderNumber(orderNumber);
+ seVcRecharge.setRechargeAmount(rechargeAmount);
+ seVcRecharge.setOrderTime(new Date());
+ seVcRecharge.setOrderState(OrderStateENUM.NON_PAYMENT.getCode());
+ Integer rec = seVcRechargeMapper.insert(seVcRecharge);
+ if(rec == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 鏍规嵁璁㈠崟鍙疯幏鍙栬櫄鎷熷崱鍏呭�煎璞�
+ * @param orderNumber
+ * @return
+ */
+ public SeVcRecharge getVCRechargeByorderNumber(String orderNumber) {
+ return seVcRechargeMapper.getVCRechargeByorderNumber(orderNumber);
+ }
+
+ /**
+ * 淇敼铏氭嫙鍗″厖鍊艰褰�
+ * 寰俊鏀粯閫氱煡鍚庯細
+ * 1. 鏇存柊鍏呭�艰〃锛氬厖鍊煎悗浣欓銆佹敮浠樺畬鎴愭椂闂淬�佽鍗曠姸鎬�
+ * 2. 鏇存柊铏氭嫙鍗¤〃锛氳处鎴蜂綑棰濄�佹渶鍚庢搷浣溿�佹渶鍚庢搷浣滄椂闂�
+ * @param orderNumber 璁㈠崟缂栧彿
+ * @return
+ */
+ @Transactional(rollbackFor = Exception.class)
+ public BaseResponse<Boolean> updateVCRecharge(String orderNumber, Date rechargeTime) {
+ SeVcRecharge seVcRecharge = seVcRechargeMapper.getVCRechargeByorderNumber(orderNumber);
+ if(seVcRecharge == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_NOT_EXIST.getMessage());
+ }
+
+ Long virtualId = seVcRecharge.getVcId();
+ Double money = seVcRecharge.getMoney();
+ Integer rechargeAmount = seVcRecharge.getRechargeAmount();
+ Double afterRrecharge = money + rechargeAmount;
+
+ seVcRecharge.setAfterRecharge(afterRrecharge);
+ seVcRecharge.setRechargeTime(rechargeTime);
+ seVcRecharge.setOrderState(OrderStateENUM.PAID.getCode());
+ Integer rec = seVcRechargeMapper.updateByPrimaryKeySelective(seVcRecharge);
+ if(rec == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL.getMessage());
+ }
+
+ SeVirtualCard seVirtualCard = seVirtualCardMapper.selectByPrimaryKey(virtualId);
+ if(seVirtualCard == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.VIRTUAL_CARD_NOT_EXIST.getMessage());
+ }
+ seVirtualCard.setMoney(afterRrecharge);
+ seVirtualCard.setLastOperate(LastOperateENUM.RECHARGE.getCode());
+ seVirtualCard.setLastOperateTime(new Date());
+ Integer rec2 = seVirtualCardMapper.updateByPrimaryKeySelective(seVirtualCard);
+ if(rec2 == null) {
+ return BaseResponseUtils.buildFail(SellResultCode.RECHARGE_FAIL.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
+
+ /**
+ * 淇敼铏氭嫙鍗″厖鍊艰褰曪紙搴熷純锛�
+ * 寰俊灏忕▼搴忔敮浠橀�氱煡鍚庝慨鏀癸細浣欓銆佸厖鍊煎悗浣欓銆佸厖鍊煎畬鎴愭椂闂�
+ * @param po
+ * @return
+ */
+ public Integer updateVCRecharge(SeVcRecharge po) {
+ return seVcRechargeMapper.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 鏍规嵁铏氭嫙鍗″彿鑾峰彇璁㈠崟鍒楄〃
+ * @param virtualId
+ * @return
+ */
+ public List<VoOrders> selectOrders(Long virtualId) {
+ List<VoOrders> rsVo = seVcRechargeMapper.getOrders(virtualId);
+ return rsVo ;
+ }
+
+ /**
+ * 鏍规嵁閫�娆綢D鑾峰彇閫�娆惧璞�
+ * @param refundId
+ * @return
+ */
+ public SeVcRefund selectRefundByRefundId(Long refundId) {
+ return seVcRefundMapper.selectByPrimaryKey(refundId);
+ }
+
+ /**
+ * 娣诲姞閫�娆剧敵璇�
+ * @param po
+ * @return
+ */
+ public Long addRefund(SeVcRefund po) {
+ seVcRefundMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 淇敼閫�娆捐褰�
+ * @param po
+ * @return
+ */
+ public Integer updateRefund(SeVcRefund po) {
+ return seVcRefundMapper.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 鏍规嵁璁㈠崟鍙疯幏鍙栧叾鍚勭瑪閫�娆鹃噾棰�
+ * @param orderNumber
+ * @return
+ */
+ public List<Integer> selectRefundAmount(String orderNumber) {
+ List<Integer> rsVo = seVcRefundMapper.getRefundAmount(orderNumber);
+ return rsVo;
+ }
+
+ /**
+ * 娣诲姞閫�娆惧垎椤�
+ * @param po
+ * @return
+ */
+ public Long addRefundItem(SeVcRefundItem po) {
+ seVcRefundItemMapper.insert(po);
+ return po.getRefundId();
+ }
+
+ /**
+ * 缂栬緫閫�娆惧垎椤�
+ * @param po
+ * @return
+ */
+ public Integer updateRefundItem(SeVcRefundItem po) {
+ return seVcRefundItemMapper.updateByPrimaryKeySelective(po);
+ }
+
+ /**
+ * 鏍规嵁璁㈠崟鍙风敓鎴愰��娆惧崟鍙�
+ * @param orderNumber
+ * @return
+ */
+ public String generateRefundNumber(String orderNumber) {
+ String refundNumber = seVcRefundItemMapper.getLastRefundNumber(orderNumber);
+ if(refundNumber == null) {
+ refundNumber = orderNumber + "01";
+ return refundNumber;
+ }
+
+ String a = String.format("%02d", (Integer.parseInt(refundNumber.substring(29,30).trim()) + 1));
+ return a;
+ }
+
+ /**
+ * 鏍规嵁璁㈠崟鍙疯幏鍙栧厖鍊奸噾棰濓紝璋冪敤閫�娆剧敵璇锋帴鍙d娇鐢�
+ * @param orderNumber
+ * @return
+ */
+ public Integer getRechargeAmountByOrderNumber(String orderNumber) {
+ return seVcRechargeMapper.getRechargeAmountByOrderNumber(orderNumber);
+
+ }
+
+ /**
+ * 鏍规嵁閫�娆鹃�氱煡鎺ュ彛杩斿洖鐨勯��娆惧崟鍙峰弽鏌ラ��娆綢D锛屾煡璇㈣閫�娆綢D涓嬫湭閫�娆捐褰曟暟閲�
+ * @param refundNumber
+ * @return
+ */
+ public Integer getNoRefundedCount(String refundNumber) {
+ return seVcRefundItemMapper.getNoRefundedCount(refundNumber);
+ }
+
+ /**
+ * 鏍规嵁閫�娆惧崟鍙疯幏鍙栭��娆綢D锛岄��娆鹃�氱煡鍚庢洿鏂伴��娆捐〃鎵�闇�
+ * @param refundNumber
+ * @return
+ */
+ public Long getRefundIdByRefundNumber(String refundNumber) {
+ return seVcRefundItemMapper.getRefundIdByRefundNumber(refundNumber);
+ }
+
+ /**
+ * 鑾峰彇铏氭嫙鍗″厖鍊艰褰�
+ * @param dtoVcRecharge
+ * @return
+ */
+ public QueryResultVo<List<VoVcRecharge>> getVcRechargeRecords(DtoVcRecharge dtoVcRecharge){
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(dtoVcRecharge);
+ Long itemTotal = seVirtualCardMapper.getRechargeRecordCount(params);
+
+ QueryResultVo<List<VoVcRecharge>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = dtoVcRecharge.pageSize;
+ rsVo.pageCurr = dtoVcRecharge.pageCurr;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = seVirtualCardMapper.getVcRechargeRecords(params);
+
+ return rsVo;
+ }
+}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoAudit.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoAudit.java
new file mode 100644
index 0000000..d7694e2
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoAudit.java
@@ -0,0 +1,35 @@
+package com.dy.pipIrrWechat.virtualCard.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:38
+ * @LastEditTime 2024-07-11 15:38
+ * @Description
+ */
+
+@Data
+public class DtoAudit {
+ public static final long serialVersionUID = 202407111539001L;
+
+ /**
+ * 铏氭嫙鍗¢��娆綢D
+ */
+ @NotNull(message = "铏氭嫙鍗¢��娆綢D涓嶈兘涓虹┖")
+ private Long refundId;
+
+ /**
+ * 瀹℃牳浜篒D
+ */
+ @NotNull(message = "瀹℃牳ID涓嶈兘涓虹┖")
+ private Long auditor;
+
+ /**
+ * 瀹℃牳澶囨敞
+ */
+ @Length(max = 200)
+ private String remarks;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRefund.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRefund.java
new file mode 100644
index 0000000..e3fdaba
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRefund.java
@@ -0,0 +1,30 @@
+package com.dy.pipIrrWechat.virtualCard.dto;
+
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Positive;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:39
+ * @LastEditTime 2024-07-11 15:39
+ * @Description
+ */
+
+@Data
+public class DtoRefund {
+ public static final long serialVersionUID = 202407111540001L;
+
+ /**
+ * 铏氭嫙鍗$紪鍙�
+ */
+ @NotNull(message = "铏氭嫙鍗$紪鍙蜂笉鑳戒负绌�")
+ private Long virtualId;
+
+ /**
+ * 閫�娆鹃噾棰�
+ */
+ @NotNull(message = "閫�娆鹃噾棰濅笉鑳戒负绌�")
+ @Positive(message = "鍏呭�奸噾棰濆繀椤讳负澶т簬0鐨勬暣鏁�")
+ private Integer refundAmount;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRegist.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRegist.java
new file mode 100644
index 0000000..e6ad96f
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoRegist.java
@@ -0,0 +1,23 @@
+package com.dy.pipIrrWechat.virtualCard.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:40
+ * @LastEditTime 2024-07-11 15:40
+ * @Description
+ */
+
+@Data
+public class DtoRegist {
+ public static final long serialVersionUID = 202407111541001L;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @NotNull(message = "鍐滄埛ID涓嶈兘涓虹┖")
+ private Long clientId;
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVcRecharge.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVcRecharge.java
new file mode 100644
index 0000000..5956583
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVcRecharge.java
@@ -0,0 +1,15 @@
+package com.dy.pipIrrWechat.virtualCard.dto;
+
+import com.dy.common.webUtil.QueryConditionVo;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:41
+ * @LastEditTime 2024-07-11 15:41
+ * @Description
+ */
+
+@Data
+public class DtoVcRecharge extends QueryConditionVo {
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVirtualCard.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVirtualCard.java
new file mode 100644
index 0000000..68086f0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/dto/DtoVirtualCard.java
@@ -0,0 +1,41 @@
+package com.dy.pipIrrWechat.virtualCard.dto;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:43
+ * @LastEditTime 2024-07-11 15:43
+ * @Description
+ */
+
+@Data
+public class DtoVirtualCard {
+ public static final long serialVersionUID = 202407111543001L;
+
+ /**
+ * 璁㈠崟鍙�
+ */
+ @NotBlank(message = "璁㈠崟鍙蜂笉鑳戒负绌�")
+ private String orderNumber;
+
+ /**
+ * 鍐滄埛ID
+ */
+ @NotNull(message = "鍐滄埛ID涓嶈兘涓虹┖")
+ private Long clientId;
+
+ /**
+ * 铏氭嫙鍗D
+ */
+ @NotNull(message = "铏氭嫙鍗D涓嶈兘涓虹┖")
+ private Long virtualId;
+
+ /**
+ * 鍏呭�奸噾棰�
+ */
+ @NotNull(message = "鍏呭�奸噾棰濅笉鑳戒负绌�")
+ private Integer rechargeAmount;
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/LastOperateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/LastOperateENUM.java
new file mode 100644
index 0000000..7a4cc72
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/LastOperateENUM.java
@@ -0,0 +1,27 @@
+package com.dy.pipIrrWechat.virtualCard.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:45
+ * @LastEditTime 2024-07-11 15:45
+ * @Description
+ */
+
+@Getter
+@AllArgsConstructor
+public enum LastOperateENUM {
+ OPEN_ACCOUNT((byte)1, "寮�鎴�"),
+ RECHARGE((byte)2, "鍏呭��"),
+ CONSUME((byte)3, "娑堣垂"),
+ APPLY_REFUND((byte)4, "鐢宠閫�娆�"),
+ AUDIT_REFUND((byte)5, "閫�娆惧鏍�"),
+ REFUND((byte)6, "閫�娆�"),
+ OPEN_VALVE((byte)7, "寮�闃�"),
+ CLOSE_VALVE((byte)8, "鍏抽榾");
+
+ private final Byte code;
+ private final String message;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/OrderStateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/OrderStateENUM.java
new file mode 100644
index 0000000..c87a704
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/OrderStateENUM.java
@@ -0,0 +1,21 @@
+package com.dy.pipIrrWechat.virtualCard.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:46
+ * @LastEditTime 2024-07-11 15:46
+ * @Description
+ */
+
+@Getter
+@AllArgsConstructor
+public enum OrderStateENUM {
+ NON_PAYMENT((byte)1, "鏈敮浠�"),
+ PAID((byte)2, "宸叉敮浠�");
+
+ private final Byte code;
+ private final String message;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundItemStateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundItemStateENUM.java
new file mode 100644
index 0000000..96b835e
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundItemStateENUM.java
@@ -0,0 +1,21 @@
+package com.dy.pipIrrWechat.virtualCard.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:47
+ * @LastEditTime 2024-07-11 15:47
+ * @Description
+ */
+
+@Getter
+@AllArgsConstructor
+public enum RefundItemStateENUM {
+ NO_REFUND((byte)1, "鏈��娆�"),
+ REFUNDED((byte)2, "宸查��娆�");
+
+ private final Byte code;
+ private final String message;
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundStateENUM.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundStateENUM.java
new file mode 100644
index 0000000..eb74301
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/virtualCard/enums/RefundStateENUM.java
@@ -0,0 +1,22 @@
+package com.dy.pipIrrWechat.virtualCard.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-07-11 15:48
+ * @LastEditTime 2024-07-11 15:48
+ * @Description
+ */
+
+@Getter
+@AllArgsConstructor
+public enum RefundStateENUM {
+ TO_AUDIT((byte)1, "寰呭鏍�"),
+ TO_REFUND((byte)2, "寰呴��娆�"),
+ REFUNDED((byte)3, "宸查��娆�");
+
+ private final Byte code;
+ private final String message;
+}
--
Gitblit v1.8.0