新增 后管生成个人桩时,生成密钥逻辑,并且绑定个人桩时增加密钥校验

This commit is contained in:
DESKTOP-D9QDT1P\JS-ZZA
2023-03-13 17:01:07 +08:00
parent 14c95a68c5
commit db31e0679b
7 changed files with 61 additions and 6 deletions

View File

@@ -40,6 +40,12 @@ public class PileBasicInfo extends BaseEntity {
@Excel(name = "经营类型", readConverterExp = "1=-运营桩2-个人桩")
private String businessType;
/**
* 个人桩密钥(八位,字母数字组合)
*/
@Excel(name = "个人桩密钥")
private String secretKey;
/**
* 软件协议1-云快充2-永联)
*/
@@ -190,12 +196,21 @@ public class PileBasicInfo extends BaseEntity {
return delFlag;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
.append("id", getId())
.append("sn", getSn())
.append("businessType", getBusinessType())
.append("secretKey", getSecretKey())
.append("softwareProtocol", getSoftwareProtocol())
.append("productionDate", getProductionDate())
.append("licenceId", getLicenceId())

View File

@@ -51,4 +51,10 @@ public class BatchCreatePileDTO {
* 备注
*/
private String remark;
/**
* 经营类型
* 1-运营桩2-个人桩
*/
private String chargerPileType;
}

View File

@@ -15,6 +15,11 @@ public class PileMemberBindingDTO {
*/
private String pileSn;
/**
* 个人桩密钥
*/
private String secretKey;
/**
* 手机号
*/

View File

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="sn" column="sn" />
<result property="businessType" column="business_type" />
<result property="secretKey" column="secret_key" />
<result property="softwareProtocol" column="software_protocol" />
<result property="productionDate" column="production_date" />
<result property="licenceId" column="licence_id" />
@@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, sn, business_type, software_protocol, production_date, licence_id, model_id, sim_id,
id, sn, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
merchant_id, station_id, fault_reason, create_by, create_time, update_by, update_time, del_flag, remark
</sql>
@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="sn != null and sn != ''"> and sn = #{sn}</if>
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
<if test="softwareProtocol != null and softwareProtocol != ''"> and software_protocol = #{softwareProtocol}</if>
<!--<if test="params.beginProductionDate != null and params.beginProductionDate != '' and params.endProductionDate != null and params.endProductionDate != ''"> and production_date between #{params.beginProductionDate} and #{params.endProductionDate}</if>
--> <if test="licenceId != null "> and licence_id = #{licenceId}</if>
@@ -67,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sn != null">sn,</if>
<if test="businessType != null">business_type,</if>
<if test="secretKey != null">secret_key,</if>
<if test="softwareProtocol != null">software_protocol,</if>
<if test="productionDate != null">production_date,</if>
<if test="licenceId != null">licence_id,</if>
@@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sn != null">#{sn},</if>
<if test="businessType != null">#{businessType},</if>
<if test="secretKey != null">#{secretKey},</if>
<if test="softwareProtocol != null">#{softwareProtocol},</if>
<if test="productionDate != null">#{productionDate},</if>
<if test="licenceId != null">#{licenceId},</if>
@@ -107,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="sn != null">sn = #{sn},</if>
<if test="businessType != null">business_type = #{businessType},</if>
<if test="secretKey != null">secret_key = #{secretKey},</if>
<if test="softwareProtocol != null">software_protocol = #{softwareProtocol},</if>
<if test="productionDate != null">production_date = #{productionDate},</if>
<if test="licenceId != null">licence_id = #{licenceId},</if>
@@ -189,13 +194,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="batchInsertPileBasicInfo">
insert into pile_basic_info
(sn, business_type, software_protocol, production_date, licence_id, model_id, sim_id,
(sn, business_type, secret_key, software_protocol, production_date, licence_id, model_id, sim_id,
merchant_id, station_id, fault_reason, create_by, update_by, del_flag, remark)
values
<foreach collection="infoList" item="item" separator=",">
(
#{item.sn,jdbcType=VARCHAR},
#{item.businessType,jdbcType=VARCHAR},
#{item.secretKey,jdbcType=VARCHAR},
#{item.softwareProtocol,jdbcType=VARCHAR},
#{item.productionDate,jdbcType=TIMESTAMP},
#{item.licenceId,jdbcType=BIGINT},