|
|
@@ -37,8 +37,8 @@ public class WarnPestService {
|
|
|
@Autowired
|
|
|
private IIotPestService iotPestService;
|
|
|
|
|
|
- @Value("warn.cbdDateDiff:1")
|
|
|
- private int cbdDateDiff;
|
|
|
+ @Value("${warn.cbdDateDiff:1}")
|
|
|
+ private String cbdDateDiff;
|
|
|
|
|
|
/**
|
|
|
* 虫害处理入口
|
|
|
@@ -108,7 +108,8 @@ public class WarnPestService {
|
|
|
}
|
|
|
|
|
|
String getDateBefore() {
|
|
|
- return DateUtils.parseDateToStr("yyyy-MM-dd", DateUtils.addDays(new Date(), -cbdDateDiff));
|
|
|
+ int cbdDateDiffInt = Integer.parseInt(cbdDateDiff);
|
|
|
+ return DateUtils.parseDateToStr("yyyy-MM-dd", DateUtils.addDays(new Date(), -cbdDateDiffInt));
|
|
|
}
|
|
|
|
|
|
/**
|