将推送第三方平台改为可推送多个平台

This commit is contained in:
Lemon
2024-01-18 17:03:08 +08:00
parent 63ae3c8ab7
commit 0b09585bbc
21 changed files with 534 additions and 63 deletions

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
/**
@@ -68,4 +69,20 @@ public interface ThirdPartyStationRelationMapper {
* @return 结果
*/
public int deleteThirdPartyStationRelationByIds(Long[] ids);
/**
* 通过站点id查询该站点对接了哪些第三方平台
* @param stationId
* @return
*/
List<ThirdPartyStationRelationVO> getRelationInfoList(@Param("stationId") String stationId);
/**
* 修改删除标识为1
* @param stationId
* @param type
* @return
*/
int updateRelationDelFlag(@Param("stationId") String stationId, @Param("type") String type);
}

View File

@@ -35,6 +35,13 @@ public interface ThirdPartyStationRelationService {
*/
ThirdPartyStationRelationVO selectRelationInfo(ThirdPartyStationRelation thirdPartyStationRelation);
/**
* 通过站点id查询该站点对接了哪些第三方平台
* @param stationId
* @return
*/
List<ThirdPartyStationRelationVO> getRelationInfoList(String stationId);
/**
* 新增站点、第三方推送平台配置对应
*
@@ -66,4 +73,6 @@ public interface ThirdPartyStationRelationService {
* @return 结果
*/
public int deleteThirdPartyStationRelationById(Long id);
int updateRelationDelFlag(String stationId, String type);
}

View File

@@ -53,6 +53,16 @@ public class ThirdPartyStationRelationServiceImpl implements ThirdPartyStationRe
return thirdPartyStationRelationMapper.selectRelationInfo(thirdPartyStationRelation);
}
/**
* 通过站点id查询该站点对接了哪些第三方平台
* @param stationId
* @return
*/
@Override
public List<ThirdPartyStationRelationVO> getRelationInfoList(String stationId) {
return thirdPartyStationRelationMapper.getRelationInfoList(stationId);
}
/**
* 新增站点、第三方推送平台配置对应
*
@@ -99,4 +109,9 @@ public class ThirdPartyStationRelationServiceImpl implements ThirdPartyStationRe
public int deleteThirdPartyStationRelationById(Long id) {
return thirdPartyStationRelationMapper.deleteThirdPartyStationRelationById(id);
}
@Override
public int updateRelationDelFlag(String stationId, String type) {
return thirdPartyStationRelationMapper.updateRelationDelFlag(stationId, type);
}
}

View File

@@ -123,14 +123,13 @@
<select id="selectThirdInfo" resultMap="ThirdPartySettingInfoResult">
select <include refid="Base_Column_List"/>
from thirdparty_setting_info
<where>
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>
</where>
limit 1
</select>
</mapper>

View File

@@ -102,4 +102,31 @@
</if>
limit 1
</select>
<select id="getRelationInfoList" resultType="com.jsowell.pile.vo.base.ThirdPartyStationRelationVO">
select
t1.station_id as stationId,
t1.third_party_type as thirdPartyType,
t2.url_address as urlAddress,
t2.operator_id as operatorId,
t2.operator_secret as operatorSecret,
t2.sign_secret as signSecret,
t2.data_secret as dataSecret,
t2.data_secret_IV as dataSecretIv
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}
</if>
</select>
<update id="updateRelationDelFlag">
update
thirdparty_station_relation
set
del_flag = '1'
where
station_id = #{stationId,jdbcType=VARCHAR}
and third_party_type = #{type,jdbcType=VARCHAR}
</update>
</mapper>