station_setting_relation ----> thirdparty_station_relation

This commit is contained in:
Lemon
2023-07-07 14:40:19 +08:00
parent 04b4859bcb
commit a1c8dfd525
12 changed files with 196 additions and 202 deletions

View File

@@ -11,7 +11,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author jsowell
* @date 2023-06-06
*/
public class StationSettingRelation extends BaseEntity {
public class ThirdPartyStationRelation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**

View File

@@ -2,8 +2,8 @@ package com.jsowell.pile.mapper;
import java.util.List;
import com.jsowell.pile.domain.StationSettingRelation;
import com.jsowell.pile.vo.base.StationSettingRelationVO;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import org.springframework.stereotype.Component;
/**
@@ -13,45 +13,45 @@ import org.springframework.stereotype.Component;
* @date 2023-06-06
*/
@Component
public interface StationSettingRelationMapper {
public interface ThirdPartyStationRelationMapper {
/**
* 查询站点第三方推送平台配置对应
*
* @param id 站点第三方推送平台配置对应主键
* @return 站点第三方推送平台配置对应
*/
public StationSettingRelation selectStationSettingRelationById(Long id);
public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id);
/**
* 查询站点第三方推送平台配置对应列表
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 站点第三方推送平台配置对应集合
*/
public List<StationSettingRelation> selectStationSettingRelationList(StationSettingRelation stationSettingRelation);
public List<ThirdPartyStationRelation> selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 查询站点第三方推送平台配置
* @param stationSettingRelation
* @param thirdPartyStationRelation
* @return
*/
StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation);
ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 新增站点第三方推送平台配置对应
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 结果
*/
public int insertStationSettingRelation(StationSettingRelation stationSettingRelation);
public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 修改站点第三方推送平台配置对应
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 结果
*/
public int updateStationSettingRelation(StationSettingRelation stationSettingRelation);
public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 删除站点第三方推送平台配置对应
@@ -59,7 +59,7 @@ public interface StationSettingRelationMapper {
* @param id 站点第三方推送平台配置对应主键
* @return 结果
*/
public int deleteStationSettingRelationById(Long id);
public int deleteThirdPartyStationRelationById(Long id);
/**
* 批量删除站点第三方推送平台配置对应
@@ -67,5 +67,5 @@ public interface StationSettingRelationMapper {
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteStationSettingRelationByIds(Long[] ids);
public int deleteThirdPartyStationRelationByIds(Long[] ids);
}

View File

@@ -2,8 +2,8 @@ package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.StationSettingRelation;
import com.jsowell.pile.vo.base.StationSettingRelationVO;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
/**
* 站点第三方推送平台配置对应Service接口
@@ -11,45 +11,45 @@ import com.jsowell.pile.vo.base.StationSettingRelationVO;
* @author jsowell
* @date 2023-06-06
*/
public interface IStationSettingRelationService {
public interface IThirdPartyStationRelationService {
/**
* 查询站点第三方推送平台配置对应
*
* @param id 站点第三方推送平台配置对应主键
* @return 站点第三方推送平台配置对应
*/
public StationSettingRelation selectStationSettingRelationById(Long id);
public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id);
/**
* 查询站点第三方推送平台配置对应列表
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 站点第三方推送平台配置对应集合
*/
public List<StationSettingRelation> selectStationSettingRelationList(StationSettingRelation stationSettingRelation);
public List<ThirdPartyStationRelation> selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 查询站点第三方推送平台配置
* @param stationSettingRelation
* @param thirdPartyStationRelation
* @return
*/
StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation);
ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 新增站点第三方推送平台配置对应
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 结果
*/
public int insertStationSettingRelation(StationSettingRelation stationSettingRelation);
public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 修改站点第三方推送平台配置对应
*
* @param stationSettingRelation 站点第三方推送平台配置对应
* @param thirdPartyStationRelation 站点第三方推送平台配置对应
* @return 结果
*/
public int updateStationSettingRelation(StationSettingRelation stationSettingRelation);
public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 批量删除站点第三方推送平台配置对应
@@ -57,7 +57,7 @@ public interface IStationSettingRelationService {
* @param ids 需要删除的站点第三方推送平台配置对应主键集合
* @return 结果
*/
public int deleteStationSettingRelationByIds(Long[] ids);
public int deleteThirdPartyStationRelationByIds(Long[] ids);
/**
* 删除站点第三方推送平台配置对应信息
@@ -65,5 +65,5 @@ public interface IStationSettingRelationService {
* @param id 站点第三方推送平台配置对应主键
* @return 结果
*/
public int deleteStationSettingRelationById(Long id);
public int deleteThirdPartyStationRelationById(Long id);
}

View File

@@ -1,104 +0,0 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.framework.web.domain.server.Sys;
import com.jsowell.pile.vo.base.StationSettingRelationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.StationSettingRelationMapper;
import com.jsowell.pile.domain.StationSettingRelation;
import com.jsowell.pile.service.IStationSettingRelationService;
/**
* 站点、第三方推送平台配置对应Service业务层处理
*
* @author jsowell
* @date 2023-06-06
*/
@Service
public class StationSettingRelationServiceImpl implements IStationSettingRelationService {
@Autowired
private StationSettingRelationMapper stationSettingRelationMapper;
/**
* 查询站点、第三方推送平台配置对应
*
* @param id 站点、第三方推送平台配置对应主键
* @return 站点、第三方推送平台配置对应
*/
@Override
public StationSettingRelation selectStationSettingRelationById(Long id) {
return stationSettingRelationMapper.selectStationSettingRelationById(id);
}
/**
* 查询站点、第三方推送平台配置对应列表
*
* @param stationSettingRelation 站点、第三方推送平台配置对应
* @return 站点、第三方推送平台配置对应
*/
@Override
public List<StationSettingRelation> selectStationSettingRelationList(StationSettingRelation stationSettingRelation) {
return stationSettingRelationMapper.selectStationSettingRelationList(stationSettingRelation);
}
/**
* 查询站点、第三方推送平台配置
* @param stationSettingRelation
* @return
*/
@Override
public StationSettingRelationVO selectRelationInfo(StationSettingRelation stationSettingRelation) {
return stationSettingRelationMapper.selectRelationInfo(stationSettingRelation);
}
/**
* 新增站点、第三方推送平台配置对应
*
* @param stationSettingRelation 站点、第三方推送平台配置对应
* @return 结果
*/
@Override
public int insertStationSettingRelation(StationSettingRelation stationSettingRelation) {
// stationSettingRelation.setCreateTime(DateUtils.getNowDate());
stationSettingRelation.setCreateBy(SecurityUtils.getUsername());
return stationSettingRelationMapper.insertStationSettingRelation(stationSettingRelation);
}
/**
* 修改站点、第三方推送平台配置对应
*
* @param stationSettingRelation 站点、第三方推送平台配置对应
* @return 结果
*/
@Override
public int updateStationSettingRelation(StationSettingRelation stationSettingRelation) {
// stationSettingRelation.setUpdateTime(DateUtils.getNowDate());
return stationSettingRelationMapper.updateStationSettingRelation(stationSettingRelation);
}
/**
* 批量删除站点、第三方推送平台配置对应
*
* @param ids 需要删除的站点、第三方推送平台配置对应主键
* @return 结果
*/
@Override
public int deleteStationSettingRelationByIds(Long[] ids) {
return stationSettingRelationMapper.deleteStationSettingRelationByIds(ids);
}
/**
* 删除站点、第三方推送平台配置对应信息
*
* @param id 站点、第三方推送平台配置对应主键
* @return 结果
*/
@Override
public int deleteStationSettingRelationById(Long id) {
return stationSettingRelationMapper.deleteStationSettingRelationById(id);
}
}

View File

@@ -0,0 +1,102 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.service.IThirdPartyStationRelationService;
/**
* 站点、第三方推送平台配置对应Service业务层处理
*
* @author jsowell
* @date 2023-06-06
*/
@Service
public class ThirdPartyStationRelationServiceImpl implements IThirdPartyStationRelationService {
@Autowired
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
/**
* 查询站点、第三方推送平台配置对应
*
* @param id 站点、第三方推送平台配置对应主键
* @return 站点、第三方推送平台配置对应
*/
@Override
public ThirdPartyStationRelation selectThirdPartyStationRelationById(Long id) {
return thirdPartyStationRelationMapper.selectThirdPartyStationRelationById(id);
}
/**
* 查询站点、第三方推送平台配置对应列表
*
* @param thirdPartyStationRelation 站点、第三方推送平台配置对应
* @return 站点、第三方推送平台配置对应
*/
@Override
public List<ThirdPartyStationRelation> selectThirdPartyStationRelationList(ThirdPartyStationRelation thirdPartyStationRelation) {
return thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(thirdPartyStationRelation);
}
/**
* 查询站点、第三方推送平台配置
* @param thirdPartyStationRelation
* @return
*/
@Override
public ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation) {
return thirdPartyStationRelationMapper.selectRelationInfo(thirdPartyStationRelation);
}
/**
* 新增站点、第三方推送平台配置对应
*
* @param thirdPartyStationRelation 站点、第三方推送平台配置对应
* @return 结果
*/
@Override
public int insertThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation) {
// stationSettingRelation.setCreateTime(DateUtils.getNowDate());
thirdPartyStationRelation.setCreateBy(SecurityUtils.getUsername());
return thirdPartyStationRelationMapper.insertThirdPartyStationRelation(thirdPartyStationRelation);
}
/**
* 修改站点、第三方推送平台配置对应
*
* @param thirdPartyStationRelation 站点、第三方推送平台配置对应
* @return 结果
*/
@Override
public int updateThirdPartyStationRelation(ThirdPartyStationRelation thirdPartyStationRelation) {
// stationSettingRelation.setUpdateTime(DateUtils.getNowDate());
return thirdPartyStationRelationMapper.updateThirdPartyStationRelation(thirdPartyStationRelation);
}
/**
* 批量删除站点、第三方推送平台配置对应
*
* @param ids 需要删除的站点、第三方推送平台配置对应主键
* @return 结果
*/
@Override
public int deleteThirdPartyStationRelationByIds(Long[] ids) {
return thirdPartyStationRelationMapper.deleteThirdPartyStationRelationByIds(ids);
}
/**
* 删除站点、第三方推送平台配置对应信息
*
* @param id 站点、第三方推送平台配置对应主键
* @return 结果
*/
@Override
public int deleteThirdPartyStationRelationById(Long id) {
return thirdPartyStationRelationMapper.deleteThirdPartyStationRelationById(id);
}
}

