Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
| | |
| | | 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); |
| | | } |
New file |
| | |
| | | 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); |
| | | } |
New file |
| | |
| | | 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); |
| | | |
| | | } |
| | |
| | | * 电子地图区域着色 |
| | | */ |
| | | @Schema(description = "区域着色", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "区域着色长度小于{max}字", min = 1, max = 6) |
| | | @Length(message = "区域着色长度小于{max}字", min = 0, max = 6) |
| | | public String color; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Length(message = "备注长度小于{max}字", min = 1, max = 50) |
| | | @Length(message = "备注长度小于{max}字", min = 0, max = 50) |
| | | public String remark; |
| | | |
| | | /** |
New file |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 轮灌组ID |
| | | */ |
| | | @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; |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long id; |
| | | |
| | | @NotBlank(message = "通讯协议不能为空") |
| | | private String protocol; |
| | | |
| | | /** |
| | | * 水卡地址 |
| | | */ |
| | |
| | | #name: sp |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_sp?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_sp?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://192.168.40.166:3306/pipIrr_sp?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_sp?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | #name: ym |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: 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://127.0.0.1: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://127.0.0.1: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!@# |
New file |
| | |
| | | <?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> |
New file |
| | |
| | | <?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> |
| | |
| | | rtus.isOnLine = #{isOnLine} |
| | | </if> |
| | | <if test="intakeNum != null and intakeNum != ''"> |
| | | AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') |
| | | AND inta.name = #{intakeNum} |
| | | </if> |
| | | </where> |
| | | order by con.id ASC |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_client_card--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> |
| | | <result column="cardAddr" jdbcType="VARCHAR" property="cardaddr" /> |
| | | <result column="cardNum" jdbcType="BIGINT" property="cardnum" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardAddr, cardNum, clientId, money, `state`, original_card_id, createDt, replaceDt, rechargeDt, |
| | | id, protocol, cardAddr, cardNum, clientId, money, `state`, original_card_id, createDt, replaceDt, rechargeDt, |
| | | lossDtDt, cancelDt, unlockDt, reversalDt, refundDt, consumeDt, lastOper, remarks |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard"> |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card (id, cardAddr, cardNum, clientId, |
| | | insert into se_client_card (id, protocol, cardAddr, cardNum, clientId, |
| | | money, `state`, original_card_id, createDt, |
| | | replaceDt, rechargeDt, lossDtDt, |
| | | cancelDt, unlockDt, reversalDt, refundDt, |
| | | consumeDt, lastOper, remarks |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, |
| | | values (#{id,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, |
| | | #{money,jdbcType=FLOAT}, #{state,jdbcType=TINYINT}, #{originalCardId,jdbcType=BIGINT}, #{createdt,jdbcType=TIMESTAMP}, |
| | | #{replacedt,jdbcType=TIMESTAMP}, #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, |
| | | #{canceldt,jdbcType=TIMESTAMP}, #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, |
| | |
| | | <!--@mbg.generated--> |
| | | insert into se_client_card |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="protocol != null"> |
| | | protocol, |
| | | </if> |
| | | <if test="cardaddr != null"> |
| | | cardAddr, |
| | | </if> |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="protocol != null"> |
| | | #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cardaddr != null"> |
| | | #{cardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | |
| | | <!--@mbg.generated--> |
| | | update se_client_card |
| | | <set> |
| | | <if test="protocol != null"> |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cardaddr != null"> |
| | | cardAddr = #{cardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard"> |
| | | <!--@mbg.generated--> |
| | | update se_client_card |
| | | set cardAddr = #{cardaddr,jdbcType=VARCHAR}, |
| | | set protocol = #{protocol,jdbcType=VARCHAR} |
| | | cardAddr = #{cardaddr,jdbcType=VARCHAR}, |
| | | cardNum = #{cardnum,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | 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: |
| | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class IrrigateGroupSv { |
| | | |
| | | @Autowired |
| | | private IrIrrigateGroupMapper irIrrigateGroupMapper; |
| | | @Autowired |
| | | private IrGroupUnitMapper irGroupUnitMapper; |
| | | |
| | | @Autowired |
| | | private IrGroupClientMapper irGroupClientMapper; |
| | | |
| | | /** |
| | | * 创建轮灌组 |
| | |
| | | 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); |
| | | } |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 轮灌组ID |
| | | */ |
| | | @NotNull(message = "轮灌组不能为空") |
| | | private Long groupId; |
| | | |
| | | /** |
| | | * 农户ID |
| | | */ |
| | | @NotNull(message = "农户不能为空") |
| | | private Long clientId; |
| | | |
| | | /** |
| | | * 操作员 |
| | | */ |
| | | @NotNull(message = "操作员不能为空") |
| | | private Long operator; |
| | | } |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class IrrigateUnitSv { |
| | | |
| | | @Autowired |
| | | private IrIrrigateUnitMapper irIrrigateUnitMapper; |
| | | @Autowired |
| | | private IrGroupUnitMapper irGroupUnitMapper; |
| | | |
| | | @Autowired |
| | | private IrUnitClientMapper irUnitClientMapper; |
| | | |
| | | /** |
| | | * 创建灌溉单元 |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | PLEASE_INPUT_PROJECT_ID(10002, "请输入项目ID"), |
| | | 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; |
| | |
| | | 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.*; |
| | |
| | | @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)在水卡表中针对水卡编号(cardNum)进行模糊查询 |
| | |
| | | * 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 原水卡ID |
| | | * amount 充值金额,充值接口为输入参数,补卡接口为原卡退还金额 |
| | | * reissueAmount 补卡金额,补卡时使用 |
| | | * paymentId 支付方式编号 |
| | |
| | | * activeTime 开卡时间 |
| | | */ |
| | | String cardAddr = po.getCardAddr(); |
| | | String clientNum = po.getClientNum(); |
| | | Integer cardCost = po.getCardCost(); |
| | | Long originalCardId = po.getOriginalCardId(); |
| | | Float amount = po.getAmount(); |
| | |
| | | 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()); |
| | | } |
| | | |
| | | /** |
| | | * 添加农户卡记录,退还金额作为当前余额 |
| | |
| | | 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()); |
| | |
| | | * 如果操作人员开卡时输入了充值金额,则开卡后调用充值功能 |
| | | * 补卡除外,补卡的退还金额是从挂失卡中转移过来的,没有实际金钱交易 |
| | | */ |
| | | 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); |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | String cardAddr = po.getCardAddr(); |
| | | String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Long cardNum = po.getCardNum(); |
| | | Long cardId = 0L; |
| | | Integer cardCost = Optional.ofNullable(po.getCardCost()).orElse(0); |
| | |
| | | Long paymentId = po.getPaymentId(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | String protocol = null; |
| | | |
| | | // 判断当前水卡是否为挂失状态且未补卡,仅已经挂失且未补卡的可以补卡 |
| | | if(!cardOperateSv.isLostAndUnreplaced(cardNum)) { |
| | |
| | | } |
| | | clientNum = map.get("clientNum").toString(); |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientId = Long.parseLong(map.get("clientId").toString()); |
| | | |
| | | /** |
| | | * 如果是补卡调用的开卡且转移了退还金额,需修改挂失卡余额为0 |
| | |
| | | /** |
| | | * 添加开卡记录,退还金额冲到新卡中 |
| | | */ |
| | | 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()); |
| | |
| | | @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); |
| | | } |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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()); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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) { |
| | |
| | | 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) { |
| | |
| | | // 验证操作类型是否正确 |
| | | 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) { |
| | |
| | | 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) { |
New file |
| | |
| | | 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; |
| | | } |
| | |
| | | * @author ZhuBaoMin |
| | | * @date 2024-01-18 19:44 |
| | | * @LastEditTime 2024-01-18 19:44 |
| | | * @Description |
| | | * @Description 开卡及补卡传入对象 |
| | | */ |
| | | |
| | | @Data |
| | |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "开卡传入对象") |
| | | @Schema(name = "开卡及补卡传入对象") |
| | | public class DtoActiveCard { |
| | | public static final long serialVersionUID = 202401181945001L; |
| | | |
| | |
| | | private String clientNum; |
| | | |
| | | /** |
| | | * 农户ID(主键),不是开卡接口传入,由农户编号获得,保存开卡记录和充值记录都需要 |
| | | * 农户ID(主键) |
| | | */ |
| | | @Schema(description = "农户ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long clientId; |
| | |
| | | * 充值金额 |
| | | */ |
| | | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message="充值金额不能小于0") |
| | | private Float amount; |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | 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()) ; |
| | |
| | | |
| | | 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.*; |
| | | |
| | | /** |
| | |
| | | @Schema(name = "交易汇总查询条件") |
| | | public class QoSummary extends QueryConditionVo { |
| | | @Schema(description = "查询起始日期") |
| | | @NotBlank(message = "查询起始日期不能为空") |
| | | public String timeStart; |
| | | |
| | | @Schema(description = "查询截止日期") |
| | | @NotBlank(message = "查询截止日期不能为空") |
| | | public String timeStop; |
| | | |
| | | @Schema(description = "收银员ID") |
| | | @NotNull(message = "收银员不能为空") |
| | | public Long cashierId; |
| | | } |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | |
| | | // 虚拟卡状态为使用中,且不是强制开阀时提示 |
| | | 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()); |
| | | } |
| | | |
| | | // 获取水价 |
New file |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 虚拟卡退款ID |
| | | */ |
| | | @NotNull(message = "虚拟卡退款ID不能为空") |
| | | private Long refundId; |
| | | |
| | | /** |
| | | * 审核人ID |
| | | */ |
| | | @NotNull(message = "审核ID不能为空") |
| | | private Long auditor; |
| | | |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | @Length(max = 200) |
| | | private String remarks; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | } |
New file |
| | |
| | | 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 { |
| | | } |
New file |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 虚拟卡ID |
| | | */ |
| | | @NotNull(message = "虚拟卡ID不能为空") |
| | | private Long virtualId; |
| | | |
| | | /** |
| | | * 充值金额 |
| | | */ |
| | | @NotNull(message = "充值金额不能为空") |
| | | private Integer rechargeAmount; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |
New file |
| | |
| | | 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; |
| | | } |