From e8c75e2a5a07927b2adbe58a16d1329b12383e6b Mon Sep 17 00:00:00 2001 From: yuyang Date: Mon, 13 Jun 2022 09:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=BC=B9=E5=87=BA=E6=B4=BB=E5=8A=A8=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xhpc/system/api/model/LoginUser.java | 20 ++++++++++++++++++ .../XhpcTimingChargingModelServiceImpl.java | 7 +++---- .../service/impl/XhpcAppUserServiceImpl.java | 21 +++++++++++-------- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/xhpc/system/api/model/LoginUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/xhpc/system/api/model/LoginUser.java index 7298a0ed..3868d577 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/xhpc/system/api/model/LoginUser.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/xhpc/system/api/model/LoginUser.java @@ -218,4 +218,24 @@ public class LoginUser implements Serializable public void setStatus(Integer status) { this.status = status; } + + @Override + public String toString() { + return "LoginUser{" + + "token='" + token + '\'' + + ", userid=" + userid + + ", username='" + username + '\'' + + ", userType=" + userType + + ", userTypeUtil='" + userTypeUtil + '\'' + + ", tenantId='" + tenantId + '\'' + + ", openId='" + openId + '\'' + + ", loginTime=" + loginTime + + ", expireTime=" + expireTime + + ", ipaddr='" + ipaddr + '\'' + + ", permissions=" + permissions + + ", roles=" + roles + + ", sysUser=" + sysUser + + ", status=" + status + + '}'; + } } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTimingChargingModelServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTimingChargingModelServiceImpl.java index 2375599b..5645ad2b 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTimingChargingModelServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTimingChargingModelServiceImpl.java @@ -61,18 +61,17 @@ public class XhpcTimingChargingModelServiceImpl extends BaseService implements I SysUser sysUser = loginUser.getSysUser(); Long sysUserId = sysUser.getUserId(); - - if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUser.getUserId())){ + if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUserId)){ if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){ Long logOperatorId = sysUser.getOperatorId(); //运营商看自己的场站 return xhpcTimingChargingModelMapper.list(operatorId,reason,status,startTime,endTime,chargingStationId,logOperatorId, 1,tenantId); }else{ //查询赋值的场站 - return xhpcTimingChargingModelMapper.list(operatorId,reason,status,startTime,endTime,chargingStationId,sysUserId, 1,tenantId); + return xhpcTimingChargingModelMapper.list(operatorId,reason,status,startTime,endTime,chargingStationId,sysUserId, 2,tenantId); } }else{ - return xhpcTimingChargingModelMapper.list(operatorId,reason,status,startTime,endTime,chargingStationId,sysUserId, 1,tenantId); + return xhpcTimingChargingModelMapper.list(operatorId,reason,status,startTime,endTime,chargingStationId,sysUserId, 0,tenantId); } } 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 1c7f1153..c2ed2668 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 @@ -489,15 +489,18 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU map.put("servicePhone",servicePhone); //获取最优的活动图片显示 Map objectMap = activityDiscountTime(loginUser.getUserid(), new Date(), loginUser.getUserType(), null, loginUser.getTenantId()); - if("1".equals(objectMap.get("state").toString())){ - map.put("activity",1); - map.put("activitySize",1); - map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/"+objectMap.get("totalBackgroundUrl").toString()); - }else{ - map.put("activity",0); - map.put("activitySize",1); - map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/bunengshanchu/1.png"); - } +// if("1".equals(objectMap.get("state").toString())){ +// map.put("activity",1); +// map.put("activitySize",1); +// map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/"+objectMap.get("totalBackgroundUrl").toString()); +// }else{ +// map.put("activity",0); +// map.put("activitySize",1); +// map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/bunengshanchu/1.png"); +// } + map.put("activity",0); + map.put("activitySize",1); + map.put("activityImg","https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/bunengshanchu/1.png"); map.put("socSize",redisService.getCacheObject("global:"+tenantId+":SOC")); return AjaxResult.success(map); }else{