|
|
@@ -34,8 +34,8 @@ import com.goafanti.patent.service.PatentNewService;
|
|
|
|
|
|
|
|
|
|
|
|
-//@Component
|
|
|
-@RestController
|
|
|
+@Component
|
|
|
+//@RestController
|
|
|
public class PatentTask {
|
|
|
@Resource
|
|
|
private PatentNewService patentNewService;
|
|
|
@@ -65,8 +65,8 @@ public class PatentTask {
|
|
|
* 1、先计算出申请时间与当前时间相隔天数 2、然后用相隔天使除以365取余计算年份差 3、在用申请时间加上年限获取最后日期
|
|
|
* 4、在相隔30天、20天、10天、3天、2天、1天分别一次提醒。原是在距离90天提醒。
|
|
|
*/
|
|
|
-// @Scheduled(cron = "0 0 0 * * ?")
|
|
|
- @RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
|
|
|
+ @Scheduled(cron = "0 0 0 * * ?")
|
|
|
+// @RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
|
|
|
public void patentRemind() {
|
|
|
LoggerUtils.debug(getClass(), "====================开始检查专利提醒==================");
|
|
|
try {
|
|
|
@@ -125,7 +125,6 @@ public class PatentTask {
|
|
|
nlist.add(n);
|
|
|
continue;
|
|
|
} else if (!SendEmailUtil.isEmail(p.getEmail())) {
|
|
|
- System.out.println("pid="+p.getId()+",aid="+p.getAid());
|
|
|
str2.append(",管理员=").append(a.getName()).append(",邮箱不正确。");
|
|
|
n.setAid("1");
|
|
|
n.setContent(str2.toString());
|