diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml index 2a75caef..6fc5bed0 100644 --- a/ruoyi-gateway/src/main/resources/bootstrap.yml +++ b/ruoyi-gateway/src/main/resources/bootstrap.yml @@ -30,7 +30,7 @@ spring: eager: true transport: # 控制台地址 - dashboard: 127.0.0.1:8718 + dashboard: 172.31.183.135:8718 # nacos配置持久化 datasource: ds1: diff --git a/xhpc-modules/xhpc-card/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-card/src/main/resources/bootstrap.yml index f1df16d1..949381e6 100644 --- a/xhpc-modules/xhpc-card/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-card/src/main/resources/bootstrap.yml @@ -14,15 +14,15 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 172.31.183.135:8848 config: # 配置中心地址 - server-addr: 127.0.0.1:8848 + server-addr: 172.31.183.135:8848 # 配置文件格式 file-extension: yml # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} -logging: - level: - com.xhpc.card.mapper: debug +#logging: +# level: +# com.xhpc.card.mapper: debug diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-charging-station/src/main/resources/bootstrap.yml index 2c7674bb..658ae6ee 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/bootstrap.yml @@ -30,21 +30,21 @@ logging: #二维码Logo图片获取位置: #imgPath: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\xhcd_logo.png" -#imgPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/logo.png" -imgPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/logo.png" +imgPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/logo.png" +#imgPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/logo.png" #生成的二维码存放位置: #destPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs" -#destPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs" -destPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs" +destPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs" +#destPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs" #生成的最终完整图片的存放位置: #fullImgDestPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs\\" -#fullImgDestPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/" -fullImgDestPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs/" +fullImgDestPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/" +#fullImgDestPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs/" #底图图片存放位置: #bottomImg: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\BottomImg.png" -#bottomImg: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/BottomImg.png" -bottomImg: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/BottomImg.png" +bottomImg: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/BottomImg.png" +#bottomImg: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/BottomImg.png" #生成的二维码zip包位置 #zipLocation: "D:\\Enterprise_Resources\\QrZip" -#zipLocation: "/www/wwwroot/scxhua.cn/dist" -zipLocation: "/www/wwwroot/xhpc.scxhua.com/dist" \ No newline at end of file +zipLocation: "/www/wwwroot/scxhua.cn/dist" +#zipLocation: "/www/wwwroot/xhpc.scxhua.com/dist" diff --git a/xhpc-modules/xhpc-order/pom.xml b/xhpc-modules/xhpc-order/pom.xml index 14d9b8c6..fd727c73 100644 --- a/xhpc-modules/xhpc-order/pom.xml +++ b/xhpc-modules/xhpc-order/pom.xml @@ -112,8 +112,9 @@ org.testng testng 7.5 - compile + test + diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java index 5340f639..f24fee51 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java @@ -1219,6 +1219,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe } }); }catch (Exception e){ + e.printStackTrace(); logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber()); logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"); e.printStackTrace(); @@ -1627,19 +1628,19 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe CacheOrderData cacheOrderData = (CacheOrderData) cacheMap.get("orderData"); if (cacheOrderData != null) { int number = 0; - if (!"0".equals(cacheOrderData.getT1PowerQuantity().toString())) { + if (cacheOrderData.getT1PowerQuantity() !=null && !"0".equals(cacheOrderData.getT1PowerQuantity().toString())) { number++; rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "00"); } - if (!"0".equals(cacheOrderData.getT2PowerQuantity().toString())) { + if (cacheOrderData.getT2PowerQuantity() !=null &&!"0".equals(cacheOrderData.getT2PowerQuantity().toString())) { number++; rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "01"); } - if (!"0".equals(cacheOrderData.getT3PowerQuantity().toString())) { + if (cacheOrderData.getT3PowerQuantity() !=null && !"0".equals(cacheOrderData.getT3PowerQuantity().toString())) { number++; rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "02"); } - if (!"0".equals(cacheOrderData.getT4PowerQuantity().toString())) { + if (cacheOrderData.getT4PowerQuantity() !=null && !"0".equals(cacheOrderData.getT4PowerQuantity().toString())) { number++; rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "03"); } diff --git a/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml index 1f4e2204..fca35f2a 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml @@ -23,3 +23,6 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +#logging: +# level: +# com.xhpc.order.mapper: debug diff --git a/xhpc-modules/xhpc-payment/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-payment/src/main/resources/bootstrap.yml index f7553392..af7517f7 100644 --- a/xhpc-modules/xhpc-payment/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-payment/src/main/resources/bootstrap.yml @@ -23,9 +23,9 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} -logging: - level: - com.xhpc.order.mapper: debug +#logging: +# level: +# com.xhpc.payment.mapper: debug ##获取微信openid地址 WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxd0a48e00319ef8a7&secret=e26d9088b58e24af69411d5933cece47&js_code=" @@ -55,7 +55,7 @@ ALIPAYPRIVATEKEY: "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCGHX1s315EK #支付宝appid ALIPAYAPPID: "2021002156615717" #应用公钥证书路径 -CERTPATH: "/www/wwwroot/scxhua.cn/xhpc-payment/appCertPublicKey.crt" +CERTPATH: "/www/wwwroot/scxhua.cn/xhpc.scxhua.com/appCertPublicKey.crt" #支付宝公钥证书路径 PUBLICCERTPATH: "/www/wwwroot/scxhua.cn/xhpc-payment/alipayCertPublicKey_RSA2.crt" #支付宝根证书路径 diff --git a/xhpc-modules/xhpc-power-pile/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-power-pile/src/main/resources/bootstrap.yml index df3a5bc9..c46b4d84 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-power-pile/src/main/resources/bootstrap.yml @@ -15,7 +15,6 @@ spring: # 环境配置 active: dev cloud: - nacos: discovery: # 服务注册地址 server-addr: 172.31.183.135:8848 diff --git a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcAppUserMapper.java b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcAppUserMapper.java index e5dff2e5..5c1f07b4 100644 --- a/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcAppUserMapper.java +++ b/xhpc-modules/xhpc-user/src/main/java/com/xhpc/user/mapper/XhpcAppUserMapper.java @@ -57,7 +57,7 @@ public interface XhpcAppUserMapper { public List> selectAppUserList(@Param("phone") String phone,@Param("tenantId") String tenantId); - public Map userSum(@Param("phone")String phone,@Param("time")String time,@Param("tenantId") String tenantId); + public Map userSum(@Param("phone")String phone,@Param("time1")String time1,@Param("time2")String time2,@Param("time3")String time3,@Param("time4")String time4,@Param("tenantId") String tenantId); /** * 手机号查询C端用户信息 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 a1c2621c..206eeeb9 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 @@ -99,11 +99,21 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU @Override public Map userSum(String phone) { LoginUser logUser = tokenService.getLoginUser(); - //最近30天用户的活跃度 - Date newDate = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -30); - String time = DateUtil.format(newDate, "yyyy-MM-dd HH:mm:ss"); - return xhpcAppUserMapper.userSum(phone,time,logUser.getTenantId()); + //昨日用户的活跃度 + Date newDate1 = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -1); + String time1 = DateUtil.format(newDate1, "yyyy-MM-dd HH:mm:ss"); + //7天用户的活跃度 + Date newDate2 = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -7); + String time2 = DateUtil.format(newDate2, "yyyy-MM-dd HH:mm:ss"); + //一个月用户的活跃度 + Date newDate3 = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -30); + String time3 = DateUtil.format(newDate3, "yyyy-MM-dd HH:mm:ss"); + //3个月天用户的活跃度 + Date newDate4 = DateUtil.offset(new Date(), DateField.DAY_OF_MONTH, -90); + String time4 = DateUtil.format(newDate4, "yyyy-MM-dd HH:mm:ss"); + + return xhpcAppUserMapper.userSum(phone,time1,time2,time3,time4,logUser.getTenantId()); } /** diff --git a/xhpc-modules/xhpc-user/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-user/src/main/resources/bootstrap.yml index b6890645..170d7d31 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-user/src/main/resources/bootstrap.yml @@ -14,10 +14,10 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 172.31.183.135:8858 + server-addr: 172.31.183.135:8848 config: # 配置中心地址 - server-addr: 172.31.183.135:8858 + server-addr: 172.31.183.135:8848 # 配置文件格式 file-extension: yml # 共享配置 diff --git a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml index 404e4bd6..9fdd9a51 100644 --- a/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml +++ b/xhpc-modules/xhpc-user/src/main/resources/mapper/XhpcAppUserMapper.xml @@ -211,9 +211,12 @@