Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 5 years ago
parent
commit
b60c527425
49 changed files with 1456 additions and 932 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 1 0
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  3. 5 0
      src/main/java/com/goafanti/admin/bo/NoticeBo.java
  4. 5 23
      src/main/java/com/goafanti/admin/controller/AdminNoticeApiController.java
  5. 5 2
      src/main/java/com/goafanti/admin/service/NoticeService.java
  6. 39 39
      src/main/java/com/goafanti/admin/service/impl/NoticeServiceImpl.java
  7. 15 23
      src/main/java/com/goafanti/common/bo/EmailBo.java
  8. 40 10
      src/main/java/com/goafanti/common/dao/NoticeMapper.java
  9. 4 0
      src/main/java/com/goafanti/common/dao/PatentNewLogMapper.java
  10. 11 36
      src/main/java/com/goafanti/common/dao/PatentNewMapper.java
  11. 2 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  12. 6 6
      src/main/java/com/goafanti/common/dao/UserServiceFollowMapper.java
  13. 6 6
      src/main/java/com/goafanti/common/dao/UserServiceMapper.java
  14. 129 0
      src/main/java/com/goafanti/common/enums/NoticeTypes.java
  15. 137 102
      src/main/java/com/goafanti/common/mapper/NoticeMapper.xml
  16. 15 0
      src/main/java/com/goafanti/common/mapper/PatentNewLogMapper.xml
  17. 59 231
      src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml
  18. 7 3
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml
  19. 38 13
      src/main/java/com/goafanti/common/mapper/UserServiceFollowMapper.xml
  20. 57 32
      src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml
  21. 245 96
      src/main/java/com/goafanti/common/model/Notice.java
  22. 121 59
      src/main/java/com/goafanti/common/model/PatentNew.java
  23. 86 38
      src/main/java/com/goafanti/common/model/UserService.java
  24. 83 35
      src/main/java/com/goafanti/common/model/UserServiceFollow.java
  25. 5 8
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  26. 193 111
      src/main/java/com/goafanti/common/task/PatentTask.java
  27. 4 8
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  28. 24 2
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  29. 4 3
      src/main/java/com/goafanti/contract/service/impl/ContractServiceImpl.java
  30. 0 1
      src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java
  31. 13 0
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  32. 8 0
      src/main/java/com/goafanti/customer/service/CustomerService.java
  33. 5 3
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  34. 7 8
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  35. 2 5
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  36. 1 4
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  37. 3 3
      src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java
  38. 2 6
      src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java
  39. 11 0
      src/main/java/com/goafanti/patent/bo/PatentNewBo.java
  40. 14 0
      src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java
  41. 5 0
      src/main/java/com/goafanti/patent/service/PatentNewService.java
  42. 0 1
      src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java
  43. 10 0
      src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java
  44. 0 1
      src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java
  45. 16 0
      src/main/java/com/goafanti/user/bo/OutOrderUserService.java
  46. 3 4
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  47. 3 3
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  48. 5 5
      src/main/resources/props/config_local.properties
  49. 1 1
      src/main/resources/props/config_test.properties

+ 1 - 1
GeneratorConfig.xml

@@ -43,7 +43,7 @@
     <property name="enableSubPackages" value="false"/>
      <property name="nullCatalogMeansCurrent" value="true"/>
     </javaClientGenerator>
-    <table schema="aft" tableName="user_service"
+    <table schema="aft" tableName="user_service_follow"
 	enableCountByExample="false" enableUpdateByExample="false"
 	enableDeleteByExample="false" enableSelectByExample="false"
 	selectByExampleQueryId="false" enableSelectByPrimaryKey="true"

+ 1 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -95,6 +95,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	private AchievementInterestMapper	achievementInterestMapper;
 	@Autowired
 	private UserMapper					userMapper;
+	
 
 	private static final Logger				logger	= LoggerFactory.getLogger(AchievementServiceImpl.class);
 

+ 5 - 0
src/main/java/com/goafanti/admin/bo/NoticeBo.java

