Browse Source

渠道列表新增简介

anderx 3 years ago
parent
commit
5a6bb900f8

+ 2 - 3
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -51,8 +51,8 @@ public class ReleaseUserTask {
 	 *
 	 * @throws InterruptedException
 	 */
-	@Scheduled(cron = "0 41 11  * * ?")
-//	@Scheduled(cron = "0 0 1  * * ?")
+//	@Scheduled(cron = "0 41 11  * * ?")
+	@Scheduled(cron = "0 0 1  * * ?")
 	public void startTask() {
 		try {
 			pushUserDays();
@@ -81,7 +81,6 @@ public class ReleaseUserTask {
 						String shareType="";
 						if(ub.getNewChannel()==0)shareType="私有";
 						else if(ub.getNewChannel()==1)shareType="渠道";
-
 						str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时%s!", shareType, ub.getName(),ub.getType()==0?"跟进":"签单");
 					}else {
 						str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时签单!", "外联", ub.getName());

+ 19 - 15
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -2371,21 +2371,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public int updateUserDate(String uid,Integer province, Integer city, Integer area, String businessScope, String intendedProject,String introduction) {
 		OrganizationIdentity oi =new OrganizationIdentity();
 		oi.setUid(uid);
-		oi.setLocationProvince(province);
-		oi.setLocationCity(city);
-		oi.setLocationArea(area);
-		 if (businessScope!=null){
-			 OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
-			updateBusinessScope(uid,businessScope,use.getBusinessScope(),new Date());
-		}
-		OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
-		oi.setBusinessScope(businessScope);
-		oi.setIntendedProject(intendedProject);
-		User user=new User();
-		user.setId(uid);
-		user.setIntroduction(introduction);
-		userMapper.updateByPrimaryKeySelective(user);
-		return organizationIdentityMapper.updateServiceByUid(oi);
+		if (province!=null ||city !=null ||area!=null|| businessScope!=null ||intendedProject!=null){
+			if(province!=null)oi.setLocationProvince(province);
+			if(city!=null)oi.setLocationCity(city);
+			if(area!=null)oi.setLocationArea(area);
+			if (businessScope!=null){
+				OrganizationIdentity use=organizationIdentityMapper.selectOrgIdentityByUserId(uid);
+				updateBusinessScope(uid,businessScope,use.getBusinessScope(),new Date());
+				oi.setBusinessScope(businessScope);
+			}
+			if(intendedProject!=null)oi.setIntendedProject(intendedProject);
+			organizationIdentityMapper.updateServiceByUid(oi);
+		}
+		if (introduction!=null){
+			User user=new User();
+			user.setId(uid);
+			user.setIntroduction(introduction);
+			userMapper.updateByPrimaryKeySelective(user);
+		}
+		return 1;
 	}
 
 	@Override