|
|
@@ -1,8 +1,6 @@
|
|
|
package com.goafanti.common.task;
|
|
|
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
@@ -12,31 +10,26 @@ import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import javax.mail.MessagingException;
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import com.goafanti.admin.service.AdminService;
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
-import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.NoticeMapper;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.enums.PatentCategoryStatus;
|
|
|
-import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.Notice;
|
|
|
import com.goafanti.common.model.PatentNew;
|
|
|
import com.goafanti.common.model.PatentNewLog;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
import com.goafanti.common.utils.SendEmailUtil;
|
|
|
-import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.patent.service.PatentNewService;
|
|
|
|
|
|
|
|
|
@@ -96,7 +89,7 @@ public class PatentTask {
|
|
|
n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
|
|
|
if (count>=0&&count<=90) {
|
|
|
Admin a=adminService.selectByPrimaryKey(p.getAid());
|
|
|
- //设置如果找不到用户则提醒
|
|
|
+ //设置如果找不到用户则提醒管理员
|
|
|
String str2="名称="+p.getName()+",email="+p.getEmail();;
|
|
|
n.setContent(str2);
|
|
|
if(a==null) {
|
|
|
@@ -106,6 +99,9 @@ public class PatentTask {
|
|
|
}else if (!SendEmailUtil.isEmail(p.getEmail())) {
|
|
|
n.setContent(str2+",管理员="+a.getName());
|
|
|
nlist.add(n);
|
|
|
+ //再发一条给管理员
|
|
|
+ n.setAid(a.getId());
|
|
|
+ nlist.add(n);
|
|
|
continue;
|
|
|
}else {
|
|
|
//计算出年费金额,然后存入数据库
|