修改BUG
This commit is contained in:
parent
5a447df6bd
commit
7fd7513e13
@ -54,7 +54,7 @@ public interface SysMenuMapper
|
|||||||
/**
|
/**
|
||||||
* 根据用户ID查询菜单
|
* 根据用户ID查询菜单
|
||||||
*
|
*
|
||||||
* @param username 用户ID
|
* @param userId 用户ID
|
||||||
* @return 菜单列表
|
* @return 菜单列表
|
||||||
*/
|
*/
|
||||||
public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||||
|
|||||||
@ -381,6 +381,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="getTerminal" resultType="String">
|
<select id="getTerminal" resultType="String">
|
||||||
select serial_number as serialNumber from xhpc_terminal where charging_station_id=#{chargingStationId} and status=#{status} and del_flag=2
|
select serial_number as serialNumber from xhpc_terminal where charging_station_id=#{chargingStationId} and status=#{status} and del_flag=0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -238,6 +238,9 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
CacheOrderData cacheOrderData = (CacheOrderData)cacheMap.get("orderData");
|
CacheOrderData cacheOrderData = (CacheOrderData)cacheMap.get("orderData");
|
||||||
//获取充电订单
|
//获取充电订单
|
||||||
XhpcChargeOrder xhpcChargeOrder = xhpcChargeOrderService.getSerialNumberMessage(orderNo);
|
XhpcChargeOrder xhpcChargeOrder = xhpcChargeOrderService.getSerialNumberMessage(orderNo);
|
||||||
|
if(xhpcChargeOrder == null ){
|
||||||
|
return R.fail(500,"无效订单号:"+orderNo);
|
||||||
|
}
|
||||||
if(xhpcChargeOrder.getStatus()==1 || xhpcChargeOrder.getStatus()==3){
|
if(xhpcChargeOrder.getStatus()==1 || xhpcChargeOrder.getStatus()==3){
|
||||||
logger.info("订单已结束不能重复结算>>>>>orderNo:"+orderNo+">>>chargeOrderId:"+xhpcChargeOrder.getChargeOrderId());
|
logger.info("订单已结束不能重复结算>>>>>orderNo:"+orderNo+">>>chargeOrderId:"+xhpcChargeOrder.getChargeOrderId());
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@ -944,5 +944,7 @@ public class XhpcHistoryOrderController extends BaseController {
|
|||||||
//
|
//
|
||||||
// System.out.println(decimal.divide(decimal1,2,BigDecimal.ROUND_DOWN));
|
// System.out.println(decimal.divide(decimal1,2,BigDecimal.ROUND_DOWN));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -621,10 +621,10 @@
|
|||||||
and co.source=#{source}
|
and co.source=#{source}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime !=null and startTime !=''">
|
<if test="startTime !=null and startTime !=''">
|
||||||
and co.start_time >= #{startTime}
|
and ho.start_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime !=null and endTime !=''">
|
<if test="endTime !=null and endTime !=''">
|
||||||
and co.start_time <= #{endTime}
|
and ho.start_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="transactionNumber !=null and transactionNumber !=''">
|
<if test="transactionNumber !=null and transactionNumber !=''">
|
||||||
and ho.serial_number like concat('%', #{transactionNumber}, '%')
|
and ho.serial_number like concat('%', #{transactionNumber}, '%')
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public interface XhpcAppUserMapper {
|
|||||||
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone);
|
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone);
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> userSum(@Param("phone") String phone);
|
public Map<String, Object> userSum(@Param("phone")String phone,@Param("time")String time);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号查询C端用户信息
|
* 手机号查询C端用户信息
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.xhpc.user.service.impl;
|
package com.xhpc.user.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.xhpc.common.core.constant.HttpStatus;
|
import com.xhpc.common.core.constant.HttpStatus;
|
||||||
import com.xhpc.common.core.constant.StatusConstants;
|
import com.xhpc.common.core.constant.StatusConstants;
|
||||||
import com.xhpc.common.core.constant.UserConstants;
|
import com.xhpc.common.core.constant.UserConstants;
|
||||||
@ -85,7 +87,11 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, Object> userSum(String phone) {
|
public Map<String, Object> userSum(String phone) {
|
||||||
|
|
||||||
return xhpcAppUserMapper.userSum(phone);
|
//最近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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -200,11 +200,8 @@
|
|||||||
<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 datediff(now(),create_time)>30) userVitality
|
(select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time}) userVitality
|
||||||
from xhpc_app_user xau
|
from xhpc_app_user xau
|
||||||
LEFT JOIN (select count(1) count ,user_id from xhpc_charge_order where del_flag = 0 ) a on a.user_id =
|
|
||||||
xau.app_user_id
|
|
||||||
WHERE xau.del_flag = 0
|
|
||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
and xau.phone like concat(concat('%', #{phone}), '%')
|
and xau.phone like concat(concat('%', #{phone}), '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user