|
@@ -4,9 +4,11 @@ import com.yonge.cooleshow.biz.dal.service.*;
|
|
|
import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
import com.yonge.cooleshow.common.entity.HttpResponseResult;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.redisson.api.RBucket;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -37,6 +39,8 @@ public class TaskController extends BaseController {
|
|
|
private PlatformCashAccountRecordService platformCashAccountRecordService;
|
|
|
@Autowired
|
|
|
private ActivityPlanService activityPlanService;
|
|
|
+ @Value("${app.blacklist:}")
|
|
|
+ private String blackListFilePath;
|
|
|
|
|
|
/***
|
|
|
* 轮询用户订单
|
|
@@ -83,7 +87,13 @@ public class TaskController extends BaseController {
|
|
|
@PostMapping(value = "/refreshBlackList")
|
|
|
public HttpResponseResult refreshBlackList() {
|
|
|
RBucket<Long> bucket = redissonClient.getBucket(SysConfigConstant.BLACK_LIST_UPDATE_TIME);
|
|
|
- File file = new File(SysConfigConstant.BLACK_LIST_FILE_PATH);
|
|
|
+
|
|
|
+ String filePath = blackListFilePath;
|
|
|
+ if (StringUtils.isEmpty(filePath)) {
|
|
|
+ filePath = SysConfigConstant.BLACK_LIST_FILE_PATH;
|
|
|
+ }
|
|
|
+
|
|
|
+ File file = new File(filePath);
|
|
|
bucket.set(file.lastModified());
|
|
|
return HttpResponseResult.succeed();
|
|
|
}
|