1修改redis设置key
This commit is contained in:
parent
ca31abbdd7
commit
18940b3bc9
@ -52,7 +52,7 @@ public class TokenService {
|
|||||||
redisService.setCacheObject(ACCESS_TOKEN + token, loginUser, EXPIRE_TIME, TimeUnit.SECONDS);
|
redisService.setCacheObject(ACCESS_TOKEN + token, loginUser, EXPIRE_TIME, TimeUnit.SECONDS);
|
||||||
Map<String, Object> map1 = new HashMap<>();
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
map1.put("privilege", loginUser.getSysUser().getDataPowerType());
|
map1.put("privilege", loginUser.getSysUser().getDataPowerType());
|
||||||
redisService.setCacheMap(loginUser.getSysUser().getUserId() + ":privilege", map1);
|
redisService.setCacheMap("privilege:" + loginUser.getSysUser().getUserId(), map1);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -530,12 +530,12 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
}
|
}
|
||||||
//费率
|
//费率
|
||||||
List<Map<String, Object>> xhpcRateList = xhpcChargingStationMapper.getXhpcRateList(chargingStationId);
|
List<Map<String, Object>> xhpcRateList = xhpcChargingStationMapper.getXhpcRateList(chargingStationId);
|
||||||
map.put("rateList",xhpcRateList);
|
map.put("xhpcRateList", xhpcRateList);
|
||||||
|
|
||||||
//费率时段,先反设置时段,在反默认时段
|
//费率时段,先反设置时段,在反默认时段
|
||||||
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcChargingStationMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
|
List<Map<String, Object>> xhpcRateTimeTypeList = xhpcChargingStationMapper.getXhpcRateTimeTypeList(chargingStationId, 1);
|
||||||
xhpcRateTimeTypeList.addAll(xhpcChargingStationMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
xhpcRateTimeTypeList.addAll(xhpcChargingStationMapper.getXhpcRateTimeTypeList(chargingStationId, 2));
|
||||||
map.put("rateTimeList",xhpcRateTimeTypeList);
|
map.put("xhpcRateTimeList", xhpcRateTimeTypeList);
|
||||||
if(type ==2){
|
if(type ==2){
|
||||||
//统计终端(充redis获取终端信息)
|
//统计终端(充redis获取终端信息)
|
||||||
|
|
||||||
|
|||||||
@ -183,7 +183,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
ct.station_type as stationType,
|
ct.station_type as stationType,
|
||||||
op.name as operatorName,
|
op.name as operatorName,
|
||||||
ct.type as type,
|
ct.type as type,
|
||||||
ct.station_type as stationType,
|
|
||||||
(select dict_value from xhpc_dict_biz where code ='charging_station_type' and dict_key =ct.station_type) as stationTypeName,
|
(select dict_value from xhpc_dict_biz where code ='charging_station_type' and dict_key =ct.station_type) as stationTypeName,
|
||||||
ct.serial_number as serialNumber,
|
ct.serial_number as serialNumber,
|
||||||
ct.construction_site as constructionSite,
|
ct.construction_site as constructionSite,
|
||||||
|
|||||||
@ -222,7 +222,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
rt.start_time as startTime,
|
rt.start_time as startTime,
|
||||||
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
replace(rt.end_time,'00:00:00','24:00:00') AS endTime,
|
||||||
rt.rate_id as rateId,
|
rt.rate_id as rateId,
|
||||||
rate_value as rateValue,
|
rt.rate_value as rateValue,
|
||||||
ra.name as rateName
|
ra.name as rateName
|
||||||
from xhpc_rate_time as rt
|
from xhpc_rate_time as rt
|
||||||
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
left join xhpc_rate as ra on ra.rate_id =rt.rate_id
|
||||||
|
|||||||
@ -16,6 +16,16 @@ public class OrderApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(OrderApplication.class, args);
|
SpringApplication.run(OrderApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 订单服务启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,7 +93,7 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult internetUser(Long userId) {
|
public AjaxResult internetUser(Long userId) {
|
||||||
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
Map<String, Object> map = redisService.getCacheMap("privilege:" + userId);
|
||||||
if (StringUtils.isNotNull(map)) {
|
if (StringUtils.isNotNull(map)) {
|
||||||
String privilege = StringUtils.valueOf(map.get("privilege"));
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
if (StringUtils.isNotEmpty(privilege)) {
|
if (StringUtils.isNotEmpty(privilege)) {
|
||||||
@ -122,7 +122,7 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
Map<String, Object> map = redisService.getCacheMap("privilege:" + userId);
|
||||||
if (StringUtils.isNotNull(map)) {
|
if (StringUtils.isNotNull(map)) {
|
||||||
String privilege = StringUtils.valueOf(map.get("privilege"));
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
if (StringUtils.isNotEmpty(privilege)) {
|
if (StringUtils.isNotEmpty(privilege)) {
|
||||||
|
|||||||
@ -93,7 +93,7 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult operatorUser(Long userId) {
|
public AjaxResult operatorUser(Long userId) {
|
||||||
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
Map<String, Object> map = redisService.getCacheMap("privilege:" + userId);
|
||||||
if (StringUtils.isNotNull(map)) {
|
if (StringUtils.isNotNull(map)) {
|
||||||
String privilege = StringUtils.valueOf(map.get("privilege"));
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
if (StringUtils.isNotEmpty(privilege)) {
|
if (StringUtils.isNotEmpty(privilege)) {
|
||||||
@ -123,7 +123,7 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
Map<String, Object> map = redisService.getCacheMap("privilege:" + userId);
|
||||||
if (StringUtils.isNotNull(map)) {
|
if (StringUtils.isNotNull(map)) {
|
||||||
String privilege = StringUtils.valueOf(map.get("privilege"));
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
if (StringUtils.isNotEmpty(privilege)) {
|
if (StringUtils.isNotEmpty(privilege)) {
|
||||||
|
|||||||
@ -321,7 +321,8 @@
|
|||||||
te.name as terminalName,
|
te.name as terminalName,
|
||||||
ho.act_price as actPrice,
|
ho.act_price as actPrice,
|
||||||
ho.act_power_price as actPowerPrice,
|
ho.act_power_price as actPowerPrice,
|
||||||
(select charging_time from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time desc LIMIT 1) as chargingTime
|
(select charging_time from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY
|
||||||
|
create_time desc LIMIT 1) as chargingTime,
|
||||||
(select charging_degree from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time desc LIMIT 1) as chargingDegree,
|
(select charging_degree from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time desc LIMIT 1) as chargingDegree,
|
||||||
(select DATE_FORMAT(create_time,'%m月%d日') from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time asc LIMIT 1) as daysOne,
|
(select DATE_FORMAT(create_time,'%m月%d日') from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time asc LIMIT 1) as daysOne,
|
||||||
(select DATE_FORMAT(create_time,'%H:%m') from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time asc LIMIT 1) as timeOne,
|
(select DATE_FORMAT(create_time,'%H:%m') from xhpc_real_time_order where charging_order_id=ho.charging_order_id ORDER BY create_time asc LIMIT 1) as timeOne,
|
||||||
|
|||||||
@ -16,6 +16,16 @@ public class PaymentApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(PaymentApplication.class, args);
|
SpringApplication.run(PaymentApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 支付服务启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,16 @@ public class UserApplication {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(UserApplication.class, args);
|
SpringApplication.run(UserApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 账号服务启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user