mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update
This commit is contained in:
@@ -88,4 +88,6 @@ public interface ThirdpartySecretInfoService {
|
||||
* @return
|
||||
*/
|
||||
List<StationInfoVO> selectStationList(String thirdPlatformType);
|
||||
|
||||
String syncThirdpartyPlatformNameToDict();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package com.jsowell.thirdparty.service.impl;
|
||||
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.entity.SysDictData;
|
||||
import com.jsowell.common.core.domain.entity.SysDictType;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.system.mapper.SysDictDataMapper;
|
||||
import com.jsowell.system.mapper.SysDictTypeMapper;
|
||||
import com.jsowell.thirdparty.domain.ThirdpartySecretInfo;
|
||||
import com.jsowell.thirdparty.mapper.ThirdpartySecretInfoMapper;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
@@ -33,6 +39,9 @@ public class ThirdpartySecretInfoServiceImpl implements ThirdpartySecretInfoServ
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private SysDictDataMapper sysDictDataMapper;
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置
|
||||
*
|
||||
@@ -144,4 +153,30 @@ public class ThirdpartySecretInfoServiceImpl implements ThirdpartySecretInfoServ
|
||||
public List<StationInfoVO> selectStationList(String thirdPlatformType) {
|
||||
return thirdPartyStationRelationMapper.selectStationList(thirdPlatformType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String syncThirdpartyPlatformNameToDict() {
|
||||
List<SysDictData> sysDictData = sysDictDataMapper.selectDictDataByType(Constants.THIRD_PARTY_TYPE);
|
||||
for (ThirdPlatformTypeEnum platformType : ThirdPlatformTypeEnum.values()) {
|
||||
String typeCode = platformType.getTypeCode();
|
||||
for (SysDictData data : sysDictData) {
|
||||
if (typeCode.equals(data.getDictValue())) {
|
||||
break;
|
||||
}else {
|
||||
SysDictData dictData = new SysDictData();
|
||||
dictData.setDictSort(0L);
|
||||
dictData.setDictLabel(platformType.getTypeLabel());
|
||||
dictData.setDictValue(platformType.getTypeCode());
|
||||
dictData.setDictType(Constants.THIRD_PARTY_TYPE);
|
||||
dictData.setListClass("default");
|
||||
dictData.setIsDefault("N");
|
||||
dictData.setStatus("0");
|
||||
dictData.setCreateBy("thinkgem");
|
||||
dictData.setCreateTime(DateUtils.getNowDate());
|
||||
sysDictDataMapper.insertDictData(dictData);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user