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

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

@@ -0,0 +1,37 @@
package com.jsowell.thirdparty.common;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.dto.PushStationInfoDTO;
import com.jsowell.pile.service.ThirdPartyStationRelationService;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* TODO
*
* @author Lemon
* @Date 2024/1/18 15:11:32
*/
@Service
public class CommonService {
@Autowired
private ThirdPartyStationRelationService thirdPartyStationRelationService;
/**
* 将站点--第三方平台类型对应关系存入关系表
* @param dto
*/
public void insertInfo2DataBase(PushStationInfoDTO dto) {
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(dto.getStationId());
relation.setThirdPartyType(dto.getThirdPartyType());
ThirdPartyStationRelationVO vo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (vo != null) {
return;
}
// 新增数据库
thirdPartyStationRelationService.insertThirdPartyStationRelation(relation);
}
}