mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-13 14:30:08 +08:00
update 对接lianlian平台
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -68,4 +69,6 @@ public interface ThirdPartyPlatformConfigMapper {
|
||||
* @return
|
||||
*/
|
||||
ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId);
|
||||
|
||||
ThirdPartySecretInfoVO queryThirdPartySecretInfo(String operatorId);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 第三方平台配置Service接口
|
||||
*
|
||||
@@ -67,18 +67,5 @@ public interface ThirdPartySettingInfoService {
|
||||
*/
|
||||
public int deleteThirdPartySettingInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 根据站点id 查询配置列表
|
||||
*
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
|
||||
|
||||
/**
|
||||
* 修改站点互联互通配置
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
int updateStationSettingInfo(ThirdPartySettingInfo info);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||
import com.jsowell.pile.mapper.ThirdPartyPlatformConfigMapper;
|
||||
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.ThirdPartyPlatformConfigMapper;
|
||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对接平台配置信息Service业务层处理
|
||||
@@ -98,4 +99,12 @@ public class ThirdPartyPlatformConfigServiceImpl implements ThirdPartyPlatformCo
|
||||
public ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId) {
|
||||
return thirdPartyPlatformConfigMapper.getInfoByOperatorId(operatorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询第三方平台配置的密钥信息
|
||||
* @return
|
||||
*/
|
||||
public ThirdPartySecretInfoVO queryThirdPartySecretInfo(String operatorId) {
|
||||
return thirdPartyPlatformConfigMapper.queryThirdPartySecretInfo(operatorId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.mapper.ThirdPartySettingInfoMapper;
|
||||
import com.jsowell.pile.service.ThirdPartySettingInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.ThirdPartySettingInfoMapper;
|
||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
||||
import com.jsowell.pile.service.ThirdPartySettingInfoService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 第三方平台配置Service业务层处理
|
||||
@@ -98,33 +98,5 @@ public class ThirdPartySettingInfoServiceImpl implements ThirdPartySettingInfoSe
|
||||
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据站点id 查询配置列表
|
||||
*
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ThirdPartySettingInfo getInfoByStationId(Long stationId) {
|
||||
return thirdPartySettingInfoMapper.getInfoByStationId(stationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点互联互通配置
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateStationSettingInfo(ThirdPartySettingInfo info) {
|
||||
Long stationId = info.getStationId();
|
||||
ThirdPartySettingInfo infoByStationId = getInfoByStationId(stationId);
|
||||
if (infoByStationId == null) {
|
||||
// 新增
|
||||
return insertThirdPartySettingInfo(info);
|
||||
}else {
|
||||
// 修改
|
||||
info.setId(infoByStationId.getId());
|
||||
return updateThirdPartySettingInfo(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.jsowell.pile.vo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 第三方平台配置的密钥信息
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class ThirdPartySecretInfoVO {
|
||||
// 我方的组织机构代码
|
||||
private String ourOperatorId;
|
||||
|
||||
// 我方生成的唯一识别密钥
|
||||
private String ourOperatorSecret;
|
||||
|
||||
// 我方生成的消息密钥
|
||||
private String ourDataSecret;
|
||||
|
||||
// 我方生成的初始化向量
|
||||
private String ourDataSecretIv;
|
||||
|
||||
// 我方生成的签名密钥
|
||||
private String ourSigSecret;
|
||||
|
||||
// 对接平台的组织机构代码
|
||||
private String theirOperatorId;
|
||||
|
||||
// 对接平台生成的唯一识别密钥
|
||||
private String theirOperatorSecret;
|
||||
|
||||
// 对接平台生成的消息密钥
|
||||
private String theirDataSecret;
|
||||
|
||||
// 对接平台的初始化向量
|
||||
private String theirDataSecretIv;
|
||||
|
||||
// 对接平台生成的签名密钥
|
||||
private String theirSigSecret;
|
||||
|
||||
// 对接平台接口前缀
|
||||
private String theirUrlPrefix;
|
||||
}
|
||||
@@ -110,4 +110,8 @@
|
||||
where del_flag = '0'
|
||||
and operator_id = #{operatorId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="queryThirdPartySecretInfo" resultType="com.jsowell.pile.vo.ThirdPartySecretInfoVO">
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -8,7 +8,6 @@
|
||||
<result property="id" column="id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="urlAddress" column="url_address" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="operatorSecret" column="operator_secret" />
|
||||
<result property="signSecret" column="sign_secret" />
|
||||
@@ -22,12 +21,12 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectThirdPartySettingInfoVo">
|
||||
select id, type, url_address, station_id, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag from thirdparty_setting_info
|
||||
select id, type, url_address, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag from thirdparty_setting_info
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, type, url_address, station_id, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag
|
||||
id, type, url_address, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag
|
||||
</sql>
|
||||
|
||||
<select id="selectThirdPartySettingInfoList" parameterType="com.jsowell.pile.domain.ThirdPartySettingInfo" resultMap="ThirdPartySettingInfoResult">
|
||||
@@ -35,7 +34,6 @@
|
||||
<where>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="urlAddress != null and type != ''"> and url_address = #{urlAddress}</if>
|
||||
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
||||
<if test="operatorId != null and operatorId != ''"> and operator_id = #{operatorId}</if>
|
||||
<if test="operatorSecret != null and operatorSecret != ''"> and operator_secret = #{operatorSecret}</if>
|
||||
<if test="signSecret != null and signSecret != ''"> and sign_secret = #{signSecret}</if>
|
||||
@@ -54,7 +52,6 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null">type,</if>
|
||||
<if test="urlAddress != null">url_address,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="operatorId != null">operator_id,</if>
|
||||
<if test="operatorSecret != null">operator_secret,</if>
|
||||
<if test="signSecret != null">sign_secret,</if>
|
||||
@@ -88,7 +85,6 @@
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="urlAddress != null">url_address = #{urlAddress},</if>
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="operatorId != null">operator_id = #{operatorId},</if>
|
||||
<if test="operatorSecret != null">operator_secret = #{operatorSecret},</if>
|
||||
<if test="signSecret != null">sign_secret = #{signSecret},</if>
|
||||
@@ -114,19 +110,10 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getInfoByStationId" resultMap="ThirdPartySettingInfoResult">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from thirdparty_setting_info
|
||||
where station_id = #{stationId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="selectThirdInfo" resultMap="ThirdPartySettingInfoResult">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from thirdparty_setting_info
|
||||
where del_flag = '0'
|
||||
<if test="stationId != null">
|
||||
and station_id = #{stationId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and type = #{type,jdbcType=VARCHAR}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user