Commit 9140c971 authored by gaoyuan's avatar gaoyuan

4.9.3需求---bug修复

parent 61b9c208
...@@ -3081,6 +3081,14 @@ public class CustomerController extends BaseController { ...@@ -3081,6 +3081,14 @@ public class CustomerController extends BaseController {
showWord = showWord + showUser.getRealName(); showWord = showWord + showUser.getRealName();
} }
logShowList.add(showWord); logShowList.add(showWord);
}else if(p.getType() == 11){
//平台客户管理转移创建人
String showWord = showTime + " " + p.getCreateUserName() + " [转移线索]" + "给 ";
UserEntity showUser = user.getById(Integer.valueOf(p.getNewValue()));
if (null != showUser) {
showWord = showWord + showUser.getRealName();
}
logShowList.add(showWord);
} }
} }
......
...@@ -3132,30 +3132,56 @@ public class CustomerImpl implements ICustomer { ...@@ -3132,30 +3132,56 @@ public class CustomerImpl implements ICustomer {
@Override @Override
@Transactional @Transactional
public void batchTransferCreator(String[] customerIds, String[] userIds, UserEntity userEntity, int type) throws Exception { public void batchTransferCreator(String[] customerIds, String[] userIds, UserEntity userEntity, int type) throws Exception {
if(customerIds.length <= userIds.length){
for (int i = 0; i < customerIds.length; i++) {
String customer = customerIds[i];
String userId = userIds[i];
if (Strings.isNullOrEmpty( customer )) {
continue;
}
if (Strings.isNullOrEmpty( userId )) {
continue;
}
batchTransferCreator(userId,customer,userEntity);
}
}else {
for (int i = 0; i < customerIds.length; i++) { for (int i = 0; i < customerIds.length; i++) {
int j = 0;
String customer = customerIds[i]; String customer = customerIds[i];
String userId = ""; String userId = "";
int j = 0;
if (Strings.isNullOrEmpty( customer )) { if (Strings.isNullOrEmpty( customer )) {
continue; continue;
} }
CustomerEntity customerEntity = customerMapper.queryById( Integer.valueOf( customer ) ); if(i > userIds.length -1){
if(userIds.length < customerIds.length && i == (userIds.length - 1)){ if(j > userIds.length -1 ){
j=0;
}
userId = userIds[j]; userId = userIds[j];
j++; j++;
}else { }else {
userId = userIds[i]; userId = userIds[i];
} }
batchTransferCreator(userId,customer,userEntity);
}
}
}
/**
*
* @param userId
* @param customerId
*/
private void batchTransferCreator(String userId,String customerId,UserEntity userEntity){
CustomerEntity customerEntity = customerMapper.queryById( Integer.valueOf( customerId ) );
Map<String, Object> map = new HashMap<>( 10 ); Map<String, Object> map = new HashMap<>( 10 );
map.put( "creater" ,userId); map.put( "creater" ,userId);
map.put( "customerId",customer ); map.put( "customerId",customerId );
customerMapper.updatePtCustomerCreater( map ); customerMapper.updatePtCustomerCreater( map );
//记录日志 //记录日志
logUtils.saveCustomerLog2( customerEntity, 11, userEntity.getId(),userEntity.getRealName(),customerEntity.getCreater(),userId ); logUtils.saveCustomerLog2( customerEntity, 11, userEntity.getId(),userEntity.getRealName(),customerEntity.getCreater(),userId );
} }
}
/** /**
* 以下均为自动生成 * 以下均为自动生成
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment