Просмотр исходного кода

修改最大领取数为读取配置文件

Signed-off-by: anderx <312518615@qq.com>
anderx лет назад: 5
Родитель
Сommit
43350cadc6

+ 6 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -94,6 +94,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	private OrganizationContactBookMapper organizationContactBookMapper;
 	@Resource(name = "passwordUtil")
 	private PasswordUtil	passwordUtil;
+	@Value(value = "${user.receive.max}")
+	private Integer USER_RECEIVE_MAX=null;
+	@Value(value = "${user.private.max}")
+	private Integer USER_PRIVATE_MAX=null;
 	@Resource
 	private UserFollowMapper userFollowMapper;
 	@Resource
@@ -950,8 +954,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			user.setTransferTime(now);
 			flag = addUserLock(uid,TokenManager.getAdminId(),0,null,now); //指定用户锁定客户
 			if(flag <= 0) throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_RECEIVE,""));
-			if(userMapper.UserReceiveCount(TokenManager.getAdminId())>AFTConstants.USER_RCEIVE_MAX)
-			throw new BusinessException(new Error(ErrorConstants.CUSTOM_EREXCESS,""+(AFTConstants.USER_RCEIVE_MAX+1),""));
+			if(userMapper.UserReceiveCount(TokenManager.getAdminId())>USER_RECEIVE_MAX)
+			throw new BusinessException(new Error(ErrorConstants.CUSTOM_EREXCESS,""+USER_RECEIVE_MAX,""));
 			organizationContactBookMapper.updateAdmin(uid,TokenManager.getAdminId());
 		}else if(operatorType.equals(AFTConstants.USER_TRANSFER_TO_OTHER)){
 			user.setAid(String.valueOf(params[0]));
@@ -1530,7 +1534,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	
 	@Override
 	public int updatePrivateBusinessTransfer(String inputId, String uid, String pid) {
-		Date now = new Date();
 		List<LockingReleaseBo> list=userLockReleaseMapper.checkUserProject(uid, pid,TokenManager.getAdminId());
 		if (list.isEmpty()) {
 			throw new BusinessException(new Error("客户归属错误","客户归属错误"));

+ 6 - 2
src/main/resources/props/config_local.properties

@@ -42,6 +42,8 @@ jdbc.filters=stat
 
 logging.level.com.goafanti=DEBUG
 
+
+
 jedis.host=localhost
 jedis.port=6379
 jedis.timeout=5000
@@ -56,16 +58,18 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
+user.receive.max=10
+user.private.max=1000
 
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-#static.host=//sb.jishutao.com/1.1.46
+#static.host=//sb.jishutao.com/1.1.48
 #avatar.host=//sb.jishutao.com
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.46
+static.host=//static.jishutao.com/1.1.48
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 3 - 0
src/main/resources/props/config_test.properties

@@ -54,6 +54,9 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
+user.receive.max=10
+user.private.max=1000
+
 static.host=//static.jishutao.com/1.1.48
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com