update 打印日志

This commit is contained in:
2024-03-19 16:22:40 +08:00
parent f079021ca4
commit 6a6ed9f311
92 changed files with 412 additions and 440 deletions

View File

@@ -1,11 +1,11 @@
package com.jsowell.web.controller.index;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.IndexQueryDTO;
import com.jsowell.pile.service.PileBasicInfoService;
import com.jsowell.pile.service.OrderBasicInfoService;
import com.jsowell.pile.service.PileBasicInfoService;
import com.jsowell.pile.vo.web.IndexGeneralSituationVO;
import com.jsowell.pile.vo.web.IndexOrderInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
@@ -33,7 +33,7 @@ public class indexController extends BaseController {
@PostMapping("/getGeneralSituation")
public RestApiResponse<?> getGeneralSituation(@RequestBody IndexQueryDTO dto) {
logger.info("首页基础数据查询 param:{}", JSONObject.toJSONString(dto));
logger.info("首页基础数据查询 param:{}", JSON.toJSONString(dto));
RestApiResponse<?> response;
try {
IndexGeneralSituationVO generalSituation = pileBasicInfoService.getGeneralSituation(dto);
@@ -42,7 +42,7 @@ public class indexController extends BaseController {
logger.error("首页数据查询错误:{}", e.getMessage());
response = new RestApiResponse<>("00200001", "首页基础数据查询错误");
}
logger.info("首页数据查询 result:{}", JSONObject.toJSONString(response));
logger.info("首页数据查询 result:{}", JSON.toJSONString(response));
return response;
}
@@ -54,7 +54,7 @@ public class indexController extends BaseController {
*/
@PostMapping("/getOrderInfo")
public RestApiResponse<?> getOrderInfo(@RequestBody IndexQueryDTO dto) {
logger.info("首页订单相关信息查询 param:{}", JSONObject.toJSONString(dto));
logger.info("首页订单相关信息查询 param:{}", JSON.toJSONString(dto));
RestApiResponse<?> response;
try {
List<IndexOrderInfoVO> indexOrderInfo = orderBasicInfoService.getIndexOrderInfo(dto);
@@ -63,7 +63,7 @@ public class indexController extends BaseController {
logger.error("首页订单相关信息查询错误!{}", e.getMessage());
response = new RestApiResponse<>("00200002", "首页订单数据查询错误");
}
logger.info("首页订单相关信息查询 result:{}", JSONObject.toJSONString(response));
logger.info("首页订单相关信息查询 result:{}", JSON.toJSONString(response));
return response;
}

View File

@@ -1,6 +1,6 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
@@ -11,7 +11,6 @@ import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.ThirdpartySnRelation;
import com.jsowell.pile.dto.BatchCreatePileDTO;
import com.jsowell.pile.dto.QueryPileDTO;
import com.jsowell.pile.dto.ReplaceMerchantStationDTO;
@@ -25,14 +24,7 @@ import com.jsowell.pile.vo.web.ThirdPartySnRelationVO;
import com.jsowell.service.PileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@@ -112,7 +104,7 @@ public class PileBasicInfoController extends BaseController {
@Log(title = "设备管理", businessType = BusinessType.INSERT)
@PostMapping("/batchAdd")
public AjaxResult batchAdd(@RequestBody BatchCreatePileDTO dto) {
logger.info("批量生成充电桩 param:{}", JSONObject.toJSONString(dto));
logger.info("批量生成充电桩 param:{}", JSON.toJSONString(dto));
return toAjax(pileService.batchCreatePile(dto));
}
@@ -136,7 +128,7 @@ public class PileBasicInfoController extends BaseController {
@Log(title = "设备管理", businessType = BusinessType.UPDATE)
@PostMapping("/updatePileName")
public RestApiResponse<?> updatePileName(@RequestBody PileBasicInfo pileBasicInfo) {
logger.info("修改桩别名 params:{}", JSONObject.toJSONString(pileBasicInfo));
logger.info("修改桩别名 params:{}", JSON.toJSONString(pileBasicInfo));
RestApiResponse<?> response = null;
try {
int i = pileBasicInfoService.updatePileBasicInfo(pileBasicInfo);
@@ -166,7 +158,7 @@ public class PileBasicInfoController extends BaseController {
*/
@PostMapping("/batchUpdatePileList")
public AjaxResult batchUpdatePileList( @RequestBody ReplaceMerchantStationDTO dto) {
logger.info("批量更新充电桩 param:{}", JSONObject.toJSONString(dto));
logger.info("批量更新充电桩 param:{}", JSON.toJSONString(dto));
return toAjax(pileBasicInfoService.replaceMerchantStationByPileIds(dto));
}
@@ -176,7 +168,7 @@ public class PileBasicInfoController extends BaseController {
*/
@PostMapping("/getPileDetailById")
public AjaxResult getPileDetailById(@RequestBody QueryPileDTO queryPileDTO) {
logger.info("查询充电桩详情 param:{}", JSONObject.toJSONString(queryPileDTO));
logger.info("查询充电桩详情 param:{}", JSON.toJSONString(queryPileDTO));
if (StringUtils.isBlank(queryPileDTO.getPileId())) {
return AjaxResult.error("充电桩id不能为空");
}
@@ -217,7 +209,7 @@ public class PileBasicInfoController extends BaseController {
@PreAuthorize("@ss.hasPermi('pile:basic:edit')")
@PostMapping("/updateThirdPartySnRelation")
public RestApiResponse<?> updateThirdPartySnRelation(@RequestBody ThirdPartySnRelationDTO dto) {
logger.info("修改第三方平台对应编号 params:{}", JSONObject.toJSONString(dto));
logger.info("修改第三方平台对应编号 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
int i = thirdpartySnRelationService.updateThirdPartySnRelation(dto);

View File

@@ -1,6 +1,6 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.controller.BaseController;
@@ -13,20 +13,13 @@ import com.jsowell.pile.dto.CreateOrUpdateBillingTemplateDTO;
import com.jsowell.pile.dto.ImportBillingTemplateDTO;
import com.jsowell.pile.dto.PublishBillingTemplateDTO;
import com.jsowell.pile.service.PileBillingTemplateService;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.pile.service.PileRemoteService;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@@ -120,7 +113,7 @@ public class PileBillingTemplateController extends BaseController {
@Log(title = "计费模板", businessType = BusinessType.INSERT)
@PostMapping("/createBillingTemplate")
public AjaxResult createBillingTemplate(@RequestBody CreateOrUpdateBillingTemplateDTO dto) {
logger.info("新增计费模板 param:{}", JSONObject.toJSONString(dto));
logger.info("新增计费模板 param:{}", JSON.toJSONString(dto));
pileBillingTemplateService.createBillingTemplate(dto);
return AjaxResult.success();
}
@@ -132,7 +125,7 @@ public class PileBillingTemplateController extends BaseController {
*/
@PostMapping("/updateBillingTemplate")
public AjaxResult updateBillingTemplate(@RequestBody CreateOrUpdateBillingTemplateDTO dto) {
logger.info("修改计费模板 param:{}", JSONObject.toJSONString(dto));
logger.info("修改计费模板 param:{}", JSON.toJSONString(dto));
pileBillingTemplateService.updateBillingTemplate(dto);
return AjaxResult.success();
}
@@ -152,7 +145,7 @@ public class PileBillingTemplateController extends BaseController {
*/
@PostMapping("/stationImportBillingTemplate")
public AjaxResult stationImportBillingTemplate(@RequestBody ImportBillingTemplateDTO dto) {
logger.info("站点导入计费模板 param:{}", JSONObject.toJSONString(dto));
logger.info("站点导入计费模板 param:{}", JSON.toJSONString(dto));
return toAjax(pileBillingTemplateService.stationImportBillingTemplate(dto));
}
@@ -163,7 +156,7 @@ public class PileBillingTemplateController extends BaseController {
public TableDataInfo queryStationBillingTemplateList(@PathVariable("stationId") String stationId) {
logger.info("查询站点计费模板 param:{}", stationId);
List<BillingTemplateVO> list = pileBillingTemplateService.queryStationBillingTemplateList(stationId);
logger.info("查询站点计费模板 result{}", JSONObject.toJSONString(list));
logger.info("查询站点计费模板 result{}", JSON.toJSONString(list));
return getDataTable(list);
}
@@ -174,7 +167,7 @@ public class PileBillingTemplateController extends BaseController {
public TableDataInfo queryStationPreferentialBillingTemplateList(@PathVariable("stationId") String stationId) {
logger.info("查询站点优惠计费模板 param:{}", stationId);
List<BillingTemplateVO> list = pileBillingTemplateService.queryStationPreferentialBillingTemplateList(stationId);
logger.info("查询站点优惠计费模板 result{}", JSONObject.toJSONString(list));
logger.info("查询站点优惠计费模板 result{}", JSON.toJSONString(list));
return getDataTable(list);
}

View File

@@ -1,6 +1,6 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.page.TableDataInfo;
@@ -15,11 +15,7 @@ import com.jsowell.pile.service.PileConnectorInfoService;
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@@ -66,9 +62,9 @@ public class PileConnectorInfoController extends BaseController {
*/
@PostMapping("/getConnectorInfoListByParams")
public TableDataInfo getConnectorInfoListByParams(@RequestBody QueryConnectorListDTO dto) {
logger.info("查询接口列表 param:{}", JSONObject.toJSONString(dto));
logger.info("查询接口列表 param:{}", JSON.toJSONString(dto));
List<PileConnectorInfoVO> list = pileConnectorInfoService.getConnectorInfoListByParams(dto);
logger.info("查询接口列表 result:{}", JSONObject.toJSONString(list));
logger.info("查询接口列表 result:{}", JSON.toJSONString(list));
return getDataTable(list);
}
@@ -81,7 +77,7 @@ public class PileConnectorInfoController extends BaseController {
@Log(title = "充电桩枪口信息", businessType = BusinessType.UPDATE)
@PostMapping("/updateParkNo")
public RestApiResponse<?> updateParkNo(@RequestBody UpdateConnectorParkNoDTO dto) {
logger.info("修改车位号 param:{}", JSONObject.toJSONString(dto));
logger.info("修改车位号 param:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
int i = pileConnectorInfoService.updateConnectorParkNo(dto);

View File

@@ -1,13 +1,11 @@
package com.jsowell.web.controller.pile;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.enums.BusinessType;
import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
@@ -15,7 +13,6 @@ import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
import com.jsowell.pile.dto.FastCreateStationDTO;
@@ -25,18 +22,12 @@ import com.jsowell.pile.dto.amap.EditAmapFlagDTO;
import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO;
import com.jsowell.pile.service.PileStationInfoService;
import com.jsowell.pile.service.ThirdPartyParkingConfigService;
import com.jsowell.pile.service.ThirdPartyStationRelationService;
import com.jsowell.pile.service.ThirdPartySettingInfoService;
import com.jsowell.pile.service.ThirdPartyStationRelationService;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.service.PileService;
import com.jsowell.thirdparty.common.CommonService;
import com.jsowell.thirdparty.huawei.HuaWeiService;
import com.jsowell.thirdparty.lianlian.service.LianLianService;
import com.jsowell.thirdparty.nanrui.service.NRService;
import com.jsowell.thirdparty.xindiantu.service.XDTService;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -105,7 +96,7 @@ public class PileStationInfoController extends BaseController {
// @PreAuthorize("@ss.hasPermi('pile:station:add')")
@PostMapping("/fastCreateStation")
public AjaxResult fastCreateStation(@RequestBody FastCreateStationDTO dto) {
logger.info("快速建站接口 param:{}", JSONObject.toJSONString(dto));
logger.info("快速建站接口 param:{}", JSON.toJSONString(dto));
int i = 0;
try {
i = pileStationInfoService.fastCreateStation(dto);
@@ -188,7 +179,7 @@ public class PileStationInfoController extends BaseController {
@Log(title = "修改对接高德标识", businessType = BusinessType.UPDATE)
@PostMapping("/editAmapFlag")
public AjaxResult editAmapFlag(@RequestBody EditAmapFlagDTO dto) {
logger.info("修改对接高德标识 param:{}", JSONObject.toJSONString(dto));
logger.info("修改对接高德标识 param:{}", JSON.toJSONString(dto));
return toAjax(pileStationInfoService.updateAmapFlag(dto.getStationId(), dto.getAmapFlag()));
}
@@ -286,7 +277,7 @@ public class PileStationInfoController extends BaseController {
*/
@PostMapping("/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送第三方平台充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送第三方平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
Long stationId = dto.getStationId();
List<String> types = dto.getThirdPartyTypes();

View File

@@ -1,6 +1,6 @@
package com.jsowell.web.controller.system;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.domain.entity.SysMenu;
@@ -46,7 +46,7 @@ public class SysLoginController {
*/
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody) {
logs.info("登录param{}", JSONObject.toJSONString(loginBody));
logs.info("登录param{}", JSON.toJSONString(loginBody));
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),

View File

@@ -63,7 +63,7 @@ public class AMapController extends BaseController {
@PostMapping("/pushStationStatus")
public AMapCommonResult pushStationStatus(@RequestBody QueryPileDTO dto) {
AMapCommonResult result = new AMapCommonResult();
logger.info("商家推送充电设备动态数据 params:{}", JSONObject.toJSONString(dto));
logger.info("商家推送充电设备动态数据 params:{}", JSON.toJSONString(dto));
try {
String pushResult = aMapService.pushChargingDeviceDynamics(dto.getStationId());
return result.successResponse(pushResult);

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.thirdparty.hainan;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
@@ -11,12 +12,12 @@ import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.platform.hainan.service.HaiNanPlatformLogic;
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.hainan.service.HaiNanPlatformLogic;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -41,10 +42,10 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("海南平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("海南平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = platformLogic.generateToken(dto);
logger.info("海南平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("海南平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("海南平台 请求令牌接口 异常", e);
@@ -60,7 +61,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_stations_info")
public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("海南平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("海南平台查询充电站信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -87,7 +88,7 @@ public class HaiNanPlatformController extends BaseController {
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.HAI_NAN_1.getCode());
Map<String, String> map = platformLogic.queryStationsInfo(queryStationInfoDTO);
logger.info("海南平台查询充电站信息 result:{}", JSONObject.toJSONString(map));
logger.info("海南平台查询充电站信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("海南平台查询充电站信息 error:", e);
@@ -103,7 +104,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_station_stats")
public CommonResult<?> queryStationStats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("海南平台查询统计信息 params:{}", JSONObject.toJSONString(dto));
logger.info("海南平台查询统计信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
if (!JWTUtils.checkThirdPartyToken(request)) {
@@ -128,7 +129,7 @@ public class HaiNanPlatformController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = platformLogic.queryStationStats(queryStationInfoDTO);
logger.info("海南平台查询统计信息 result:{}", JSONObject.toJSONString(map));
logger.info("海南平台查询统计信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("海南平台查询统计信息 error:", e);
@@ -145,7 +146,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("海南平台设备接口状态查询 params:{}", JSONObject.toJSONString(dto));
logger.info("海南平台设备接口状态查询 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -171,7 +172,7 @@ public class HaiNanPlatformController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = platformLogic.queryStationStatus(queryStationInfoDTO);
logger.info("海南平台设备接口状态查询 result:{}", JSONObject.toJSONString(map));
logger.info("海南平台设备接口状态查询 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "设备接口状态查询成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("海南平台设备接口状态查询 error:", e);
@@ -187,7 +188,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_equip_auth")
public CommonResult<?> queryEquipAuth(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("请求设备认证 param:{}", JSONObject.toJSONString(dto));
logger.info("请求设备认证 param:{}", JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -212,7 +213,7 @@ public class HaiNanPlatformController extends BaseController {
QueryEquipmentDTO queryEquipmentDTO = JSONObject.parseObject(dataStr, QueryEquipmentDTO.class);
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = platformLogic.queryEquipAuth(queryEquipmentDTO);
logger.info("请求设备认证 result:{}", JSONObject.toJSONString(map));
logger.info("请求设备认证 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("请求设备认证 error:", e);
@@ -228,7 +229,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_equip_business_policy")
public CommonResult<?> queryEquipBusinessPolicy(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("查询业务策略信息 params:{}", JSONObject.toJSONString(dto));
logger.info("查询业务策略信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -254,7 +255,7 @@ public class HaiNanPlatformController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = platformLogic.queryEquipBusinessPolicy(queryStartChargeDTO);
logger.info("查询业务策略信息 result:{}", JSONObject.toJSONString(map));
logger.info("查询业务策略信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询业务策略信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
@@ -271,7 +272,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_start_charge")
public CommonResult<?> query_start_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("海南平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
logger.info("海南平台请求启动充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
if (!JWTUtils.checkThirdPartyToken(request)) {
@@ -295,7 +296,7 @@ public class HaiNanPlatformController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = platformLogic.queryStartCharge(queryStartChargeDTO);
logger.info("海南平台请求启动充电 result:{}", JSONObject.toJSONString(map));
logger.info("海南平台请求启动充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("海南平台请求启动充电 error", e);
@@ -335,7 +336,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_equip_charge_status")
public CommonResult<?> queryEquipChargeStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("【{}】查询充电状态 params :{}", this.getClass().getSimpleName(), JSONObject.toJSONString(dto));
logger.info("【{}】查询充电状态 params :{}", this.getClass().getSimpleName(), JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -360,7 +361,7 @@ public class HaiNanPlatformController extends BaseController {
QueryEquipChargeStatusDTO queryEquipChargeStatusDTO = JSONObject.parseObject(dataStr, QueryEquipChargeStatusDTO.class);
queryEquipChargeStatusDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = platformLogic.queryEquipChargeStatus(queryEquipChargeStatusDTO);
logger.info("【{}】查询充电状态 result:{}", this.getClass().getSimpleName(), JSONObject.toJSONString(map));
logger.info("【{}】查询充电状态 result:{}", this.getClass().getSimpleName(), JSON.toJSONString(map));
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("【{}】平台查询充电状态 error", this.getClass().getSimpleName(), e);
@@ -400,7 +401,7 @@ public class HaiNanPlatformController extends BaseController {
*/
@PostMapping("/v1/query_stop_charge")
public CommonResult<?> queryStopCharge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("请求停止充电 params :{}", JSONObject.toJSONString(dto));
logger.info("请求停止充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
// String token = request.getHeader("Authorization");
@@ -425,7 +426,7 @@ public class HaiNanPlatformController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = platformLogic.queryStopCharge(queryStartChargeDTO);
logger.info("请求停止充电 result:{}", JSONObject.toJSONString(map));
logger.info("请求停止充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("请求停止充电 error", e);

View File

@@ -45,10 +45,10 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("华为平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("华为平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = huaWeiService.generateToken(dto);
logger.info("华为平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -103,7 +103,7 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为平台查询统计信息 params:{}", JSONObject.toJSONString(dto));
logger.info("华为平台查询统计信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -129,7 +129,7 @@ public class HuaWeiController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = huaWeiService.queryStationStatus(queryStationInfoDTO);
logger.info("华为平台查询统计信息 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台查询统计信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("华为平台查询统计信息 error:", e);
@@ -147,7 +147,7 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/query_equip_auth")
public CommonResult<?> query_equip_auth(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为平台请求设备认证 param:{}", JSONObject.toJSONString(dto));
logger.info("华为平台请求设备认证 param:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -172,7 +172,7 @@ public class HuaWeiController extends BaseController {
QueryEquipmentDTO queryEquipmentDTO = JSONObject.parseObject(dataStr, QueryEquipmentDTO.class);
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = huaWeiService.queryEquipAuth(queryEquipmentDTO);
logger.info("华为平台请求设备认证 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台请求设备认证 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("华为平台请求设备认证 error:", e);
@@ -189,7 +189,7 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/request_equip_business_policy")
public CommonResult<?> requestEquipBusinessPolicy(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为平台请求计费策略 params:{}", JSONObject.toJSONString(dto));
logger.info("华为平台请求计费策略 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -215,7 +215,7 @@ public class HuaWeiController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = huaWeiService.requestEquipBusinessPolicy(queryStartChargeDTO);
logger.info("华为平台请求计费策略 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台请求计费策略 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求计费策略成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
@@ -233,7 +233,7 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/query_equip_charge_status")
public CommonResult<?> query_equip_charge_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为平台查询充电状态 params :{}", JSONObject.toJSONString(dto));
logger.info("华为平台查询充电状态 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -258,7 +258,7 @@ public class HuaWeiController extends BaseController {
QueryEquipChargeStatusDTO queryEquipChargeStatusDTO = JSONObject.parseObject(dataStr, QueryEquipChargeStatusDTO.class);
queryEquipChargeStatusDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = huaWeiService.queryEquipChargeStatus(queryEquipChargeStatusDTO);
logger.info("华为平台查询充电状态 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台查询充电状态 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("华为平台查询充电状态 error", e);
@@ -274,7 +274,7 @@ public class HuaWeiController extends BaseController {
*/
@PostMapping("/v1/query_stop_charge")
public CommonResult<?> query_stop_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
logger.info("华为平台请求停止充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -299,7 +299,7 @@ public class HuaWeiController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = huaWeiService.queryStopCharge(queryStartChargeDTO);
logger.info("华为平台请求停止充电 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台请求停止充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("华为平台请求停止充电 error", e);

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.thirdparty.huawei;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
@@ -11,7 +12,6 @@ import com.jsowell.pile.vo.huawei.QueryStartChargeVO;
import com.jsowell.thirdparty.huawei.HuaweiServiceV2;
import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.thirdparty.lianlian.domain.ConnectorStatusInfo;
import com.jsowell.thirdparty.lianlian.domain.StationStatusInfo;
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.util.Cryptos;
import com.jsowell.thirdparty.lianlian.util.Encodes;
@@ -44,10 +44,10 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("华为平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("华为平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = huaweiServiceV2.generateToken(dto);
logger.info("华为平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("华为平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -62,7 +62,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_stationStatus")
public CommonResult<?> receiveNotificationStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为设备接口状态变化推送 params:{}", JSONObject.toJSONString(dto));
logger.info("华为设备接口状态变化推送 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
ConnectorStatusInfo connectorStatusInfo = JSONObject.parseObject(dataStr, ConnectorStatusInfo.class);
@@ -81,7 +81,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/request_equip_business_policy")
public CommonResult<?> requestEquipBusinessPolicy(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为请求设备计费信息 params:{}", JSONObject.toJSONString(dto));
logger.info("华为请求设备计费信息 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
RequestEquipBusinessPolicyDTO requestEquipBusinessPolicyDTO = JSONObject.parseObject(dataStr, RequestEquipBusinessPolicyDTO.class);
@@ -100,7 +100,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_start_charge_result")
public CommonResult<?> receiveStartChargeResult(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("接收华为启动充电结果 params:{}", JSONObject.toJSONString(dto));
logger.info("接收华为启动充电结果 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
ReceiveStartChargeResultDTO receiveStartChargeResultDTO = JSONObject.parseObject(dataStr, ReceiveStartChargeResultDTO.class);
@@ -119,7 +119,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_equip_charge_status")
public CommonResult<?> receiveEquipChargeStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("接收华为设备充电状态 params:{}", JSONObject.toJSONString(dto));
logger.info("接收华为设备充电状态 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
ReceiveEquipChargeStatusDTO receiveEquipChargeStatusDTO = JSONObject.parseObject(dataStr, ReceiveEquipChargeStatusDTO.class);
@@ -138,7 +138,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_stop_charge_result")
public CommonResult<?> receiveStopChargeResult(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("接收华为停止充电结果 params:{}", JSONObject.toJSONString(dto));
logger.info("接收华为停止充电结果 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
ReceiveStopChargeResultVO receiveStopChargeResultVO = JSONObject.parseObject(dataStr, ReceiveStopChargeResultVO.class);
@@ -156,7 +156,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_charge_order_info")
public CommonResult<?> receiveOrderInfo(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("接收华为订单信息 params:{}", JSONObject.toJSONString(dto));
logger.info("接收华为订单信息 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
ReceiveOrderInfoDTO receiveOrderInfoDTO = JSONObject.parseObject(dataStr, ReceiveOrderInfoDTO.class);
@@ -174,7 +174,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/insert_start_charge")
public CommonResult<?> vinStartCharge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("华为vin启动充电 params:{}", JSONObject.toJSONString(dto));
logger.info("华为vin启动充电 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
VinStartChargeDTO vinStartChargeDTO = JSONObject.parseObject(dataStr, VinStartChargeDTO.class);
@@ -201,7 +201,7 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/notification_deliver_equip_business_policy_result")
public CommonResult<?> receiveDeliverEquipBusinessPolicyResult(HttpServletRequest request, @RequestBody CommonParamsDTO dto){
logger.info("华为下发计费策略响应 params:{}", JSONObject.toJSONString(dto));
logger.info("华为下发计费策略响应 params:{}", JSON.toJSONString(dto));
String dataStr = checkAuth(request, dto);
// 转换成相应对象
DeliverBusinessPolicyResponseDTO deliverPolicyResponseDTO = JSONObject.parseObject(dataStr, DeliverBusinessPolicyResponseDTO.class);
@@ -266,7 +266,7 @@ public class HuaWeiControllerV2 extends BaseController {
} catch (Exception e) {
logger.error("请求华为设备认证 error", e);
}
logger.info("请求华为设备认证 result:{}", JSONObject.toJSONString(vo));
logger.info("请求华为设备认证 result:{}", JSON.toJSONString(vo));
return vo;
}
@@ -277,14 +277,14 @@ public class HuaWeiControllerV2 extends BaseController {
*/
@PostMapping("/v2/query_start_charge")
public QueryStartChargeVO queryStartCharge(@RequestBody HWQueryStartChargeDTO dto) {
logger.info("请求华为启动充电 param:{}", JSONObject.toJSONString(dto));
logger.info("请求华为启动充电 param:{}", JSON.toJSONString(dto));
QueryStartChargeVO vo = null;
try {
vo = huaweiServiceV2.queryStartCharge(dto);
} catch (Exception e) {
logger.error("请求华为启动充电 error", e);
}
logger.info("请求华为启动充电 result:{}", JSONObject.toJSONString(vo));
logger.info("请求华为启动充电 result:{}", JSON.toJSONString(vo));
return vo;
}
@@ -303,7 +303,7 @@ public class HuaWeiControllerV2 extends BaseController {
} catch (Exception e) {
logger.error("查询华为充电状态 error", e);
}
logger.info("查询华为充电状态 result:{}", JSONObject.toJSONString(vo));
logger.info("查询华为充电状态 result:{}", JSON.toJSONString(vo));
return vo;
}
@@ -322,7 +322,7 @@ public class HuaWeiControllerV2 extends BaseController {
}catch (Exception e) {
logger.error("请求华为停止充电 error", e);
}
logger.info("请求华为停止充电 result:{}", JSONObject.toJSONString(vo));
logger.info("请求华为停止充电 result:{}", JSON.toJSONString(vo));
return vo;
}

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.thirdparty.lianlian;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
@@ -9,7 +10,6 @@ import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.JWTUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.vo.lianlian.PushStationFeeVO;
import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.service.LianLianService;
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.util.Map;
/**
@@ -46,7 +45,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送联联平台充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送联联平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
@@ -74,7 +73,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/pushStationStatus")
public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) {
logger.info("联联平台设备状态变化推送 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) ||
@@ -153,7 +152,7 @@ public class LianLianController extends BaseController {
*/
// @PostMapping("/query_stations_info")
// public RestApiResponse<?> query_stations_info(@RequestBody QueryStationInfoDTO dto) {
// logger.info("联联平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
// logger.info("联联平台查询充电站信息 params:{}", JSON.toJSONString(dto));
// RestApiResponse<?> response = null;
// try {
// // 校验签名
@@ -207,7 +206,7 @@ public class LianLianController extends BaseController {
*/
// @PostMapping("/query_station_stats")
// public RestApiResponse<?> query_station_stats(@RequestBody QueryStationInfoDTO dto) {
// logger.info("联联平台查询统计信息 params :{}", JSONObject.toJSONString(dto));
// logger.info("联联平台查询统计信息 params :{}", JSON.toJSONString(dto));
// RestApiResponse<?> response;
// try {
// StationStatsInfo stationStatsInfo = lianLianService.query_station_stats(dto);
@@ -231,7 +230,7 @@ public class LianLianController extends BaseController {
*/
// @PostMapping("/query_equip_auth")
// public RestApiResponse<?> query_equip_auth(@RequestBody QueryEquipmentDTO dto) {
// logger.info("联联平台请求设备认证 params :{}", JSONObject.toJSONString(dto));
// logger.info("联联平台请求设备认证 params :{}", JSON.toJSONString(dto));
// RestApiResponse<?> response;
// try {
// EquipmentAuthVO equipmentAuthVO = lianLianService.query_equip_auth(dto);
@@ -255,7 +254,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_equip_auth")
public CommonResult<?> query_equip_auth(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台请求设备认证 param:{}", JSONObject.toJSONString(dto));
logger.info("联联平台请求设备认证 param:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -297,7 +296,7 @@ public class LianLianController extends BaseController {
*/
// @PostMapping("/query_start_charge")
// public RestApiResponse<?> query_start_charge(@RequestBody QueryStartChargeDTO dto) {
// logger.info("联联平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
// logger.info("联联平台请求启动充电 params :{}", JSON.toJSONString(dto));
// RestApiResponse<?> response;
// try {
// QueryStartChargeVO queryStartChargeVO = lianLianService.query_start_charge(dto);
@@ -321,7 +320,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_start_charge")
public CommonResult<?> query_start_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
logger.info("联联平台请求启动充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -386,7 +385,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_equip_charge_status")
public CommonResult<?> query_equip_charge_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台查询充电状态 params :{}", JSONObject.toJSONString(dto));
logger.info("联联平台查询充电状态 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -427,7 +426,7 @@ public class LianLianController extends BaseController {
*/
// @PostMapping("/query_stop_charge")
// public RestApiResponse<?> query_stop_charge(@RequestBody QueryStartChargeDTO dto) {
// logger.info("联联平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
// logger.info("联联平台请求停止充电 params :{}", JSON.toJSONString(dto));
// RestApiResponse<?> response;
// try {
// QueryStopChargeVO queryStopChargeVO = lianLianService.query_stop_charge(dto);
@@ -451,7 +450,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_stop_charge")
public CommonResult<?> query_stop_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
logger.info("联联平台请求停止充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -490,10 +489,10 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("联联平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = lianLianService.generateToken(dto);
logger.info("联联平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("联联平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -509,7 +508,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/notification_order_settlement_info")
public CommonResult<?> notification_order_settlement_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台推送订单结算信息 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台推送订单结算信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -551,7 +550,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_stations_info")
public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台查询充电站信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -594,7 +593,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> query_station_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台查询充电站状态信息 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台查询充电站状态信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -637,7 +636,7 @@ public class LianLianController extends BaseController {
*/
@PostMapping("/v1/query_station_stats")
public CommonResult<?> query_station_stats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("联联平台查询统计信息 params:{}", JSONObject.toJSONString(dto));
logger.info("联联平台查询统计信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");

View File

@@ -165,10 +165,10 @@ public class NRController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("江苏平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("江苏平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = nrService.generateToken(dto);
logger.info("江苏平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("江苏平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -192,7 +192,7 @@ public class NRController extends BaseController {
*/
@PostMapping("/v1/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送江苏平台充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送江苏平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
@@ -219,7 +219,7 @@ public class NRController extends BaseController {
*/
@PostMapping("/v1/pushAlarmInfo")
public RestApiResponse<?> pushAlarmInfo(@RequestBody PushAlarmInfoDTO dto) {
logger.info("推送江苏平台告警信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送江苏平台告警信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
@@ -245,7 +245,7 @@ public class NRController extends BaseController {
*/
@PostMapping("/v1/pushPileStatus")
public RestApiResponse<?> pushPileStatus(@RequestBody RealTimeMonitorData data) {
logger.info("推送江苏平台设备状态变化推送 params:{}", JSONObject.toJSONString(data));
logger.info("推送江苏平台设备状态变化推送 params:{}", JSON.toJSONString(data));
RestApiResponse<?> response = null;
try {
String s = nrService.pushPileStatus(data);

View File

@@ -1,10 +1,10 @@
package com.jsowell.web.controller.thirdparty.ningxiajiaotou;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.util.JWTUtils;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO;
import com.jsowell.thirdparty.lianlian.common.CommonResult;
@@ -47,10 +47,10 @@ public class NXJTController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("宁夏交投平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("宁夏交投平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = nxjtService.generateToken(dto);
logger.info("宁夏交投平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("宁夏交投平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -66,7 +66,7 @@ public class NXJTController extends BaseController {
*/
@PostMapping("/v1/query_stations_info")
public CommonResult<?> queryStationsInfo(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("宁夏交投平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("宁夏交投平台查询充电站信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -109,7 +109,7 @@ public class NXJTController extends BaseController {
*/
@PostMapping("/v1/query_free_pile_number")
public CommonResult<?> queryFreePileNumber(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("宁夏交投平台查询充电站中空闲桩数量 params:{}", JSONObject.toJSONString(dto));
logger.info("宁夏交投平台查询充电站中空闲桩数量 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -151,7 +151,7 @@ public class NXJTController extends BaseController {
*/
@PostMapping("/v1/query_orders_info_by_Plate_number")
public CommonResult<?> queryOrdersInfoByPlateNumber(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("宁夏交投平台查询某车牌号消费记录 params:{}", JSONObject.toJSONString(dto));
logger.info("宁夏交投平台查询某车牌号消费记录 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -194,7 +194,7 @@ public class NXJTController extends BaseController {
*/
@PostMapping("/v1/query_orders_info")
public CommonResult<?> queryOrdersInfo(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("宁夏交投平台查询某段时间内消费记录 params:{}", JSONObject.toJSONString(dto));
logger.info("宁夏交投平台查询某段时间内消费记录 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");

View File

@@ -43,10 +43,10 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("新电途平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("新电途平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = xdtService.generateToken(dto);
logger.info("新电途平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("获取token接口 异常");
@@ -62,7 +62,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送新电途平台充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送新电途平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
@@ -127,7 +127,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台查询统计信息 params:{}", JSONObject.toJSONString(dto));
logger.info("新电途平台查询统计信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -153,7 +153,7 @@ public class XDTController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = xdtService.queryStationStatus(queryStationInfoDTO);
logger.info("新电途平台查询统计信息 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台查询统计信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("新电途平台查询统计信息 error:", e);
@@ -170,7 +170,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_equip_business_policy")
public CommonResult<?> queryEquipBusinessPolicy(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台查询业务策略信息 params:{}", JSONObject.toJSONString(dto));
logger.info("新电途平台查询业务策略信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -196,7 +196,7 @@ public class XDTController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = xdtService.queryEquipBusinessPolicy(queryStartChargeDTO);
logger.info("新电途平台查询业务策略信息 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台查询业务策略信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询业务策略信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
@@ -214,7 +214,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_equip_auth")
public CommonResult<?> query_equip_auth(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台请求设备认证 param:{}", JSONObject.toJSONString(dto));
logger.info("新电途平台请求设备认证 param:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -239,7 +239,7 @@ public class XDTController extends BaseController {
QueryEquipmentDTO queryEquipmentDTO = JSONObject.parseObject(dataStr, QueryEquipmentDTO.class);
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = xdtService.queryEquipAuth(queryEquipmentDTO);
logger.info("新电途平台请求设备认证 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台请求设备认证 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("新电途平台请求设备认证 error:", e);
@@ -256,7 +256,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_start_charge")
public CommonResult<?> query_start_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
logger.info("新电途平台请求启动充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -281,7 +281,7 @@ public class XDTController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = xdtService.queryStartCharge(queryStartChargeDTO);
logger.info("新电途平台请求启动充电 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台请求启动充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("新电途平台请求启动充电 error", e);
@@ -297,7 +297,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_equip_charge_status")
public CommonResult<?> query_equip_charge_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台查询充电状态 params :{}", JSONObject.toJSONString(dto));
logger.info("新电途平台查询充电状态 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -322,7 +322,7 @@ public class XDTController extends BaseController {
QueryEquipChargeStatusDTO queryEquipChargeStatusDTO = JSONObject.parseObject(dataStr, QueryEquipChargeStatusDTO.class);
queryEquipChargeStatusDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = xdtService.queryEquipChargeStatus(queryEquipChargeStatusDTO);
logger.info("新电途平台查询充电状态 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台查询充电状态 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("新电途平台查询充电状态 error", e);
@@ -338,7 +338,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/v1/query_stop_charge")
public CommonResult<?> query_stop_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("新电途平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
logger.info("新电途平台请求停止充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -363,7 +363,7 @@ public class XDTController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = xdtService.queryStopCharge(queryStartChargeDTO);
logger.info("新电途平台请求停止充电 result:{}", JSONObject.toJSONString(map));
logger.info("新电途平台请求停止充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("新电途平台请求停止充电 error", e);
@@ -475,7 +475,7 @@ public class XDTController extends BaseController {
*/
@PostMapping("/pushStationStatus")
public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) {
logger.info("新电途平台设备状态变化推送 params:{}", JSONObject.toJSONString(dto));
logger.info("新电途平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) ||

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.thirdparty.yongchengboche;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
@@ -16,7 +17,6 @@ import com.jsowell.thirdparty.lianlian.util.Cryptos;
import com.jsowell.thirdparty.lianlian.util.Encodes;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -48,10 +48,10 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = ycbcService.generateToken(dto);
logger.info("甬城泊车平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("甬城泊车平台 请求令牌接口 异常");
@@ -65,7 +65,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/ycbcQuery_token")
public String ycbcQueryToken(@RequestBody YCBCGetTokenDTO dto) {
logger.info("请求甬城泊车平台令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("请求甬城泊车平台令牌 params:{}", JSON.toJSONString(dto));
String token = "";
try {
token = ycbcService.YCBCGetToken(dto);
@@ -86,7 +86,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_stations_info")
public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台查询充电站信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -111,7 +111,7 @@ public class YCBCController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = ycbcService.queryStationsInfo(queryStationInfoDTO);
logger.info("甬城泊车平台查询充电站信息 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台查询充电站信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("甬城泊车平台查询充电站信息 error:", e);
@@ -129,7 +129,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> query_station_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台查询充电站状态信息 params:{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台查询充电站状态信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -154,7 +154,7 @@ public class YCBCController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = ycbcService.queryStationStatus(queryStationInfoDTO);
logger.info("甬城泊车平台查询充电站状态信息 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台查询充电站状态信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电站状态信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("甬城泊车平台查询充电站状态信息 error:", e);
@@ -172,7 +172,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/pushStationStatus")
public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) {
logger.info("甬城泊车平台设备状态变化推送 params:{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) ||
@@ -224,7 +224,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_equip_auth")
public CommonResult<?> query_equip_auth(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台请求设备认证 param:{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台请求设备认证 param:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -249,7 +249,7 @@ public class YCBCController extends BaseController {
QueryEquipmentDTO queryEquipmentDTO = JSONObject.parseObject(dataStr, QueryEquipmentDTO.class);
queryEquipmentDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = ycbcService.queryEquipAuth(queryEquipmentDTO);
logger.info("甬城泊车平台请求设备认证 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台请求设备认证 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求设备认证成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("甬城泊车平台请求设备认证 error:", e);
@@ -266,7 +266,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_start_charge")
public CommonResult<?> query_start_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台请求启动充电 params :{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台请求启动充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -291,7 +291,7 @@ public class YCBCController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = ycbcService.queryStartCharge(queryStartChargeDTO);
logger.info("甬城泊车平台请求启动充电 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台请求启动充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("甬城泊车平台请求启动充电 error", e);
@@ -307,7 +307,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_equip_charge_status")
public CommonResult<?> query_equip_charge_status(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台查询充电状态 params :{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台查询充电状态 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -332,7 +332,7 @@ public class YCBCController extends BaseController {
QueryEquipChargeStatusDTO queryEquipChargeStatusDTO = JSONObject.parseObject(dataStr, QueryEquipChargeStatusDTO.class);
queryEquipChargeStatusDTO.setOperatorID(dto.getOperatorID());
Map<String, String> map = ycbcService.queryEquipChargeStatus(queryEquipChargeStatusDTO);
logger.info("甬城泊车平台查询充电状态 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台查询充电状态 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电状态成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("甬城泊车平台查询充电状态 error", e);
@@ -372,7 +372,7 @@ public class YCBCController extends BaseController {
*/
@PostMapping("/v1/query_stop_charge")
public CommonResult<?> query_stop_charge(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("甬城泊车平台请求停止充电 params :{}", JSONObject.toJSONString(dto));
logger.info("甬城泊车平台请求停止充电 params :{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -397,7 +397,7 @@ public class YCBCController extends BaseController {
QueryStartChargeDTO queryStartChargeDTO = JSONObject.parseObject(dataStr, QueryStartChargeDTO.class);
queryStartChargeDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = ycbcService.queryStopCharge(queryStartChargeDTO);
logger.info("甬城泊车平台请求停止充电 result:{}", JSONObject.toJSONString(map));
logger.info("甬城泊车平台请求停止充电 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求停止充电成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.error("甬城泊车平台请求停止充电 error", e);

View File

@@ -1,5 +1,6 @@
package com.jsowell.web.controller.thirdparty.zhongdianlian;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
@@ -47,10 +48,10 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/v1/query_token")
public CommonResult<?> queryToken(@RequestBody CommonParamsDTO dto) {
logger.info("中电联平台请求令牌 params:{}", JSONObject.toJSONString(dto));
logger.info("中电联平台请求令牌 params:{}", JSON.toJSONString(dto));
try {
Map<String, String> map = zdlService.generateToken(dto);
logger.info("中电联平台请求令牌 result:{}", JSONObject.toJSONString(map));
logger.info("中电联平台请求令牌 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "请求令牌成功!", map.get("Data"), map.get("Sig"));
} catch (UnsupportedEncodingException e) {
logger.error("中电联平台 请求令牌接口 异常");
@@ -66,7 +67,7 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/v1/query_stations_info")
public CommonResult<?> query_stations_info(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台查询充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("中电联平台查询充电站信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -93,7 +94,7 @@ public class ZDLController extends BaseController {
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
queryStationInfoDTO.setAddress("宁波");
Map<String, String> map = zdlService.queryStationsInfo(queryStationInfoDTO);
logger.info("中电联平台查询充电站信息 result:{}", JSONObject.toJSONString(map));
logger.info("中电联平台查询充电站信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("中电联平台查询充电站信息 error:", e);
@@ -110,7 +111,7 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/v1/query_station_stats")
public CommonResult<?> queryStationStats(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台查询统计信息 params:{}", JSONObject.toJSONString(dto));
logger.info("中电联平台查询统计信息 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -136,7 +137,7 @@ public class ZDLController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = zdlService.queryStationStats(queryStationInfoDTO);
logger.info("中电联平台查询统计信息 result:{}", JSONObject.toJSONString(map));
logger.info("中电联平台查询统计信息 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "查询统计信息成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("中电联平台查询统计信息 error:", e);
@@ -153,7 +154,7 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/v1/query_station_status")
public CommonResult<?> queryStationStatus(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
logger.info("中电联平台设备接口状态查询 params:{}", JSONObject.toJSONString(dto));
logger.info("中电联平台设备接口状态查询 params:{}", JSON.toJSONString(dto));
try {
// 校验令牌
String token = request.getHeader("Authorization");
@@ -183,7 +184,7 @@ public class ZDLController extends BaseController {
QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class);
queryStationInfoDTO.setOperatorId(dto.getOperatorID());
Map<String, String> map = zdlService.queryStationStatus(queryStationInfoDTO);
logger.info("中电联平台设备接口状态查询 result:{}", JSONObject.toJSONString(map));
logger.info("中电联平台设备接口状态查询 result:{}", JSON.toJSONString(map));
return CommonResult.success(0, "设备接口状态查询成功!", map.get("Data"), map.get("Sig"));
} catch (Exception e) {
logger.info("中电联平台设备接口状态查询 error:", e);
@@ -201,7 +202,7 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/pushStationInfo")
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
logger.info("推送中电联平台充电站信息 params:{}", JSONObject.toJSONString(dto));
logger.info("推送中电联平台充电站信息 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
@@ -228,7 +229,7 @@ public class ZDLController extends BaseController {
*/
@PostMapping("/pushStationStatus")
public RestApiResponse<?> pushStationStatus(@RequestBody PushInfoParamDTO dto) {
logger.info("中电联平台设备状态变化推送 params:{}", JSONObject.toJSONString(dto));
logger.info("中电联平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(String.valueOf(dto.getPileConnectorCode())) ||