瀏覽代碼

Merge remote-tracking branch 'origin/master'

wangyangyang 4 年之前
父節點
當前提交
3f93229604

+ 2 - 1
operation_manager/src/main/java/com/huaxu/config/ResourceServerConfig.java

@@ -19,9 +19,10 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                 .antMatchers("/swagger-ui.html","/webjars/**", "/webjars/**", "/swagger-resources/**",
                        "/webSocket/**","/message/sendToOne","/messageTemplate/**","/messageType/**",
                         "/order/workOrderManage/saveByAlarms",
+                        "/workflow/process/image*",
                         "/v2/**")
                 .permitAll() //配置不需要身份认证的请求路径
-               // .anyRequest().authenticated() //其他所有访问路径都需要身份认证
+                .anyRequest().authenticated() //其他所有访问路径都需要身份认证
                 .and()
                 .httpBasic();
     }

+ 1 - 1
operation_manager/src/main/java/com/huaxu/process/service/impl/WorkFlowServiceImpl.java

@@ -149,7 +149,7 @@ public class WorkFlowServiceImpl implements WorkFlowService {
     public IPage<ProcessDefinitionDTO> selectPage(ProcessDefinition processDefinition, IPage<ProcessDefinitionDTO> iPage) {
         LoginUser loginUser = UserUtil.getCurrentUser();
         processDefinition.setTenantId(loginUser.getTenantId());
-        processDefinition.setCompanyOrgId(loginUser.getCompanyId());
+        //processDefinition.setCompanyOrgId(loginUser.getCompanyId());
         IPage<ProcessDefinitionDTO> processDefinitionDTOIPage = processDefinitionMapper.selectPage(iPage, processDefinition);
         return processDefinitionDTOIPage;
     }

+ 5 - 1
operation_manager/src/main/resources/application-sit.properties

@@ -86,6 +86,10 @@ UMIS.sys_excel_path=/UMIS_USER_EXCEL/
 UMIS.sys_video_path=/UMIS_USER_VIDEOS/
 wf.svg.file.path=D:/test/
 
-
+# 设置 feign 客户端超时时间(OpenFeign 默认支持 ribbon)
+# 值的是建立连接所用的时间,使用与网络状态正常的情况,两端连接所用的时间
+ribbon.ReadTimeout=5000
+# 指的是建立连接后从服务器读取到可用资源所用的时间
+ribbon.ConnectionTimeout=5000
 
 

+ 1 - 1
operation_manager/src/main/resources/mapper/ProcessDefinitionMapper.xml

@@ -241,7 +241,7 @@
         <include refid="Base_Column_List"/>
         from sc_process_definition
         <where>
-            status =1 and
+            status =1
             <if test="processDefinition.id != null">
                 and id = #{processDefinition.id}
             </if>

+ 5 - 3
sms_water/src/main/java/com/huaxu/service/impl/MonitorDataReportServiceImpl.java

@@ -631,7 +631,8 @@ public class MonitorDataReportServiceImpl implements MonitorDataReportService {
         //水厂获取实时流量并计算出当天流量
         for (DeviceWaterDetail deviceWaterDetail : deviceSupplyWaterDetailsForDay) {
             MonitorDataEntity monitorDataEntity = MonitorDataMap.get(deviceWaterDetail.getDeviceId());
-            if (monitorDataEntity != null && monitorDataEntity.getDataValues() != null && monitorDataEntity.getDataValues().size() > 0) {
+            if (monitorDataEntity != null && monitorDataEntity.getDataValues() != null && monitorDataEntity.getDataValues().size() > 0
+                && deviceWaterDetail != null && deviceWaterDetail.getLatestValue() != null) {
                 for (MonitorDataValueEntity monitorDataValueEntity : monitorDataEntity.getDataValues()) {
                     if (monitorDataValueEntity.getAttributeId().equals(deviceWaterDetail.getAttributeId())) {
                         //累计当天流量
@@ -644,7 +645,8 @@ public class MonitorDataReportServiceImpl implements MonitorDataReportService {
         //水源获取实时流量并计算出当天流量
         for (DeviceWaterDetail deviceWaterDetail : deviceIntakeWaterDetailsForDay) {
             MonitorDataEntity monitorDataEntity = MonitorDataMap.get(deviceWaterDetail.getDeviceId());
-            if (monitorDataEntity != null && monitorDataEntity.getDataValues() != null && monitorDataEntity.getDataValues().size() > 0) {
+            if (monitorDataEntity != null && monitorDataEntity.getDataValues() != null && monitorDataEntity.getDataValues().size() > 0
+                    && deviceWaterDetail != null && deviceWaterDetail.getLatestValue() != null) {
                 for (MonitorDataValueEntity monitorDataValueEntity : monitorDataEntity.getDataValues()) {
                     if (monitorDataValueEntity.getAttributeId().equals(deviceWaterDetail.getAttributeId())) {
                         //累计当天流量
@@ -841,7 +843,7 @@ public class MonitorDataReportServiceImpl implements MonitorDataReportService {
 
         List<SceneWaterAmount> sceneWaterAmounts = new ArrayList<>();
         deviceSupplyWaterDetailsForDay.stream()
-                .filter(item -> StringUtils.isNotBlank(item.getSceneName()))
+                .filter(item -> StringUtils.isNotBlank(item.getSceneName()) && item != null && item.getLatestValue() != null )
                 .collect(Collectors.groupingBy(item -> item.getSceneName(), Collectors.toList()))
                 .forEach((key, value) -> {
                     SceneWaterAmount sceneWaterAmount = new SceneWaterAmount();

+ 7 - 7
sms_water/src/main/resources/mapper/MonitorDataReportMapper.xml

@@ -918,7 +918,7 @@
             sum(r.SUM_VALUE) as "amount"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
-        left join sms_device_parm dp on s.id=dp.SCENE_ID
+        left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
         left join sms_month_report r on r.DEVICE_ID= dp.DEVICE_ID and r.ATTRIBUTE_ID = dp.ATTRIBUTE_ID
 
         where  dp.`STATUS`=1 and st.SCENE_TYPE_NAME = '水厂' and s.ENABLE_STATE = 1
@@ -963,7 +963,7 @@
             ,dp.PARM_TYPE as "parmType"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
-        left join sms_device_parm dp on s.id=dp.SCENE_ID
+        left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
         where  dp.`STATUS`=1 and st.SCENE_TYPE_NAME = #{sceneTypeName} and s.ENABLE_STATE = 1
         and dp.PARM_TYPE =#{parmType}   and dp.TENANT_ID=#{tenantId}
         <if test="userType!=null and userType!=-999 and userType!=-9999 and  programItems != null and programItems.size() > 0">
@@ -1001,7 +1001,7 @@
             ,dp.DEVICE_ID as "deviceId"
             ,dp.ATTRIBUTE_ID as "attributeId"
             ,dp.PARM_TYPE as "parmType"
-            ,ifnull(r.LATEST_VALUE,0)  as "latestValue"
+            ,r.LATEST_VALUE  as "latestValue"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
         left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
@@ -1042,7 +1042,7 @@
             sum(ifnull(r.SUM_VALUE,0)) as "amount"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
-        left join sms_device_parm dp on s.id=dp.SCENE_ID
+        left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
         left join sms_month_report r on r.DEVICE_ID= dp.DEVICE_ID and r.ATTRIBUTE_ID = dp.ATTRIBUTE_ID and r.year = #{year} and r.month= #{month}
         where  dp.`STATUS`=1 and st.SCENE_TYPE_NAME = #{sceneTypeName} and s.ENABLE_STATE = 1
         and dp.PARM_TYPE =#{parmType}   and dp.TENANT_ID=#{tenantId}
@@ -1080,7 +1080,7 @@
             sum(ifnull(r.SUM_VALUE,0)) as "amount"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
-        left join sms_device_parm dp on s.id=dp.SCENE_ID
+        left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
         left join sms_year_report r on r.DEVICE_ID= dp.DEVICE_ID and r.ATTRIBUTE_ID = dp.ATTRIBUTE_ID and r.year = #{year}
         where  dp.`STATUS`=1 and st.SCENE_TYPE_NAME = #{sceneTypeName} and s.ENABLE_STATE = 1
         and dp.PARM_TYPE =#{parmType}   and dp.TENANT_ID=#{tenantId}
@@ -1172,7 +1172,7 @@
         from sms_scene_type st
             left join sms_scene s on s.SCENE_TYPE_ID =st.id and PARENT_SCENE_ID ='0'
             left join sms_device_parm dp on dp.PARENT_SCENE_ID =s.ID
-            left join sms_alarm_details ad on ad.STATE = 1 and ad.SCENE_ID=dp.SCENE_ID and ad.DEVICE_ID =dp.DEVICE_ID and ad.ATTRIBUTE_ID =dp.ATTRIBUTE_ID
+            left join sms_alarm_details ad on ad.STATE = 1 and ad.PARENT_SCENE_ID=dp.PARENT_SCENE_ID and ad.DEVICE_ID =dp.DEVICE_ID and ad.ATTRIBUTE_ID =dp.ATTRIBUTE_ID
 
             where s.`STATUS`=1  and s.ENABLE_STATE = 1 and st.SCENE_TYPE_NAME = '水厂' and s.TENANT_ID =#{tenantId}  and dp.`STATUS` = 1
 
@@ -1218,7 +1218,7 @@
             ,da.UNIT as "unit"
         from sms_scene_type st
         left join sms_scene s on s.SCENE_TYPE_ID =st.id
-        left join sms_device_parm dp on s.id=dp.SCENE_ID
+        left join sms_device_parm dp on s.id=dp.PARENT_SCENE_ID
         left join sms_device_attribute da on dp.ATTRIBUTE_ID =da.ID
         left join sms_month_report r on r.DEVICE_ID =dp.DEVICE_ID and r.ATTRIBUTE_ID = dp.ATTRIBUTE_ID
         where  dp.`STATUS`=1 and st.SCENE_TYPE_NAME = #{sceneTypeName} and s.ENABLE_STATE = 1

+ 1 - 0
user_auth/src/main/java/com/huaxu/dto/UserDto.java

@@ -17,5 +17,6 @@ public class UserDto {
     private String webUrl;
     @ApiModelProperty(value="logo")
     private String logo;
+    private String name;
     private Integer id;
 }

+ 57 - 2
user_auth/src/main/java/com/huaxu/security/MyAuthenticationSuccessHandler.java

@@ -1,5 +1,6 @@
 package com.huaxu.security;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -12,11 +13,18 @@ import com.huaxu.model.LoginUser;
 import com.huaxu.model.AjaxMessage;
 import com.huaxu.model.ResultStatus;
 import com.huaxu.service.UserService;
+import com.huaxu.util.RedisUtil;
 import com.huaxu.util.Util;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 
 
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.oauth2.common.OAuth2AccessToken;
 import org.springframework.security.oauth2.common.exceptions.UnapprovedClientAuthenticationException;
@@ -24,6 +32,10 @@ import org.springframework.security.oauth2.provider.*;
 import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
 import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;
 import org.springframework.stereotype.Component;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+import sun.misc.BASE64Encoder;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -34,6 +46,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 @Component("myAuthenticationSuccessHandler")
+@Slf4j
 public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler {
 
     @Autowired
@@ -49,14 +62,17 @@ public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticat
     @Autowired
     private UserService userService;
 
-
+    @Value("${iot.url}")
+    private String iotUrl;
+    @Autowired
+    private RedisUtil redisUtil;
 
     @SuppressWarnings("unchecked")
     @Override
     public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                                         Authentication authentication) throws IOException, ServletException {
 
-        logger.info("登录成功");
+        log.info("登录成功");
 
         String clientId = "smart-city-v2";
         String clientSecret = "smart-city-v2-123";
@@ -91,6 +107,14 @@ public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticat
         responseUserLoginDto.setToken(token);
         responseUserLoginDto.setLoginInfo(JSONArray.parseArray(loginUser.getUserInfos(), UserDto.class));
         JSONObject result=new JSONObject();
+
+        //可以加一个映射表
+        /*String iotToken=getLoginIotToken(loginUser.getPhoneNumber());
+        if(iotToken!=null){
+            String iotTokenKey = "iotToken:" + token;
+            redisUtil.set(iotTokenKey,iotToken);
+            redisUtil.setExpire(iotTokenKey,60*30);
+        }*/
         result.put("token",token);
         result.put("userInfos",loginUser.getUserInfos());
 
@@ -100,5 +124,36 @@ public class MyAuthenticationSuccessHandler extends SavedRequestAwareAuthenticat
 
         response.getWriter().write(objectMapper.writeValueAsString(ajaxMessage));
     }
+    public String getLoginIotToken(String account){
+        log.info("begin IotService login account={}",account);
+        String url = iotUrl + "/api/integration/auth/login";
+         RestTemplate restTemplate = new RestTemplate();
+        MultiValueMap<String, String> map= new LinkedMultiValueMap<String, String>();
+        map.add("source","rmcp");
+        map.add("code",new BASE64Encoder().encode(account.getBytes()));
+        HttpHeaders headers = new HttpHeaders();
+        HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(map,headers);
+        ResponseEntity<JSONObject> responseEntity  = restTemplate.postForEntity(url, request, JSONObject.class);
+        log.info("responseEntity ={}", JSONObject.toJSONString(responseEntity));
+        if(responseEntity !=null && responseEntity.getStatusCode() == HttpStatus.OK){
+            JSONObject jsonObject =  responseEntity.getBody();
+            if(jsonObject != null){
+                if(jsonObject.getInteger("status")==0){
+                    String token = jsonObject.getString("data");
+                    log.info("IotService getLoginIotToken success res={}",token);
+                    return token;
+                }else {
+                    log.info("IotService getLoginIotToken fail");
+                    return null;
+
+                }
+            }else {
+                return null;
+            }
+        }
+
+        return null;
+    }
+
 
 }

+ 1 - 0
user_auth/src/main/java/com/huaxu/service/MyUserDetailService.java

@@ -56,6 +56,7 @@ public class MyUserDetailService implements UserDetailsService {
         LoginUser loginUser = new LoginUser(null);
         loginUser.setId(loginInfos.get(0).getId());
         loginUser.setLoginToken(UUID.randomUUID().toString());
+        loginUser.setPhoneNumber(phone);
         loginUser.setUserInfos(JSONObject.toJSONString(loginInfos));
         return loginUser;
     }

+ 1 - 0
user_auth/src/main/resources/application-dev.properties

@@ -76,6 +76,7 @@ spring.rabbitmq.template.mandatory=true
 dispath.queue=dispath
 receive.exchange.name=messageExchange
 dispath.routing.key=dipathKey
+iot.url=http://localhost:8090
 
 
 

+ 10 - 2
user_auth/src/main/resources/application-sit.properties

@@ -7,7 +7,7 @@ spring.datasource.url=jdbc:mysql://114.135.61.188:33306/uims?characterEncoding=u
 spring.datasource.username=root
 spring.datasource.password=100Zone@123
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-
+spring.datasource.hikari.max-lifetime=30000
 mybatis-plus.mapper-locations=classpath:mapper/*.xml
 mybatis-plus.type-aliases-package=com.huaxu.entity
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
@@ -66,7 +66,15 @@ getSendCodeMax=2
 receive.exchange.name=messageExchangeTest
 dispath.routing.key=dipathKeyTest
 dispath.queue=dispathTest
-
+spring.rabbitmq.addresses=114.135.61.188:55672
+spring.rabbitmq.username=zoniot
+spring.rabbitmq.password=zcxk100
+spring.rabbitmq.virtual-host=/
+spring.rabbitmq.connection-timeout=15000
+spring.rabbitmq.publisher-confirm-type=correlated
+spring.rabbitmq.publisher-returns=true
+spring.rabbitmq.template.mandatory=true
+iot.url=http://114.135.61.188:58080
 
 
 

+ 1 - 1
user_auth/src/main/resources/application.properties

@@ -1,2 +1,2 @@
 #开发环境:dev  测试环境:sit  线上环境:prd
-spring.profiles.active=dev
+spring.profiles.active=sit

+ 1 - 1
user_auth/src/main/resources/mapper/UserMapper.xml

@@ -275,7 +275,7 @@
 
     </select>
     <select id="findLoginInfo" resultType="com.huaxu.dto.UserDto">
-        select a.id, a.PHONE,b.TENANT_NAME,b.code tenantId,b.WEB_URL ,b.LOGO
+        select a.id, a.PHONE,b.TENANT_NAME,b.code tenantId,b.WEB_URL ,b.LOGO,a.USERNAME name
         from uims_user a  join uims_tenant b on
         a.TENANT_ID=b.CODE
         where a.PHONE=#{phone} and a.status!=0 and b.status!=0

+ 2 - 2
user_center/src/main/java/com/huaxu/controller/OrgController.java

@@ -140,8 +140,8 @@ public class OrgController {
         return new AjaxMessage<>(ResultStatus.OK, orgService.getUserTrees(org));
     }
 
-      @RequestMapping(value = "getAllByTenantId", method = RequestMethod.POST)
-      List<Org>getAllByTenantId(){
+    @RequestMapping(value = "getAllByTenantId", method = RequestMethod.POST)
+    public List<Org> getAllByTenantId(){
         Org org=new Org();
         org.setStatus(1);
         org.setTenantId(UserUtil.getCurrentUser().getTenantId());

+ 0 - 1
user_center/src/main/java/com/huaxu/controller/TenantController.java

@@ -92,7 +92,6 @@ public class TenantController {
      * 新增租户logo
      */
     @RequestMapping(value = "addTenantLogo", method = RequestMethod.POST)
-    @ResponseBody
     @ApiOperation(value = "租户logo")
     public  AjaxMessage<String>  addUserPhoto(@ApiParam(value = "租户logo", required = true)@RequestParam("avatarfile") MultipartFile file) {
         String avatar = "";

+ 0 - 11
user_center/src/main/java/com/huaxu/controller/UserController.java

@@ -135,7 +135,6 @@ public class UserController {
      */
     @ApiOperation(value = "用户头像")
     @RequestMapping(value = "addUserPhoto", method = RequestMethod.POST)
-    @ResponseBody
     public AjaxMessage<String> addUserPhoto(@ApiParam(value = "用户头像", required = true) @RequestParam("avatarfile") MultipartFile file) {
         String avatar = "";
         if (!file.isEmpty()) {
@@ -154,7 +153,6 @@ public class UserController {
     @LogAnnotation(module = "【用户管理】新增")
     @ApiOperation(value = "新增用户信息")
     @RequestMapping(value = "addUser", method = RequestMethod.POST)
-    @ResponseBody
     public AjaxMessage<Integer> addUser(@ApiParam(value = "用户信息", required = true) @RequestBody UserEntity user) {
         if (user.getPhone() != null) {
             boolean isExsit = userService.checkMobileUnique(user.getPhone());
@@ -184,7 +182,6 @@ public class UserController {
     @LogAnnotation(module = "【用户管理】修改")
     @ApiOperation(value = "更新用户信息")
     @RequestMapping(value = "/updateUserById", method = RequestMethod.POST)
-    @ResponseBody
     public AjaxMessage<Integer> editUser(@ApiParam(value = "用户信息", required = true) @RequestBody UserEntity user) {
         if (user.getPhone() != null) {
             boolean isExsit = userService.checkMobileUnique(user);
@@ -208,7 +205,6 @@ public class UserController {
     @LogAnnotation(module = "【用户管理】批量删除")
     @ApiOperation(value = "按ID进行批量删除")
     @RequestMapping(value = "/deleteUserByIds", method = RequestMethod.POST)
-    @ResponseBody
     public AjaxMessage<Integer> deleteUserByIds(@ApiParam(value = "用户ID", required = true) @RequestBody Long[] ids) {
         LoginUser currentUser = UserUtil.getCurrentUser();
         Integer userId = currentUser.getId();
@@ -242,7 +238,6 @@ public class UserController {
     @LogAnnotation(module = "【用户管理】单条删除")
     @ApiOperation(value = "按ID进行单个删除")
     @RequestMapping(value = "/deleteUserById", method = RequestMethod.POST)
-    @ResponseBody
     public AjaxMessage<Integer> deleteUserById(@ApiParam(value = "用户ID", required = true) @RequestParam Long id) {
         LoginUser currentUser = UserUtil.getCurrentUser();
         Integer userId = currentUser.getId();
@@ -259,7 +254,6 @@ public class UserController {
         return new AjaxMessage<>(ResultStatus.OK, result);
     }
     @RequestMapping(value = "/getUserIdsByOrgId", method = RequestMethod.POST)
-    @ResponseBody
     public List<Integer>getUserIdsByOrgId(String ids) {
         List list = JSONObject.parseObject(ids, List.class);
         List<Integer> result = userService.getUserIdsByOrgId(list);
@@ -267,20 +261,17 @@ public class UserController {
     }
 
     @RequestMapping(value = "/findUserIdsByOrgId", method = RequestMethod.GET)
-    @ResponseBody
     public AjaxMessage<List<UserEntity>> findUserIdsByOrgId(String ids) {
         List list = JSONObject.parseObject(ids, List.class);
         List<UserEntity> result = userService.findUserIdsByOrgId(list);
         return new AjaxMessage<>(ResultStatus.OK,result);
     }
     @RequestMapping(value = "/findUserList", method = RequestMethod.GET)
-    @ResponseBody
     public AjaxMessage<List<UserListDto>> findUserList() {
         List<UserListDto> userList = userService.findUserList();
         return new AjaxMessage<>(ResultStatus.OK,userList);
     }
     @RequestMapping(value = "/findUserIdsByUserIds", method = RequestMethod.POST)
-    @ResponseBody
     public List<UserEntity> findUserIdsByUserIds(Long[] ids) {
         List list = Arrays.asList(ids.clone());
         List<UserEntity> result = userService.findUserIdsByUserIds(list);
@@ -288,7 +279,6 @@ public class UserController {
     }
     @ApiOperation(value = "获取登录用户所属机构及其上级机构用户信息")
     @RequestMapping(value = "/findUserIdsForOrg", method = RequestMethod.GET)
-    @ResponseBody
     public List<Long> findUserIdsForOrg() {
         List<Long> ids = new ArrayList<>();
         List<UserEntity> result = userService.findUserIdsForOrg();
@@ -300,7 +290,6 @@ public class UserController {
 
     @ApiOperation(value = "查询拥有此机构权限的用户")
     @RequestMapping(value = "/findUserIdsByPermissonOrg", method = RequestMethod.POST)
-    @ResponseBody
     public List<Integer> findUserIdsByPermissonOrg(
             @RequestParam(value = "tenantId", required = false) String tenantId,
             @RequestParam(value = "companyOrgId", required = false)Integer companyOrgId,

+ 7 - 0
user_center/src/main/resources/application-dev.properties

@@ -82,3 +82,10 @@ receive.exchange.name=messageExchange
 dispath.routing.key=dipathKey
 
 
+# 设置 feign 客户端超时时间(OpenFeign 默认支持 ribbon)
+# 值的是建立连接所用的时间,使用与网络状态正常的情况,两端连接所用的时间
+ribbon.ReadTimeout=5000
+# 指的是建立连接后从服务器读取到可用资源所用的时间
+ribbon.ConnectionTimeout=5000
+
+