lihui001 преди 3 години
родител
ревизия
942390a60d

+ 1 - 1
user_center/src/main/java/com/zcxk/config/ResourceServerConfig.java

@@ -18,7 +18,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                 .authorizeRequests()
                 .antMatchers("/swagger-ui.html","/webjars/**", "/webjars/**", "/swagger-resources/**",
                        "/user/findUserIdsByPermissonOrg","/user/findAllUserList", "/user/findUserIdsByUserIds","/verManage/selectVer",
-                       "/v2/**")
+                       "/v2/**","/dict/selectListByPCodes")
                 .permitAll() //配置不需要身份认证的请求路径
                 .anyRequest().authenticated() //其他所有访问路径都需要身份认证
                 .and()

+ 1 - 0
user_center/src/main/java/com/zcxk/controller/OrgController.java

@@ -171,4 +171,5 @@ public class OrgController {
     public List<OrgBaseTreeInfoDto> getCompanyByUser(@RequestParam(value = "condition" ,required =  false) String condition,@RequestBody List<Integer> companyIds ) {
         return orgService.getCompanyByUser(condition,companyIds);
     }
+
 }

+ 1 - 0
user_center/src/main/java/com/zcxk/service/impl/OrgServiceImpl.java

@@ -1,6 +1,7 @@
 package com.zcxk.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.api.R;
 import com.zcxk.dao.OrgMapper;
 import com.zcxk.dto.OrgBaseTreeInfoDto;
 import com.zcxk.dto.OrgTree;

+ 1 - 1
user_center/src/main/resources/application-dev.properties

@@ -39,7 +39,7 @@ spring.redis.lettuce.shutdown-timeout=100
 security.oauth2.client.client-id=smart-city-v2
 security.oauth2.client.client-secret=smart-city-v2-123
 security.oauth2.resource.id=smartcity-deivice-service
-security.oauth2.resource.user-info-uri=http://localhost:8321/user/principal
+security.oauth2.resource.user-info-uri=http://10.0.0.62:8321/user/principal
 security.oauth2.resource.prefer-token-info=false
 
 

+ 3 - 2
user_center/src/main/resources/mapper/OrgMapper.xml

@@ -327,7 +327,8 @@
         where p.`STATUS` = 1
         and p.ORG_TYPE = 'company'
         and p.TENANT_ID = #{tenantId}
-        and (1>2
+
+        <if test="(condition != null and condition != '') or (companyIds != null and companyIds.size() > 0)">and ( 1 > 2</if>
         <if test="condition != null and condition != ''">
             or p.org_name like concat('%', #{condition},'%')
         </if>
@@ -337,7 +338,7 @@
                 #{item}
             </foreach>
         </if>
-        )
+        <if test="(condition != null and condition != '') or (companyIds != null and companyIds.size() > 0)">)</if>
         <if test="userType!=null and userType!=-999 and userType!=-9999 and  programItems != null and programItems.size() > 0">
             and p.id in
             <foreach collection="programItems" item="item" open="(" close=")" separator=",">