mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
将推送第三方平台改为可推送多个平台
This commit is contained in:
37
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java
vendored
Normal file
37
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java
vendored
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user