mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 联联
This commit is contained in:
@@ -20,6 +20,7 @@ import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.IStationSettingRelationService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.vo.base.StationSettingRelationVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.service.PileService;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
@@ -191,7 +192,9 @@ public class PileStationInfoController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||
@GetMapping("/getSettingByStationId/{stationId}")
|
||||
public AjaxResult getSettingByStationId(@PathVariable("stationId") Long id) {
|
||||
return AjaxResult.success(thirdPartySettingInfoService.getInfoByStationId(id));
|
||||
StationSettingRelation info = new StationSettingRelation();
|
||||
info.setStationId(id);
|
||||
return AjaxResult.success(stationSettingRelationService.selectRelationInfo(info));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,11 +213,11 @@ public class PileStationInfoController extends BaseController {
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
||||
@PostMapping("/updateSettingByStationId")
|
||||
public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) {
|
||||
return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info));
|
||||
}
|
||||
// @PreAuthorize("@ss.hasPermi('pile:station:edit')")
|
||||
// @PostMapping("/updateSettingByStationId")
|
||||
// public AjaxResult updateSettingByStationId(@RequestBody ThirdPartySettingInfo info) {
|
||||
// return AjaxResult.success(thirdPartySettingInfoService.updateStationSettingInfo(info));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增站点互联互通配置信息
|
||||
@@ -243,14 +246,23 @@ public class PileStationInfoController extends BaseController {
|
||||
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String result = lianLianService.pushStationInfo(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
|
||||
// 推送联联
|
||||
if (StringUtils.equals("1", dto.getThirdPartyType())) {
|
||||
String result = lianLianService.pushStationInfo(dto);
|
||||
response = new RestApiResponse<>(result);
|
||||
}
|
||||
}catch (BusinessException e) {
|
||||
logger.error("推送联联平台充电站信息 error",e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
}catch (Exception e) {
|
||||
logger.error("推送联联平台充电站信息 error", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
response = new RestApiResponse<>("推送失败,请联系管理员");
|
||||
// 删除对应配置信息
|
||||
StationSettingRelation relation = new StationSettingRelation();
|
||||
relation.setStationId(dto.getStationId());
|
||||
relation.setDelFlag("1");
|
||||
stationSettingRelationService.updateStationSettingRelation(relation);
|
||||
}
|
||||
logger.info("推送联联平台充电站信息 result:{}", response);
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user