mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 03:55:17 +08:00
update 对接第三方平台
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user