统计增加活动

This commit is contained in:
yuyang 2022-04-27 11:22:57 +08:00
parent 9d547026c0
commit 080f97cc55
9 changed files with 228 additions and 51 deletions

View File

@ -135,7 +135,7 @@ public class XhpcHistoryOrderController extends BaseController {
* 日期统计\场站统计\终端统计
*/
@GetMapping("/test1")
//@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 0/2 * * * ?")
public void test1(){
add(3000,1);
}
@ -425,7 +425,7 @@ public class XhpcHistoryOrderController extends BaseController {
* 小时统计
*/
@GetMapping("/test")
//@Scheduled(cron = "0 0/2 * * * ?")
@Scheduled(cron = "0 0/2 * * * ?")
public void test(){
logger.info(">>>>>>>>>>>>>>>>>>>>>>>小时统计定时任务>>>>>>>>>>>>>>>>>>>>>");
//小时统计
@ -485,6 +485,9 @@ public class XhpcHistoryOrderController extends BaseController {
xhpcSt.setOperationSvcCommission(xhpc.getOperationSvcCommission());
xhpcSt.setOperatorId(operatorId);
xhpcSt.setChargingStationId(chargingStationId);
xhpcSt.setActivityPowerPriceTotal(xhpc.getActivityPowerPriceTotal());
xhpcSt.setActivityServicePriceTotal(xhpc.getActivityServicePriceTotal());
xhpcSt.setActivityTotalPrice(xhpc.getActivityTotalPrice());
//xhpcSt.setCreateTime(data);
xhpcSt.setTerminalId(terminalId);
xhpcSt.setHistoryOrderId(historyOrderId);
@ -967,7 +970,9 @@ public class XhpcHistoryOrderController extends BaseController {
xhpcSt.setCreateTime(Calendar.getInstance().getTime());
xhpcSt.setTerminalId(xhpc.getTerminalId());
xhpcSt.setChargingMode(xhpc.getChargingMode());
xhpcSt.setActivityPowerPriceTotal(xhpc.getActivityPowerPriceTotal());
xhpcSt.setActivityServicePriceTotal(xhpc.getActivityServicePriceTotal());
xhpcSt.setActivityTotalPrice(xhpc.getActivityTotalPrice());
xhpcSt.setHistoryOrderId(historyOrderId);
xhpcSt.setChargingPileId(xhpc.getChargingPileId());
xhpcSt.setCreateTime(xhpc.getEndTime());

View File

@ -137,4 +137,19 @@ public class XhpcStatisticsStation extends BaseEntity {
* 订单来源0 C端用户 1 流量方用户 2社区用户 3B端用户
*/
private Integer source;
/**
* 活动总电费
*/
private BigDecimal activityPowerPriceTotal;
/**
* 活动总服务费
*/
private BigDecimal activityServicePriceTotal;
/**
* 活动总金额
*/
private BigDecimal activityTotalPrice;
}

View File

@ -138,6 +138,21 @@ public class XhpcStatisticsTimeInterval extends BaseEntity {
*/
private BigDecimal servicePriceEvcs;
/**
* 活动总电费
*/
private BigDecimal activityPowerPriceTotal;
/**
* 活动总服务费
*/
private BigDecimal activityServicePriceTotal;
/**
* 活动总金额
*/
private BigDecimal activityTotalPrice;
public Long getStatisticsTimeIntervalId() {
@ -426,4 +441,28 @@ public class XhpcStatisticsTimeInterval extends BaseEntity {
public void setInternetDegreeCommission(BigDecimal internetDegreeCommission) {
this.internetDegreeCommission = internetDegreeCommission;
}
public BigDecimal getActivityPowerPriceTotal() {
return activityPowerPriceTotal;
}
public void setActivityPowerPriceTotal(BigDecimal activityPowerPriceTotal) {
this.activityPowerPriceTotal = activityPowerPriceTotal;
}
public BigDecimal getActivityServicePriceTotal() {
return activityServicePriceTotal;
}
public void setActivityServicePriceTotal(BigDecimal activityServicePriceTotal) {
this.activityServicePriceTotal = activityServicePriceTotal;
}
public BigDecimal getActivityTotalPrice() {
return activityTotalPrice;
}
public void setActivityTotalPrice(BigDecimal activityTotalPrice) {
this.activityTotalPrice = activityTotalPrice;
}
}

View File

@ -265,6 +265,21 @@ public class XhpcChargeHistoryOrder {
*/
private String chargingMode;
/**
* 活动总电费
*/
private BigDecimal activityPowerPriceTotal;
/**
* 活动总服务费
*/
private BigDecimal activityServicePriceTotal;
/**
* 活动总金额
*/
private BigDecimal activityTotalPrice;
public Date getCreateTime() {
return createTime;
@ -765,4 +780,28 @@ public class XhpcChargeHistoryOrder {
public void setInternetDegreeCommission(BigDecimal internetDegreeCommission) {
this.internetDegreeCommission = internetDegreeCommission;
}
public BigDecimal getActivityPowerPriceTotal() {
return activityPowerPriceTotal;
}
public void setActivityPowerPriceTotal(BigDecimal activityPowerPriceTotal) {
this.activityPowerPriceTotal = activityPowerPriceTotal;
}
public BigDecimal getActivityServicePriceTotal() {
return activityServicePriceTotal;
}
public void setActivityServicePriceTotal(BigDecimal activityServicePriceTotal) {
this.activityServicePriceTotal = activityServicePriceTotal;
}
public BigDecimal getActivityTotalPrice() {
return activityTotalPrice;
}
public void setActivityTotalPrice(BigDecimal activityTotalPrice) {
this.activityTotalPrice = activityTotalPrice;
}
}

View File

@ -459,6 +459,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
Integer source = xhpcChargeOrder.getSource();
String internetSerialNumber = xhpcChargeOrder.getInternetSerialNumber();
//判断是否有活动
logger.info("<<<<<<<<<<<<<<<判断是否有活动>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
boolean judge =false;
if(source==UserTypeUtil.INTERNET_TYPE && internetSerialNumber!=null){
xhpcHistoryOrder.setChargingMode(xhpcChargeOrder.getUserId()+"");
@ -498,6 +499,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
}
}
if(activityStationTime !=null && activityStationTime.size()>0 && activityStationTime.size()<=2 && activityInternetTime){
logger.info("<<<<<<<<<<<<<<<有流量方活动>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
judge =true;
int number = activityStationTime.size();
String start = DateUtil.formatTime(startTime);
@ -772,6 +774,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
//查询是否有活动
List<XhpcActivityDiscountDto> activityDiscountTime = xhpcRealTimeOrderMapper.getActivityDiscountTime(userId, DateUtil.formatDateTime(startTime), source, xhpcChargeOrder.getChargingStationId(), xhpcChargeOrder.getTenantId());
if(activityDiscountTime !=null && activityDiscountTime.size()>0){
logger.info("<<<<<<<<<<<<<<<有活动>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
judge =true;
int size = activityDiscountTime.size();
activityServicePriceTotal = surplusServicePrice;
@ -980,6 +983,8 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
}
}
}
logger.info("<<<<<<<<<<<<<<<获取运营商>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
//获取运营商
Map<String, Object> operatorMessage = xhpcChargeOrderService.getOperatorMessage(xhpcChargeOrder.getChargingStationId());
if(operatorMessage !=null){
@ -1086,8 +1091,8 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
return R.fail();
}
}
logger.info("<<<<<<<<<<<<<<<<22222>>>>>>>>>>>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<22222>>>>>>>>>>>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<22222>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
logger.info("<<<<<<<<<<<<<<<<22222>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
xhpcHistoryOrder.setStopReasonEvcs(xhpcChargeOrder.getType());
xhpcHistoryOrder.setChargeOrderId(chargeOrderId);
@ -1137,8 +1142,8 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
xhpcHistoryOrder.setConnectorPowerEvcs(Double.parseDouble(xhpcChargeOrder.getPower()));
}
logger.info("<<<<<<<<<<<<<<<<33333>>>>>>>>>>>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<33333>>>>>>>>>>>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<33333>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
logger.info("<<<<<<<<<<<<<<<<33333>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
Map<String, Object> map =new HashMap<>();
map.put("source",xhpcChargeOrder.getSource());
map.put("tenantId",xhpcChargeOrder.getTenantId());
@ -1199,50 +1204,50 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe
public void run() {
try{
logger.info("<<<<<<<<<<<<<<<<进行入短信发送>>>>>>>>>>>>>>>>>");
// if(!UserTypeUtil.INTERNET_TYPE.equals(source)){
// if(userMessage !=null && userMessage.get("phone") != null){
// if("1".equals(xhpcChargingPile.get("type").toString())){
// HashMap<String, String> paramMap = new HashMap<>();
// paramMap.put("elec", xhpcChargeOrder.getEndSoc());
// paramMap.put("sumMoney", balance.toString());
// paramMap.put("phone", userMessage.get("phone").toString());
// paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。");
// smsService.sendNotice(paramMap);
// }else {
// HashMap<String, String> paramMap = new HashMap<>();
// paramMap.put("sumMoney", balance.toString());
// paramMap.put("phone", userMessage.get("phone").toString());
// paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询小华充电小程序,谢谢。");
// smsService.sendNotice(paramMap);
// }
// }
// }
if(!UserTypeUtil.INTERNET_TYPE.equals(source)){
if(userMessage !=null && userMessage.get("phone") != null){
if("1".equals(xhpcChargingPile.get("type").toString())){
HashMap<String, String> paramMap = new HashMap<>();
paramMap.put("elec", xhpcChargeOrder.getEndSoc());
paramMap.put("sumMoney", balance.toString());
paramMap.put("phone", userMessage.get("phone").toString());
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。");
smsService.sendNotice(paramMap);
}else {
HashMap<String, String> paramMap = new HashMap<>();
paramMap.put("sumMoney", balance.toString());
paramMap.put("phone", userMessage.get("phone").toString());
paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询小华充电小程序,谢谢。");
smsService.sendNotice(paramMap);
}
}
}
}catch (Exception e){
logger.info("<<<<<<<<<<<<<<<<发送短信失败>>>>>>>>>>>>>>>>>");
}
addPileEndOrder(xhpcHistoryOrder, xhpcChargeOrder, xhpcChargeOrder.getSerialNumber(),1);
// if(!UserTypeUtil.INTERNET_TYPE.equals(source)){
// try{
// //充电结算后自动申请退款
// if(userMessage !=null && "1".equals(userMessage.get("isRefund").toString()) && map !=null){
// if(UserTypeUtil.CHARGING_MODE_WX.equals(xhpcChargeOrder.getChargingMode()) ||UserTypeUtil.CHARGING_MODE_ZFB.equals(xhpcChargeOrder.getChargingMode()) ){
// if(UserTypeUtil.USER_TYPE.equals(source) || UserTypeUtil.COMMUNIT_TYPE.equals(source)){
// refundOrderService.sendNotice(balance2,openids,xhpcChargeOrder.getSource(),refundTypes,xhpcChargeOrder.getUserId().toString(),xhpcChargeOrder.getTenantId(),"充电结算自动申请退款");
// }
// }
// }
// }catch (Exception e){
// e.printStackTrace();
// logger.info("<<<<<<<<<<<<<<<<自动退款失败>>>>>>>>>>>>>>>>>");
// }
// }
if(!UserTypeUtil.INTERNET_TYPE.equals(source)){
try{
//充电结算后自动申请退款
if(userMessage !=null && "1".equals(userMessage.get("isRefund").toString()) && map !=null){
if(UserTypeUtil.CHARGING_MODE_WX.equals(xhpcChargeOrder.getChargingMode()) ||UserTypeUtil.CHARGING_MODE_ZFB.equals(xhpcChargeOrder.getChargingMode()) ){
if(UserTypeUtil.USER_TYPE.equals(source) || UserTypeUtil.COMMUNIT_TYPE.equals(source)){
refundOrderService.sendNotice(balance2,openids,xhpcChargeOrder.getSource(),refundTypes,xhpcChargeOrder.getUserId().toString(),xhpcChargeOrder.getTenantId(),"充电结算自动申请退款");
}
}
}
}catch (Exception e){
e.printStackTrace();
logger.info("<<<<<<<<<<<<<<<<自动退款失败>>>>>>>>>>>>>>>>>");
}
}
}
});
}catch (Exception e){
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>");
e.printStackTrace();
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>");
logger.info("<<<<<<<<<<<<<<<<运行异常,结算失败,数据回滚>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber());
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return R.fail();
}

View File

@ -920,6 +920,9 @@
co.user_id as userId,
co.user_id as internetUserId,
ho.charging_mode as chargingMode,
ho.activity_power_price_total as activityPowerPriceTotal,
ho.activity_service_price_total as activityServicePriceTotal,
ho.activity_total_price as activityTotalPrice,
ho.create_time as createTime
from xhpc_history_order ho
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id

View File

@ -812,10 +812,10 @@
and (find_in_set(#{internetUserId}, xad.app_user_list) or xad.app_user_list='-1')
</if>
<if test="userType ==2">
and (find_in_set(#{internetUserId}, xad.com_user_list) or xad.app_user_list='-1')
and (find_in_set(#{internetUserId}, xad.com_user_list) or xad.com_user_list='-1')
</if>
<if test="userType ==3">
and (find_in_set(#{internetUserId}, xad.cus_user_list) or xad.app_user_list='-1')
and (find_in_set(#{internetUserId}, xad.cus_user_list) or xad.cus_user_list='-1')
</if>
and xad.start_time &lt;=#{startTime} and xad.end_time &gt; #{startTime}
order by xad.start_time asc

View File

@ -42,6 +42,9 @@
format(ifnull(sum(act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(act_service_price),0), 2) actServicePrice,
format(ifnull(sum(act_service_price + act_power_price),0), 2) actTotalPrice,
format(ifnull(sum(activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(charging_degree),0), 2) chargingDegree,
format(ifnull(sum(charging_time),0), 2) chargingTime,
format(ifnull(sum(charging_number),0), 2) chargingNumber,
@ -117,6 +120,9 @@
format(ifnull(sum(power_price),0), 2) powerPrice,
format(ifnull(sum(service_price),0), 2) servicePrice,
format(ifnull(sum(total_price),0), 2) totalPrice,
format(ifnull(sum(activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(act_price),0), 2) actPrice,
format(ifnull(sum(act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(act_service_price),0), 2) actServicePrice,
@ -165,6 +171,9 @@
format(ifnull(sum(ss.power_price),0), 2) powerPrice,
format(ifnull(sum(ss.service_price),0), 2) servicePrice,
format(ifnull(sum(ss.total_price),0), 2) totalPrice,
format(ifnull(sum(ss.activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(ss.activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(ss.activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(ss.act_price),0), 2) actPrice,
format(ifnull(sum(ss.act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(ss.act_service_price),0), 2) actServicePrice,
@ -222,6 +231,9 @@
format(ifnull(sum(ss.power_price),0), 2) powerPrice,
format(ifnull(sum(ss.service_price),0), 2) servicePrice,
format(ifnull(sum(ss.total_price),0), 2) totalPrice,
format(ifnull(sum(ss.activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(ss.activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(ss.activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(ss.act_price),0), 2) actPrice,
format(ifnull(sum(ss.act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(ss.act_service_price),0), 2) actServicePrice,
@ -271,6 +283,9 @@
format(ifnull(sum(ss.power_price),0), 2) powerPrice,
format(ifnull(sum(ss.service_price),0), 2) servicePrice,
format(ifnull(sum(ss.total_price),0), 2) totalPrice,
format(ifnull(sum(ss.activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(ss.activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(ss.activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(ss.act_price),0), 2) actPrice,
format(ifnull(sum(ss.act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(ss.act_service_price),0), 2) actServicePrice,
@ -316,6 +331,9 @@
format(ifnull(sum(ss.power_price),0), 2) powerPrice,
format(ifnull(sum(ss.service_price),0), 2) servicePrice,
format(ifnull(sum(ss.total_price),0), 2) totalPrice,
format(ifnull(sum(ss.activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(ss.activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(ss.activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(ss.act_price),0), 2) actPrice,
format(ifnull(sum(ss.act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(ss.act_service_price),0), 2) actServicePrice,
@ -458,6 +476,9 @@
format(ifnull(sum(service_price),0), 2) servicePrice,
format(ifnull(sum(total_price),0), 2) totalPrice,
format(ifnull(sum(act_price),0), 2) actPrice,
format(ifnull(sum(activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(act_service_price),0), 2) actServicePrice,
format(ifnull(sum(act_service_price + act_power_price),0), 2) actTotalPrice,
@ -602,7 +623,16 @@
service_price_evcs,
</if>
<if test="null != internetDegreeCommission ">
internet_degree_commission
internet_degree_commission,
</if>
<if test="null != activityPowerPriceTotal ">
activity_power_price_total,
</if>
<if test="null != activityServicePriceTotal ">
activity_service_price_total,
</if>
<if test="null != activityTotalPrice ">
activity_total_price,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -694,7 +724,16 @@
#{servicePriceEvcs},
</if>
<if test="null != internetDegreeCommission ">
#{internetDegreeCommission}
#{internetDegreeCommission},
</if>
<if test="null != activityPowerPriceTotal ">
#{activityPowerPriceTotal},
</if>
<if test="null != activityServicePriceTotal ">
#{activityServicePriceTotal},
</if>
<if test="null != activityTotalPrice ">
#{activityTotalPrice},
</if>
</trim>
</insert>
@ -789,6 +828,15 @@
<if test="null != source ">
source,
</if>
<if test="null != activityPowerPriceTotal ">
activity_power_price_total,
</if>
<if test="null != activityServicePriceTotal ">
activity_service_price_total,
</if>
<if test="null != activityTotalPrice ">
activity_total_price,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != chargingDegree ">
@ -878,6 +926,15 @@
<if test="null != source ">
#{source},
</if>
<if test="null != activityPowerPriceTotal ">
#{activityPowerPriceTotal},
</if>
<if test="null != activityServicePriceTotal ">
#{activityServicePriceTotal},
</if>
<if test="null != activityTotalPrice ">
#{activityTotalPrice},
</if>
</trim>
</insert>
@ -908,6 +965,9 @@
format(ifnull(sum(ss.power_price),0), 2) powerPrice,
format(ifnull(sum(ss.service_price),0), 2) servicePrice,
format(ifnull(sum(ss.total_price),0), 2) totalPrice,
format(ifnull(sum(ss.activity_power_price_total),0), 2) activityPowerPriceTotal,
format(ifnull(sum(ss.activity_service_price_total),0), 2) activityServicePriceTotal,
format(ifnull(sum(ss.activity_total_price),0), 2) activityTotalPrice,
format(ifnull(sum(ss.act_price),0), 2) actPrice,
format(ifnull(sum(ss.act_power_price),0), 2) actPowerPrice,
format(ifnull(sum(ss.act_service_price),0), 2) actServicePrice,
@ -1025,7 +1085,6 @@
</if>
</select>
<select id="getTodayNUmber" resultType="int">
SELECT
COUNT(charge_order_id) number
@ -1131,7 +1190,6 @@
</if>
</select>
<select id="getDateOrder" resultType="map">
select
ifnull(sum(total_power),0) totalPower,
@ -1168,7 +1226,6 @@
order by end_time
</select>
<select id="getDateOrderNUmber" resultType="int">
select
IFNULL(sum(total_power),0) totalPower

View File

@ -283,7 +283,15 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
redisService.deleteObject("pvToken:" + username);
// 获取登录token
return R.ok(tokenService.createToken(userInfo));
Map<String, Object> token = tokenService.createToken(userInfo);
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<appUserId>>>>>>>>>>>>"+appUserId);
logger.info("<<<<<<<<<<token>>>>>>>>>>>>"+token.toString());
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
return R.ok(token);
}else{
return R.fail(HttpStatus.DATA_ERROR, "无此账号,请重新输入账号登录");
}
@ -342,8 +350,14 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
//添加最后一次登录数据
xhpcAppUserMapper.addUserLoginTime(user.getAppUserId(),username,userInfo.getUserType(),openid,Integer.valueOf(type),UserConstants.LOGIN,tenantId,new Date());
// 获取登录token
return R.ok(tokenService.createToken(userInfo));
Map<String, Object> token = tokenService.createToken(userInfo);
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<appUserId>>>>>>>>>>>>"+user.getAppUserId());
logger.info("<<<<<<<<<<token>>>>>>>>>>>>"+token.toString());
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
logger.info("<<<<<<<<<<openid>>>>>>>>>>>>");
return R.ok(token);
}
/**