Browse Source

渠道列表BUG修复

anderx 3 years ago
parent
commit
fb13dcf800

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

@@ -2464,11 +2464,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	 * @param params
 	 */
 	private void addParams(InputChannelListBo in, Map<String, Object> params) {
-		if(!TokenManager.hasRole(AFTConstants.SUPERADMIN)){
-			if (null!= in.getAid()) params.put("aid", in.getAid());
-		}else if (TokenManager.hasRole(AFTConstants.SALESMAN)){
-			params.put("aid", TokenManager.getAdminId());
-		}
 		if (StringUtils.isNotBlank(in.getName())) params.put("name", in.getName());
 		if (StringUtils.isNotBlank(in.getStartDate())) params.put("startDate", in.getStartDate());
 		if (StringUtils.isNotBlank(in.getEndDate())) params.put("endDate", in.getEndDate()+" 23:59:59");
@@ -2476,7 +2471,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if (null!= in.getArea()) params.put("area", in.getArea());
 		if (null!= in.getCity()) params.put("city", in.getCity());
 		if (null!= in.getType()) params.put("type", in.getType());
-		if (null!= in.getShareType()) params.put("shareType", in.getShareType());
+		if (null!= in.getShareType()) {
+			params.put("shareType", in.getShareType());
+			if(!TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+				if (in.getShareType()==0){
+					params.put("aid", TokenManager.getAdminId());
+				}
+			}else{
+				if (null != in.getAid())params.put("aid", in.getAid());
+			}
+		}
 		if (null != in.getNewChannel())params.put("newChannel", in.getNewChannel());
 
 	}

+ 5 - 5
src/main/resources/props/config_local.properties

@@ -1,12 +1,12 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
-jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20220318?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-jdbc.username=root
-jdbc.password=123456
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
-#jdbc.password=aftdev
+#jdbc.password=123456
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20