From caa9ffb67fe78cbdbe44ccd433e0c0d1980c2908 Mon Sep 17 00:00:00 2001 From: yuyang Date: Thu, 10 Mar 2022 15:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=A9=E5=81=9C=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/XhpcTerminalController.java | 7 ++++++- .../service/XhpcTerminalServiceImpl.java | 3 ++- .../mapper/XhpcChargingStationMapper.xml | 1 + .../XhpcServiceDataUpdateServiceImpl.java | 10 +++++----- .../impl/XhpcRealTimeOrderServiceImpl.java | 1 - .../resources/mapper/XhpcStatisticsMapper.xml | 5 +++++ .../service/impl/XhpcAppUserServiceImpl.java | 17 +++++++++++------ 7 files changed, 30 insertions(+), 14 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcTerminalController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcTerminalController.java index e46c38ff..6dc06bd7 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcTerminalController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcTerminalController.java @@ -52,7 +52,12 @@ public class XhpcTerminalController extends BaseController { @Log(title = "终端-停用", businessType = BusinessType.UPDATE) @PostMapping(value = "/updateStatus") public AjaxResult updateStatus(@RequestBody XhpcTerminal xhpcTerminal) { - + if(null==xhpcTerminal.getTerminalId()){ + return AjaxResult.error("桩数据为空"); + } + if(null==xhpcTerminal.getStatus()){ + return AjaxResult.error("桩数据状态为空"); + } return xhpcTerminalService.updateStatus(xhpcTerminal.getTerminalId(), xhpcTerminal.getStatus()); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java index b8adbcb9..05b740d7 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java @@ -63,7 +63,8 @@ public class XhpcTerminalServiceImpl extends BaseService implements IXhpcTermina @Override public AjaxResult updateStatus(Long terminalId, Integer Status) { - XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId); + XhpcTerminal xhpcTerminal = new XhpcTerminal(); + xhpcTerminal.setTerminalId(terminalId); xhpcTerminal.setStatus(Status); xhpcTerminalMapper.updateXhpcTerminal(xhpcTerminal); return AjaxResult.success(); diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml index 5b0749d2..593cd285 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -396,6 +396,7 @@ where te.charging_station_id = #{chargingStationId} and te.status = 0 and te.del_flag = 0 + order by te.serial_number desc operatorMessage = xhpcChargeOrderService.getOperatorMessage(xhpcChargeOrder.getChargingStationId()); if(operatorMessage !=null){ if(operatorMessage.get("operatorIdEvcs")!=null){ - if(operatorMessage.get("operatorIdEvcs") !=null && !"".equals(operatorMessage.get("operatorIdEvcs").toString())){ String stw = operatorMessage.get("operatorIdEvcs").toString(); if(stw.length()>9){ diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index 7e5cc6cd..2525484e 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -924,4 +924,9 @@ + + + diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcAppUserServiceImpl.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcAppUserServiceImpl.java index 4554a763..f5545e77 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcAppUserServiceImpl.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/service/impl/XhpcAppUserServiceImpl.java @@ -133,6 +133,9 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU String type = StringUtils.valueOf(map.get("type")); String openid = StringUtils.valueOf(map.get("openid")); String tenantId = StringUtils.valueOf(map.get("tenantId")); + logger.info("<<<<<<<<<>>>>>>>>>>>"); + logger.info("<<<<<<<<<<注册openid>>>>>>>>>>>>"+openid); + logger.info("<<<<<<<<<>>>>>>>>>>>"); if (StringUtils.isEmpty(openid)) { return R.fail(HttpStatus.NOT_NULL, "openid不能为空"); } @@ -201,6 +204,9 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU return R.fail(HttpStatus.NOT_NULL, "验证码不能为空"); } String openid = StringUtils.valueOf(map.get("openid")); + logger.info("<<<<<<<<<>>>>>>>>>>>"); + logger.info("<<<<<<<<<<登录openid>>>>>>>>>>>>"+openid); + logger.info("<<<<<<<<<>>>>>>>>>>>"); if (StringUtils.isEmpty(openid)) { return R.fail(HttpStatus.NOT_NULL, "openid不能为空"); } @@ -323,14 +329,10 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU return R.fail(HttpStatus.DATA_ERROR, "对不起,您的账号:" + username + " 已停用"); } if (StatusConstants.OPERATION_WX_TYPE.equals(type)) { - if (StringUtils.isEmpty(user.getWeixinOpenId())) { - user.setWeixinOpenId(openid); - } + user.setWeixinOpenId(openid); user.setWeixinLogin(UserConstants.LOGIN); } else { - if (StringUtils.isEmpty(user.getAlipayOpenId())) { - user.setAlipayOpenId(openid); - } + user.setAlipayOpenId(openid); user.setAlipayLogin(UserConstants.LOGIN); } xhpcAppUserMapper.update(user); @@ -409,6 +411,9 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU String type = StringUtils.valueOf(map.get("type")); String openid = StringUtils.valueOf(map.get("openid")); String tenantId = StringUtils.valueOf(map.get("tenantId")); + logger.info("<<<<<<<<<>>>>>>>>>>>"); + logger.info("<<<<<<<<<<自动登录openid>>>>>>>>>>>>"+openid); + logger.info("<<<<<<<<<>>>>>>>>>>>"); Map userLoginTime = xhpcAppUserMapper.getUserLoginTime(Integer.valueOf(type), openid,tenantId); if(userLoginTime ==null){ return R.fail(HttpStatus.USER_LOGIN, "请重新登录");