|  | @ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
	
		
			
				|  |  | import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | import org.springframework.util.StringUtils;
 | 
	
		
			
				|  |  | import sun.misc.Unsafe;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.util.*;
 | 
	
		
			
				|  |  | import java.util.logging.Logger;
 | 
	
	
		
			
				|  | @ -125,22 +126,27 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
 | 
	
		
			
				|  |  |                         "\tCASE \n" +
 | 
	
		
			
				|  |  |                         "WHEN del=1 THEN\n" +
 | 
	
		
			
				|  |  |                         "\t'有效'\n" +
 | 
	
		
			
				|  |  |                         "WHEN del=0 THEN\n" +
 | 
	
		
			
				|  |  |                         "\t'失效'\n" +
 | 
	
		
			
				|  |  |                         "ELSE\n" +
 | 
	
		
			
				|  |  |                         "\t'失效'\n" +
 | 
	
		
			
				|  |  |                         "END AS \"del\",\n" +
 | 
	
		
			
				|  |  |                         " province_name || city_name || town_name || address AS \"address\"\n" +
 | 
	
		
			
				|  |  |                         " province_name AS \"provinceName\"," +
 | 
	
		
			
				|  |  |                         " city_name AS \"cityName\" ," +
 | 
	
		
			
				|  |  |                         "town_name AS \"townName\"," +
 | 
	
		
			
				|  |  |                         "address AS \"address\"\n" +
 | 
	
		
			
				|  |  |                         "FROM\n" +
 | 
	
		
			
				|  |  |                         "\tbase_org\n" +
 | 
	
		
			
				|  |  |                         "WHERE\n" +
 | 
	
		
			
				|  |  |                         "\t(\n" +
 | 
	
		
			
				|  |  |                         "\t\t(code LIKE '%%' OR '' = '%%')\n" +
 | 
	
		
			
				|  |  |                         "\t\tAND (del = '' OR '' = '')\n" +
 | 
	
		
			
				|  |  |                         "\t\t(code like '{code}' OR '' =  '{code}')\n" +
 | 
	
		
			
				|  |  |                         "\t\tAND (del = '{orgStatus}' OR '' = '{orgStatus}')\n" +
 | 
	
		
			
				|  |  |                         "\t)\n" +
 | 
	
		
			
				|  |  |                         "OR (\n" +
 | 
	
		
			
				|  |  |                         "\t(NAME LIKE '%%' OR '' = '%%')\n" +
 | 
	
		
			
				|  |  |                         "\tAND (del = '' OR '' = '')\n" +
 | 
	
		
			
				|  |  |                         "\t(NAME LIKE '{name}' OR '' = '{name}')\n" +
 | 
	
		
			
				|  |  |                         "\tAND (del ='{orgStatus}' OR '' = '{orgStatus}')\n" +
 | 
	
		
			
				|  |  |                         ")\n" +
 | 
	
		
			
				|  |  |                         "AND (del = '' OR '' = '')\n" +
 | 
	
		
			
				|  |  |                         "AND (del = '{orgStatus}' OR '' = '{orgStatus}')\n" +
 | 
	
		
			
				|  |  |                         "ORDER BY\n" +
 | 
	
		
			
				|  |  |                         "\tcreate_time DESC";
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -152,7 +158,6 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<Map<String, Object>> list=null;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
 | 
	
		
			
				|  |  |             if (flag){
 | 
	
		
			
				|  |  |                 finalSql+=" LIMIT  " + (page - 1) * size + "," + size + "";
 |