|
|
@@ -86,6 +86,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
//创建一个对象,用来存储数据
|
|
|
List<InputUserChannel> list=new ArrayList<>();
|
|
|
List<InputUserChannel> list2=new ArrayList<>();
|
|
|
+ List<InputUserChannel> list3=new ArrayList<>();
|
|
|
String aid=TokenManager.getAdminId();
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
now.set(Calendar.MILLISECOND, 0);
|
|
|
@@ -95,7 +96,6 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
if(sheet == null){
|
|
|
return null;
|
|
|
}
|
|
|
-
|
|
|
//获得当前sheet的开始行
|
|
|
int firstRowNum = sheet.getFirstRowNum();
|
|
|
//获得当前sheet的结束行
|
|
|
@@ -183,9 +183,16 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
in.setPassword(passwordUtil.getEncryptPwd("123456", now.getTime()));
|
|
|
User u=userMapper.selectByName(in.getUserName());
|
|
|
if (u==null) {
|
|
|
- in.setStatus(ChannelStatus.WFP.getCode());
|
|
|
in.setUid(uid);
|
|
|
- list.add(in);
|
|
|
+ if (checkUserName(in.getUserName())) {
|
|
|
+ in.setStatus(ChannelStatus.FFMC.getCode());
|
|
|
+ in.setUserStatus(1);
|
|
|
+ list3.add(in);
|
|
|
+ }else {
|
|
|
+ in.setUserStatus(0);
|
|
|
+ in.setStatus(ChannelStatus.WFP.getCode());
|
|
|
+ list.add(in);
|
|
|
+ }
|
|
|
}else {
|
|
|
// 共享类型 0-私有 1-公共 2 签单
|
|
|
if(u.getShareType()==0)in.setStatus(ChannelStatus.YCZSY.getCode());
|
|
|
@@ -195,6 +202,7 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
list2.add(in);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
for (InputUserChannel in : list) {
|
|
|
@@ -216,17 +224,31 @@ public class UserChannelServiceImpl extends BaseMybatisDao<UserChannelMapper> im
|
|
|
userChannelMapper.insertBatch(list);
|
|
|
userTransferLogMapper.insertBatch(list);
|
|
|
}
|
|
|
- if(list2.isEmpty()) {
|
|
|
+ if(list2.isEmpty()&&list3.isEmpty()) {
|
|
|
return 1;
|
|
|
}else {
|
|
|
+ userMapper.insertBatch(list3);
|
|
|
+ organizationIdentityMapper.insertBatch(list3);
|
|
|
+ organizationContactBookMapper.insertBatch(list3);
|
|
|
+ list2.addAll(list3);
|
|
|
userChannelMapper.insertBatch(list2);
|
|
|
- return getErorrList(1,10);
|
|
|
+ return getErorrList(1,10);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ private boolean checkUserName(String userName) {
|
|
|
+ if (userName.contains("房地产")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private String getCityId(List<CityBo> cList, String cellValue) {
|
|
|
for (CityBo cityBo : cList) {
|
|
|
if (cityBo.getName().contains(cellValue)) {
|