This commit is contained in:
Lemon
2023-05-24 15:27:08 +08:00
parent 8e509dd559
commit 198ebfeb1a
5 changed files with 143 additions and 102 deletions

View File

@@ -11,142 +11,149 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author jsowell * @author jsowell
* @date 2023-05-24 * @date 2023-05-24
*/ */
public class ThirdPartySettingInfo extends BaseEntity public class ThirdPartySettingInfo extends BaseEntity {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键 */ /**
* 主键
*/
private Long id; private Long id;
/** 对接类型1-联联平台) */ /**
* 对接类型1-联联平台)
*/
@Excel(name = "对接类型", readConverterExp = "1=-联联平台") @Excel(name = "对接类型", readConverterExp = "1=-联联平台")
private String type; private String type;
/** 站点id */ /**
* 站点id
*/
@Excel(name = "站点id") @Excel(name = "站点id")
private String stationId; private Long stationId;
/** 运营商id */ /**
* 运营商id
*/
@Excel(name = "运营商id") @Excel(name = "运营商id")
private String operatorId; private String operatorId;
/** 运营商密钥 */ /**
* 运营商密钥
*/
@Excel(name = "运营商密钥") @Excel(name = "运营商密钥")
private String operatorSecret; private String operatorSecret;
/** 签名密钥 */ /**
* 签名密钥
*/
@Excel(name = "签名密钥") @Excel(name = "签名密钥")
private String signSecret; private String signSecret;
/** 消息密钥 */ /**
* 消息密钥
*/
@Excel(name = "消息密钥") @Excel(name = "消息密钥")
private String dataSecret; private String dataSecret;
/** 消息密钥初始化向量 */ /**
* 消息密钥初始化向量
*/
@Excel(name = "消息密钥初始化向量") @Excel(name = "消息密钥初始化向量")
private String dataSecretIv; private String dataSecretIv;
/** 删除标识 */ /**
* 删除标识
*/
private String delFlag; private String delFlag;
public void setId(Long id) public void setId(Long id) {
{
this.id = id; this.id = id;
} }
public Long getId() public Long getId() {
{
return id; return id;
} }
public void setType(String type)
{ public void setType(String type) {
this.type = type; this.type = type;
} }
public String getType() public String getType() {
{
return type; return type;
} }
public void setStationId(String stationId)
{ public void setStationId(Long stationId) {
this.stationId = stationId; this.stationId = stationId;
} }
public String getStationId() public Long getStationId() {
{
return stationId; return stationId;
} }
public void setOperatorId(String operatorId)
{ public void setOperatorId(String operatorId) {
this.operatorId = operatorId; this.operatorId = operatorId;
} }
public String getOperatorId() public String getOperatorId() {
{
return operatorId; return operatorId;
} }
public void setOperatorSecret(String operatorSecret)
{ public void setOperatorSecret(String operatorSecret) {
this.operatorSecret = operatorSecret; this.operatorSecret = operatorSecret;
} }
public String getOperatorSecret() public String getOperatorSecret() {
{
return operatorSecret; return operatorSecret;
} }
public void setSignSecret(String signSecret)
{ public void setSignSecret(String signSecret) {
this.signSecret = signSecret; this.signSecret = signSecret;
} }
public String getSignSecret() public String getSignSecret() {
{
return signSecret; return signSecret;
} }
public void setDataSecret(String dataSecret)
{ public void setDataSecret(String dataSecret) {
this.dataSecret = dataSecret; this.dataSecret = dataSecret;
} }
public String getDataSecret() public String getDataSecret() {
{
return dataSecret; return dataSecret;
} }
public void setDataSecretIv(String dataSecretIv)
{ public void setDataSecretIv(String dataSecretIv) {
this.dataSecretIv = dataSecretIv; this.dataSecretIv = dataSecretIv;
} }
public String getDataSecretIv() public String getDataSecretIv() {
{
return dataSecretIv; return dataSecretIv;
} }
public void setDelFlag(String delFlag)
{ public void setDelFlag(String delFlag) {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
public String getDelFlag() public String getDelFlag() {
{
return delFlag; return delFlag;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE) return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
.append("id", getId()) .append("id", getId())
.append("type", getType()) .append("type", getType())
.append("stationId", getStationId()) .append("stationId", getStationId())
.append("operatorId", getOperatorId()) .append("operatorId", getOperatorId())
.append("operatorSecret", getOperatorSecret()) .append("operatorSecret", getOperatorSecret())
.append("signSecret", getSignSecret()) .append("signSecret", getSignSecret())
.append("dataSecret", getDataSecret()) .append("dataSecret", getDataSecret())
.append("dataSecretIv", getDataSecretIv()) .append("dataSecretIv", getDataSecretIv())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("delFlag", getDelFlag()) .append("delFlag", getDelFlag())
.toString(); .toString();
} }
} }

View File

