|
|
@@ -1,10 +1,14 @@
|
|
|
package com.cyksj.web.controller.manage.account;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.cyksj.common.EnvCommonService;
|
|
|
+import com.cyksj.common.constant.Constant;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
-import com.cyksj.mapper.NetflixUserAccountSubmitRecoverRecordMapper;
|
|
|
import com.cyksj.model.views.NetflixErrorRecoverView;
|
|
|
import com.cyksj.service.relation.CmsGroupsRelationService;
|
|
|
+import com.cyksj.xxljob.XxlJobInfo;
|
|
|
+import com.cyksj.xxljob.XxlJobUtil;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
@@ -32,10 +36,10 @@ public class NetflixErrorRecoverController {
|
|
|
|
|
|
private final HttpServletRequest request;
|
|
|
|
|
|
- private final NetflixUserAccountSubmitRecoverRecordMapper recoverRecordMapper;
|
|
|
-
|
|
|
private final CmsGroupsRelationService cmsGroupsRelationService;
|
|
|
|
|
|
+ private final EnvCommonService envCommonService;
|
|
|
+
|
|
|
/**
|
|
|
* 奈飞恢复列表
|
|
|
*/
|
|
|
@@ -56,4 +60,16 @@ public class NetflixErrorRecoverController {
|
|
|
cmsGroupsRelationService.recoverAvailableParkingSpace();
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 奈飞从备用账号中恢复
|
|
|
+ */
|
|
|
+ @PostMapping("/recover/standby")
|
|
|
+ public Result<String> recoverStandby() throws Exception {
|
|
|
+ if (envCommonService.isPrdEnv()) {
|
|
|
+ //立即执行客服值班定时任务
|
|
|
+ XxlJobUtil.executeMarkDynamicRuleTagJob(XxlJobInfo.getExecuteTaskInstance(Constant.NF_RECOVER_STANDBY_JOB_ID, StrUtil.EMPTY).toString());
|
|
|
+ }
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
+ }
|
|
|
}
|