Kaynağa Gözat

Merge branch 'test'

anderx 4 yıl önce
ebeveyn
işleme
f17e9fce92

+ 10 - 0
.idea/artifacts/kede_server_war_exploded.xml

@@ -1,6 +1,13 @@
 <component name="ArtifactManager">
   <artifact type="exploded-war" build-on-make="true" name="kede-server:war exploded">
     <output-path>$PROJECT_DIR$/out</output-path>
+    <properties id="maven-jee-properties">
+      <options>
+        <exploded>true</exploded>
+        <module>kede-server</module>
+        <packaging>war</packaging>
+      </options>
+    </properties>
     <root id="root">
       <element id="directory" name="WEB-INF">
         <element id="directory" name="classes">
@@ -95,6 +102,9 @@
           <element id="library" level="project" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.7" />
         </element>
       </element>
+      <element id="directory" name="META-INF">
+        <element id="file-copy" path="$PROJECT_DIR$/target/kede-server-1.0.0-BUILD-SNAPSHOT/META-INF/MANIFEST.MF" />
+      </element>
       <element id="javaee-facet-resources" facet="kede-server/web/Web" />
     </root>
   </artifact>

+ 1 - 1
.idea/misc.xml

@@ -11,6 +11,6 @@
     </option>
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/target/classes" />
+    <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 1 - 8
src/main/java/com/goafanti/common/dao/UserLockReleaseMapper.java

