新增 第三方平台对接配置 表、实体

This commit is contained in:
Lemon
2023-05-24 15:17:09 +08:00
parent ff3fc98af6
commit 8e509dd559
6 changed files with 580 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,61 @@
package com.jsowell.pile.mapper;
import java.util.List;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
/**
* 第三方平台配置Mapper接口
*
* @author jsowell
* @date 2023-05-24
*/
public interface ThirdPartySettingInfoMapper
{
/**
* 查询第三方平台配置
*
* @param id 第三方平台配置主键
* @return 第三方平台配置
*/
public ThirdPartySettingInfo selectThirdPartySettingInfoById(Long id);
/**
* 查询第三方平台配置列表
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 第三方平台配置集合
*/
public List<ThirdPartySettingInfo> selectThirdPartySettingInfoList(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 新增第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
public int insertThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 修改第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
public int updateThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 删除第三方平台配置
*
* @param id 第三方平台配置主键
* @return 结果
*/
public int deleteThirdPartySettingInfoById(Long id);
/**
* 批量删除第三方平台配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteThirdPartySettingInfoByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
/**
* 第三方平台配置Service接口
*
* @author jsowell
* @date 2023-05-24
*/
public interface IThirdPartySettingInfoService
{
/**
* 查询第三方平台配置
*
* @param id 第三方平台配置主键
* @return 第三方平台配置
*/
public ThirdPartySettingInfo selectThirdPartySettingInfoById(Long id);
/**
* 查询第三方平台配置列表
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 第三方平台配置集合
*/
public List<ThirdPartySettingInfo> selectThirdPartySettingInfoList(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 新增第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
public int insertThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 修改第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
public int updateThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo);
/**
* 批量删除第三方平台配置
*
* @param ids 需要删除的第三方平台配置主键集合
* @return 结果
*/
public int deleteThirdPartySettingInfoByIds(Long[] ids);
/**
* 删除第三方平台配置信息
*
* @param id 第三方平台配置主键
* @return 结果
*/
public int deleteThirdPartySettingInfoById(Long id);
}

View File

@@ -0,0 +1,96 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
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.IThirdPartySettingInfoService;
/**
* 第三方平台配置Service业务层处理
*
* @author jsowell
* @date 2023-05-24
*/
@Service
public class ThirdPartySettingInfoServiceImpl implements IThirdPartySettingInfoService
{
@Autowired
private ThirdPartySettingInfoMapper thirdPartySettingInfoMapper;
/**
* 查询第三方平台配置
*
* @param id 第三方平台配置主键
* @return 第三方平台配置
*/
@Override
public ThirdPartySettingInfo selectThirdPartySettingInfoById(Long id)
{
return thirdPartySettingInfoMapper.selectThirdPartySettingInfoById(id);
}
/**
* 查询第三方平台配置列表
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 第三方平台配置
*/
@Override
public List<ThirdPartySettingInfo> selectThirdPartySettingInfoList(ThirdPartySettingInfo thirdPartySettingInfo)
{
return thirdPartySettingInfoMapper.selectThirdPartySettingInfoList(thirdPartySettingInfo);
}
/**
* 新增第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
@Override
public int insertThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo)
{
thirdPartySettingInfo.setCreateTime(DateUtils.getNowDate());
return thirdPartySettingInfoMapper.insertThirdPartySettingInfo(thirdPartySettingInfo);
}
/**
* 修改第三方平台配置
*
* @param thirdPartySettingInfo 第三方平台配置
* @return 结果
*/
@Override
public int updateThirdPartySettingInfo(ThirdPartySettingInfo thirdPartySettingInfo)
{
thirdPartySettingInfo.setUpdateTime(DateUtils.getNowDate());
return thirdPartySettingInfoMapper.updateThirdPartySettingInfo(thirdPartySettingInfo);
}
/**
* 批量删除第三方平台配置
*
* @param ids 需要删除的第三方平台配置主键
* @return 结果
*/
@Override
public int deleteThirdPartySettingInfoByIds(Long[] ids)
{
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoByIds(ids);
}
/**
* 删除第三方平台配置信息
*
* @param id 第三方平台配置主键
* @return 结果
*/
@Override
public int deleteThirdPartySettingInfoById(Long id)
{
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoById(id);
}
}

View File

@@ -0,0 +1,106 @@
<?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.jsowell.pile.mapper.ThirdPartySettingInfoMapper">
<resultMap type="com.jsowell.pile.domain.ThirdPartySettingInfo" id="ThirdPartySettingInfoResult">
<result property="id" column="id" />
<result property="type" column="type" />
<result property="stationId" column="station_id" />
<result property="operatorId" column="operator_id" />
<result property="operatorSecret" column="operator_secret" />
<result property="signSecret" column="sign_secret" />
<result property="dataSecret" column="data_secret" />
<result property="dataSecretIv" column="data_secret_IV" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectThirdPartySettingInfoVo">
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>
<select id="selectThirdPartySettingInfoList" parameterType="com.jsowell.pile.domain.ThirdPartySettingInfo" resultMap="ThirdPartySettingInfoResult">
<include refid="selectThirdPartySettingInfoVo"/>
<where>
<if test="type != null and type != ''"> and type = #{type}</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>
<if test="dataSecret != null and dataSecret != ''"> and data_secret = #{dataSecret}</if>
<if test="dataSecretIv != null and dataSecretIv != ''"> and data_secret_IV = #{dataSecretIv}</if>
</where>
</select>
<select id="selectThirdPartySettingInfoById" parameterType="Long" resultMap="ThirdPartySettingInfoResult">
<include refid="selectThirdPartySettingInfoVo"/>
where id = #{id}
</select>
<insert id="insertThirdPartySettingInfo" parameterType="com.jsowell.pile.domain.ThirdPartySettingInfo" useGeneratedKeys="true" keyProperty="id">
insert into thirdparty_setting_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null">type,</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>
<if test="dataSecret != null">data_secret,</if>
<if test="dataSecretIv != null">data_secret_IV,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null">#{type},</if>
<if test="stationId != null">#{stationId},</if>
<if test="operatorId != null">#{operatorId},</if>
<if test="operatorSecret != null">#{operatorSecret},</if>
<if test="signSecret != null">#{signSecret},</if>
<if test="dataSecret != null">#{dataSecret},</if>
<if test="dataSecretIv != null">#{dataSecretIv},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateThirdPartySettingInfo" parameterType="com.jsowell.pile.domain.ThirdPartySettingInfo">
update thirdparty_setting_info
<trim prefix="SET" suffixOverrides=",">
<if test="type != null">type = #{type},</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>
<if test="dataSecret != null">data_secret = #{dataSecret},</if>
<if test="dataSecretIv != null">data_secret_IV = #{dataSecretIv},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteThirdPartySettingInfoById" parameterType="Long">
delete from thirdparty_setting_info where id = #{id}
</delete>
<delete id="deleteThirdPartySettingInfoByIds" parameterType="String">
delete from thirdparty_setting_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>