View File

@@ -9,7 +9,7 @@ import lombok.Data;
* @date 2023/6/6 8:48
*/
@Data
public class StationSettingRelationVO {
public class ThirdPartyStationRelationVO {
private String stationId;
private String thirdPartyType;

View File

@@ -2,9 +2,9 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsowell.pile.mapper.StationSettingRelationMapper">
<mapper namespace="com.jsowell.pile.mapper.ThirdPartyStationRelationMapper">
<resultMap type="com.jsowell.pile.domain.StationSettingRelation" id="StationSettingRelationResult">
<resultMap type="com.jsowell.pile.domain.ThirdPartyStationRelation" id="ThirdPartyStationRelationResult">
<result property="id" column="id" />
<result property="stationId" column="station_id" />
<result property="thirdPartyType" column="third_party_type" />
@@ -15,29 +15,29 @@
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectStationSettingRelationVo">
select id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag from station_setting_relation
<sql id="selectThirdPartyStationRelationVo">
select id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag from thirdparty_station_relation
</sql>
<sql id="Base_Column_List" >
id, station_id, third_party_type, create_time, create_by, update_time, update_by, del_flag
</sql>
<select id="selectStationSettingRelationList" parameterType="com.jsowell.pile.domain.StationSettingRelation" resultMap="StationSettingRelationResult">
<include refid="selectStationSettingRelationVo"/>
<select id="selectThirdPartyStationRelationList" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" resultMap="ThirdPartyStationRelationResult">
<include refid="selectThirdPartyStationRelationVo"/>
<where>
<if test="stationId != null "> and station_id = #{stationId}</if>
<if test="thirdPartyType != null and thirdPartyType != ''"> and third_party_type = #{thirdPartyType}</if>
</where>
</select>
<select id="selectStationSettingRelationById" parameterType="Long" resultMap="StationSettingRelationResult">
<include refid="selectStationSettingRelationVo"/>
<select id="selectThirdPartyStationRelationById" parameterType="Long" resultMap="ThirdPartyStationRelationResult">
<include refid="selectThirdPartyStationRelationVo"/>
where id = #{id}
</select>
<insert id="insertStationSettingRelation" parameterType="com.jsowell.pile.domain.StationSettingRelation" useGeneratedKeys="true" keyProperty="id">
insert into station_setting_relation
<insert id="insertThirdPartyStationRelation" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation" useGeneratedKeys="true" keyProperty="id">
insert into thirdparty_station_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="stationId != null">station_id,</if>
<if test="thirdPartyType != null">third_party_type,</if>
@@ -58,8 +58,8 @@
</trim>
</insert>
<update id="updateStationSettingRelation" parameterType="com.jsowell.pile.domain.StationSettingRelation">
update station_setting_relation
<update id="updateThirdPartyStationRelation" parameterType="com.jsowell.pile.domain.ThirdPartyStationRelation">
update thirdparty_station_relation
<trim prefix="SET" suffixOverrides=",">
<if test="stationId != null">station_id = #{stationId},</if>
<if test="thirdPartyType != null">third_party_type = #{thirdPartyType},</if>
@@ -72,18 +72,18 @@
where station_id = #{stationId,jdbcType=BIGINT}
</update>
<delete id="deleteStationSettingRelationById" parameterType="Long">
delete from station_setting_relation where id = #{id}
<delete id="deleteThirdPartyStationRelationById" parameterType="Long">
delete from thirdparty_station_relation where id = #{id}
</delete>
<delete id="deleteStationSettingRelationByIds" parameterType="String">
delete from station_setting_relation where id in
<delete id="deleteThirdPartyStationRelationByIds" parameterType="String">
delete from thirdparty_station_relation where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectRelationInfo" resultType="com.jsowell.pile.vo.base.StationSettingRelationVO">
<select id="selectRelationInfo" resultType="com.jsowell.pile.vo.base.ThirdPartyStationRelationVO">
select
t1.station_id as stationId,
t1.third_party_type as thirdPartyType,
@@ -93,7 +93,7 @@
t2.sign_secret as signSecret,
t2.data_secret as dataSecret,
t2.data_secret_IV as dataSecretIv
from station_setting_relation t1 join thirdparty_setting_info t2 on t1.third_party_type = t2.type
from thirdparty_station_relation t1 join thirdparty_setting_info t2 on t1.third_party_type = t2.type
where t1.del_flag = '0'
<if test="stationId != null">
and t1.station_id = #{stationId,jdbcType=BIGINT}