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

Merge remote-tracking branch 'origin/test' into dev

anderx лет назад: 5
Родитель
Сommit
015cfc12c0

+ 10 - 0
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -342,7 +342,12 @@
 		left join district_glossory dg3 on b.location_area = dg3.id
 		left join admin d on a.aid = d.id 
 		where a.type = 1 and a.status != 1
+	<if test="role == 0">
 		and a.identify_name = #{name}
+	</if>
+	<if test="role == 1">
+		and a.identify_name like concat('%', #{name},'%')
+	</if>	
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
@@ -379,7 +384,12 @@
 		where department_id=#{departmentId,jdbcType=VARCHAR}) d on a.aid = d.id
 		</if>
 		where a.type = 1 and a.status != 1
+		<if test="role == 0">
 		and a.identify_name = #{name}
+	</if>
+	<if test="role == 1">
+		and a.identify_name like concat('%', #{name},'%')
+	</if>
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>

+ 3 - 3
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -97,7 +97,7 @@ public class PatentTask {
 						n.setContent(str2+",aid="+p.getAid());
 						nlist.add(n);
 							continue;
-					 }else if (!SendEmailUtil.isEmail(p.getEmail())) {
+					 }else if (!SendEmailUtil.isEmail(p.getEmail().trim())) {
 						n.setContent(str2+",管理员="+a.getName());
 						nlist.add(n);
 						//再发一条给管理员
@@ -227,8 +227,8 @@ public class PatentTask {
 	}
 	
 	
-
-		
+	
+	
 	/**
          * @param htmlStr
          * @return

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

@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import com.alibaba.druid.sql.ast.statement.SQLIfStatement.Else;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
@@ -192,6 +193,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public Pagination<CustomerListOut> listAllOrganizationCustomer(CustomerListIn cli, Integer pageNo,Integer pageSize) {
 		cli.setType(AFTConstants.USER_TYPE_ORGANIZATION);
 		Map<String,Object> params = disposeParams(cli);
+		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			params.put("role", 1);
+		}else {
+			params.put("role", 0);
+		}
+		
 		Pagination<CustomerListOut> p=(Pagination<CustomerListOut>) findPage("selectOrganizationCustomerList","selectOrganizationCustomerCount",params,pageNo,pageSize);
 		List<CustomerListOut> l=(List<CustomerListOut>) p.getList();
 		for (CustomerListOut c : l) {
@@ -1533,11 +1540,14 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		LockingReleaseBo l=list.get(0);
 		UserLockRelease ul=new UserLockRelease();
 		ul.setId(l.getId());
-		ul.setStatus(2);
-		ul.setReleaseTime(now);
+//		不做释放与锁定的动作
+//		ul.setStatus(2);
+		ul.setAid(inputId);
+//		不修改时间
+//		ul.setReleaseTime(now);
 		userLockReleaseMapper.updateByPrimaryKeySelective(ul);
 		addtransferLog(uid,pid,TokenManager.getAdminId(),inputId,1);
-		addUserLock(uid,inputId,1,pid,now); //指定用户锁定客户
+//		addUserLock(uid,inputId,1,pid,now); //指定用户锁定客户
 		List<BusinessListBo> bl=userBusinessMapper.selectBusinessProjectByUAPid(uid, TokenManager.getAdminId(), pid);
 		if (bl.size()==1) {
 			UserBusiness ub=new UserBusiness();

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/1.1.46
+static.host=//static.jishutao.com/1.1.47
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload