Prechádzať zdrojové kódy

Merge branch '84-integrate' into 'develop'

84 integrate



See merge request !39

zengweijie 2 rokov pred
rodič
commit
5e2be44597

+ 1 - 1
smsb-customer-manager-adapter/src/main/java/com/inspur/customer/web/controller/tenant/TenantCommonAttributeController.java

@@ -36,7 +36,7 @@ public class TenantCommonAttributeController {
         if(!checkResponse.isSuccess()){
             return checkResponse;
         }
-        return commonAttributeService.queryTenantAttribute(attribute);
+        return SingleResponse.of(commonAttributeService.queryTenantAttribute(attribute));
     }
 
     private Response checkParameters(TenantAttributeCO attribute){

+ 0 - 1
smsb-customer-manager-app/src/main/java/com/inspur/customer/service/keycloak/KeycloakServiceImpl.java

@@ -453,7 +453,6 @@ public class KeycloakServiceImpl implements KeycloakService {
     }
 
     @Override
-    @Cacheable(value = "msr:user:openIds", key = "#role")
     public List<String> queryWechatByRole(String role) {
         List<String> openIds = Lists.newArrayList();
          realmResource.roles().get(role).getRoleUserMembers().forEach(user->{

+ 4 - 4
smsb-customer-manager-app/src/main/java/com/inspur/customer/service/tenant/TenantCommonAttributeServiceImpl.java

@@ -1,7 +1,6 @@
 package com.inspur.customer.service.tenant;
 
 import com.alibaba.cola.dto.Response;
-import com.alibaba.cola.dto.SingleResponse;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.inspur.customer.client.tenant.TenantCommonAttributeService;
@@ -58,9 +57,10 @@ public class TenantCommonAttributeServiceImpl extends ServiceImpl<TenantCommonAt
 
     @Override
     @Cacheable(value = "msr:customer:tenantCommonAttribute")
-    public Response queryTenantAttribute(TenantAttributeCO attributeCO) {
-        TenantCommonAttributeDO tenantAttribute = queryOne(attributeCO.getTenant() ,attributeCO.getAttributeKey());
-        return SingleResponse.of(tenantAttribute);
+    public TenantAttributeCO queryTenantAttribute(TenantAttributeCO attributeCO) {
+        TenantAttributeCO co = new TenantAttributeCO();
+        BeanUtils.copyProperties(queryOne(attributeCO.getTenant() ,attributeCO.getAttributeKey()),co);
+        return co;
     }
 
     @Override

+ 1 - 3
smsb-customer-manager-client/src/main/java/com/inspur/customer/client/tenant/TenantCommonAttributeService.java

@@ -3,8 +3,6 @@ package com.inspur.customer.client.tenant;
 import com.alibaba.cola.dto.Response;
 import com.inspur.customer.object.tenant.TenantAttributeCO;
 
-import java.time.LocalTime;
-
 /**
  * @Author wangbo13
  * @Date 2023/2/14 11:16
@@ -26,7 +24,7 @@ public interface TenantCommonAttributeService {
      * @param attributeCO
      * @return 属性值
      */
-    Response queryTenantAttribute(TenantAttributeCO attributeCO);
+    TenantAttributeCO queryTenantAttribute(TenantAttributeCO attributeCO);
 
     /**
      * 获取设备重启时间

+ 4 - 0
smsb-customer-manager-client/src/main/java/com/inspur/customer/object/tenant/TenantAttributeCO.java

@@ -13,6 +13,10 @@ import java.io.Serializable;
 @Data
 public class TenantAttributeCO implements Serializable {
     private static final long serialVersionUID = -6306767042786033321L;
+    /**
+     * 主键
+     */
+    private Long id;
     /**
      * 租户
      */