@@ -1,7 +1,9 @@
package com.jsowell.pile.mapper; package com.jsowell.pile.mapper;
import java.util.List; import java.util.List;
import com.jsowell.pile.domain.ThirdPartySettingInfo; import com.jsowell.pile.domain.ThirdPartySettingInfo;
import org.springframework.stereotype.Component;
/** /**
* 第三方平台配置Mapper接口 * 第三方平台配置Mapper接口
@@ -9,8 +11,8 @@ import com.jsowell.pile.domain.ThirdPartySettingInfo;
* @author jsowell * @author jsowell
* @date 2023-05-24 * @date 2023-05-24
*/ */
public interface ThirdPartySettingInfoMapper @Component
{ public interface ThirdPartySettingInfoMapper {
/** /**
* 查询第三方平台配置 * 查询第三方平台配置
* *
@@ -58,4 +60,12 @@ public interface ThirdPartySettingInfoMapper
* @return 结果 * @return 结果
*/ */
public int deleteThirdPartySettingInfoByIds(Long[] ids); public int deleteThirdPartySettingInfoByIds(Long[] ids);
/**
* 根据站点id 查询配置列表
*
* @param stationId
* @return
*/
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
} }

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.service; package com.jsowell.pile.service;
import java.util.List; import java.util.List;
import com.jsowell.pile.domain.ThirdPartySettingInfo; import com.jsowell.pile.domain.ThirdPartySettingInfo;
/** /**
@@ -9,8 +10,7 @@ import com.jsowell.pile.domain.ThirdPartySettingInfo;
* @author jsowell * @author jsowell
* @date 2023-05-24 * @date 2023-05-24
*/ */
public interface IThirdPartySettingInfoService public interface IThirdPartySettingInfoService {
{
/** /**
* 查询第三方平台配置 * 查询第三方平台配置
* *
@@ -58,4 +58,12 @@ public interface IThirdPartySettingInfoService
* @return 结果 * @return 结果
*/ */
public int deleteThirdPartySettingInfoById(Long id); public int deleteThirdPartySettingInfoById(Long id);
/**
* 根据站点id 查询配置列表
*
* @param stationId
* @return
*/
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
} }

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.service.impl; package com.jsowell.pile.service.impl;
import java.util.List; import java.util.List;
import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -15,8 +16,7 @@ import com.jsowell.pile.service.IThirdPartySettingInfoService;
* @date 2023-05-24 * @date 2023-05-24
*/ */
@Service @Service
public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoService public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoService {
{
@Autowired @Autowired
private ThirdPartySettingInfoMapper thirdPartySettingInfoMapper; private ThirdPartySettingInfoMapper thirdPartySettingInfoMapper;
@@ -27,8 +27,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 第三方平台配置 * @return 第三方平台配置
*/ */
@Override @Override
public ThirdPartySettingInfo selectThirdPartySettingInfoById(Long id) public ThirdPartySettingInfo selectThirdPartySettingInfoById(Long id) {
{
return thirdPartySettingInfoMapper.selectThirdPartySettingInfoById(id); return thirdPartySettingInfoMapper.selectThirdPartySettingInfoById(id);
} }
@@ -39,8 +38,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 第三方平台配置 * @return 第三方平台配置
*/ */
@Override @Override
public List<ThirdPartySettingInfo> selectThirdPartySettingInfoList(ThirdPartySettingInfo thirdPartySettingInfo) public List<ThirdPartySettingInfo> selectThirdPartySettingInfoList(ThirdPartySettingInfo thirdPartySettingInfo) {
{
return thirdPartySettingInfoMapper.selectThirdPartySettingInfoList(thirdPartySettingInfo); return thirdPartySettingInfoMapper.selectThirdPartySettingInfoList(thirdPartySettingInfo);
} }
@@ -51,8 +49,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo) public int insertThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo) {
{
thirdPartySettingInfo.setCreateTime(DateUtils.getNowDate()); thirdPartySettingInfo.setCreateTime(DateUtils.getNowDate());
return thirdPartySettingInfoMapper.insertThirdPartySettingInfo(thirdPartySettingInfo); return thirdPartySettingInfoMapper.insertThirdPartySettingInfo(thirdPartySettingInfo);
} }
@@ -64,8 +61,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo) public int updateThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo) {
{
thirdPartySettingInfo.setUpdateTime(DateUtils.getNowDate()); thirdPartySettingInfo.setUpdateTime(DateUtils.getNowDate());
return thirdPartySettingInfoMapper.updateThirdPartySettingInfo(thirdPartySettingInfo); return thirdPartySettingInfoMapper.updateThirdPartySettingInfo(thirdPartySettingInfo);
} }
@@ -77,8 +73,7 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteThirdPartySettingInfoByIds(Long[] ids) public int deleteThirdPartySettingInfoByIds(Long[] ids) {
{
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoByIds(ids); return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoByIds(ids);
} }
@@ -89,8 +84,18 @@ public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteThirdPartySettingInfoById(Long id) public int deleteThirdPartySettingInfoById(Long id) {
{
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoById(id); return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoById(id);
} }
/**
* 根据站点id 查询配置列表
*
* @param stationId
* @return
*/
@Override
public ThirdPartySettingInfo getInfoByStationId(Long stationId) {
return thirdPartySettingInfoMapper.getInfoByStationId(stationId);
}
} }

View File

@@ -24,6 +24,11 @@
select id, type, 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, 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
</sql> </sql>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, type, station_id, 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"> <select id="selectThirdPartySettingInfoList" parameterType="com.jsowell.pile.domain.ThirdPartySettingInfo" resultMap="ThirdPartySettingInfoResult">
<include refid="selectThirdPartySettingInfoVo"/> <include refid="selectThirdPartySettingInfoVo"/>
<where> <where>
@@ -103,4 +108,10 @@
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
<select id="getInfoByStationId" resultMap="ThirdPartySettingInfoResult">
select <include refid="Base_Column_List"/>
from thirdparty_setting_info
where station_id = #{stationId,jdbcType=BIGINT}
</select>
</mapper> </mapper>