update 对接第三方平台

This commit is contained in:
2024-03-26 17:13:00 +08:00
parent 7db83ee738
commit 79caa6f0bb
24 changed files with 750 additions and 544 deletions

View File

@@ -227,7 +227,7 @@ public class PileStationInfoController extends BaseController {
public TableDataInfo getSettingByStationId(@PathVariable("stationId") Long id) {
List<ThirdPartyStationRelationVO> list = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(id));
for (ThirdPartyStationRelationVO vo : list) {
vo.setThirdPartyType(ThirdPlatformTypeEnum.getLabelByCode(vo.getThirdPartyType()));
vo.setThirdPartyType(ThirdPlatformTypeEnum.getTypeLabelByTypeCode(vo.getThirdPartyType()));
}
return getDataTable(list);
}

View File

@@ -16,9 +16,10 @@ import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.util.Cryptos;
import com.jsowell.thirdparty.lianlian.util.Encodes;
import com.jsowell.thirdparty.platform.AbsInterfaceWithPlatformLogic;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.hainan.service.HaiNanPlatformLogic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@@ -33,8 +34,12 @@ import java.util.Map;
@RequestMapping("/hainan")
public class HaiNanPlatformController extends BaseController {
// 使用海南平台处理逻辑
// @Autowired
// private AbsInterfaceWithPlatformLogic platformLogic = new HaiNanPlatformLogic();
@Autowired
private AbsInterfaceWithPlatformLogic platformLogic = new HaiNanPlatformLogic();
@Qualifier("haiNanPlatformLogic")
private ThirdPartyPlatformService platformLogic;
/**
* 获取token接口
@@ -86,7 +91,7 @@ public class HaiNanPlatformController extends BaseController {
// 转换成相应对象
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.HAI_NAN_1.getCode());
queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.HAI_NAN_1.getTypeCode());
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
logger.info("海南平台查询充电站信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));