第三方平台站点关系表新增 启动方式字段

This commit is contained in:
Lemon
2024-03-18 09:25:01 +08:00
parent d07b0f6ac9
commit 04afd5aa53
6 changed files with 33 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ package com.jsowell.pile.domain;
import com.jsowell.common.annotation.Excel; import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity; import com.jsowell.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@@ -11,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author jsowell * @author jsowell
* @date 2023-06-06 * @date 2023-06-06
*/ */
@Data
public class ThirdPartyStationRelation extends BaseEntity { public class ThirdPartyStationRelation extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -31,43 +33,16 @@ public class ThirdPartyStationRelation extends BaseEntity {
@Excel(name = "三方配置类型") @Excel(name = "三方配置类型")
private String thirdPartyType; private String thirdPartyType;
/**
* 启动方式1-我方启动)
*/
private String startMode;
/** /**
* 删除标识 * 删除标识
*/ */
private String delFlag; private String delFlag;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setStationId(Long stationId) {
this.stationId = stationId;
}
public Long getStationId() {
return stationId;
}
public void setThirdPartyType(String thirdPartyType) {
this.thirdPartyType = thirdPartyType;
}
public String getThirdPartyType() {
return thirdPartyType;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE) return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)

View File

@@ -14,6 +14,8 @@ public class ThirdPartyStationRelationVO {
private String thirdPartyType; private String thirdPartyType;
private String startMode;
private String urlAddress; private String urlAddress;
private String operatorId; private String operatorId;
private String operatorSecret; private String operatorSecret;

View File

@@ -8,6 +8,7 @@
<result property="id" column="id" /> <result property="id" column="id" />
<result property="stationId" column="station_id" /> <result property="stationId" column="station_id" />
<result property="thirdPartyType" column="third_party_type" /> <result property="thirdPartyType" column="third_party_type" />
<result property="startMode" column="start_mode" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
@@ -16,11 +17,11 @@
</resultMap> </resultMap>
<sql id="selectThirdPartyStationRelationVo"> <sql id="selectThirdPartyStationRelationVo">
select id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag from thirdparty_station_relation select id, station_id, third_party_type, start_mode, create_time, create_by, update_time, update_by, del_flag from thirdparty_station_relation
</sql> </sql>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag id, station_id, third_party_type, start_mode, create_time, create_by, update_time, update_by, del_flag
</sql> </sql>
<select id="selectThirdPartyStationRelationList" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" resultMap="ThirdPartyStationRelationResult"> <select id="selectThirdPartyStationRelationList" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" resultMap="ThirdPartyStationRelationResult">
@@ -40,6 +41,7 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationId != null">station_id,</if> <if test="stationId != null">station_id,</if>
<if test="thirdPartyType != null">third_party_type,</if> <if test="thirdPartyType != null">third_party_type,</if>
<if test="startMode != null">start_mode,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
@@ -49,6 +51,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="stationId != null">#{stationId},</if> <if test="stationId != null">#{stationId},</if>
<if test="thirdPartyType != null">#{thirdPartyType},</if> <if test="thirdPartyType != null">#{thirdPartyType},</if>
<if test="startMode != null">#{startMode},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
@@ -62,6 +65,7 @@
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="stationId != null">station_id = #{stationId},</if> <if test="stationId != null">station_id = #{stationId},</if>
<if test="thirdPartyType != null">third_party_type = #{thirdPartyType},</if> <if test="thirdPartyType != null">third_party_type = #{thirdPartyType},</if>
<if test="startMode != null">start_mode = #{startMode},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
@@ -86,6 +90,7 @@
select select
t1.station_id as stationId, t1.station_id as stationId,
t1.third_party_type as thirdPartyType, t1.third_party_type as thirdPartyType,
t1.start_mode as startMode,
t2.url_address as urlAddress, t2.url_address as urlAddress,
t2.operator_id as operatorId, t2.operator_id as operatorId,
t2.operator_secret as operatorSecret, t2.operator_secret as operatorSecret,
@@ -107,6 +112,7 @@
select select
t1.station_id as stationId, t1.station_id as stationId,
t1.third_party_type as thirdPartyType, t1.third_party_type as thirdPartyType,
t1.start_mode as startMode,
t2.url_address as urlAddress, t2.url_address as urlAddress,
t2.operator_id as operatorId, t2.operator_id as operatorId,
t2.operator_secret as operatorSecret, t2.operator_secret as operatorSecret,

View File

@@ -104,9 +104,13 @@ public class CommonService {
* @param dto * @param dto
*/ */
public void insertInfo2DataBase(PushStationInfoDTO dto) { public void insertInfo2DataBase(PushStationInfoDTO dto) {
String thirdPartyType = dto.getThirdPartyType();
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(dto.getStationId()); relation.setStationId(dto.getStationId());
relation.setThirdPartyType(dto.getThirdPartyType()); relation.setThirdPartyType(thirdPartyType);
if (StringUtils.equals(thirdPartyType, ThirdPlatformTypeEnum.HUA_WEI.getCode())) {
relation.setStartMode(Constants.ONE);
}
ThirdPartyStationRelationVO vo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO vo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (vo != null) { if (vo != null) {
return; return;
@@ -202,6 +206,10 @@ public class CommonService {
String changedStatus = changeConnectorStatus(connectorStatus, realTimeMonitorData.getPutGunType()); String changedStatus = changeConnectorStatus(connectorStatus, realTimeMonitorData.getPutGunType());
for (ThirdPartyStationRelationVO vo : list) { for (ThirdPartyStationRelationVO vo : list) {
String thirdPartyType = vo.getThirdPartyType(); String thirdPartyType = vo.getThirdPartyType();
if (StringUtils.equals(Constants.TWO, vo.getStartMode())) {
// 如果是对接平台方启动,不需要传
continue;
}
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) {
// 联联 // 联联
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
@@ -309,6 +317,10 @@ public class CommonService {
} }
for (ThirdPartyStationRelationVO relationVO : relationInfoList) { for (ThirdPartyStationRelationVO relationVO : relationInfoList) {
String thirdPartyType = relationVO.getThirdPartyType(); String thirdPartyType = relationVO.getThirdPartyType();
if (StringUtils.equals(Constants.TWO, relationVO.getStartMode())) {
// 如果是对接平台方启动,不需要传
continue;
}
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) {
// 联联平台 // 联联平台
// 推送停止充电结果 // 推送停止充电结果

View File

@@ -773,6 +773,8 @@ public class HuaweiServiceV2 {
.build(); .build();
transactionService.doUpdateOrder(transactionDTO); transactionService.doUpdateOrder(transactionDTO);
// TODO 订单退款
// 构建返回参数 // 构建返回参数
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("StartChargeSeq", startChargeSeq); jsonObject.put("StartChargeSeq", startChargeSeq);

View File

@@ -387,8 +387,7 @@ public class LianLianServiceImpl implements LianLianService {
String dataSecret = "E6gnWuz0QzBW75CR"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR String dataSecret = "E6gnWuz0QzBW75CR"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR
String dataSecretIV = "SXejaSUx5yud8UHm"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm String dataSecretIV = "SXejaSUx5yud8UHm"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm
String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA
String dataString = "GZlmSIZOVzT+Yvpc2PmvNnWXL8LvGl835nWGQwrKl7/Ao4jlvMsK7wV1VfJz7jsWIdRmgQd6ZrAQuoxD5NfGxjIDuic9McX6JyvxK/9GPYq4q+14ojuwUk1XNCK6Ae1a9cKP4b6\n" + String dataString = "o1tqVesDkPUXBNdUmE10Z7FWjAf/KFO3Iq4NWNCcFeq0h8wBcdWcZwojkdv2TNFpS0Qftv1HWDTdm+8Pjj0AIw==";
"39x2Crof6/fRfnSvXR+6IUDWAl8gIVMkbHIQUkqs58C1Ik7d1OAss4eBmgeSoUddUDQ2Qj3nmCFGBmg==";
// 解密data // 解密data
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes()); byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());