Commit 9140c971 authored by gaoyuan's avatar gaoyuan

4.9.3需求---bug修复

parent 61b9c208
......@@ -3081,6 +3081,14 @@ public class CustomerController extends BaseController {
showWord = showWord + showUser.getRealName();
}
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 {
@Override
@Transactional
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++) {
int j = 0;
String customer = customerIds[i];
String userId = "";
int j = 0;
if (Strings.isNullOrEmpty( customer )) {
continue;
}
CustomerEntity customerEntity = customerMapper.queryById( Integer.valueOf( customer ) );
if(userIds.length < customerIds.length && i == (userIds.length - 1)){
if(i > userIds.length -1){
if(j > userIds.length -1 ){
j=0;
}
userId = userIds[j];
j++;
}else {
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.put( "creater" ,userId);
map.put( "customerId",customer );
map.put( "customerId",customerId );
customerMapper.updatePtCustomerCreater( map );
//记录日志
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