c端用户增加 昨日、7天、一个月、一季度 活跃度统计\自动退款金额增加到200元
This commit is contained in:
parent
6a9a4f781d
commit
12b4241e36
@ -30,7 +30,7 @@ spring:
|
|||||||
eager: true
|
eager: true
|
||||||
transport:
|
transport:
|
||||||
# 控制台地址
|
# 控制台地址
|
||||||
dashboard: 127.0.0.1:8718
|
dashboard: 172.31.183.135:8718
|
||||||
# nacos配置持久化
|
# nacos配置持久化
|
||||||
datasource:
|
datasource:
|
||||||
ds1:
|
ds1:
|
||||||
|
|||||||
@ -14,15 +14,15 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 172.31.183.135:8848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 172.31.183.135:8848
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
logging:
|
#logging:
|
||||||
level:
|
# level:
|
||||||
com.xhpc.card.mapper: debug
|
# com.xhpc.card.mapper: debug
|
||||||
|
|||||||
@ -30,21 +30,21 @@ logging:
|
|||||||
|
|
||||||
#二维码Logo图片获取位置:
|
#二维码Logo图片获取位置:
|
||||||
#imgPath: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\xhcd_logo.png"
|
#imgPath: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\xhcd_logo.png"
|
||||||
#imgPath: "/www/wwwroot/scxhua.cn/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"
|
#imgPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/logo.png"
|
||||||
#生成的二维码存放位置:
|
#生成的二维码存放位置:
|
||||||
#destPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs"
|
#destPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs"
|
||||||
#destPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs"
|
destPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs"
|
||||||
destPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs"
|
#destPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs"
|
||||||
#生成的最终完整图片的存放位置:
|
#生成的最终完整图片的存放位置:
|
||||||
#fullImgDestPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs\\"
|
#fullImgDestPath: "D:\\Enterprise_Resources\\XiaoHuaFullImgs\\"
|
||||||
#fullImgDestPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/"
|
fullImgDestPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/"
|
||||||
fullImgDestPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs/"
|
#fullImgDestPath: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/XiaoHuaFullImgs/"
|
||||||
#底图图片存放位置:
|
#底图图片存放位置:
|
||||||
#bottomImg: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\BottomImg.png"
|
#bottomImg: "D:\\Enterprise_Resources\\XiaoHuaMaterialImgs\\BottomImg.png"
|
||||||
#bottomImg: "/www/wwwroot/scxhua.cn/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"
|
#bottomImg: "/www/wwwroot/xhpc.scxhua.com/xhpc-charging-stion/BottomImg.png"
|
||||||
#生成的二维码zip包位置
|
#生成的二维码zip包位置
|
||||||
#zipLocation: "D:\\Enterprise_Resources\\QrZip"
|
#zipLocation: "D:\\Enterprise_Resources\\QrZip"
|
||||||
#zipLocation: "/www/wwwroot/scxhua.cn/dist"
|
zipLocation: "/www/wwwroot/scxhua.cn/dist"
|
||||||
zipLocation: "/www/wwwroot/xhpc.scxhua.com/dist"
|
#zipLocation: "/www/wwwroot/xhpc.scxhua.com/dist"
|
||||||
|
|||||||
@ -112,8 +112,9 @@
|
|||||||
<groupId>org.testng</groupId>
|
<groupId>org.testng</groupId>
|
||||||
<artifactId>testng</artifactId>
|
<artifactId>testng</artifactId>
|
||||||
<version>7.5</version>
|
<version>7.5</version>
|
||||||
<scope>compile</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>org.apache.poi</groupId>-->
|
<!-- <groupId>org.apache.poi</groupId>-->
|
||||||
<!-- <artifactId>poi-ooxml</artifactId>-->
|
<!-- <artifactId>poi-ooxml</artifactId>-->
|
||||||
|
|||||||
@ -1219,6 +1219,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
|
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
|
||||||
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>");
|
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -1627,19 +1628,19 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
|
|||||||
CacheOrderData cacheOrderData = (CacheOrderData) cacheMap.get("orderData");
|
CacheOrderData cacheOrderData = (CacheOrderData) cacheMap.get("orderData");
|
||||||
if (cacheOrderData != null) {
|
if (cacheOrderData != null) {
|
||||||
int number = 0;
|
int number = 0;
|
||||||
if (!"0".equals(cacheOrderData.getT1PowerQuantity().toString())) {
|
if (cacheOrderData.getT1PowerQuantity() !=null && !"0".equals(cacheOrderData.getT1PowerQuantity().toString())) {
|
||||||
number++;
|
number++;
|
||||||
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "00");
|
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "00");
|
||||||
}
|
}
|
||||||
if (!"0".equals(cacheOrderData.getT2PowerQuantity().toString())) {
|
if (cacheOrderData.getT2PowerQuantity() !=null &&!"0".equals(cacheOrderData.getT2PowerQuantity().toString())) {
|
||||||
number++;
|
number++;
|
||||||
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "01");
|
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "01");
|
||||||
}
|
}
|
||||||
if (!"0".equals(cacheOrderData.getT3PowerQuantity().toString())) {
|
if (cacheOrderData.getT3PowerQuantity() !=null && !"0".equals(cacheOrderData.getT3PowerQuantity().toString())) {
|
||||||
number++;
|
number++;
|
||||||
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "02");
|
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "02");
|
||||||
}
|
}
|
||||||
if (!"0".equals(cacheOrderData.getT4PowerQuantity().toString())) {
|
if (cacheOrderData.getT4PowerQuantity() !=null && !"0".equals(cacheOrderData.getT4PowerQuantity().toString())) {
|
||||||
number++;
|
number++;
|
||||||
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "03");
|
rateTimeList = xhpcRealTimeOrderMapper.getRateTimeList(chargingStationId, rateModelId, "03");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,3 +23,6 @@ spring:
|
|||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
#logging:
|
||||||
|
# level:
|
||||||
|
# com.xhpc.order.mapper: debug
|
||||||
|
|||||||
@ -23,9 +23,9 @@ spring:
|
|||||||
# 共享配置
|
# 共享配置
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
logging:
|
#logging:
|
||||||
level:
|
# level:
|
||||||
com.xhpc.order.mapper: debug
|
# com.xhpc.payment.mapper: debug
|
||||||
|
|
||||||
##获取微信openid地址
|
##获取微信openid地址
|
||||||
WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxd0a48e00319ef8a7&secret=e26d9088b58e24af69411d5933cece47&js_code="
|
WXGETJSCODE: "https://api.weixin.qq.com/sns/jscode2session?appid=wxd0a48e00319ef8a7&secret=e26d9088b58e24af69411d5933cece47&js_code="
|
||||||
@ -55,7 +55,7 @@ ALIPAYPRIVATEKEY: "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCGHX1s315EK
|
|||||||
#支付宝appid
|
#支付宝appid
|
||||||
ALIPAYAPPID: "2021002156615717"
|
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"
|
PUBLICCERTPATH: "/www/wwwroot/scxhua.cn/xhpc-payment/alipayCertPublicKey_RSA2.crt"
|
||||||
#支付宝根证书路径
|
#支付宝根证书路径
|
||||||
|
|||||||
@ -15,7 +15,6 @@ spring:
|
|||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 172.31.183.135:8848
|
server-addr: 172.31.183.135:8848
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public interface XhpcAppUserMapper {
|
|||||||
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone,@Param("tenantId") String tenantId);
|
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone,@Param("tenantId") String tenantId);
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> userSum(@Param("phone")String phone,@Param("time")String time,@Param("tenantId") String tenantId);
|
public Map<String, Object> 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端用户信息
|
* 手机号查询C端用户信息
|
||||||
|
|||||||
@ -99,11 +99,21 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> userSum(String phone) {
|
public Map<String, Object> userSum(String phone) {
|
||||||
LoginUser logUser = tokenService.getLoginUser();
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -14,10 +14,10 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 172.31.183.135:8858
|
server-addr: 172.31.183.135:8848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 172.31.183.135:8858
|
server-addr: 172.31.183.135:8848
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|||||||
@ -211,9 +211,12 @@
|
|||||||
<select id="userSum" resultType="map">
|
<select id="userSum" resultType="map">
|
||||||
select
|
select
|
||||||
count(xau.app_user_id) userSum,
|
count(xau.app_user_id) userSum,
|
||||||
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time} and tenant_id =#{tenantId}) userVitality,
|
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time1} and tenant_id =#{tenantId}) one,
|
||||||
|
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time2} and tenant_id =#{tenantId}) two,
|
||||||
|
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time3} and tenant_id =#{tenantId}) three,
|
||||||
|
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time4} and tenant_id =#{tenantId}) four,
|
||||||
sum(xau.balance) balance
|
sum(xau.balance) balance
|
||||||
from xhpc_app_user xau where 1=1
|
from xhpc_app_user xau where del_flag=0
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
and xau.phone like concat('%', #{phone}, '%')
|
and xau.phone like concat('%', #{phone}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user