mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-04 10:00:11 +08:00
update 打印日志
This commit is contained in:
@@ -71,7 +71,7 @@ public class OrderController extends BaseController {
|
||||
dto.setMemberId(memberId);
|
||||
// 生成订单
|
||||
dto.setStartMode(Constants.ONE); // 启动方式 1-app启动
|
||||
String orderCode = orderService.generateOrder(dto);
|
||||
String orderCode = orderService.generateOrderV2(dto);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("orderCode", orderCode));
|
||||
} catch (BusinessException e) {
|
||||
logger.warn("生成订单 warn", e);
|
||||
|
||||
@@ -135,7 +135,7 @@ public class PayController extends BaseController {
|
||||
if (isLock) {
|
||||
String appId = request.getHeader("appId");
|
||||
dto.setWechatAppId(appId);
|
||||
map = orderService.payOrder(dto);
|
||||
map = orderService.payOrderV2(dto);
|
||||
}
|
||||
response = new RestApiResponse<>(map);
|
||||
} catch (BusinessException e) {
|
||||
|
||||
@@ -165,6 +165,18 @@ public class OrderService {
|
||||
return orderBasicInfoService.payOrder(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
* @param dto
|
||||
*/
|
||||
public Map<String, Object> payOrderV2(PayOrderDTO dto) {
|
||||
String mode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
|
||||
// 获取处理逻辑
|
||||
AbstractOrderLogic orderLogic = OrderLogicFactory.getOrderLogic(mode);
|
||||
Map<String, Object> map = orderLogic.payOrder(dto);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结算订单
|
||||
* endCharging
|
||||
@@ -1268,11 +1280,5 @@ public class OrderService {
|
||||
return orderPileOccupyService.payOccupyPileOrder(dto);
|
||||
}
|
||||
|
||||
public Map<String, Object> payOrderV2(PayOrderDTO dto) {
|
||||
String mode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
|
||||
// 获取处理逻辑
|
||||
AbstractOrderLogic orderLogic = OrderLogicFactory.getOrderLogic(mode);
|
||||
Map<String, Object> map = orderLogic.payOrder(dto);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,21 +6,31 @@ package com.jsowell.common.constant;
|
||||
* @author jsowell
|
||||
*/
|
||||
public class CacheConstants {
|
||||
|
||||
// 缓存时间 1分钟
|
||||
public static final int cache_expire_time_1m = 60;
|
||||
|
||||
// 缓存时间 3分钟
|
||||
public static final int cache_expire_time_3m = cache_expire_time_1m * 3;
|
||||
|
||||
// 缓存时间 5分钟
|
||||
public static final int cache_expire_time_5m = cache_expire_time_1m * 5;
|
||||
|
||||
// 缓存时间 10分钟
|
||||
public static final int cache_expire_time_10m = cache_expire_time_1m * 10;
|
||||
|
||||
// 缓存时间 30分钟
|
||||
public static final int cache_expire_time_30m = cache_expire_time_1m * 30;
|
||||
|
||||
// 缓存时间 60分钟
|
||||
public static final int cache_expire_time_1h = cache_expire_time_1m * 60;
|
||||
|
||||
// 缓存时间 12小时
|
||||
public static final int cache_expire_time_12h = cache_expire_time_1h * 12;
|
||||
|
||||
// 缓存时间 24小时
|
||||
public static final int cache_expire_time_1d = cache_expire_time_1h * 24;
|
||||
|
||||
// 缓存时间 10天
|
||||
public static final int cache_expire_time_10d = cache_expire_time_1d * 10;
|
||||
|
||||
public static final String PUSH_STATION_CONNECTOR = "push_station_connector";
|
||||
|
||||
@@ -575,7 +575,7 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
|
||||
// 只修改一个枪口的状态
|
||||
num = pileConnectorInfoMapper.updateConnectorStatus(pileConnectorCode, status);
|
||||
deleteRedisByPileSn(pileSn);
|
||||
redisCache.setCacheObject(redisKey, status, CacheConstants.cache_expire_time_10m);
|
||||
redisCache.setCacheObject(redisKey, status, CacheConstants.cache_expire_time_3m);
|
||||
|
||||
// TODO 推送联联平台 设备状态变化推送接口 ConnectorStatusInfo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user