mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
设置挡板, PRE环境不执行定时任务
This commit is contained in:
@@ -73,8 +73,8 @@ public class JsowellTask {
|
|||||||
*/
|
*/
|
||||||
public void setBarrier() {
|
public void setBarrier() {
|
||||||
String env = SpringUtils.getActiveProfile();
|
String env = SpringUtils.getActiveProfile();
|
||||||
if (!StringUtils.equalsIgnoreCase(env, "prd")) {
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
log.info("非PRD环境不执行");
|
log.info("PRE环境不执行");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,11 @@ public class JsowellTask {
|
|||||||
* close15MinutesOfUnpaidOrders
|
* close15MinutesOfUnpaidOrders
|
||||||
*/
|
*/
|
||||||
public void close15MinutesOfUnpaidOrders() {
|
public void close15MinutesOfUnpaidOrders() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// log.info("关闭15分钟未支付的订单");
|
// log.info("关闭15分钟未支付的订单");
|
||||||
orderBasicInfoService.close15MinutesOfUnpaidOrders();
|
orderBasicInfoService.close15MinutesOfUnpaidOrders();
|
||||||
}
|
}
|
||||||
@@ -94,7 +98,11 @@ public class JsowellTask {
|
|||||||
* 订单支付成功,在15分钟内未启动,
|
* 订单支付成功,在15分钟内未启动,
|
||||||
*/
|
*/
|
||||||
public void closeStartFailedOrder() {
|
public void closeStartFailedOrder() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询出最近2天支付成功,并且订单状态为未启动的订单
|
// 查询出最近2天支付成功,并且订单状态为未启动的订单
|
||||||
String startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addDays(new Date(), -2));
|
String startTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.addDays(new Date(), -2));
|
||||||
String endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
String endTime = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, new Date());
|
||||||
@@ -105,7 +113,11 @@ public class JsowellTask {
|
|||||||
* 查询预约充电的订单并启动
|
* 查询预约充电的订单并启动
|
||||||
*/
|
*/
|
||||||
public void appointmentOrderStart() {
|
public void appointmentOrderStart() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询出 已支付 设置预约充电 未启动 的订单
|
// 查询出 已支付 设置预约充电 未启动 的订单
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
List<OrderBasicInfo> list = orderBasicInfoService.getReservedOrder(now);
|
List<OrderBasicInfo> list = orderBasicInfoService.getReservedOrder(now);
|
||||||
@@ -150,7 +162,11 @@ public class JsowellTask {
|
|||||||
* jsowellTask.calculateTheSiteOrdersReport()
|
* jsowellTask.calculateTheSiteOrdersReport()
|
||||||
*/
|
*/
|
||||||
public void calculateTheSiteOrdersReport() {
|
public void calculateTheSiteOrdersReport() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询出所有站点
|
// 查询出所有站点
|
||||||
PileStationInfo pileStationInfo = new PileStationInfo();
|
PileStationInfo pileStationInfo = new PileStationInfo();
|
||||||
pileStationInfo.setDelFlag(Constants.ZERO);
|
pileStationInfo.setDelFlag(Constants.ZERO);
|
||||||
@@ -175,7 +191,11 @@ public class JsowellTask {
|
|||||||
* jsowellTask.pushToAMap()
|
* jsowellTask.pushToAMap()
|
||||||
*/
|
*/
|
||||||
public void pushToAMap() {
|
public void pushToAMap() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Set<String> stationIds = redisCache.getCacheSet(CacheConstants.PUSH_STATION_CONNECTOR);
|
Set<String> stationIds = redisCache.getCacheSet(CacheConstants.PUSH_STATION_CONNECTOR);
|
||||||
if (CollectionUtils.isEmpty(stationIds)) {
|
if (CollectionUtils.isEmpty(stationIds)) {
|
||||||
return;
|
return;
|
||||||
@@ -196,7 +216,11 @@ public class JsowellTask {
|
|||||||
* 贵州省平台推送充电站实时功率
|
* 贵州省平台推送充电站实时功率
|
||||||
*/
|
*/
|
||||||
public void pushStationRealTimePowerInfo() {
|
public void pushStationRealTimePowerInfo() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询出要推送的站点(贵州、)
|
// 查询出要推送的站点(贵州、)
|
||||||
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
||||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||||
@@ -214,7 +238,11 @@ public class JsowellTask {
|
|||||||
* jsowellTask.processOrderSplitting()
|
* jsowellTask.processOrderSplitting()
|
||||||
*/
|
*/
|
||||||
public void processOrderSplitting() {
|
public void processOrderSplitting() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询运营商列表
|
// 查询运营商列表
|
||||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
||||||
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
||||||
@@ -249,7 +277,11 @@ public class JsowellTask {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void generateMerchantBill() {
|
public void generateMerchantBill() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 查询运营商列表
|
// 查询运营商列表
|
||||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
||||||
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
||||||
@@ -274,8 +306,12 @@ public class JsowellTask {
|
|||||||
* jsowellTask.automaticPayouts()
|
* jsowellTask.automaticPayouts()
|
||||||
*/
|
*/
|
||||||
public void automaticPayouts() {
|
public void automaticPayouts() {
|
||||||
setBarrier();
|
String env = SpringUtils.getActiveProfile();
|
||||||
// TODO 查询开启自动提现运营商列表
|
if (StringUtils.equalsIgnoreCase(env, "pre")) {
|
||||||
|
log.info("PRE环境不执行");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 查询开启自动提现运营商列表
|
||||||
// List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
// List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectPileMerchantInfoList(null);
|
||||||
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectAutoWithdrawalMerchantInfoList();
|
List<PileMerchantInfo> pileMerchantInfos = pileMerchantInfoService.selectAutoWithdrawalMerchantInfoList();
|
||||||
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
if (CollectionUtils.isEmpty(pileMerchantInfos)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user