@@ -4,6 +4,11 @@ import com.goafanti.common.model.Notice;
 
 public class NoticeBo extends Notice {
 
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
 	private String	unitName;
 
 	private String	principle;

+ 5 - 23
src/main/java/com/goafanti/admin/controller/AdminNoticeApiController.java

@@ -10,8 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.admin.service.NoticeService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.shiro.token.TokenManager;
+
 @RestController
 @RequestMapping(value = "/api/admin/notice")
 public class AdminNoticeApiController extends CertifyApiController{
@@ -36,18 +35,9 @@ public class AdminNoticeApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/unread", method = RequestMethod.GET)
-	public Result unread(String pageNo, String pageSize){
+	public Result unread(){
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		
-		res.setData(noticeService.updateListUnreadNoticeByAid(pNo, pSize, TokenManager.getAdminId()));
+		res.setData(noticeService.updateListUnreadNoticeByAid());
 		return res;
 	}
 	
@@ -56,17 +46,9 @@ public class AdminNoticeApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/readed", method = RequestMethod.GET)
-	public Result readed(String pageNo, String pageSize){
+	public Result readed(Integer type,Integer pageNo, Integer pageSize){
 		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(noticeService.ListReadedNoticeByAid(pNo, pSize, TokenManager.getAdminId()));
+		res.setData(noticeService.ListReadedNoticeByAid(type,pageNo, pageSize));
 		return res;
 	}
 }

+ 5 - 2
src/main/java/com/goafanti/admin/service/NoticeService.java

@@ -1,13 +1,16 @@
 package com.goafanti.admin.service;
 
+import java.util.List;
+import java.util.Map;
+
 import com.goafanti.admin.bo.NoticeBo;
 import com.goafanti.core.mybatis.page.Pagination;
 
 public interface NoticeService {
 
-	Pagination<NoticeBo> updateListUnreadNoticeByAid(Integer pageNo, Integer pageSize, String adminId);
+	List<Map<String, Object>> updateListUnreadNoticeByAid();
 
-	Pagination<NoticeBo> ListReadedNoticeByAid(Integer pNo, Integer pSize, String adminId);
+	Pagination<NoticeBo> ListReadedNoticeByAid(Integer type, Integer pNo, Integer pageSize);
 
 	int findUnreadNoticeCount();
 

+ 39 - 39
src/main/java/com/goafanti/admin/service/impl/NoticeServiceImpl.java

@@ -10,11 +10,8 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.admin.bo.NoticeBo;
 import com.goafanti.admin.service.NoticeService;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.NoticeMapper;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.Notice;
+import com.goafanti.common.enums.NoticeTypes;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -23,59 +20,62 @@ import com.goafanti.core.shiro.token.TokenManager;
 public class NoticeServiceImpl extends BaseMybatisDao<NoticeMapper> implements NoticeService {
 	@Autowired
 	private NoticeMapper noticeMapper;
-	@Autowired
-	private AdminMapper adminMapper;
 
-	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<NoticeBo> updateListUnreadNoticeByAid(Integer pageNo, Integer pageSize, String aid) {
-		Map<String, Object> params = new HashMap<>();
-			params.put("aid", aid);
-		if (pageNo == null || pageNo < 0) {
-			pageNo = 1;
-		}
-		if (pageSize == null || pageSize < 0) {
-			pageSize = 10;
-		}
-		Pagination<NoticeBo> notice = (Pagination<NoticeBo>) findPage("findUnreadNoticeListByPage", "findUnreadNoticeCount",
-				params, pageNo, pageSize);
+	public List<Map<String, Object>> updateListUnreadNoticeByAid() {
+		List<Map<String, Object>> list = new ArrayList<>();
+		List<NoticeBo> nl = noticeMapper.findUnreadNoticeListByPage(TokenManager.getAdminId());
+		List<String> dl = new ArrayList<String>();
 
-		if (null != notice.getList() && notice.getList().size()>0) {
-			List<Notice> list = (List<Notice>) notice.getList();
-			List<String> dl = new ArrayList<String>();
-			for (Notice n : list) {
+		for (int i = NoticeTypes.getCount(); i >= 0; i--) {
+			Map<String, Object> map = new HashMap<String, Object>();
+			List<NoticeBo> cffk = new ArrayList<NoticeBo>();
+			for (NoticeBo n : nl) {
+				// 0专利提醒
+				if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				} else if (n.getType() == i) {
+					cffk.add(n);
+				}
+			}
+			map.put("name", NoticeTypes.getValueByCode(i));
+			map.put("id", i);
+			map.put("list", cffk);
+			list.add(map);
+		}
+		if (!nl.isEmpty()) {
+			for (NoticeBo n : nl) {
+				// 添加已读
 				dl.add(n.getId());
 			}
 			noticeMapper.batchUpdateUnreaded(dl);
 		}
-		return notice;
+		return list;
 	}
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<NoticeBo> ListReadedNoticeByAid(Integer pageNo, Integer pageSize, String aid) {
+	public Pagination<NoticeBo> ListReadedNoticeByAid(Integer type, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<>();
-
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
-			params.put("aid", aid);
-		}
-
-		if (pageNo == null || pageNo < 0) {
-			pageNo = 1;
-		}
-
-		if (pageSize == null || pageSize < 0) {
-			pageSize = 10;
-		}
+		params.put("aid", TokenManager.getAdminId());
+		params.put("type", type==null?0:type);
 		return (Pagination<NoticeBo>) findPage("findReadedNoticeListByPage", "findReadedNoticeCount", params, pageNo,
 				pageSize);
 	}
 
 	@Override
 	public int findUnreadNoticeCount() {
-		String aid = null;
-			aid = TokenManager.getAdminId();
-		return noticeMapper.selectUnreadedCount(aid);
+		return noticeMapper.selectUnreadedCount(TokenManager.getAdminId());
 	}
 
 

+ 15 - 23
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -23,28 +23,9 @@ public class EmailBo {
 	public EmailBo() {
 	}
 	
-	/**
-	 *  
-	 * @param subject	
-	 * @param address	收件地址
-	 * @param addressee 	收件人
-	 * @param deptname		部门
-	 * @param sender		发起人id
-	 * @param content		内容
-	 */
-//	public EmailBo(String subject, String address, String addressee,
-//			String deptname, String sender,
-//			String content) {
-//		this.subject = subject;
-//		this.address = address;
-//		this.addressee = addressee;
-//		this.deptname = deptname;
-//		this.sender = sender;
-//		this.content = content;
-//	}
 	
 	/**
-	 * 
+	 * 专利提醒模版接口
 	 * @param subject
 	 * @param address
 	 * @param addressee
@@ -58,13 +39,21 @@ public class EmailBo {
 	 * @param date
 	 */
 	public  EmailBo(String subject, String address, String addressee,
-			String deptname, String sender,String patentName,String patentNo,String amount,String date) {
+			String deptname, String sender,String patentName,String patentNo,String amount,String date,Integer status) {
 		this.subject = subject;
 		this.address = address;
 		this.addressee = addressee;
 		this.deptname = deptname;
 		this.sender = sender;
-		this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, date);
+		Integer days=0;
+		if (status==1) days=90;
+		else if (status==2) days=30;
+		else if (status==3) days=20;
+		else if (status==4) days=10;
+		else if (status==5) days=3;
+		else if (status==6) days=2;
+		else if (status==7) days=1;
+		this.content=setPatentFormat( addressee, sender, patentName, patentNo, amount, date,days);
 		
 		
 	}
@@ -309,7 +298,7 @@ public class EmailBo {
 	
 	
 	
-	public String setPatentFormat(String userName,String adminName,String patentName,String patentNo,String amount,String date ){
+	public String setPatentFormat(String userName,String adminName,String patentName,String patentNo,String amount,String date,Integer days ){
 		String str="<table width=\"800\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"font-family:'Microsoft YaHei';\">\r\n" + 
 				"    		<tbody><tr>\r\n" + 
 				"		        <td>\r\n" + 
@@ -360,6 +349,9 @@ public class EmailBo {
 				"              </tr>\r\n" + 
 				"               <tr>\r\n" + 
 				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">金额:" + amount + " <span style=\"color: red\">(本缴费金额仅供参考,实际缴费金额,请登录国知局官方网址<a href=\"http://cpquery.sipo.gov.cn/\">cpquery.sipo.gov.cn</a>查询)</span></td>\r\n" + 
+				"              </tr>\r\n" +
+				"               <tr>\r\n" + 
+				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">剩余天数:" + days + "</td>\r\n" + 
 				"              </tr>\r\n" + 
 				"               <tr>\r\n" + 
 				"                <td width=\"720\" height=\"24\" colspan=\"2\" style=\"padding-left:40px;\">到期时间:" + date + "</td>\r\n" + 

+ 40 - 10
src/main/java/com/goafanti/common/dao/NoticeMapper.java

@@ -2,20 +2,48 @@ package com.goafanti.common.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
+import com.goafanti.admin.bo.NoticeBo;
 import com.goafanti.common.model.Notice;
 
 public interface NoticeMapper {
-    int deleteByPrimaryKey(String id);
-
-    int insert(Notice record);
-
-    int insertSelective(Notice record);
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	int deleteByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	int insert(Notice record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	int insertSelective(Notice record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	Notice selectByPrimaryKey(String id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	int updateByPrimaryKeySelective(Notice record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	int updateByPrimaryKey(Notice record);
 
-    Notice selectByPrimaryKey(String id);
-
-    int updateByPrimaryKeySelective(Notice record);
-
-    int updateByPrimaryKey(Notice record);
 
 	int findUnreadNoticeCount(String aid);
 
@@ -24,4 +52,6 @@ public interface NoticeMapper {
 	int batchUpdateUnreaded(List<String> dl);
 
 	void insertBatch(List<Notice> notice);
+
+	List<NoticeBo> findUnreadNoticeListByPage(@Param("aid") String aid);
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/PatentNewLogMapper.java

@@ -72,4 +72,8 @@ public interface PatentNewLogMapper {
 	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
 	 */
 	int updateByPrimaryKey(PatentNewLog record);
+
+	void insertLogBatch(List<PatentNewLog> list);
+
+	List<PatentNewLog> selectPatentNewLog(Integer id);
 }

+ 11 - 36
src/main/java/com/goafanti/common/dao/PatentNewMapper.java

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.model.PatentNewExample;
+import com.goafanti.common.model.PatentNewLog;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -9,67 +11,37 @@ public interface PatentNewMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
-	 */
-	long countByExample(PatentNewExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
-	 */
-	int deleteByExample(PatentNewExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	int insert(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	int insertSelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
-	 */
-	List<PatentNew> selectByExample(PatentNewExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	PatentNew selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") PatentNew record, @Param("example") PatentNewExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
-	 */
-	int updateByExample(@Param("record") PatentNew record, @Param("example") PatentNewExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	int updateByPrimaryKeySelective(PatentNew record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	int updateByPrimaryKey(PatentNew record);
 
@@ -78,4 +50,7 @@ public interface PatentNewMapper {
 	List<PatentNew> AllselectEndPatentNew();
 
 	void updateAdmin(@Param("aid")String aid, @Param("transferId")String transferId);
+
+
+	void insertLogBatch(List<PatentNewLog> list);
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -290,6 +290,8 @@ public interface UserMapper {
 
 	String checkBeforeChannel(String uid);
 
+	List<CustomerSimpleBo> getUserByName(String name);
+
 	
 	
 }

+ 6 - 6
src/main/java/com/goafanti/common/dao/UserServiceFollowMapper.java

@@ -9,37 +9,37 @@ public interface UserServiceFollowMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	int insert(UserServiceFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	int insertSelective(UserServiceFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	UserServiceFollow selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	int updateByPrimaryKeySelective(UserServiceFollow record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	int updateByPrimaryKey(UserServiceFollow record);
 

+ 6 - 6
src/main/java/com/goafanti/common/dao/UserServiceMapper.java

@@ -6,37 +6,37 @@ public interface UserServiceMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	int insert(UserService record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	int insertSelective(UserService record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	UserService selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	int updateByPrimaryKeySelective(UserService record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	int updateByPrimaryKey(UserService record);
 

+ 129 - 0
src/main/java/com/goafanti/common/enums/NoticeTypes.java

@@ -0,0 +1,129 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+public enum NoticeTypes {
+	// 0其他 1专利提醒 2订单审核 3客户释放 4限时跟进 5催款\付款 6订单开票
+	/** 专利提醒 */
+	ZLTX(1,"专利提醒"),
+	/** 订单审核 */
+	DDSH(2,"订单审核"),
+	/** 客户释放 */
+	KHSF(3,"客户释放"),
+	/** 限时跟进 */
+	XSGJ(4,"限时跟进"),
+	/** 催款\付款 */
+	CKFK(5,"催款\\付款"),
+	/** 订单开票 */
+	DDKP(6,"订单开票"),
+	ELSE(0,"其他");
+	
+	/**
+	 * 跟进通知类型获取大分类
+	 * @param i
+	 * @return
+	 */
+	public static Integer getType(Integer i) {
+		if (i == NoticeStatus.TASK_PATENT_ERROR.getCode() || i == NoticeStatus.TASK_PATENT_REMIND.getCode()) {
+			return 1;
+		} else if (i == NoticeStatus.ORDER_CHANGE_ADD.getCode() || i == NoticeStatus.ORDER_CHANGE_UDPATE.getCode()
+				|| i == NoticeStatus.ORDER_BACK.getCode() || i == NoticeStatus.ORDER_REFUND.getCode()
+				|| i == NoticeStatus.ORDER_REFUND_REFUSE.getCode() || i == NoticeStatus.ORDER_CHANGE_YES.getCode()
+				|| i == NoticeStatus.ORDER_CHANGE_NO.getCode() || i == NoticeStatus.ORDER_CHANGE_END.getCode()
+				|| i == NoticeStatus.ORDER_CHANGE_START.getCode() || i == NoticeStatus.ORDER_START.getCode()
+				|| i == NoticeStatus.ORDER_APPROVA_YES.getCode() || i == NoticeStatus.ORDER_APPROVA_NO.getCode()
+				|| i == NoticeStatus.ORDER_OUTSOURCE_NO.getCode() || i == NoticeStatus.ORDER_OUTSOURCE_YES.getCode()
+				|| i == NoticeStatus.ORDER_YES.getCode() || i == NoticeStatus.ORDER_NO.getCode()
+				|| i == NoticeStatus.ORDER_TASK_TO.getCode() || i == NoticeStatus.PROJECT_OUTSOURCE_START.getCode()
+				|| i == NoticeStatus.PROJECT_OUTSOURCE_YES.getCode()|| i == NoticeStatus.PROJECT_OUTSOURCE_NO.getCode()){
+			return 2;
+		}else if(i==NoticeStatus.CUSTOMER_LOSE30.getCode()||
+				i==NoticeStatus.CUSTOMER_LOSE270.getCode()||
+				i==NoticeStatus.CUSTOMER_CHENNEL_LOSE.getCode()||
+				i==NoticeStatus.CUSTOMER_CHENNEL_RECOVERY.getCode()
+				) {
+			return 3;
+		}else if(i==NoticeStatus.CUSTOMER_PRIVATE_REMINDER.getCode()||
+				i==NoticeStatus.CUSTOMER_LOSE_REMINDER.getCode()) {
+			return 4;
+		}else if(i==NoticeStatus.ORDER_DUN.getCode()||
+				i==NoticeStatus.ORDER_ARREARS_DUN.getCode()||
+				i==NoticeStatus.PAYMENT_DUN.getCode()||
+				i==NoticeStatus.PAYMENT_NODE.getCode()||
+				i==NoticeStatus.PAYMENT_NO.getCode()||
+				i==NoticeStatus.PAYMENT_YES.getCode()||
+				i==NoticeStatus.PAYMENT_COMPLETE.getCode()) {
+			return 5;
+		}else if(i==NoticeStatus.ORDER_INVPICE_START.getCode()||
+				i==NoticeStatus.ORDER_INVPICE_YES.getCode()||
+				i==NoticeStatus.ORDER_INVPICE_NO.getCode()||
+				i==NoticeStatus.ORDER_INVPICE_APPROVA_YES.getCode()||
+				i==NoticeStatus.ORDER_INVPICE_APPROVA_NO.getCode()||
+				i==NoticeStatus.ORDER_INVPICE_END.getCode()) {
+			return 6;
+		}
+		return 0;
+	}
+	
+	private static Map<Integer, NoticeTypes> status = new HashMap<Integer, NoticeTypes>();
+	
+	static {
+		for (NoticeTypes value : NoticeTypes.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static NoticeTypes getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return ELSE;
+	}
+	
+	public static String getValueByCode(Integer code){
+        for(NoticeTypes NoticeTypes:NoticeTypes.values()){
+            if(code.equals(NoticeTypes.getCode())){
+                return NoticeTypes.getDesc();
+            }
+        }
+        return  ELSE.getDesc();
+    }
+	
+	public static Integer getCount(){
+		Integer count=0;
+        for(NoticeTypes x:NoticeTypes.values()){
+         if(x!=null)count++;
+        }
+        return  --count;
+    }
+	
+	
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	
+	private String desc;
+	private Integer code;
+	
+	private NoticeTypes(Integer code, String desc) {
+		this.setCode(code);
+		this.setDesc(desc);
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+}

+ 137 - 102
src/main/java/com/goafanti/common/mapper/NoticeMapper.xml

@@ -1,191 +1,221 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.goafanti.common.dao.NoticeMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.Notice" >
-    <id column="id" property="id" jdbcType="VARCHAR" />
-    <result column="aid" property="aid" jdbcType="VARCHAR" />
-    <result column="notice_type" property="noticeType" jdbcType="INTEGER" />
-    <result column="content" property="content" jdbcType="VARCHAR" />
-    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="readed" property="readed" jdbcType="INTEGER" />
-    <result column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="pid" property="pid" jdbcType="VARCHAR" />
-    <result column="rid" property="rid" jdbcType="VARCHAR" />
-    <result column="year" property="year" jdbcType="INTEGER" />
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.NoticeMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.Notice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="notice_type" jdbcType="INTEGER" property="noticeType" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="readed" jdbcType="INTEGER" property="readed" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="pid" jdbcType="VARCHAR" property="pid" />
+    <result column="rid" jdbcType="VARCHAR" property="rid" />
+    <result column="year" jdbcType="INTEGER" property="year" />
+    <result column="type" jdbcType="INTEGER" property="type" />
   </resultMap>
-  <sql id="Base_Column_List" >
-    id, aid, notice_type, content, create_time, readed, uid, pid, rid, year
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
+    id, aid, notice_type, content, create_time, readed, `uid`, pid, rid, `year`, `type`
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     select 
     <include refid="Base_Column_List" />
     from notice
     where id = #{id,jdbcType=VARCHAR}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     delete from notice
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Notice" >
+  <insert id="insert" parameterType="com.goafanti.common.model.Notice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     insert into notice (id, aid, notice_type, 
-      content, create_time, readed, uid, pid, rid, year
-      )
+      content, create_time, readed, 
+      `uid`, pid, rid, `year`, 
+      `type`)
     values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{noticeType,jdbcType=INTEGER}, 
-      #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{readed,jdbcType=INTEGER},
-      #{uid,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{rid,jdbcType=VARCHAR}, #{year,jdbcType=INTEGER}
-      )
+      #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{readed,jdbcType=INTEGER}, 
+      #{uid,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{rid,jdbcType=VARCHAR}, #{year,jdbcType=INTEGER}, 
+      #{type,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Notice" >
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.Notice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     insert into notice
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         id,
       </if>
-      <if test="aid != null" >
+      <if test="aid != null">
         aid,
       </if>
-      <if test="noticeType != null" >
+      <if test="noticeType != null">
         notice_type,
       </if>
-      <if test="content != null" >
+      <if test="content != null">
         content,
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         create_time,
       </if>
-      <if test="readed != null" >
+      <if test="readed != null">
         readed,
       </if>
-      
-       <if test="uid != null" >
-        uid,
+      <if test="uid != null">
+        `uid`,
       </if>
-      <if test="pid != null" >
+      <if test="pid != null">
         pid,
       </if>
-      
-      <if test="rid != null" >
+      <if test="rid != null">
         rid,
       </if>
-      
-      <if test="year != null" >
-        year,
+      <if test="year != null">
+        `year`,
+      </if>
+      <if test="type != null">
+        `type`,
       </if>
-      
     </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
         #{id,jdbcType=VARCHAR},
       </if>
-      <if test="aid != null" >
+      <if test="aid != null">
         #{aid,jdbcType=VARCHAR},
       </if>
-      <if test="noticeType != null" >
+      <if test="noticeType != null">
         #{noticeType,jdbcType=INTEGER},
       </if>
-      <if test="content != null" >
+      <if test="content != null">
         #{content,jdbcType=VARCHAR},
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="readed != null" >
+      <if test="readed != null">
         #{readed,jdbcType=INTEGER},
       </if>
-      
-      <if test="uid != null" >
+      <if test="uid != null">
         #{uid,jdbcType=VARCHAR},
       </if>
-      <if test="pid != null" >
+      <if test="pid != null">
         #{pid,jdbcType=VARCHAR},
       </if>
-      
-      <if test="rid != null" >
+      <if test="rid != null">
         #{rid,jdbcType=VARCHAR},
       </if>
-      
-       <if test="year != null" >
+      <if test="year != null">
         #{year,jdbcType=INTEGER},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Notice" >
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Notice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     update notice
-    <set >
-      <if test="aid != null" >
+    <set>
+      <if test="aid != null">
         aid = #{aid,jdbcType=VARCHAR},
       </if>
-      <if test="noticeType != null" >
+      <if test="noticeType != null">
         notice_type = #{noticeType,jdbcType=INTEGER},
       </if>
-      <if test="content != null" >
+      <if test="content != null">
         content = #{content,jdbcType=VARCHAR},
       </if>
-      <if test="createTime != null" >
+      <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="readed != null" >
+      <if test="readed != null">
         readed = #{readed,jdbcType=INTEGER},
       </if>
-      
-      <if test="uid != null" >
-        uid = #{uid,jdbcType=VARCHAR},
+      <if test="uid != null">
+        `uid` = #{uid,jdbcType=VARCHAR},
       </if>
-      <if test="pid != null" >
+      <if test="pid != null">
         pid = #{pid,jdbcType=VARCHAR},
       </if>
-      
-      <if test="rid != null" >
+      <if test="rid != null">
         rid = #{rid,jdbcType=VARCHAR},
       </if>
-      
-       <if test="year != null" >
-        year = #{year,jdbcType=INTEGER},
+      <if test="year != null">
+        `year` = #{year,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Notice" >
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Notice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu May 27 17:22:58 CST 2021.
+    -->
     update notice
     set aid = #{aid,jdbcType=VARCHAR},
       notice_type = #{noticeType,jdbcType=INTEGER},
       content = #{content,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       readed = #{readed,jdbcType=INTEGER},
-      
-      uid = #{uid,jdbcType=VARCHAR},
+      `uid` = #{uid,jdbcType=VARCHAR},
       pid = #{pid,jdbcType=VARCHAR},
-      
       rid = #{rid,jdbcType=VARCHAR},
-      
-      year = #{year,jdbcType=INTEGER}
+      `year` = #{year,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER}
     where id = #{id,jdbcType=VARCHAR}
   </update>
+
   
-  <select id="findUnreadNoticeListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.NoticeBo">
-    select n.id, n.aid, n.uid, n.notice_type as noticeType, n.content, n.create_time as createTime, 
+  
+  <select id="findUnreadNoticeListByPage"  resultType="com.goafanti.admin.bo.NoticeBo">
+    select n.id, n.aid, n.uid, n.notice_type as noticeType, n.content, n.create_time as createTime, n.type,
 		oi.unit_name as unitName, n.rid, a.name as principle, n.readed, n.year
 		from notice n 
 		LEFT JOIN organization_identity oi on n.uid = oi.uid
 		LEFT JOIN admin a on a.id = n.pid 
     where n.readed = 0 
     <if test="aid != null">
-    	and n.aid = #{aid,jdbcType=VARCHAR}
+    	and n.aid = #{aid}
     </if>
     order by n.create_time desc
-    <if test="page_sql!=null">
-		${page_sql}
-	</if>
-  </select>
-  
-   <select id="findUnreadNoticeCount" resultType="java.lang.Integer" parameterType="java.lang.String">
- 	select count(1) 
- 	 from notice n
-    where n.readed = 0 
-    <if test="aid != null">
-    	and n.aid = #{aid,jdbcType=VARCHAR}
-    </if>
   </select>
+    
   
   <select id="findReadedNoticeListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.NoticeBo">
      select n.id, n.uid, n.aid, n.notice_type as noticeType, n.content, n.create_time as createTime, 
@@ -195,7 +225,10 @@
 		LEFT JOIN admin a on a.id = n.pid 
     where n.readed = 1 
     <if test="aid != null">
-   		 and n.aid = #{aid,jdbcType=VARCHAR}
+   		 and n.aid = #{aid}
+    </if>
+    <if test="type != null">
+   		 and n.type = #{type}
     </if>
     order by n.create_time desc
     <if test="page_sql!=null">
@@ -203,16 +236,19 @@
 	</if>
   </select>
   
-   <select id="findReadedNoticeCount" resultType="java.lang.Integer" parameterType="java.lang.String">
+   <select id="findReadedNoticeCount" parameterType="java.lang.String" resultType="java.lang.Integer">
  	select count(1) 
  	 from notice n
     where n.readed = 1 
     <if test="aid != null">
-    and n.aid = #{aid,jdbcType=VARCHAR}
+    and n.aid = #{aid}
+    </if>
+    <if test="type != null">
+   		 and n.type = #{type}
     </if>
   </select>
   
-  <select id="selectUnreadedCount" resultType="java.lang.Integer" parameterType="java.lang.String">
+  <select id="selectUnreadedCount" parameterType="java.lang.String" resultType="java.lang.Integer">
    select count(1) from notice where readed = 0 
    <if test="_parameter">
     	and aid = #{_parameter,jdbcType=VARCHAR}
@@ -222,21 +258,20 @@
   <update id="batchUpdateUnreaded" parameterType="java.util.List">
 		update notice set readed = 1
 		where id in
-		<foreach item="item" index="index" collection="list" open="("
-			separator="," close=")">
+		<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
 			#{item}
 		</foreach>
   </update>
   
   <insert id="insertBatch" parameterType="com.goafanti.common.model.Notice">
-    insert into notice (id, aid, notice_type, content, create_time, readed, uid, pid, rid, year)
+    insert into notice (id, aid, notice_type, content, create_time, readed, uid, pid, rid, year,type)
     values 
-    <foreach item="item" index="index" collection="list" separator=",">
+    <foreach collection="list" index="index" item="item" separator=",">
       (
       	#{item.id,jdbcType=VARCHAR}, #{item.aid,jdbcType=VARCHAR}, #{item.noticeType,jdbcType=INTEGER},
       	#{item.content,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.readed,jdbcType=INTEGER},
       	#{item.uid,jdbcType=VARCHAR}, #{item.pid,jdbcType=VARCHAR}, #{item.rid,jdbcType=VARCHAR},
-      	#{item.year,jdbcType=INTEGER}
+      	#{item.year,jdbcType=INTEGER},#{item.type,jdbcType=INTEGER}
       )
     </foreach>
   </insert>

+ 15 - 0
src/main/java/com/goafanti/common/mapper/PatentNewLogMapper.xml

@@ -268,4 +268,19 @@
       pid = #{pid,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <insert id="insertLogBatch">
+        INSERT INTO patent_new_log(content, create_time, pid)values
+      <foreach item="item" index="index" collection="list" separator=",">
+      ( #{item.content,jdbcType=VARCHAR}, #{item.createTime,jdbcType=INTEGER},
+      	#{item.pid,jdbcType=VARCHAR}
+      )
+    </foreach>
+    </insert>
+    
+    <select id="selectPatentNewLog" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from patent_new_log
+    where pid = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

+ 59 - 231
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
@@ -24,109 +24,23 @@
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
     <result column="years" jdbcType="INTEGER" property="years" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
-    id, patent_no, name, type, status, apply_date, authorization_date, patent_amount, 
+    id, patent_no, `name`, `type`, `status`, apply_date, authorization_date, patent_amount, 
     applicant, province, contact_mobile, email, certificate_url, create_time, update_time, 
-    aid, years
+    aid, `years`, `uid`
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.PatentNewExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from patent_new
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -137,46 +51,35 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     delete from patent_new
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.PatentNewExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    delete from patent_new
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.PatentNew">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
-    insert into patent_new (id, patent_no, name, 
-      type, status, apply_date, 
+    insert into patent_new (id, patent_no, `name`, 
+      `type`, `status`, apply_date, 
       authorization_date, patent_amount, applicant, 
       province, contact_mobile, email, 
       certificate_url, create_time, update_time, 
-      aid, years)
+      aid, `years`, `uid`)
     values (#{id,jdbcType=INTEGER}, #{patentNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{applyDate,jdbcType=DATE}, 
       #{authorizationDate,jdbcType=DATE}, #{patentAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, 
       #{province,jdbcType=INTEGER}, #{contactMobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, 
       #{certificateUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
-      #{aid,jdbcType=VARCHAR}, #{years,jdbcType=INTEGER})
+      #{aid,jdbcType=VARCHAR}, #{years,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentNew">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     insert into patent_new
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -187,13 +90,13 @@
         patent_no,
       </if>
       <if test="name != null">
-        name,
+        `name`,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="status != null">
-        status,
+        `status`,
       </if>
       <if test="applyDate != null">
         apply_date,
@@ -229,7 +132,10 @@
         aid,
       </if>
       <if test="years != null">
-        years,
+        `years`,
+      </if>
+      <if test="uid != null">
+        `uid`,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -284,116 +190,16 @@
       <if test="years != null">
         #{years,jdbcType=INTEGER},
       </if>
+      <if test="uid != null">
+        #{uid,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.PatentNewExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    select count(*) from patent_new
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    update patent_new
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.patentNo != null">
-        patent_no = #{record.patentNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.name != null">
-        name = #{record.name,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.status != null">
-        status = #{record.status,jdbcType=INTEGER},
-      </if>
-      <if test="record.applyDate != null">
-        apply_date = #{record.applyDate,jdbcType=DATE},
-      </if>
-      <if test="record.authorizationDate != null">
-        authorization_date = #{record.authorizationDate,jdbcType=DATE},
-      </if>
-      <if test="record.patentAmount != null">
-        patent_amount = #{record.patentAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.applicant != null">
-        applicant = #{record.applicant,jdbcType=VARCHAR},
-      </if>
-      <if test="record.province != null">
-        province = #{record.province,jdbcType=INTEGER},
-      </if>
-      <if test="record.contactMobile != null">
-        contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
-      </if>
-      <if test="record.email != null">
-        email = #{record.email,jdbcType=VARCHAR},
-      </if>
-      <if test="record.certificateUrl != null">
-        certificate_url = #{record.certificateUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.updateTime != null">
-        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.aid != null">
-        aid = #{record.aid,jdbcType=VARCHAR},
-      </if>
-      <if test="record.years != null">
-        years = #{record.years,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
-    -->
-    update patent_new
-    set id = #{record.id,jdbcType=INTEGER},
-      patent_no = #{record.patentNo,jdbcType=VARCHAR},
-      name = #{record.name,jdbcType=VARCHAR},
-      type = #{record.type,jdbcType=INTEGER},
-      status = #{record.status,jdbcType=INTEGER},
-      apply_date = #{record.applyDate,jdbcType=DATE},
-      authorization_date = #{record.authorizationDate,jdbcType=DATE},
-      patent_amount = #{record.patentAmount,jdbcType=DECIMAL},
-      applicant = #{record.applicant,jdbcType=VARCHAR},
-      province = #{record.province,jdbcType=INTEGER},
-      contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
-      email = #{record.email,jdbcType=VARCHAR},
-      certificate_url = #{record.certificateUrl,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
-      aid = #{record.aid,jdbcType=VARCHAR},
-      years = #{record.years,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentNew">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     update patent_new
     <set>
@@ -401,13 +207,13 @@
         patent_no = #{patentNo,jdbcType=VARCHAR},
       </if>
       <if test="name != null">
-        name = #{name,jdbcType=VARCHAR},
+        `name` = #{name,jdbcType=VARCHAR},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="status != null">
-        status = #{status,jdbcType=INTEGER},
+        `status` = #{status,jdbcType=INTEGER},
       </if>
       <if test="applyDate != null">
         apply_date = #{applyDate,jdbcType=DATE},
@@ -443,7 +249,10 @@
         aid = #{aid,jdbcType=VARCHAR},
       </if>
       <if test="years != null">
-        years = #{years,jdbcType=INTEGER},
+        `years` = #{years,jdbcType=INTEGER},
+      </if>
+      <if test="uid != null">
+        `uid` = #{uid,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
@@ -452,13 +261,13 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed May 08 14:33:37 CST 2019.
+      This element was generated on Thu May 27 11:21:28 CST 2021.
     -->
     update patent_new
     set patent_no = #{patentNo,jdbcType=VARCHAR},
-      name = #{name,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      status = #{status,jdbcType=INTEGER},
+      `name` = #{name,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
       apply_date = #{applyDate,jdbcType=DATE},
       authorization_date = #{authorizationDate,jdbcType=DATE},
       patent_amount = #{patentAmount,jdbcType=DECIMAL},
@@ -470,18 +279,20 @@
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP},
       aid = #{aid,jdbcType=VARCHAR},
-      years = #{years,jdbcType=INTEGER}
+      `years` = #{years,jdbcType=INTEGER},
+      `uid` = #{uid,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   
   <select id="selectPatentNewList" resultType="com.goafanti.patent.bo.PatentNewBo">
-	  	  select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
-	  date_format(a.apply_date,'%Y-%m-%d') as applyDates,
+	  select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
+	  date_format(a.apply_date,'%Y-%m-%d') as applyDates,a.uid,
 	  date_format(a.authorization_date ,'%Y-%m-%d ')as authorizationDates,a.patent_amount as patentAmount,a.province,
 	a.applicant,a.contact_mobile as contactMobile,a.email,a.certificate_url as certificateUrl,
 	date_format(a.create_time,'%Y-%m-%d %H:%I:%S') as createTimeS,a.apply_date as applyDate,c.name depName,
-	date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname
+	date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname,u.nickname  userName
 	from patent_new a left join admin b on a.aid=b.id
+	left join `user` u on a.uid=u.id
 	left join department c on b.department_id=c.id
 	<if test="shiro ==1">
      left join admin e on e.department_id=c.id
@@ -559,7 +370,7 @@
 	<select id="AllselectStartPatentNew" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
-    from patent_new where status =0
+    from patent_new where status &lt; 8
     </select>
     <select id="AllselectEndPatentNew" resultMap="BaseResultMap">
     select 
@@ -571,4 +382,21 @@
     update patent_new set aid= #{transferId}
 	where aid= #{aid} 
     </update>
+    <insert id="insertBatch">
+        insert into patent_new (patent_no, `name`, 
+      `type`, `status`, apply_date, 
+      authorization_date, patent_amount, applicant, 
+      province, contact_mobile, email, 
+      certificate_url, create_time, update_time, 
+      aid, `years`, `uid`)values
+      <foreach item="item" index="index" collection="list" separator=",">
+      ( #{item.aid,jdbcType=VARCHAR}, #{item.noticeType,jdbcType=INTEGER},
+      	#{item.content,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.readed,jdbcType=INTEGER},
+      	#{item.uid,jdbcType=VARCHAR}, #{item.pid,jdbcType=VARCHAR}, #{item.rid,jdbcType=VARCHAR},
+      	#{item.year,jdbcType=INTEGER}
+      )
+    </foreach>
+    </insert>
+    
+    
 </mapper>

+ 7 - 3
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -2054,7 +2054,7 @@ inner join(
 	<select id="checkUserMax" parameterType="string" resultType="integer">
 		select count(*) from `user`
 		where aid= #{aid,jdbcType=VARCHAR}
-		and source in(1,2,3) and share_type=0
+		and source in(1,2,3) and share_type=0 and channel =0
 	</select>
 	
 	<select id="checkRoleMax" parameterType="string" resultType="string">
@@ -2074,12 +2074,12 @@ inner join(
 	
 	<insert id="insertBatch" parameterType="com.goafanti.user.bo.InputUserChannel">
 	INSERT INTO `user` (id, mobile, password,
-	nickname,identify_name,aid,
+	nickname,identify_name,
 	share_type,type,society_tag,channel,source,status)VALUES
 	<foreach item="item" index="index" collection="list"
 		separator=",">
 		(#{item.uid,jdbcType=VARCHAR}, #{item.contactMobile,jdbcType=VARCHAR},#{item.password,jdbcType=VARCHAR},
-		#{item.userName},#{item.userName},#{item.aid},
+		#{item.userName},#{item.userName},
 		#{item.shareType,jdbcType=TIMESTAMP}, 1,#{item.societyTag},1,1 ,#{item.userStatus})
     </foreach>
   </insert>
@@ -2282,4 +2282,8 @@ inner join(
 	left join `role` r on r.id=ur.rid 
 	where r.role_type=80
   </select>
+  
+  <select id="getUserByName" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerSimpleBo">
+		select id,nickname name from `user` where nickname like concat('%',#{name},'%')
+    </select>
 </mapper>

+ 38 - 13
src/main/java/com/goafanti/common/mapper/UserServiceFollowMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
@@ -18,21 +18,23 @@
     <result column="sign_project" jdbcType="VARCHAR" property="signProject" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="tech_satisfaction" jdbcType="INTEGER" property="techSatisfaction" />
+    <result column="business_satisfaction" jdbcType="INTEGER" property="businessSatisfaction" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project_id, sign_project, 
-    remarks, create_time
+    remarks, create_time, tech_satisfaction, business_satisfaction
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -43,7 +45,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     delete from user_service_follow
     where id = #{id,jdbcType=INTEGER}
@@ -52,22 +54,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     insert into user_service_follow (id, `uid`, aid, 
       add_wechat, wechat, renewal, 
       renewal_time, sign_project_id, sign_project, 
-      remarks, create_time)
+      remarks, create_time, tech_satisfaction, 
+      business_satisfaction)
     values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER}, 
       #{renewalTime,jdbcType=TIMESTAMP}, #{signProjectId,jdbcType=VARCHAR}, #{signProject,jdbcType=VARCHAR}, 
-      #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+      #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{techSatisfaction,jdbcType=INTEGER}, 
+      #{businessSatisfaction,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserServiceFollow">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     insert into user_service_follow
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -104,6 +108,12 @@
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="techSatisfaction != null">
+        tech_satisfaction,
+      </if>
+      <if test="businessSatisfaction != null">
+        business_satisfaction,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -139,13 +149,19 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="techSatisfaction != null">
+        #{techSatisfaction,jdbcType=INTEGER},
+      </if>
+      <if test="businessSatisfaction != null">
+        #{businessSatisfaction,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserServiceFollow">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     update user_service_follow
     <set>
@@ -179,6 +195,12 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="techSatisfaction != null">
+        tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
+      </if>
+      <if test="businessSatisfaction != null">
+        business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -186,7 +208,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:51 CST 2021.
+      This element was generated on Fri May 28 13:37:12 CST 2021.
     -->
     update user_service_follow
     set `uid` = #{uid,jdbcType=VARCHAR},
@@ -198,13 +220,16 @@
       sign_project_id = #{signProjectId,jdbcType=VARCHAR},
       sign_project = #{signProject,jdbcType=VARCHAR},
       remarks = #{remarks,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
+      business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="listUseServiceFollow" resultType="com.goafanti.user.bo.OutUserServiceFollow">
 	select a.id, a.`uid`, a.aid, a.add_wechat addWechat, a.wechat, renewal, a.renewal_time renewalTime, a.sign_project_id signProjectId,
  a.sign_project signProject,  a.create_time createTime ,date_format(a.renewal_time,'%Y-%m-%d') as renewalTimes,
- date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTimes,a.remarks,b.name adminName
+ date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTimes,a.remarks,b.name adminName,a.tech_satisfaction techSatisfaction,
+ a.business_satisfaction businessSatisfaction
   from user_service_follow a left join admin b on a.aid =b.id
     where uid = #{uid}
     order by a.create_time desc

+ 57 - 32
src/main/java/com/goafanti/common/mapper/UserServiceMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
@@ -19,21 +19,23 @@
     <result column="new_time" jdbcType="TIMESTAMP" property="newTime" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="tech_satisfaction" jdbcType="INTEGER" property="techSatisfaction" />
+    <result column="business_satisfaction" jdbcType="INTEGER" property="businessSatisfaction" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     id, `uid`, aid, add_wechat, wechat, renewal, renewal_time, sign_project, sign_project_id, 
-    new_time, remarks, create_time
+    new_time, remarks, create_time, tech_satisfaction, business_satisfaction
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -44,7 +46,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     delete from user_service
     where id = #{id,jdbcType=INTEGER}
@@ -53,24 +55,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     insert into user_service (id, `uid`, aid, 
       add_wechat, wechat, renewal, 
       renewal_time, sign_project, sign_project_id, 
-      new_time, remarks, create_time
-      )
+      new_time, remarks, create_time, 
+      tech_satisfaction, business_satisfaction)
     values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{addWechat,jdbcType=INTEGER}, #{wechat,jdbcType=VARCHAR}, #{renewal,jdbcType=INTEGER}, 
       #{renewalTime,jdbcType=TIMESTAMP}, #{signProject,jdbcType=VARCHAR}, #{signProjectId,jdbcType=VARCHAR}, 
-      #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
-      )
+      #{newTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{techSatisfaction,jdbcType=INTEGER}, #{businessSatisfaction,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserService">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     insert into user_service
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -110,6 +112,12 @@
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="techSatisfaction != null">
+        tech_satisfaction,
+      </if>
+      <if test="businessSatisfaction != null">
+        business_satisfaction,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -148,13 +156,19 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="techSatisfaction != null">
+        #{techSatisfaction,jdbcType=INTEGER},
+      </if>
+      <if test="businessSatisfaction != null">
+        #{businessSatisfaction,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserService">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     update user_service
     <set>
@@ -191,6 +205,12 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="techSatisfaction != null">
+        tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
+      </if>
+      <if test="businessSatisfaction != null">
+        business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -198,7 +218,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue May 18 15:33:59 CST 2021.
+      This element was generated on Fri May 28 13:36:56 CST 2021.
     -->
     update user_service
     set `uid` = #{uid,jdbcType=VARCHAR},
@@ -211,7 +231,9 @@
       sign_project_id = #{signProjectId,jdbcType=VARCHAR},
       new_time = #{newTime,jdbcType=TIMESTAMP},
       remarks = #{remarks,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      tech_satisfaction = #{techSatisfaction,jdbcType=INTEGER},
+      business_satisfaction = #{businessSatisfaction,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByUid" resultType="java.lang.Integer">
@@ -220,23 +242,25 @@
   
   
    <resultMap id="userService" type="com.goafanti.user.bo.OutOrderUserService">
-      <result property="orderNo" column="orderNo"/>
-      <result property="contractNo" column="contractNo"/>
-      <result property="depName" column="depName"/>
-      <result property="userName" column="userName"/>
-      <result property="uid" column="uid"/>
-      <result property="signTimes" column="signTimes"/>
-      <result property="orderTimes" column="orderTimes"/>
-      <result property="newTimes" column="newTimes"/>
-      <result property="adminName" column="adminName"/>
-      <result property="addWechat" column="addWechat"/>
-      <result property="wechat" column="wechat"/>
-      <result property="deleteSign" column="deleteSign"/>
-      <result property="renewal" column="renewal"/>
-      <result property="signProject" column="signProject"/>
-      <result property="remarks" column="remarks"/>
-      <result property="renewalTimes" column="renewalTimes"/>
-      <association property="list" column="orderNo" javaType="java.util.ArrayList" select="getTask"/>
+      <result column="orderNo" property="orderNo" />
+      <result column="contractNo" property="contractNo" />
+      <result column="depName" property="depName" />
+      <result column="userName" property="userName" />
+      <result column="uid" property="uid" />
+      <result column="signTimes" property="signTimes" />
+      <result column="orderTimes" property="orderTimes" />
+      <result column="newTimes" property="newTimes" />
+      <result column="adminName" property="adminName" />
+      <result column="addWechat" property="addWechat" />
+      <result column="wechat" property="wechat" />
+      <result column="deleteSign" property="deleteSign" />
+      <result column="renewal" property="renewal" />
+      <result column="signProject" property="signProject" />
+      <result column="remarks" property="remarks" />
+      <result column="renewalTimes" property="renewalTimes" />
+      <result column="techSatisfaction" property="techSatisfaction" />
+      <result column="businessSatisfaction" property="businessSatisfaction" />
+      <association column="orderNo" javaType="java.util.ArrayList" property="list" select="getTask" />
     </resultMap>
     <select id="getTask" resultType="com.goafanti.user.bo.OrderProject">
     	select id,commodity_name commodityName ,declaration_batch declarationBatch ,
@@ -249,7 +273,8 @@
 select a.order_no orderNo,a.contract_no contractNo,b.dep_name depName ,a.buyer_id uid,a.create_time ,b.buyer_name userName,c.new_time ,
 date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as orderTimes, date_format(c.new_time,'%Y-%m-%d %H:%i:%S') as newTimes,
 date_format(c.renewal_time,'%Y-%m-%d') as renewalTimes, date_format(a.sign_time,'%Y-%m-%d') as signTimes,a.delete_sign deleteSign ,
-d.name adminName,c.add_wechat addWechat,c.wechat ,c.renewal ,c.renewal_time ,c.sign_project signProject ,c.remarks 
+d.name adminName,c.add_wechat addWechat,c.wechat ,c.renewal ,c.renewal_time ,c.sign_project signProject ,c.remarks,
+c.tech_satisfaction techSatisfaction, c.business_satisfaction businessSatisfaction
 from t_order_new a
 left join t_order_mid b on a.order_no =b.order_no  left join user_service c on a.buyer_id =c.uid 
 left join admin d on c.aid =d.id  

+ 245 - 96
src/main/java/com/goafanti/common/model/Notice.java

@@ -4,182 +4,331 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.enums.NoticeStatus;
+import java.io.Serializable;
 
-public class Notice {
-	private String	id;
+public class Notice implements Serializable {
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.id
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	private String id;
 
-	private String	aid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.aid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	private String aid;
 
 	/**
-	 * 通知类型
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.notice_type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	private Integer	noticeType;
+	private Integer noticeType;
 
 	/**
-	 * 通知内容
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.content
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	private String	content;
+	private String content;
 
 	/**
-	 * 创建时间
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.create_time
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	private Date	createTime;
-	
+	private Date createTime;
+
 	/**
-	 * 已读标记
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.readed
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	private Integer	readed;
-	
+	private Integer readed;
+
 	/**
-	 * 用户id
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.uid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
 	private String uid;
-	
+
 	/**
-	 * 录入公司信息业务员ID
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.pid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
 	private String pid;
-	
+
 	/**
-	 * 业务记录ID
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.rid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
 	private String rid;
-	
+
 	/**
-	 * 高企记录申请年份
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.year
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
 	private Integer year;
-	
-	public Notice() {};
-//	Readed(0);//未读
-//	 n.setAid("1");
-//	 n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
-//	 n
+
 	/**
-	 * 
-	 * @param id 编号
-	 * @param createTime 创建时间
-	 * @param readed 0未读
-	 * @param aid 发件人
-	 * @param noticeType 标题
-	 * @param content  内容
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column notice.type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	public Notice(String id,Date createTime,Integer readed,String aid,Integer noticeType,String content,String uid) {
-		this.id=id;
-		this.createTime=createTime;
-		this.readed=readed;
-		this.aid=aid;
-		this.noticeType=noticeType;
-		this.content=content;
-		this.uid=uid;
-	}
-	
-	
+	private Integer type;
+
 	/**
-	 * 
-	 * @param id 编号
-	 * @param createTime 创建时间
-	 * @param readed 0未读
-	 * @param aid 发件人
-	 * @param noticeType 标题
-	 * @param content  内容
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
 	 */
-	public Notice(String id,Date createTime,Integer readed,String aid,Integer noticeType,String content) {
-		this.id=id;
-		this.createTime=createTime;
-		this.readed=readed;
-		this.aid=aid;
-		this.noticeType=noticeType;
-		this.content=content;
-	}
-
-	public Integer getYear() {
-		return year;
-	}
-
-	public void setYear(Integer year) {
-		this.year = year;
-	}
+	private static final long serialVersionUID = 1L;
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.id
+	 * @return  the value of notice.id
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getId() {
 		return id;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.id
+	 * @param id  the value for notice.id
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setId(String id) {
-		this.id = id;
+		this.id = id == null ? null : id.trim();
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.aid
+	 * @return  the value of notice.aid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getAid() {
 		return aid;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.aid
+	 * @param aid  the value for notice.aid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setAid(String aid) {
-		this.aid = aid;
+		this.aid = aid == null ? null : aid.trim();
 	}
-
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.notice_type
+	 * @return  the value of notice.notice_type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public Integer getNoticeType() {
 		return noticeType;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.notice_type
+	 * @param noticeType  the value for notice.notice_type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setNoticeType(Integer noticeType) {
 		this.noticeType = noticeType;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.content
+	 * @return  the value of notice.content
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getContent() {
 		return content;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.content
+	 * @param content  the value for notice.content
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setContent(String content) {
-		this.content = content;
+		this.content = content == null ? null : content.trim();
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.create_time
+	 * @return  the value of notice.create_time
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public Date getCreateTime() {
 		return createTime;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.create_time
+	 * @param createTime  the value for notice.create_time
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
-
-	@JsonIgnore
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.readed
+	 * @return  the value of notice.readed
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public Integer getReaded() {
 		return readed;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.readed
+	 * @param readed  the value for notice.readed
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setReaded(Integer readed) {
 		this.readed = readed;
 	}
-	
-	
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.uid
+	 * @return  the value of notice.uid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getUid() {
 		return uid;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.uid
+	 * @param uid  the value for notice.uid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setUid(String uid) {
-		this.uid = uid;
+		this.uid = uid == null ? null : uid.trim();
 	}
-
-	
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.pid
+	 * @return  the value of notice.pid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getPid() {
 		return pid;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.pid
+	 * @param pid  the value for notice.pid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setPid(String pid) {
-		this.pid = pid;
+		this.pid = pid == null ? null : pid.trim();
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.rid
+	 * @return  the value of notice.rid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public String getRid() {
 		return rid;
 	}
-
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.rid
+	 * @param rid  the value for notice.rid
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
 	public void setRid(String rid) {
-		this.rid = rid;
+		this.rid = rid == null ? null : rid.trim();
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.year
+	 * @return  the value of notice.year
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	public Integer getYear() {
+		return year;
 	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.year
+	 * @param year  the value for notice.year
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	public void setYear(Integer year) {
+		this.year = year;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column notice.type
+	 * @return  the value of notice.type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	public Integer getType() {
+		return type;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column notice.type
+	 * @param type  the value for notice.type
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table notice
+	 * @mbg.generated  Thu May 27 17:22:58 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", aid=").append(aid);
+		sb.append(", noticeType=").append(noticeType);
+		sb.append(", content=").append(content);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", readed=").append(readed);
+		sb.append(", uid=").append(uid);
+		sb.append(", pid=").append(pid);
+		sb.append(", rid=").append(rid);
+		sb.append(", year=").append(year);
+		sb.append(", type=").append(type);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+
+
+	
+	public Notice() {};
+//	Readed(0);//未读
+//	 n.setAid("1");
+//	 n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
+//	 n
+	/**
+	 * 
+	 * @param id 编号
+	 * @param createTime 创建时间
+	 * @param readed 0未读
+	 * @param aid 发件人
+	 * @param noticeType 标题
+	 * @param content  内容
+	 */
+	public Notice(String id,Date createTime,Integer readed,String aid,Integer noticeType,String content,String uid) {
+		this.id=id;
+		this.createTime=createTime;
+		this.readed=readed;
+		this.aid=aid;
+		this.noticeType=noticeType;
+		this.content=content;
+		this.uid=uid;
+	}
+	
+	
+	/**
+	 * 
+	 * @param id 编号
+	 * @param createTime 创建时间
+	 * @param readed 0未读
+	 * @param aid 发件人
+	 * @param noticeType 标题
+	 * @param content  内容
+	 */
+	public Notice(String id,Date createTime,Integer readed,String aid,Integer noticeType,String content) {
+		this.id=id;
+		this.createTime=createTime;
+		this.readed=readed;
+		this.aid=aid;
+		this.noticeType=noticeType;
+		this.content=content;
+	}
+
+
 
 	public String getNoticeTypeName(){
 		if (null == this.noticeType)return null;

+ 121 - 59
src/main/java/com/goafanti/common/model/PatentNew.java

@@ -2,99 +2,110 @@ package com.goafanti.common.model;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.io.Serializable;
 
-public class PatentNew {
+public class PatentNew implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.id
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_no
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String patentNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.name
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String name;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.type
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.status
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.apply_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Date applyDate;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.authorization_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Date authorizationDate;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_amount
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private BigDecimal patentAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.applicant
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String applicant;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.province
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Integer province;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.contact_mobile
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String contactMobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.email
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String email;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.certificate_url
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String certificateUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.create_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.update_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.aid
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.years
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	private Integer years;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.uid
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
+	 */
+	private String uid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
+	 */
+	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.id
 	 * @return  the value of patent_new.id
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -103,7 +114,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.id
 	 * @param id  the value for patent_new.id
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -112,7 +123,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_no
 	 * @return  the value of patent_new.patent_no
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getPatentNo() {
 		return patentNo;
@@ -121,16 +132,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_no
 	 * @param patentNo  the value for patent_new.patent_no
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setPatentNo(String patentNo) {
-		this.patentNo = patentNo;
+		this.patentNo = patentNo == null ? null : patentNo.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.name
 	 * @return  the value of patent_new.name
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getName() {
 		return name;
@@ -139,16 +150,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.name
 	 * @param name  the value for patent_new.name
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setName(String name) {
-		this.name = name;
+		this.name = name == null ? null : name.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.type
 	 * @return  the value of patent_new.type
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Integer getType() {
 		return type;
@@ -157,7 +168,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.type
 	 * @param type  the value for patent_new.type
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -166,7 +177,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.status
 	 * @return  the value of patent_new.status
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Integer getStatus() {
 		return status;
@@ -175,7 +186,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.status
 	 * @param status  the value for patent_new.status
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -184,7 +195,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.apply_date
 	 * @return  the value of patent_new.apply_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Date getApplyDate() {
 		return applyDate;
@@ -193,7 +204,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.apply_date
 	 * @param applyDate  the value for patent_new.apply_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setApplyDate(Date applyDate) {
 		this.applyDate = applyDate;
@@ -202,7 +213,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.authorization_date
 	 * @return  the value of patent_new.authorization_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Date getAuthorizationDate() {
 		return authorizationDate;
@@ -211,7 +222,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.authorization_date
 	 * @param authorizationDate  the value for patent_new.authorization_date
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setAuthorizationDate(Date authorizationDate) {
 		this.authorizationDate = authorizationDate;
@@ -220,7 +231,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_amount
 	 * @return  the value of patent_new.patent_amount
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public BigDecimal getPatentAmount() {
 		return patentAmount;
@@ -229,7 +240,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_amount
 	 * @param patentAmount  the value for patent_new.patent_amount
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setPatentAmount(BigDecimal patentAmount) {
 		this.patentAmount = patentAmount;
@@ -238,7 +249,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.applicant
 	 * @return  the value of patent_new.applicant
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getApplicant() {
 		return applicant;
@@ -247,16 +258,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.applicant
 	 * @param applicant  the value for patent_new.applicant
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setApplicant(String applicant) {
-		this.applicant = applicant;
+		this.applicant = applicant == null ? null : applicant.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.province
 	 * @return  the value of patent_new.province
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Integer getProvince() {
 		return province;
@@ -265,7 +276,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.province
 	 * @param province  the value for patent_new.province
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setProvince(Integer province) {
 		this.province = province;
@@ -274,7 +285,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.contact_mobile
 	 * @return  the value of patent_new.contact_mobile
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getContactMobile() {
 		return contactMobile;
@@ -283,16 +294,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.contact_mobile
 	 * @param contactMobile  the value for patent_new.contact_mobile
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setContactMobile(String contactMobile) {
-		this.contactMobile = contactMobile;
+		this.contactMobile = contactMobile == null ? null : contactMobile.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.email
 	 * @return  the value of patent_new.email
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getEmail() {
 		return email;
@@ -301,16 +312,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.email
 	 * @param email  the value for patent_new.email
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setEmail(String email) {
-		this.email = email;
+		this.email = email == null ? null : email.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.certificate_url
 	 * @return  the value of patent_new.certificate_url
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getCertificateUrl() {
 		return certificateUrl;
@@ -319,16 +330,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.certificate_url
 	 * @param certificateUrl  the value for patent_new.certificate_url
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setCertificateUrl(String certificateUrl) {
-		this.certificateUrl = certificateUrl;
+		this.certificateUrl = certificateUrl == null ? null : certificateUrl.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.create_time
 	 * @return  the value of patent_new.create_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -337,7 +348,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.create_time
 	 * @param createTime  the value for patent_new.create_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -346,7 +357,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.update_time
 	 * @return  the value of patent_new.update_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -355,7 +366,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.update_time
 	 * @param updateTime  the value for patent_new.update_time
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -364,7 +375,7 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.aid
 	 * @return  the value of patent_new.aid
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -373,16 +384,16 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.aid
 	 * @param aid  the value for patent_new.aid
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setAid(String aid) {
-		this.aid = aid;
+		this.aid = aid == null ? null : aid.trim();
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.years
 	 * @return  the value of patent_new.years
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public Integer getYears() {
 		return years;
@@ -391,9 +402,60 @@ public class PatentNew {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.years
 	 * @param years  the value for patent_new.years
-	 * @mbg.generated  Wed May 08 14:33:37 CST 2019
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
 	 */
 	public void setYears(Integer years) {
 		this.years = years;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.uid
+	 * @return  the value of patent_new.uid
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
+	 */
+	public String getUid() {
+		return uid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.uid
+	 * @param uid  the value for patent_new.uid
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
+	 */
+	public void setUid(String uid) {
+		this.uid = uid == null ? null : uid.trim();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Thu May 27 11:21:28 CST 2021
+	 */
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(getClass().getSimpleName());
+		sb.append(" [");
+		sb.append("Hash = ").append(hashCode());
+		sb.append(", id=").append(id);
+		sb.append(", patentNo=").append(patentNo);
+		sb.append(", name=").append(name);
+		sb.append(", type=").append(type);
+		sb.append(", status=").append(status);
+		sb.append(", applyDate=").append(applyDate);
+		sb.append(", authorizationDate=").append(authorizationDate);
+		sb.append(", patentAmount=").append(patentAmount);
+		sb.append(", applicant=").append(applicant);
+		sb.append(", province=").append(province);
+		sb.append(", contactMobile=").append(contactMobile);
+		sb.append(", email=").append(email);
+		sb.append(", certificateUrl=").append(certificateUrl);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", updateTime=").append(updateTime);
+		sb.append(", aid=").append(aid);
+		sb.append(", years=").append(years);
+		sb.append(", uid=").append(uid);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
 }

+ 86 - 38
src/main/java/com/goafanti/common/model/UserService.java

@@ -7,74 +7,84 @@ public class UserService implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.uid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.aid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Integer addWechat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String wechat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.renewal
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Integer renewal;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Date renewalTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.sign_project
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String signProject;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String signProjectId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.new_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Date newTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.remarks
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.create_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private Date createTime;
 	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	private Integer techSatisfaction;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	private Integer businessSatisfaction;
+	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.id
 	 * @return  the value of user_service.id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -83,7 +93,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.id
 	 * @param id  the value for user_service.id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -92,7 +102,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.uid
 	 * @return  the value of user_service.uid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getUid() {
 		return uid;
@@ -101,7 +111,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.uid
 	 * @param uid  the value for user_service.uid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setUid(String uid) {
 		this.uid = uid == null ? null : uid.trim();
@@ -110,7 +120,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.aid
 	 * @return  the value of user_service.aid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -119,7 +129,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.aid
 	 * @param aid  the value for user_service.aid
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setAid(String aid) {
 		this.aid = aid == null ? null : aid.trim();
@@ -128,7 +138,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.add_wechat
 	 * @return  the value of user_service.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Integer getAddWechat() {
 		return addWechat;
@@ -137,7 +147,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.add_wechat
 	 * @param addWechat  the value for user_service.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setAddWechat(Integer addWechat) {
 		this.addWechat = addWechat;
@@ -146,7 +156,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.wechat
 	 * @return  the value of user_service.wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getWechat() {
 		return wechat;
@@ -155,7 +165,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.wechat
 	 * @param wechat  the value for user_service.wechat
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setWechat(String wechat) {
 		this.wechat = wechat == null ? null : wechat.trim();
@@ -164,7 +174,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.renewal
 	 * @return  the value of user_service.renewal
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Integer getRenewal() {
 		return renewal;
@@ -173,7 +183,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.renewal
 	 * @param renewal  the value for user_service.renewal
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setRenewal(Integer renewal) {
 		this.renewal = renewal;
@@ -182,7 +192,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.renewal_time
 	 * @return  the value of user_service.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Date getRenewalTime() {
 		return renewalTime;
@@ -191,7 +201,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.renewal_time
 	 * @param renewalTime  the value for user_service.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setRenewalTime(Date renewalTime) {
 		this.renewalTime = renewalTime;
@@ -200,7 +210,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.sign_project
 	 * @return  the value of user_service.sign_project
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getSignProject() {
 		return signProject;
@@ -209,7 +219,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.sign_project
 	 * @param signProject  the value for user_service.sign_project
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setSignProject(String signProject) {
 		this.signProject = signProject == null ? null : signProject.trim();
@@ -218,7 +228,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.sign_project_id
 	 * @return  the value of user_service.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getSignProjectId() {
 		return signProjectId;
@@ -227,7 +237,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.sign_project_id
 	 * @param signProjectId  the value for user_service.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setSignProjectId(String signProjectId) {
 		this.signProjectId = signProjectId == null ? null : signProjectId.trim();
@@ -236,7 +246,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.new_time
 	 * @return  the value of user_service.new_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Date getNewTime() {
 		return newTime;
@@ -245,7 +255,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.new_time
 	 * @param newTime  the value for user_service.new_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setNewTime(Date newTime) {
 		this.newTime = newTime;
@@ -254,7 +264,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.remarks
 	 * @return  the value of user_service.remarks
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -263,7 +273,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.remarks
 	 * @param remarks  the value for user_service.remarks
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks == null ? null : remarks.trim();
@@ -272,7 +282,7 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.create_time
 	 * @return  the value of user_service.create_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -281,15 +291,51 @@ public class UserService implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.create_time
 	 * @param createTime  the value for user_service.create_time
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
 	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.tech_satisfaction
+	 * @return  the value of user_service.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	public Integer getTechSatisfaction() {
+		return techSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.tech_satisfaction
+	 * @param techSatisfaction  the value for user_service.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	public void setTechSatisfaction(Integer techSatisfaction) {
+		this.techSatisfaction = techSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service.business_satisfaction
+	 * @return  the value of user_service.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	public Integer getBusinessSatisfaction() {
+		return businessSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service.business_satisfaction
+	 * @param businessSatisfaction  the value for user_service.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
+	 */
+	public void setBusinessSatisfaction(Integer businessSatisfaction) {
+		this.businessSatisfaction = businessSatisfaction;
+	}
+
+	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service
-	 * @mbg.generated  Tue May 18 15:33:59 CST 2021
+	 * @mbg.generated  Fri May 28 13:36:56 CST 2021
 	 */
 	@Override
 	public String toString() {
@@ -309,6 +355,8 @@ public class UserService implements Serializable {
 		sb.append(", newTime=").append(newTime);
 		sb.append(", remarks=").append(remarks);
 		sb.append(", createTime=").append(createTime);
+		sb.append(", techSatisfaction=").append(techSatisfaction);
+		sb.append(", businessSatisfaction=").append(businessSatisfaction);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();

+ 83 - 35
src/main/java/com/goafanti/common/model/UserServiceFollow.java

@@ -7,69 +7,79 @@ public class UserServiceFollow implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.uid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.aid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private Integer addWechat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String wechat;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.renewal
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private Integer renewal;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private Date renewalTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String signProjectId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.sign_project
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String signProject;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.remarks
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.create_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private Date createTime;
 	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	private Integer techSatisfaction;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_service_follow.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	private Integer businessSatisfaction;
+	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.id
 	 * @return  the value of user_service_follow.id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -78,7 +88,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.id
 	 * @param id  the value for user_service_follow.id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -87,7 +97,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.uid
 	 * @return  the value of user_service_follow.uid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getUid() {
 		return uid;
@@ -96,7 +106,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.uid
 	 * @param uid  the value for user_service_follow.uid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setUid(String uid) {
 		this.uid = uid == null ? null : uid.trim();
@@ -105,7 +115,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.aid
 	 * @return  the value of user_service_follow.aid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -114,7 +124,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.aid
 	 * @param aid  the value for user_service_follow.aid
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setAid(String aid) {
 		this.aid = aid == null ? null : aid.trim();
@@ -123,7 +133,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.add_wechat
 	 * @return  the value of user_service_follow.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public Integer getAddWechat() {
 		return addWechat;
@@ -132,7 +142,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.add_wechat
 	 * @param addWechat  the value for user_service_follow.add_wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setAddWechat(Integer addWechat) {
 		this.addWechat = addWechat;
@@ -141,7 +151,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.wechat
 	 * @return  the value of user_service_follow.wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getWechat() {
 		return wechat;
@@ -150,7 +160,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.wechat
 	 * @param wechat  the value for user_service_follow.wechat
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setWechat(String wechat) {
 		this.wechat = wechat == null ? null : wechat.trim();
@@ -159,7 +169,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.renewal
 	 * @return  the value of user_service_follow.renewal
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public Integer getRenewal() {
 		return renewal;
@@ -168,7 +178,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.renewal
 	 * @param renewal  the value for user_service_follow.renewal
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setRenewal(Integer renewal) {
 		this.renewal = renewal;
@@ -177,7 +187,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.renewal_time
 	 * @return  the value of user_service_follow.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public Date getRenewalTime() {
 		return renewalTime;
@@ -186,7 +196,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.renewal_time
 	 * @param renewalTime  the value for user_service_follow.renewal_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setRenewalTime(Date renewalTime) {
 		this.renewalTime = renewalTime;
@@ -195,7 +205,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.sign_project_id
 	 * @return  the value of user_service_follow.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getSignProjectId() {
 		return signProjectId;
@@ -204,7 +214,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.sign_project_id
 	 * @param signProjectId  the value for user_service_follow.sign_project_id
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setSignProjectId(String signProjectId) {
 		this.signProjectId = signProjectId == null ? null : signProjectId.trim();
@@ -213,7 +223,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.sign_project
 	 * @return  the value of user_service_follow.sign_project
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getSignProject() {
 		return signProject;
@@ -222,7 +232,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.sign_project
 	 * @param signProject  the value for user_service_follow.sign_project
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setSignProject(String signProject) {
 		this.signProject = signProject == null ? null : signProject.trim();
@@ -231,7 +241,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.remarks
 	 * @return  the value of user_service_follow.remarks
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -240,7 +250,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.remarks
 	 * @param remarks  the value for user_service_follow.remarks
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks == null ? null : remarks.trim();
@@ -249,7 +259,7 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.create_time
 	 * @return  the value of user_service_follow.create_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -258,15 +268,51 @@ public class UserServiceFollow implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.create_time
 	 * @param createTime  the value for user_service_follow.create_time
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
 	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.tech_satisfaction
+	 * @return  the value of user_service_follow.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	public Integer getTechSatisfaction() {
+		return techSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.tech_satisfaction
+	 * @param techSatisfaction  the value for user_service_follow.tech_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	public void setTechSatisfaction(Integer techSatisfaction) {
+		this.techSatisfaction = techSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_service_follow.business_satisfaction
+	 * @return  the value of user_service_follow.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	public Integer getBusinessSatisfaction() {
+		return businessSatisfaction;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_service_follow.business_satisfaction
+	 * @param businessSatisfaction  the value for user_service_follow.business_satisfaction
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
+	 */
+	public void setBusinessSatisfaction(Integer businessSatisfaction) {
+		this.businessSatisfaction = businessSatisfaction;
+	}
+
+	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_service_follow
-	 * @mbg.generated  Tue May 18 15:33:51 CST 2021
+	 * @mbg.generated  Fri May 28 13:37:12 CST 2021
 	 */
 	@Override
 	public String toString() {
@@ -285,6 +331,8 @@ public class UserServiceFollow implements Serializable {
 		sb.append(", signProject=").append(signProject);
 		sb.append(", remarks=").append(remarks);
 		sb.append(", createTime=").append(createTime);
+		sb.append(", techSatisfaction=").append(techSatisfaction);
+		sb.append(", businessSatisfaction=").append(businessSatisfaction);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();

+ 5 - 8
src/main/java/com/goafanti/common/task/OrderDunTask.java

@@ -23,7 +23,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.PaymentNodeMapper;
 import com.goafanti.common.dao.TArrearsDunMapper;
 import com.goafanti.common.dao.TOrderMidMapper;
@@ -61,8 +60,6 @@ public class OrderDunTask {
 	@Autowired
 	private TOrderMidMapper	tOrderMidMapper;
 	@Autowired
-	private NoticeMapper	noticeMapper;
-	@Autowired
 	private PaymentNodeMapper	paymentNodeMapper;
 	@Autowired
 	private OrderProjectService	orderProjectService;
@@ -256,7 +253,7 @@ public class OrderDunTask {
 					td.setStartTime(date);
 					td.setOrderArrears(tm.getOrderArrears());
 					td.setOrderReceivables(tm.getOrderReceivables());
-					addNoticAndSendEmail(td.getOrderNo(),td,NoticeStatus.ORDER_ARREARS_DUN.getCode());
+					addNotic(td.getOrderNo(),td,NoticeStatus.ORDER_ARREARS_DUN.getCode());
 					tArrearsDunMapper.updateByPrimaryKeySelective(td);
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					td.setDunStatus(2);
@@ -278,7 +275,7 @@ public class OrderDunTask {
 					ta.setOrderArrears(tm.getOrderArrears());
 					ta.setOrderReceivables(tm.getOrderReceivables());
 					tArrearsDunMapper.insertSelective(ta);
-					addNoticAndSendEmail(ta.getOrderNo(),ta,NoticeStatus.ORDER_ARREARS_DUN.getCode());
+					addNotic(ta.getOrderNo(),ta,NoticeStatus.ORDER_ARREARS_DUN.getCode());
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					ta.setDunStatus(2);
 					ta.setOrderArrears(tm.getOrderArrears());
@@ -299,7 +296,7 @@ public class OrderDunTask {
 					ta.setOrderArrears(tm.getOrderArrears());
 					ta.setOrderReceivables(tm.getOrderReceivables());
 					tArrearsDunMapper.insertSelective(ta);
-					addNoticAndSendEmail(ta.getOrderNo(),ta,NoticeStatus.ORDER_ARREARS_DUN.getCode());
+					addNotic(ta.getOrderNo(),ta,NoticeStatus.ORDER_ARREARS_DUN.getCode());
 				}else if(tm.getOrderArrears().compareTo(new BigDecimal(0))<1) {
 					ta.setDunStatus(2);
 					ta.setOrderReceivables(tm.getOrderReceivables());
@@ -315,7 +312,7 @@ public class OrderDunTask {
 	}
 	
 	
-	private void addNoticAndSendEmail(String orderNo, TArrearsDun td, Integer code) throws UnsupportedEncodingException, MessagingException {
+	private void addNotic(String orderNo, TArrearsDun td, Integer code) throws UnsupportedEncodingException, MessagingException {
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(orderNo);
 			String str=NoticeStatus.getValueByCode(code)+": 订单编号 -"+orderNo+", 操作人: 平台超管中心 - yxy。";
 			Notice n =new Notice();
@@ -324,7 +321,7 @@ public class OrderDunTask {
 			n.setNoticeType(code);
 			n.setContent(str);
 			n.setReaded(0);//未读
-			noticeMapper.insertSelective(n);
+			asyncUtils.addNotice(n);
 	}
 
 

+ 193 - 111
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -22,7 +22,8 @@ import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.bo.EmailBo;
-import com.goafanti.common.dao.NoticeMapper;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.PatentCategoryStatus;
 import com.goafanti.common.model.Admin;
@@ -30,6 +31,7 @@ import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.PatentNew;
 import com.goafanti.common.model.PatentNewLog;
 import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.patent.service.PatentNewService;
@@ -37,6 +39,7 @@ import com.goafanti.patent.service.PatentNewService;
 
 
 
+
 @Component
 @RestController
 public class PatentTask {
@@ -45,7 +48,7 @@ public class PatentTask {
 	@Resource
 	private AdminService adminService;
 	@Autowired
-	private NoticeMapper	noticeMapper;
+	private UserMapper	userMapper;
 	@Autowired
 	private AsyncUtils	asyncUtils;
 	
@@ -64,142 +67,195 @@ public class PatentTask {
 
 	
 	
-	
+	/**
+	 * 专利提醒定时任务
+	 * 每天0点触发任务
+	 * 1、先计算出申请时间与当前时间相隔天数 2、然后用相隔天使除以365取余计算年份差 3、在用申请时间加上年限获取最后日期
+	 * 4、在相隔30天、20天、10天、3天、2天、1天分别一次提醒。原是在距离90天提醒。
+	 */
 	@Scheduled(cron = "0 0 0  * * ?") 
 	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
 	public void patentRemind() {
 		LoggerUtils.debug(getClass(), "====================开始检查专利提醒==================");
 		try {
-		List<PatentNew> l=patentNewService.AllselectStartPatentNew();
-		List<Notice> nlist=new  ArrayList<>();
-		for (PatentNew p : l) {
-			 Calendar cst =Calendar.getInstance();
-			 Calendar ced =Calendar.getInstance();
-			 Calendar ted =Calendar.getInstance();
-			 cst.setTime(p.getApplyDate());
-			 ced.setTime(new Date());
-			 //获得累计年限   
-			 int d = (int) ((ced.getTimeInMillis()-cst.getTimeInMillis()) / (1000*3600*24));
-			 int y=d/365;
-			 if(d%365>0)y++;
-			 ted.setTime(cst.getTime());
-			 ted.add(Calendar.YEAR,y);
-			 //计算相差日期
-			 int count = (int) ((ted.getTimeInMillis()-ced.getTimeInMillis()) / (1000*3600*24));
-			 Notice n =new Notice();
-			 n.setId(UUID.randomUUID().toString());
-			 n.setCreateTime(new Date());
-			 n.setReaded(0);//未读
-			 n.setAid("1");
-			 n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
-			 if (count>=0&&count<=90) {
-					 Admin a=adminService.selectByPrimaryKey(p.getAid());
-					 //设置如果找不到用户则提醒管理员
-					 String str2="专利编号="+p.getPatentNo()+"名称="+p.getName()+",email="+p.getEmail();;
-					 n.setContent(str2);
-					 if(a==null) {
-						n.setContent(str2+",aid="+p.getAid());
+			List<PatentNew> l = patentNewService.AllselectStartPatentNew();
+			List<Notice> nlist = new ArrayList<>();
+			List<PatentNewLog> logList = new ArrayList<>();
+			for (PatentNew p : l) {
+				//因为改成数据关联字段修改
+				String userName ="";
+				if (p.getUid()!=null) {
+					userName=userMapper.selectByPrimaryKey(p.getUid()).getNickname();
+				}else {
+					userName=p.getApplicant();
+				}
+				// 申请时间
+				Calendar sq = Calendar.getInstance();
+				sq.setTime(p.getApplyDate());
+				Integer status = 0;
+				// 当前时间
+				Calendar now = Calendar.getInstance();
+				now.setTime(new Date());
+				now.set(Calendar.MILLISECOND, 0);
+				now.set(Calendar.HOUR_OF_DAY, 0);
+				now.clear(Calendar.MINUTE);
+				now.clear(Calendar.SECOND);
+				Date date=new Date();
+				// 提醒
+				Calendar ted = Calendar.getInstance();
+				// 先获取到目前多少天数,再计算出年限
+				int d = (int) ((now.getTimeInMillis() - sq.getTimeInMillis()) / (1000 * 3600 * 24));
+				int y = d / 365;
+				if (d % 365 > 0)
+					y++;
+				ted.setTime(sq.getTime());
+				ted.add(Calendar.YEAR, y);
+				// 计算相差日期
+				int count = (int) ((ted.getTimeInMillis() - now.getTimeInMillis()) / (1000 * 3600 * 24));
+				Notice n = new Notice();
+				n.setId(UUID.randomUUID().toString());
+				n.setCreateTime(date);
+				n.setReaded(0);// 未读
+				n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
+				boolean flag=false;
+				if (count > 30 && count <= 90&&p.getStatus()!=1) {
+					flag=true;
+					status = 1;
+				} else if (count > 20 && count <= 30&&p.getStatus()!=2) {
+					flag=true;
+					status = 2;
+				}else if (count > 10 && count <= 20&&p.getStatus()!=3) {
+					flag=true;
+					status = 3;
+				}else if (count > 3 && count <= 10&&p.getStatus()!=4) {
+					flag=true;
+					status = 4;
+				}else if (count == 3&&p.getStatus()!=5) {
+					flag=true;
+					status = 5;
+				}else if (count == 2&&p.getStatus()!=6) {
+					flag=true;
+					status = 6;
+				}else if (count == 1&&p.getStatus()!=7) {
+					flag=true;
+					status = 7;
+				}
+				if (flag) {
+					Admin a = adminService.selectByPrimaryKey(p.getAid());
+					StringBuffer str2 = new StringBuffer();
+					str2.append("专利编号=").append(p.getPatentNo()).append("名称=").append(p.getName()).append(",email=")
+							.append(p.getEmail());
+					n.setContent(str2.toString());
+					if (a == null) {
+						str2.append(",aid=").append(p.getAid()).append(",找不到管理员。");
+						n.setContent(str2.toString());
+						n.setAid("1");
 						nlist.add(n);
-							continue;
-					 }else if (!SendEmailUtil.isEmail(p.getEmail().trim())) {
-						n.setContent(str2+",管理员="+a.getName());
+						continue;
+					} else if (!SendEmailUtil.isEmail(p.getEmail().trim())) {
+						str2.append(",管理员=").append(a.getName()).append(",邮箱不正确。");
+						n.setAid("1");
+						n.setContent(str2.toString());
 						nlist.add(n);
-						//再发一条给管理员
-						Notice n2 =new Notice();
+						// 再发一条给当事人
+						Notice n2 = new Notice();
 						n2.setId(UUID.randomUUID().toString());
-						n2.setCreateTime(new Date());
-						n2.setReaded(0);//未读
-						n2.setContent(str2);
+						n2.setCreateTime(date);
+						n2.setReaded(0);// 未读
+						n2.setContent(str2.toString());
 						n2.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
 						n2.setAid(a.getId());
 						nlist.add(n2);
-							continue;
-					}else {
-						 //计算出年费金额,然后存入数据库
-						 BigDecimal money=countMoney(y,p.getType());
-						ted.setTime(cst.getTime());
-						ted.add(Calendar.YEAR, y);
-						EmailBo emailBo = new EmailBo("专利提醒",p.getEmail().trim(), p.getApplicant(), "科德集团", a.getName(),p.getName(), p.getPatentNo(), money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"));
-						 n.setNoticeType(NoticeStatus.TASK_PATENT_REMIND.getCode());
-						 String title="专利提醒";
-						 p.setStatus(1);//提醒中
+						continue;
+					} else {
+						// 计算出年费金额,然后存入数据库
+						BigDecimal money = countMoney(y, p.getType());
+						
+						EmailBo emailBo = new EmailBo("专利提醒", p.getEmail().trim(),userName, "科德集团", a.getName(),
+								p.getName(), p.getPatentNo(), money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"),status);
+						n.setNoticeType(NoticeStatus.TASK_PATENT_REMIND.getCode());
+						String title = "专利提醒成功!";
+						p.setStatus(status);// 提醒中
 						try {
 							asyncUtils.patentSend(emailBo);
 						} catch (SendFailedException e) {
-							//如果邮件发送失败提醒
-							 n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
-							 title="专利提醒失败!对方邮箱不存在或者拒收";
-							 p.setStatus(0);
+							// 如果邮件发送失败提醒
+							n.setNoticeType(NoticeStatus.TASK_PATENT_ERROR.getCode());
+							title = "提醒失败!对方邮箱不存在或者拒收";
+							p.setStatus(0);
 						}
-						 p.setPatentAmount(money);
-						 p.setYears(y);
-						 patentNewService.updatePatenNew(p);
-						 PatentNewLog pl=new PatentNewLog();
-						 String str=StrToString(title,p.getEmail().trim(), p.getApplicant(), a.getName(),p.getName(), p.getPatentNo(),
-								 money.toString(), DateFormatUtils.format(ted, "yyyy-MM-dd"));
-						 pl.setContent(str);
-						 pl.setCreateTime(new Date());
-						 pl.setPid(p.getId());
-						 patentNewService.addPatenNewLog(pl);
-						 n.setAid(p.getAid());
-						 n.setContent(str);
-						 nlist.add(n);
+						p.setPatentAmount(money);
+						p.setYears(y);
+						patentNewService.updatePatenNew(p);
+						PatentNewLog pl = new PatentNewLog();
+						String str = StrToString(title, p.getEmail().trim(), userName ,p.getName(),date,status);
+						pl.setContent(str);
+						pl.setCreateTime(new Date());
+						pl.setPid(p.getId());
+						logList.add(pl);
+						n.setAid(p.getAid());
+						n.setContent(str);
+						nlist.add(n);
 					}
-					
-					 Thread.sleep(2000);
 				}
-		}
-		if (!nlist.isEmpty()) {
-			List<Notice> newList=new  ArrayList<>();
-				  for(int i=0;i<nlist.size();i++){
-					  newList.add(nlist.get(i));
-					  if(pointsDataLimit == newList.size()||i == nlist.size()-1){
-						  if(newList.size()>0) noticeMapper.insertBatch(newList);	
-						  newList.clear();
-						  Thread.sleep(2000);
-					  }  
 			}
-		}
-		List<PatentNew> ls=patentNewService.AllselectEndPatentNew();
-		for (PatentNew p : ls) {
-			Calendar cst =Calendar.getInstance();
-			Calendar ced =Calendar.getInstance();
-			Calendar ted =Calendar.getInstance();
-			cst.setTime(p.getApplyDate());
-			ced.setTime(new Date());
-			int d = (int) ((ced.getTimeInMillis()-cst.getTimeInMillis()) / (1000*3600*24));
-			int y=(d/365);
-			if(d%365>0)y++;
-			ted.setTime(cst.getTime());
-			ted.add(Calendar.YEAR,y);
-			//计算相差日期
-			int count = (int) ((ted.getTimeInMillis()-ced.getTimeInMillis()) / (1000*3600*24));
-			if (count>200) {
-			p.setStatus(0);//恢复待提醒
-			patentNewService.updatePatenNew(p);
-			 }
-		}
+			if (!nlist.isEmpty()) {
+				List<Notice> newList = new ArrayList<>();
+				for (int i = 0; i < nlist.size(); i++) {
+					newList.add(nlist.get(i));
+					if (pointsDataLimit == newList.size() || i == nlist.size() - 1) {
+						if (newList.size() > 0) asyncUtils.addNoticeBatch(newList);
+						Thread.sleep(2000);
+						newList.clear();
+					}
+				}
+			}
+			if (!logList.isEmpty()) {
+				List<PatentNewLog> logList2 = new ArrayList<>();
+				for (int i = 0; i < logList.size(); i++) {
+					logList2.add(logList.get(i));
+					if (pointsDataLimit == logList2.size() || i == logList.size() - 1) {
+						if (logList2.size() > 0) patentNewService.insertLogBatch(logList2);
+						logList2.clear();
+						Thread.sleep(2000);
+					}
+				}
+
+			}
 		} catch (Exception e) {
 			LoggerUtils.debug(getClass(), "=====================专利提醒失败======================");
-			 Notice n =new Notice(UUID.randomUUID().toString(),new Date(),0,"1",NoticeStatus.TASK_PATENT_ERROR.getCode(),"==============专利提醒失败================");
-			 noticeMapper.insert(n);
+			Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
+					NoticeStatus.TASK_PATENT_ERROR.getCode(), "==============专利提醒失败================");
+			asyncUtils.addNotice(n);
 			e.printStackTrace();
 		}
-					 
+
 		LoggerUtils.debug(getClass(), "=====================专利提醒结束======================");
 	}
 	
 
-	private String StrToString(String name, String email, String applicant,  String adminName, String pantentName,
-		String pantentNo, String money, String format) {
-		StringBuilder str =new StringBuilder("");
-		str.append(name).append(":").append("邮箱:").append(email).append(",授权公司:").append(applicant).append(",录入人:").append(adminName)
-		.append(",专利名称:").append(pantentName).append (",专利编号:").append(pantentNo).append(",金额:").append(money).append(",时间:").append(format);
-		return str.toString();
+	private String StrToString(String title, String email, String userName, String pname, Date date, Integer status) {
+		//状态 0 未提醒 1 剩余90天 2剩余30天 3剩余20天 4剩余10天 5剩余3天 6剩余2天 7剩余1天
+		Integer days=0;
+		StringBuffer sb=new StringBuffer().append(title).append("客户[").append(userName).append("]专利[")
+				.append(pname).append("]");
+		if (status==1) days=90;
+		else if (status==2) days=30;
+		else if (status==3) days=20;
+		else if (status==4) days=10;
+		else if (status==5) days=3;
+		else if (status==6) days=2;
+		else if (status==7) days=1;
+		if(days>0) {
+			sb.append(",续费时间还剩").append(days).append("天");
+		}
+		sb.append(",已于").append(DateUtils.formatDate(date, AFTConstants.YYYYMMDDHHMMSS)).append("发送专利提醒至邮箱")
+			.append(email).append("!");
+				
+		
+		return sb.toString();
+	}
 	
-}
-
-
 	/**
 	 * 
 	 * @param 年份
@@ -270,4 +326,30 @@ public class PatentTask {
             htmlStr = htmlStr.replaceAll("&nbsp;", "");
             return htmlStr;
         }
+        
+        
+        public static void main(String[] args) {
+        	// 申请时间一月份是0。
+			Calendar sq = Calendar.getInstance();
+			sq.set(2020, 7, 29);
+			System.out.println(DateUtils.formatDate(sq.getTime(), AFTConstants.YYYYMMDD));
+			// 当前时间
+			Calendar now = Calendar.getInstance();
+			now.setTime(new Date());
+			now.set(Calendar.MILLISECOND, 0);
+			// 提醒
+			Calendar ted = Calendar.getInstance();
+			// 先获取到目前多少天数,再计算出年限
+			int d = (int) ((now.getTimeInMillis() - sq.getTimeInMillis()) / (1000 * 3600 * 24));
+			System.out.println(d);
+			int y = d / 365;
+			if (d % 365 > 0)y++;
+			System.out.println(y);
+			ted.setTime(sq.getTime());
+			ted.add(Calendar.YEAR, y);
+			System.out.println(DateUtils.formatDate(ted.getTime(), AFTConstants.YYYYMMDD));
+			// 计算相差日期
+			int count = (int) ((ted.getTimeInMillis() - now.getTimeInMillis()) / (1000 * 3600 * 24));
+			System.out.println(count);
+		}
 }

+ 4 - 8
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -19,13 +19,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.customer.bo.LockingReleaseBo;
 import com.goafanti.customer.service.CustomerService;
@@ -39,8 +37,6 @@ public class ReleaseUserTask {
 	@Resource
 	private UserService userService;
 	@Autowired
-	private NoticeMapper noticeMapper;
-	@Autowired
 	private AsyncUtils	asyncUtils;
 
 	int pointsDataLimit = 50;
@@ -108,7 +104,7 @@ public class ReleaseUserTask {
 				newList.add(ln.get(i));
 				if (pointsDataLimit == newList.size() || i == ln.size() - 1) {
 					if (newList.size() > 0)
-						noticeMapper.insertBatch(newList);
+						asyncUtils.addNoticeBatch(newList);
 					newList.clear();
 					Thread.sleep(2000);
 				}
@@ -197,7 +193,7 @@ public class ReleaseUserTask {
 		} catch (Exception e) {
 			Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
 					NoticeStatus.TASK_PATENT_ERROR.getCode(), "==============客户释放失败================",null);
-			noticeMapper.insert(n);
+			asyncUtils.addNotice(n);
 			EmailBo emailBo = new EmailBo("释放客户失败", AFTConstants.ADMIN_EMAIL, "超管", "平台", "系统", "释放客户失败");
 			try {
 				asyncUtils.send(emailBo);
@@ -224,7 +220,7 @@ public class ReleaseUserTask {
 					String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
 					u.getUid()));
 		}
-		if(!nl.isEmpty())noticeMapper.insertBatch(nl);
+		if(!nl.isEmpty())asyncUtils.addNoticeBatch(nl);
 	}
 
 	private void addChannelNotice(List<userDaysBo> hsList, List<userDaysBo> sfList) {
@@ -242,7 +238,7 @@ public class ReleaseUserTask {
 					String.format("您的%s客户【%s】已经90天未跟进,已经自动释放!", "渠道", sf.getName()),
 					sf.getUid()));
 		}
-		if(!nl.isEmpty())noticeMapper.insertBatch(nl);
+		if(!nl.isEmpty())asyncUtils.addNoticeBatch(nl);
 	}
 
 }

+ 24 - 2
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -1,24 +1,46 @@
 package com.goafanti.common.utils;
 
 import java.io.UnsupportedEncodingException;
+import java.util.List;
 
 import javax.mail.MessagingException;
 
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
 import com.goafanti.common.bo.EmailBo;
+import com.goafanti.common.dao.NoticeMapper;
+import com.goafanti.common.enums.NoticeTypes;
+import com.goafanti.common.model.Notice;
 
 @Component
+@Async
 public class AsyncUtils {
+	@Autowired
+	private NoticeMapper noticeMapper;
 
-	@Async
+	
 	public void patentSend(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
 		SendEmailUtil.getInstance().patentSend(bo);
 	}
 	
-	@Async
+	
 	public void send(EmailBo bo) throws UnsupportedEncodingException, MessagingException {
 		SendEmailUtil.getInstance().send(bo);
 	}
+	
+	public void addNotice(Notice n ) {
+		n.setType(NoticeTypes.getType(n.getNoticeType()));
+		noticeMapper.insertSelective(n);
+	}
+	
+	
+	public void addNoticeBatch(List<Notice> list){
+		for (Notice n : list) {
+			n.setType(NoticeTypes.getType(n.getNoticeType()));
+		}
+		noticeMapper.insertBatch(list);
+		
+	}
 }

+ 4 - 3
src/main/java/com/goafanti/contract/service/impl/ContractServiceImpl.java

@@ -29,6 +29,7 @@ import com.goafanti.common.model.Contract;
 import com.goafanti.common.model.ContractLog;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.contract.bo.ContractClientListBo;
@@ -49,7 +50,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 	@Autowired
 	private UserMapper			userMapper;
 	@Autowired
-	private NoticeMapper		noticeMapper;
+	private AsyncUtils		asyncUtils;
 	@Autowired
 	private PatentInfoMapper	patentInfoMapper;
 	@Autowired
@@ -176,7 +177,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 			notice.add(createNotice(c, log));
 		}
 		contractLogMapper.insertBatch(logs);
-		noticeMapper.insertBatch(notice);
+		asyncUtils.addNoticeBatch(notice);
 
 	}
 
@@ -235,7 +236,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 			notice.add(createNotice(c, log));
 		}
 		contractLogMapper.insertBatch(logs);
-		noticeMapper.insertBatch(notice);
+		asyncUtils.addNoticeBatch(notice);
 	}
 
 	@Override

+ 0 - 1
src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java

@@ -345,7 +345,6 @@ public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper
 		n.setAid(l.getPrincipal());
 		n.setContent("编号" + info.getSerialNumber() + "  " + CopyrightStatus.getStatus(l.getStatus()).getDesc());
 		n.setNoticeType(NoticeStatus.COPYRIGHT.getCode());
-		// noticeMapper.insert(n);
 	}
 
 }

+ 13 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -241,6 +241,19 @@ public class AdminCustomerApiController extends BaseApiController{
 		return res;
 	}
 	
+	/** 客户查询 **/
+	@RequestMapping(value = "/getUserByName",method = RequestMethod.GET)
+	public Result getUserByName(String name){
+		Result res = new Result();
+		if(StringUtils.isEmpty(name)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "名称","名称"));
+			return res;
+		}
+		if(name.length()<2) return res;
+		res.data(customerService.getUserByName(name));
+		return res;
+	}
+	
 	/** 添加客户基本信息  
 	 * @throws Exception 
 	 * @throws NumberFormatException **/

+ 8 - 0
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -126,6 +126,14 @@ public interface CustomerService {
 	 */
 	List<CustomerSimpleBo> getSignedCustomerByName(String name);
 	
+	
+	/**
+	 * 客户全查询
+	 * @param name
+	 * @return
+	 */
+	List<CustomerSimpleBo> getUserByName(String name);
+	
 	/**
 	 * 判断是否存在某个单位客户
 	 * @param name

+ 5 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -31,7 +31,6 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.BusinessGlossoryMapper;
 import com.goafanti.common.dao.BusinessProjectMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationAnnualReportMapper;
 import com.goafanti.common.dao.OrganizationApplicationInfoMapper;
 import com.goafanti.common.dao.OrganizationBusinessScopeMapper;
@@ -125,8 +124,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	@Resource
 	private AdminMapper adminMapper;
 	@Resource
-	private NoticeMapper noticeMapper;
-	@Resource
 	private OrganizationApplicationInfoMapper organizationApplicationInfoMapper;
 	@Resource
 	private OrganizationAnnualReportMapper organizationAnnualReportMapper;
@@ -2202,4 +2199,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				in.getPageSize());
 	}
 
+	@Override
+	public List<CustomerSimpleBo> getUserByName(String name) {
+		return userMapper.getUserByName(name);
+	}
+
 }

+ 7 - 8
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -32,7 +32,6 @@ import com.goafanti.common.dao.DemandMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
 
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.ProjectInterestMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
@@ -58,6 +57,7 @@ import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -88,8 +88,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@Autowired
 	private UserRoleMapper					userRoleMapper;
 	@Autowired
-	private NoticeMapper					noticeMapper;
-	@Autowired
 	private DemandKeywordMapper				demandKeywordMapper;
 	@Autowired
 	private AchievementDemandMapper			achievementDemandMapper;
@@ -114,6 +112,8 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private UserInterestMapper	userInterestMapper;
 	@Autowired
 	ProjectInterestMapper	projectInterestMapper; 
+	@Autowired
+	AsyncUtils	asyncUtils;
 	
 	
 	DemandFollowDetailMapper	demandFollowDetailMapper;
@@ -679,13 +679,12 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			for (String s : ids) {
 				list.add(disposeNotice(d, s));
 			}
-			noticeMapper.insertBatch(list);
+			asyncUtils.addNoticeBatch(list);
 		}
 	}
 
 	// 给指派技术经纪人发送审核结果通知
 	private void createTechBorkerNotice(Demand a) {
-		// noticeMapper.insert(disposeNotice(a, null));
 	}
 
 	private Notice disposeNotice(Demand d, String aid) {
@@ -970,7 +969,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return (Pagination<DemandSearchListBo>) findPage("findAppMyDemandListByPage", "findAppMyDemandCount", params, pNo, pSize);
 	}
 
-
+
 	public int saveAppUserDemand(Demand d, String validityPeriodFormattedDate, String[] keywords) {
 		Date validityPeriod = null;
 		if (!StringUtils.isBlank(validityPeriodFormattedDate)) {
@@ -1016,7 +1015,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.insert(d);
 	}
 
-
+
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<DemandManageListBo> selectMyDemandManageList(Integer dataCategory,String employerName, Integer auditStatus,
@@ -1057,7 +1056,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return (Pagination<DemandManageListBo>) findPage("findMyDemandListByPage", "findMyDemandCount",
 				params, pNo, pSize);
 	}
-	
+	
 	
 	@SuppressWarnings("unchecked")
 	@Override

+ 2 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -41,7 +41,6 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.IdleContractNoMapper;
 import com.goafanti.common.dao.NewOrderDunMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationManagementMapper;
 import com.goafanti.common.dao.OutsourceLogMapper;
@@ -154,8 +153,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Autowired
 	private TOrderLogMapper tOrderLogMapper;
 	@Autowired
-	private NoticeMapper	noticeMapper;
-	@Autowired
 	private OrderService	orderService;
 	@Autowired
 	private IdleContractNoMapper	idleContractNoMapper;
@@ -1167,7 +1164,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		n.setNoticeType(type);
 		n.setContent(str);
 		n.setReaded(0);//未读
-		noticeMapper.insertSelective(n);
+		asyncUtils.addNotice(n);
 	}
 	public void  sendEmail(String orderNo,String dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
 		LoggerUtils.debug(logger, "======================邮件信息发送===================");
@@ -1230,7 +1227,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			Admin admin = adminMapper.selectAllByid(string);
 			if(admin!=null&&SendEmailUtil.isEmail(admin.getEmail().trim()))adminIds+=admin.getEmail()+",";
 		}
-		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
+		if(!nlist.isEmpty())asyncUtils.addNoticeBatch(nlist);
 		if (!nlist.isEmpty()&&StringUtils.isNotBlank(adminIds)) {
 			adminIds=adminIds.substring(0, adminIds.length()-1);
 			EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), adminIds, a.getDepartmentName(), a.getName(), "请登录查看"

+ 1 - 4
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -30,7 +30,6 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.BusinessProjectMapper;
 import com.goafanti.common.dao.NewOrderDunMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.PaymentNodeMapper;
@@ -148,8 +147,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Autowired
 	private PaymentNodeMapper	paymentNodeMapper;
 	@Autowired
-	private NoticeMapper	noticeMapper;
-	@Autowired
 	private TTaskMidMapper	tTaskMidMapper;
 	@Autowired
 	private UserMapper	userMapper;
@@ -660,7 +657,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		n.setNoticeType(type);
 		n.setContent(str);
 		n.setReaded(0);//未读
-		noticeMapper.insertSelective(n);
+		asyncUtils.addNotice(n);
 		pn.setDunStatus(1);
 		paymentNodeMapper.updateByPrimaryKeySelective(pn);
 		//营销员名称、邮箱、订单编号、客户名称

+ 3 - 3
src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java

@@ -28,7 +28,6 @@ import com.goafanti.common.dao.BusinessProjectMapper;
 import com.goafanti.common.dao.ContractMapper;
 import com.goafanti.common.dao.ContractTaskLogMapper;
 import com.goafanti.common.dao.ContractTaskMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationManagementMapper;
 import com.goafanti.common.dao.TOrderBillMapper;
 import com.goafanti.common.dao.TOrderChangeMapper;
@@ -64,6 +63,7 @@ import com.goafanti.common.model.UserFollow;
 import com.goafanti.common.model.UserFollowBusiness;
 import com.goafanti.common.model.UserLockRelease;
 import com.goafanti.common.model.UserRole;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.BeanUtilsExt;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.MobileMessageUtils;
@@ -127,7 +127,7 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 	@Autowired
 	private AdminMapper adminMapper;
 	@Autowired
-	private NoticeMapper noticeMapper;
+	private AsyncUtils	asyncUtils;
 	@Autowired
 	private ContractTaskLogMapper contractTaskLogMapper;
 	@Autowired
@@ -1994,7 +1994,7 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 				noticeList.add(notice);
 			}
 			MobileNotice( targetIds, tOrder);
-			noticeMapper.insertBatch(noticeList);
+			asyncUtils.addNoticeBatch(noticeList);
 			//触发短信提醒
 			List<UserRole> list=userRoleMapper. selectAdminRole(AFTConstants.CONSULTANT_MANAGER);
 				for (UserRole u : list) {

+ 2 - 6
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -21,7 +21,6 @@ import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.CompanyLibraryMapper;
 import com.goafanti.common.dao.FinancialPaymentMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OfficialFeePriceMapper;
 import com.goafanti.common.dao.PatentPriceMapper;
 import com.goafanti.common.dao.PaymentLogMapper;
@@ -82,8 +81,6 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	@Autowired
 	private AdminMapper	adminMapper;
 	@Autowired
-	private NoticeMapper	noticeMapper;
-	@Autowired
 	private FinancialPaymentMapper	financialPaymentMapper;
 	@Autowired
 	private TOrderTaskMapper	tOrderTaskMapper;
@@ -467,7 +464,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		n.setNoticeType(type);
 		n.setContent(str);
 		n.setReaded(0);//未读
-		noticeMapper.insertSelective(n);
+		asyncUtils.addNotice(n);
 		if(StringUtils.isNotBlank(a.getEmail())) {
 			try {
 				asyncUtils.send(bo);
@@ -744,8 +741,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				elist.add(Integer.valueOf(s));
 			}
 		}
-		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
-//		if(!list.isEmpty())tOrderPaymentMapper.updateByids(list);
+		if(!nlist.isEmpty())asyncUtils.addNoticeBatch(nlist);
 		Map<String ,Object> map=new HashMap<>();
 		map.put("OK", list);
 		map.put("fail", elist);

+ 11 - 0
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -4,6 +4,10 @@ package com.goafanti.patent.bo;
 import com.goafanti.common.model.PatentNew;
 
 public class PatentNewBo extends PatentNew{
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
 	private String applyDates;
 	private String authorizationDates;
 	private String aname;
@@ -13,6 +17,7 @@ public class PatentNewBo extends PatentNew{
 	private String startDate;
 	private String endDate;
 	private String departmentId;
+	private String userName;
 	public String getApplyDates() {
 		return applyDates;
 	}
@@ -67,4 +72,10 @@ public class PatentNewBo extends PatentNew{
 	public void setDepartmentId(String departmentId) {
 		this.departmentId = departmentId;
 	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
 }

+ 14 - 0
src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java

@@ -89,6 +89,20 @@ public class AdminPatentNewApiController extends CertifyApiController {
 		Result res = new Result();
 		return res.data(patentNewService.selectPatentNew(p,pageSize,pageNo));
 	}
+	
+	
+	/**
+	 * 专利列表
+	 */
+	@RequestMapping(value = "/selectPatentNewLog", method = RequestMethod.GET)
+	public Result selectPatentNew(Integer id){
+		Result res = new Result();
+		if (id==null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"编号","编号"));
+			return res;
+		}
+		return res.data(patentNewService.selectPatentNewLog(id));
+	}
 	/** 证件上传 **/
 	@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
 	public Result uploadRefundOrderFile(HttpServletRequest req,String sign){

+ 5 - 0
src/main/java/com/goafanti/patent/service/PatentNewService.java

@@ -22,4 +22,9 @@ public interface PatentNewService {
 
 	List<PatentNew> AllselectEndPatentNew();
 
+
+	void insertLogBatch(List<PatentNewLog> logList2);
+
+	List<PatentNewLog> selectPatentNewLog(Integer id);
+
 }

+ 0 - 1
src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java

@@ -633,7 +633,6 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		n.setAid(l.getPrincipal());
 		n.setContent("编号" + info.getSerialNumber() + "  " + PatentInfoStatus.getStatus(l.getState()).getDesc());
 		n.setNoticeType(NoticeStatus.PATENTINFO.getCode());
-		// noticeMapper.insert(n);
 	}
 
 }

+ 10 - 0
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -79,6 +79,16 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		return patentNewMapper.AllselectEndPatentNew();
 	}
 
+	@Override
+	public void insertLogBatch(List<PatentNewLog> list) {
+		patentNewLogMapper.insertLogBatch(list);
+	}
+
+	@Override
+	public List<PatentNewLog> selectPatentNewLog(Integer id) {
+		return patentNewLogMapper.selectPatentNewLog(id);
+	}
+
 	
 	
 	

+ 0 - 1
src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

@@ -326,7 +326,6 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		n.setAid(l.getPrincipal());
 		n.setContent("编号" + info.getSerialNumber() + "  " + TechProjectStatus.getStatus(l.getState()).getDesc());
 		n.setNoticeType(NoticeStatus.TECHPROJECT.getCode());
-		// noticeMapper.insert(n);
 	}
 
 	@SuppressWarnings("unchecked")

+ 16 - 0
src/main/java/com/goafanti/user/bo/OutOrderUserService.java

@@ -45,11 +45,27 @@ public class OutOrderUserService {
 	private String signProject;
 	@Excel(name = "备注")
 	private String remarks;
+	@Excel(name = "技术端满意度",readConverterExp = "0=已投诉,1=不满意,2=一般满意,3=非常满意")
+	private Integer techSatisfaction;
+	@Excel(name = "业务端满意度",readConverterExp = "0=已投诉,1=不满意,2=一般满意,3=非常满意")
+	private Integer businessSatisfaction;
 	private String uid;
 	private List<OrderProject> list;
 	
 	
 	
+	public Integer getTechSatisfaction() {
+		return techSatisfaction;
+	}
+	public void setTechSatisfaction(Integer techSatisfaction) {
+		this.techSatisfaction = techSatisfaction;
+	}
+	public Integer getBusinessSatisfaction() {
+		return businessSatisfaction;
+	}
+	public void setBusinessSatisfaction(Integer businessSatisfaction) {
+		this.businessSatisfaction = businessSatisfaction;
+	}
 	public Integer getDeleteSign() {
 		return deleteSign;
 	}

+ 3 - 4
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -17,7 +17,6 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.bo.Result;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrgHumanResourceMapper;
 import com.goafanti.common.dao.OrgRatepayMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
@@ -34,6 +33,7 @@ import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -60,7 +60,7 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 	@Autowired
 	private OrgHumanResourceMapper		orgHumanResourceMapper;
 	@Autowired
-	private NoticeMapper				noticeMapper;
+	private AsyncUtils				asyncUtils;
 	@Autowired
 	private UserRoleMapper				userRoleMapper;
 
@@ -304,7 +304,7 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 				n.setNoticeType(NoticeStatus.ORGANIZATIONCERTIFY.getCode());
 				list.add(n);
 			}
-			noticeMapper.insertBatch(list);
+			asyncUtils.addNoticeBatch(list);
 		}
 	}
 
@@ -330,7 +330,6 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 		}
 		n.setContent(content);
 		n.setNoticeType(NoticeStatus.ORGANIZATIONCERTIFY.getCode());
-		// noticeMapper.insert(n);
 	}
 
 	@Override

+ 3 - 3
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -22,7 +22,6 @@ import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.DistrictGlossoryMapper;
 import com.goafanti.common.dao.IndustryCategoryMapper;
-import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.common.dao.UserInterestMapper;
 import com.goafanti.common.dao.UserMapper;
@@ -35,6 +34,7 @@ import com.goafanti.common.enums.UserLevel;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -55,7 +55,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	@Autowired
 	private UserRoleMapper		userRoleMapper;
 	@Autowired
-	private NoticeMapper		noticeMapper;
+	private AsyncUtils		asyncUtils;
 	@Autowired
 	DistrictGlossoryMapper districtGlossoryMapper;
 	@Autowired
@@ -254,7 +254,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 				n.setNoticeType(NoticeStatus.PERSONALCERTIFY.getCode());
 				list.add(n);
 			}
-			noticeMapper.insertBatch(list);
+			asyncUtils.addNoticeBatch(list);
 		}
 	}
 

+ 5 - 5
src/main/resources/props/config_local.properties

@@ -1,7 +1,7 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-#jdbc.url=jdbc\:mysql://localhost:3306/aft20210514?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
 #jdbc.password=123456
 #测试
@@ -64,12 +64,12 @@ user_remind_days=15
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开�
-static.host=//172.16.0.253/1.1.73
-avatar.host=//172.16.0.253
+#static.host=//172.16.0.253/1.1.74
+#avatar.host=//172.16.0.253
 
-#avatar.host=//static.jishutao.com
-#static.host=//static.jishutao.com/1.1.73
+avatar.host=//static.jishutao.com
+static.host=//static.jishutao.com/1.1.74
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -59,7 +59,7 @@ user.private.max=1000
 #客户释放提醒
 user_remind_days=15
 
-static.host=//static.jishutao.com/1.1.73
+static.host=//static.jishutao.com/1.1.74
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload