|
|
@@ -7,6 +7,7 @@ import com.goafanti.common.enums.UserLevel;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.*;
|
|
|
import com.goafanti.common.utils.PasswordUtil;
|
|
|
+import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.ZoneId;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
import java.util.regex.Matcher;
|
|
|
@@ -65,7 +67,7 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
|
|
|
LocalDateTime now = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0);
|
|
|
LocalDateTime clueTime = null;
|
|
|
for (OutUserClueList e : list) {
|
|
|
- clueTime=e.getClueTransferTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDateTime();
|
|
|
+ clueTime=e.getClueTransferTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
clueTime = clueTime.withHour(0).withMinute(0).withSecond(0).plusDays(15);
|
|
|
long between = ChronoUnit.DAYS.between(now,clueTime);
|
|
|
e.setDays((int) between);
|
|
|
@@ -133,6 +135,12 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
|
|
|
un.setName(user.getNickname());
|
|
|
userNamesMapper.insertSelective(un);
|
|
|
// 新增企业联系人
|
|
|
+ iterContactBook(in,aname,uid);
|
|
|
+ addUserTransferLog(user,22,null);
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void iterContactBook(InputUserClueBo in, String aname, String uid) {
|
|
|
OrganizationContactBook cob = new OrganizationContactBook();
|
|
|
cob.setAid(TokenManager.getAdminId());
|
|
|
cob.setAname(aname);
|
|
|
@@ -142,8 +150,27 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
|
|
|
cob.setMobile(in.getContactMobile());
|
|
|
cob.setMajor(AFTConstants.YES);
|
|
|
organizationContactBookMapper.insert(cob);
|
|
|
- addUserTransferLog(user,22,null);
|
|
|
- return 1;
|
|
|
+ if (StringUtils.isNotBlank(in.getContactMobileMore())){
|
|
|
+ String[] split = null;
|
|
|
+ if (in.getContactMobileMore().contains(";")){
|
|
|
+ split = in.getContactMobileMore().split(";");
|
|
|
+ } else if (in.getContactMobileMore().contains(";")) {
|
|
|
+ split = in.getContactMobileMore().split(";");
|
|
|
+ }
|
|
|
+ for (String s : split) {
|
|
|
+ if (StringUtils.isNotBlank(s)) {
|
|
|
+ OrganizationContactBook cob2 = new OrganizationContactBook();
|
|
|
+ cob2.setAid(TokenManager.getAdminId());
|
|
|
+ cob2.setAname(aname);
|
|
|
+ cob2.setId(UUID.randomUUID().toString());
|
|
|
+ cob2.setUid(uid);
|
|
|
+ cob2.setName(in.getContacts());
|
|
|
+ cob2.setMobile(s);
|
|
|
+ cob2.setMajor(AFTConstants.NO);
|
|
|
+ organizationContactBookMapper.insert(cob2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -165,6 +192,7 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
|
|
|
inUserClueBo.setUserName(e.getNickname());
|
|
|
inUserClueBo.setContactMobile(e.getContactMobile());
|
|
|
inUserClueBo.setContacts(e.getContacts());
|
|
|
+ inUserClueBo.setContactMobileMore(e.getContactMobileMore());
|
|
|
try {
|
|
|
add(inUserClueBo);
|
|
|
}catch (Exception ex){
|