@@ -82,7 +82,6 @@ public interface UserLockReleaseMapper {
 
 	/**
 	 * 重新锁定
-	 * @param oldAid
 	 * @param aid
 	 * @param uid
 	 * @return
@@ -110,19 +109,13 @@ public interface UserLockReleaseMapper {
 	List<LockingReleaseBo> checkTask(@Param("buyerId")String buyerId, @Param("commodityId")String commodityId);
 
 
-	void updateBatchReleaseProject(@Param("uids")List<String> uids, @Param("receiveId")String receiveId, @Param("aid")String aid);
-
-	void updateBatchlockProject(@Param("uid")List<String> uids, @Param("receiveId")String receiveId, @Param("aid")String aid);
-
 	int updatePrivateBusinessTransfer(@Param("inputId")String inputId, @Param("uid")String uid, @Param("pid")String pid,@Param("aid")String aid);
 
 	List<LockingReleaseBo> checkUserProject(@Param("uid")String uid, @Param("pid")String pid, @Param("aid")String aid);
 
 	List<userDaysBo> selectUserDays(@Param("aid")String aid, @Param("x")Integer x, @Param("y")Integer y);
 
-	int updateUserMid(@Param("uid")String uid, @Param("aid")String aid, @Param("followTime")Date followTime, @Param("lockTime")Date lockTime);
-	
-	int insertUserMid(@Param("uid")String uid, @Param("aid")String aid, @Param("followTime")Date followTime, @Param("lockTime")Date lockTime);
+
 
 	int insertList(List<UserLockRelease> ulrList);
 

+ 5 - 0
src/main/java/com/goafanti/common/dao/UserMidMapper.java

@@ -1,6 +1,9 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserMid;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface UserMidMapper {
     int deleteByPrimaryKey(Integer id);
@@ -16,4 +19,6 @@ public interface UserMidMapper {
     int updateByPrimaryKey(UserMid record);
 
     int updateByUid(UserMid um);
+
+    void updateListByUid(@Param("aid") String aid,@Param("updateFollow") Integer updateFollow, @Param("list")List<String> list);
 }

+ 2 - 2
src/main/java/com/goafanti/common/mapper/PermissionMapper.xml

@@ -247,7 +247,7 @@
   		from permission 		
   		where
   		hierarchies=1
-  		order by aut_no
+  		order by show_order
   </select>
   <select id="selectNameById" parameterType="java.lang.String" resultType="java.lang.String">
   		select
@@ -262,7 +262,7 @@
 		from permission
 		where
 		super_id=#{superId,jdbcType=VARCHAR}
-		order by aut_no
+		order by show_order
   </select>
   <select id="selectAutNoByNamei" resultType="java.lang.String">
 		select

+ 1 - 0
src/main/java/com/goafanti/common/mapper/UserDataLogMapper.xml

@@ -80,5 +80,6 @@
     date_format(create_time ,'%Y-%m-%d %H:%i:%s')createTimes
     from user_data_log
     where uid= #{uid}
+    order by create_time desc
   </select>
 </mapper>

+ 0 - 11
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -500,17 +500,6 @@
 	and datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t1.t0.lock_time)) &gt; #{days} 
   </select>
   
-  
-   <insert id="insertUserMid">
-  insert into user_mid (uid,aid,last_sign_time,last_follow_time,create_time)
-  values (#{uid},#{aid},#{lockTime},#{followTime},now())
-  </insert>
-  <update id="updateUserMid" >
-  update user_mid 
-  set last_sign_time=#{lockTime},last_follow_time=#{followTime}
-  where uid=#{uid} and aid=#{aid}
-  </update> 
-  
   <insert id="insertList" >
       insert into user_lock_release (id, type, uid, 
       aid, business_project_id, status, 

+ 14 - 10
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1769,9 +1769,9 @@
   </select>
   <select id="findMainProductsList" resultType="com.goafanti.customer.bo.OutUserMianProducts">
     select oi.id ,u.id uid, u.nickname userName, oi.business_scope businessScope,
-    um.update_name updateName,um.update_aid updateAid,
+    um.update_name updateName,um.update_aid updateAid,u.share_type shareType,
      <if test="shiroType ==2">
-     a.name adminName,d.name depName,u.share_type shareType,dg.name province,
+     a.name adminName,d.name depName,dg.name province,
      </if>
     date_format(u.transfer_time ,'%Y-%m-%d %H:%i:%s')transferTimes,
     date_format(um.date_update_time,'%Y-%m-%d %H:%i:%s')dateUpdateTimes
@@ -1786,7 +1786,7 @@
       left join admin a on u.aid=a.id left join department d on a.department_id =d.id
       left join district_glossory dg on oi.location_province =dg.id
     </if>
-    where u.share_type in (0, 2, 3) and u.source in(1,2,3)
+    where  u.`type` =1 and u.status=0
       <if test="shiroType==1">
       and u.information_maintainer = #{aid}
       </if>
@@ -1797,9 +1797,10 @@
     <if test="depId !=null">
       and d.id= #{depId}
     </if>
-      <if test="shareType !=null">
-        and u.share_type = #{shareType}
-      </if>
+
+    </if>
+    <if test="shareType !=null">
+      and u.share_type = #{shareType}
     </if>
       <if test="userName != null">
     and u.nickname like concat('%',#{userName},'%')
@@ -1823,9 +1824,11 @@
   </if>
   left join organization_identity oi on u.id = oi.uid
     <if test="shiroType==2">
+      <if test="adminName !=null or depId !=null">
       left join admin a on u.aid=a.id left join department d on a.department_id =d.id
+      </if>
     </if>
-  where u.share_type in (0, 2, 3) and u.source in(1,2,3)
+  where  u.`type` =1 and u.status=0
     <if test="shiroType==1">
       and u.information_maintainer = #{aid}
     </if>
@@ -1836,9 +1839,10 @@
       <if test="depId !=null">
         and d.id= #{depId}
       </if>
-      <if test="shareType !=null">
-        and u.share_type = #{shareType}
-      </if>
+
+    </if>
+    <if test="shareType !=null">
+      and u.share_type = #{shareType}
     </if>
     <if test="userName != null">
       and u.nickname like concat('%',#{userName},'%')

+ 4 - 3
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -1589,7 +1589,7 @@
 			<if test="follow !=null and follow!=''">
 			left join (select aid,uid,contact_type from user_follow where aid= #{aid,jdbcType=VARCHAR} and contact_type=0 GROUP by uid) e on a.id=e.uid and a.aid=e.aid
 			</if>
-			where  a.status=0
+			where  a.status=0  and a.`type` =1
 			and a.information_maintainer = #{aid,jdbcType=VARCHAR}
 			<if test="type !=null and type!=''">
 			and a.`type`=#{type,jdbcType=VARCHAR}
@@ -1636,13 +1636,14 @@
    		 </if>
 	</select>
 	<select id="selectCustomerInformationCount" resultType="java.lang.Integer">
-		select count(0)
+		select count(*)
 			from user a left join organization_identity b
 			on a.id=b.uid
 			<if test="follow  !=null and follow!=''">
 			left join (select aid,uid,contact_type from user_follow where aid= #{aid,jdbcType=VARCHAR} and contact_type=0 GROUP by uid) e on a.id=e.uid and a.aid=e.aid
 			</if>
-			where  a.status=0 and a.information_maintainer = #{aid,jdbcType=VARCHAR}
+			where  a.status=0 and a.`type` =1
+			  and a.information_maintainer = #{aid,jdbcType=VARCHAR}
 			<if test="type !=null and type!=''">
 			and a.`type`=#{type,jdbcType=VARCHAR}
 			</if>

+ 35 - 0
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -174,4 +174,39 @@
     </set>
     where `uid` = #{uid,jdbcType=VARCHAR}
   </update>
+
+
+  <update id="updateListByUid" parameterType="com.goafanti.common.model.UserMid">
+    update user_mid
+    <set>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateFollow ==1">
+        last_follow_time = null,
+      </if>
+      <if test="lastSignTime != null">
+        last_sign_time = #{lastSignTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bigCustomer != null">
+        big_customer = #{bigCustomer,jdbcType=INTEGER},
+      </if>
+      <if test="updateAid != null">
+        update_aid = #{updateAid,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        update_name = #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="dateUpdateTime != null">
+        date_update_time = #{dateUpdateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where `uid` in
+    <foreach item="item" collection="list" separator="," open="(" close=")" index="">
+      #{item}
+    </foreach>
+  </update>
 </mapper>

+ 54 - 56
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -170,7 +170,6 @@ public class NewExcelUtil<T> {
 	 * 	导出CXCEL表到指定目录
 	 * @param list 导出数据集合
 	 * @param sheetName 工作表的名称
-	 * @param response
 	 */
 	public Result exportExcel(List<T> list, String sheetName, String uploadPath) {
 		this.init(list, sheetName);
@@ -180,37 +179,36 @@ public class NewExcelUtil<T> {
 
 	private void exportExcel(HttpServletResponse response) {
 		try {
-			OutputStream out = response.getOutputStream();
-			// 取出一共有多少个sheet.
-			int sheetNo = (int) Math.ceil(list.size() / sheetSize);
-			
-			String dateFilename =DateFilename(sheetName);
-			for (int index = 0; index <= sheetNo; index++) {
-				createSheet(sheetNo, index);
-				// 产生一行
-				Row title = sheet.createRow(0);
-				Cell cell = title.createCell(0);
-				cell.setCellValue(sheetName);
-				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
-				sheet.addMergedRegion(region);
-				cell.setCellStyle(styles.get("total"));
-				Row row = sheet.createRow(1);
-				int column = 0;
-				// 写入各个字段的列头名称
-				for (Object[] os : fields) {
-					Excel excel = (Excel) os[1];
-					this.createCell(excel, row, column++);
+				OutputStream out = response.getOutputStream();
+				// 取出一共有多少个sheet.
+				int sheetNo = (int) Math.ceil(list.size() / sheetSize);
+				String dateFilename =DateFilename(sheetName);
+				for (int index = 0; index <= sheetNo; index++) {
+					createSheet(sheetNo, index);
+					// 产生一行
+					Row title = sheet.createRow(0);
+					Cell cell = title.createCell(0);
+					cell.setCellValue(sheetName);
+					CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
+					sheet.addMergedRegion(region);
+					cell.setCellStyle(styles.get("total"));
+					Row row = sheet.createRow(1);
+					int column = 0;
+					// 写入各个字段的列头名称
+					for (Object[] os : fields) {
+						Excel excel = (Excel) os[1];
+						this.createCell(excel, row, column++);
+					}
+					fillExcelData(index, row);
+					addStatisticsRow();
 				}
-				fillExcelData(index, row);
-				addStatisticsRow();
-			}
-			response.addHeader("Content-Disposition", "attachment;filename="  + new String(dateFilename.getBytes(),"iso-8859-1"));  
-			response.setContentType("application/octet-stream;charset=utf-8");  
-			wb.write(out);
-			out.flush();
-			out.close();
+				response.addHeader("Content-Disposition", "attachment;filename="  + new String(dateFilename.getBytes(),"iso-8859-1"));
+				response.setContentType("application/octet-stream;charset=utf-8");
+				wb.write(out);
+				out.flush();
+				out.close();
 		} catch (Exception e) {
-			log.error("导出Excel异常{}", e.getMessage());
+			e.printStackTrace();
 			throw new BusinessException("导出Excel失败,请联系网站管理员!");
 		} finally {
 			if (wb != null) {
@@ -249,36 +247,37 @@ public class NewExcelUtil<T> {
 	 */
 	public Result exportExcel() {
 		OutputStream out = null;
+		String filename="";
 		try {
-			// 取出一共有多少个sheet.
-			int sheetNo = (int) Math.ceil(list.size() / sheetSize);
-			for (int index = 0; index <= sheetNo; index++) {
-				createSheet(sheetNo, index);
-				// 产生一行
-				Row title = sheet.createRow(0);
-				Cell cell = title.createCell(0);
-				cell.setCellValue(sheetName);
-				CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
-				sheet.addMergedRegion(region);
-				cell.setCellStyle(styles.get("total"));
-				Row row = sheet.createRow(1);
-				// 产生一行
-				int column = 0;
-				// 写入各个字段的列头名称
-				for (Object[] os : fields) {
-					Excel excel = (Excel) os[1];
-					this.createCell(excel, row, column++);
+				// 取出一共有多少个sheet.
+				int sheetNo = (int) Math.ceil(list.size() / sheetSize);
+				for (int index = 0; index <= sheetNo; index++) {
+					createSheet(sheetNo, index);
+					// 产生一行
+					Row title = sheet.createRow(0);
+					Cell cell = title.createCell(0);
+					cell.setCellValue(sheetName);
+					CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
+					sheet.addMergedRegion(region);
+					cell.setCellStyle(styles.get("total"));
+					Row row = sheet.createRow(1);
+					// 产生一行
+					int column = 0;
+					// 写入各个字段的列头名称
+					for (Object[] os : fields) {
+						Excel excel = (Excel) os[1];
+						this.createCell(excel, row, column++);
+					}
+					filename = encodingFilename(sheetName);
+					out = new FileOutputStream(getAbsoluteFile(filename));
+					fillExcelData(index, row);
+					addStatisticsRow();
 				}
+				wb.write(out);
 
-				fillExcelData(index, row);
-				addStatisticsRow();
-			}
-			String filename = encodingFilename(sheetName);
-			out = new FileOutputStream(getAbsoluteFile(filename));
-			wb.write(out);
 			return new Result().data(filename);
 		} catch (Exception e) {
-			log.error("导出Excel异常{}", e.getMessage());
+			e.printStackTrace();
 			throw new BusinessException("导出Excel失败,请联系网站管理员!");
 		} finally {
 			if (wb != null) {
@@ -1021,7 +1020,6 @@ public class NewExcelUtil<T> {
 	/**
 	 * 读取文件为字节数据
 	 * 
-	 * @param key 地址
 	 * @return 字节数据
 	 */
 	public static byte[] readFile(String url) {

+ 1 - 1
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -809,7 +809,7 @@ public class AdminCustomerApiController extends BaseApiController{
 			return res;
 		}
 		if(data==null)data=0;
-		if(data==1&&customerService.checkData(uid,aid)){
+		if(data==1&&customerService.checkData(uid,oldAid)){
 			res.getError().add(buildError("","资料归属不正确,无法转交客户资料。"));
 			return res;
 		}

+ 52 - 27
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -653,8 +653,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		int followCount = userBusinessMapper.selectFollowCountByUAid(fbb.getUid(), null) + 1;
 		userFollow.setFollowCount(followCount);
 		userFollowMapper.insert(userFollow);
-		// 判断是跟进还是签单
-		int x = 0;
 		// 检查客户锁定情况
 		if (fbb.getUserBusinessList()!=null&&fbb.getUserBusinessList().size() > 0) {
 			boolean isUserOwner = false;
@@ -780,7 +778,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 			}
 		}
-		followProject(fbb.getUid(), x);
+		followProject(fbb.getUid());
 		return 1;
 	}
 
@@ -788,19 +786,17 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	 * 跟进更新用户中间表
 	 * 
 	 */
-	private void followProject(String uid, int x) {
+	private void followProject(String uid) {
 		Date date = new Date();
 		String aid = TokenManager.getAdminId();
-		if (x == 0) {
-			if (userLockReleaseMapper.updateUserMid(uid, aid, date, null) < 1) {
-				userLockReleaseMapper.insertUserMid(uid, aid, date, null);
-			}
-		} else {
-			if (userLockReleaseMapper.updateUserMid(uid, aid, date, date) < 1) {
-				userLockReleaseMapper.insertUserMid(uid, aid, date, date);
-			}
+		UserMid um=new UserMid();
+		um.setUid(uid);
+		um.setAid(aid);
+		um.setLastFollowTime(date);
+		int x=userMidMapper.updateByUid(um);
+		if (x==0){
+			userMidMapper.insertSelective(um);
 		}
-
 	}
 
 	@SuppressWarnings("unused")
@@ -1126,6 +1122,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public int updateByOperatorType(String uid,String aid, String oldAid, Integer operatorType,Integer data) {
 		User user = new User();
 		Date now = new Date();
+		if(aid==null)aid=TokenManager.getAdminId();
 		if(data==null)data=0;
 		// 是否多个客户
 		boolean isUs = false;
@@ -1151,6 +1148,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			addUserTransferLog(uid, TokenManager.getAdminId(), null,1, null, now, uList);
 			if (flag <= 0)
 				throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_RECEIVE, ""));
+			updateUserMid(aid,uid,0,null);
 			//转交
 		} else if (AFTConstants.USER_TRANSFER_TO_OTHER.equals(operatorType)
 				|| AFTConstants.SIGN_USER_TRANSFER_TO_OTHER == operatorType) {
@@ -1171,7 +1169,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 					if (flag <= 0)
 						throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL, ""));
 				}
-
+				updateUserMid(aid,uid,0,null);
 			} else {
 				for (String us : uList) {
 					if (userMapper.getAidAndUser(us, TokenManager.getAdminId()) <= 0)
@@ -1180,8 +1178,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				if (AFTConstants.USER_TRANSFER_TO_OTHER == operatorType) {
 					flag = updateUsersLock(uList, oldAid, UserLockReleaseStatus.LOCKED.getCode(),
 							UserLockReleaseStatus.RELEASE.getCode()); // 原用户释放客户
-					if (flag > 0)
+					if (flag > 0){
 						flag = addUserLock(uid, aid, now, uList); // 指定用户锁定客户
+
+					}
 					if (flag <= 0)
 						throw new BusinessException(new Error(ErrorConstants.CUSTOMER_TRANSFER_FAIL, ""));
 				}
@@ -1191,6 +1191,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 			addUserTransferLog(uid, aid,oldAid, type, null, now, uList);
 		}
+
+
 		if (isUs) {
 			if (AFTConstants.USER_RECEIVE == operatorType) {
 				userMapper.updateList(aid, null, 3, null, 2, uList,null);
@@ -1204,6 +1206,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	}
 
 	/**
+	 * 处理中间表
+	 * @param aid
+	 * @param uid
+	 * @param type 0单个 1批量
+	 */
+	private void updateUserMid(String aid, String uid,Integer type,List<String> list){
+		if (type==0){
+			UserMid um=new UserMid();
+			um.setAid(aid);
+			um.setUid(uid);
+			um.setLastFollowTime(null);
+			userMidMapper.updateByUid(um);
+		}else{
+			if (!list.isEmpty())userMidMapper.updateListByUid(aid,1,list);
+		}
+
+	}
+
+	/**
 	 * 
 	 * @param uid      客户id
 	 * @param aid      接受者id
@@ -2263,10 +2284,10 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		if(in.getStartTime()!=null)map.put("startTime",in.getStartTime());
 		if(in.getEndTime()!=null)map.put("endTime",in.getEndTime()+" 23:59:59");
 		if(in.getShiroType()==null){in.setShiroType(0);}
+		if(in.getShareType()!=null)map.put("shareType",in.getShareType());
 		else if(in.getShiroType()==2){
 			if(in.getAdminName()!=null)map.put("adminName",in.getAdminName());
 			if(in.getDepId()!=null)map.put("depId",in.getDepId());
-			if(in.getShareType()!=null)map.put("shareType",in.getShareType());
 		}
 		map.put("shiroType",in.getShiroType());
 		return (Pagination<OutUserMianProducts>) findPage("findMainProductsList","findMainProductsCount",map,in.getPageNo(),in.getPageSize());
@@ -2281,21 +2302,25 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public int updateuserBusinessScope(String id, String businessScope) {
 		Date date =new Date();
 		OrganizationIdentity use=organizationIdentityMapper.selectByPrimaryKey(id);
-		updateBusinessScope(use.getUid(),businessScope,use.getBusinessScope(),date);
-		OrganizationIdentity oi=new OrganizationIdentity();
-		oi.setId(id);
-		oi.setBusinessScope(businessScope);
-		return organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		if(!businessScope.equals(use.getBusinessScope())){
+			updateBusinessScope(use.getUid(),businessScope,use.getBusinessScope(),date);
+			OrganizationIdentity oi=new OrganizationIdentity();
+			oi.setId(id);
+			oi.setBusinessScope(businessScope);
+			return organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		}
+		return 0;
 	}
 
 	@Override
 	public boolean checkData(String uid, String aid) {
-		User u=userMapper.selectByPrimaryKey(uid);
-		if (u.getInformationMaintainer().equals(aid)){
-			return true;
+		List<String> list=Arrays.asList(uid.split(","));
+		for (String s : list) {
+			User u=userMapper.selectByPrimaryKey(s);
+			if (u.getInformationMaintainer().equals(aid)){
+				return true;
+			}
 		}
-		return false;
+	return false;
 	}
-
-
 }

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -411,6 +411,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			if(t.getTotalAmount().compareTo(new BigDecimal("10"))>=0) {
 				UserMid um=new UserMid();
 				um.setUid(t.getBuyerId());
+				um.setAid(t2.getSalesmanId());
 				um.setBigCustomer(1);
 				int i=userMidMapper.updateByUid(um);
 				if (i==0) {

+ 0 - 1
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -558,7 +558,6 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		return null;
 	}
 
-	@SuppressWarnings("unchecked")
 	@Override
 	public Object export(PatentNewBo p, Integer pageSize, Integer pageNo) {
 		NewExcelUtil<PatentNewBo> excel=new NewExcelUtil<PatentNewBo>(PatentNewBo.class);

+ 7 - 31
src/main/resources/props/config_local.properties

@@ -1,46 +1,27 @@
 dev.name=local
-#Driver
+
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#本地
-jdbc.url=jdbc\:mysql://localhost:3306/aft?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.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
-#jdbc.password=aftdev
-#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
+#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'
-#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 jdbc.maxIdle=20
-#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
-#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
-
 logging.level.com.goafanti=DEBUG
 
 jedis.host=localhost
@@ -48,6 +29,7 @@ jedis.port=6379
 jedis.timeout=5000
 jedis.password=aft123456
 #jedis.password=hqa103146
+
 pwd.hash_algorithm_name=md5
 pwd.hash_iterations=2
 
@@ -56,19 +38,15 @@ session.validate.timespan=18000000
 
 app.name=AFT
 template.cacheable=false
-#最大领取客户
 user.receive.max=10
 user.private.max=1000
-#客户提醒剩余天数
 user_remind_days=15
 
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
-#连接开发
 #static.host=//172.16.0.253/1.1.83
 #avatar.host=//172.16.0.253
 
-
 avatar.host=//static.jishutao.com
 static.host=//static.jishutao.com/1.1.86
 
@@ -78,8 +56,6 @@ wx.appSecret=081744369d42405be58fe37f892631f7
 wx.state=trial
 wx.clockInRange=1000
 
-
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload
 

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

@@ -1,42 +1,23 @@
 dev.name=test
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
 jdbc.url=jdbc:mysql://127.0.0.1:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#\u5e10\u53f7
 jdbc.username=root
-#\u5bc6\u7801
 jdbc.password=aftdev
-#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
-#\u521d\u59cb\u8fde\u63a5\u6570
 jdbc.initialSize=3
-#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
 jdbc.maxActive=20
-#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
 #jdbc.maxIdle=20
-#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
 jdbc.minIdle=0
-#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
 jdbc.maxWait=120000
-#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
 jdbc.testOnBorrow=false
-#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
 jdbc.testOnReturn=false
-#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
 jdbc.testWhileIdle=true
-#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
-#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
 jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
 jdbc.minEvictableIdleTimeMillis=300000
-#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
 jdbc.removeAbandoned=true
-#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
 jdbc.removeAbandonedTimeout=300
-#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
 jdbc.logAbandoned=true
-#\u7edf\u8ba1\u76d1\u63a7
 jdbc.filters=stat
 
 logging.level.com.goafanti=DEBUG