Pārlūkot izejas kodu

机构详情查询增加服务名称 和 人员上线字段

hgw 3 gadi atpakaļ
vecāks
revīzija
d3fe8599cc

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TenantInfoDto.java

@@ -106,6 +106,12 @@ public class TenantInfoDto implements Serializable {
     @ApiModelProperty(value = "机构配置参数")
     private TenantConfigDto config;
 
+    @ApiModelProperty(value = "购买的服务名称")
+    private String platformServeName;
+
+    @ApiModelProperty(value = "人数上线")
+    private Integer studentUpLimit;
+
     public Integer getId() {
         return id;
     }
@@ -225,4 +231,20 @@ public class TenantInfoDto implements Serializable {
     public void setTsignName(String tsignName) {
         this.tsignName = tsignName;
     }
+
+    public String getPlatformServeName() {
+        return platformServeName;
+    }
+
+    public void setPlatformServeName(String platformServeName) {
+        this.platformServeName = platformServeName;
+    }
+
+    public Integer getStudentUpLimit() {
+        return studentUpLimit;
+    }
+
+    public void setStudentUpLimit(Integer studentUpLimit) {
+        this.studentUpLimit = studentUpLimit;
+    }
 }

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/PlatformServeDetailService.java

@@ -1,4 +1,7 @@
 package com.ym.mec.biz.service;
 
-public interface PlatformServeDetailService {
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.biz.dal.entity.PlatformServeDetail;
+
+public interface PlatformServeDetailService extends IService<PlatformServeDetail> {
 }

+ 17 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantInfoServiceImpl.java

@@ -54,6 +54,10 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
     @Autowired
     private PlatformProductService platformProductService;
     @Autowired
+    private PlatformServeService platformServeService;
+    @Autowired
+    private PlatformServeDetailService platformServeDetailService;
+    @Autowired
     private TenantConfigService tenantConfigService;
     @Autowired
     private RedissonClient redissonClient;
@@ -179,6 +183,18 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
         TenantConfig tenantConfig = tenantConfigService.getOne(new QueryWrapper<TenantConfig>()
                 .eq("tenant_id_", tenantId));
         setTenantInfo(tenantConfig, new TenantConfigDto(), tenantInfoDto::setConfig);
+        //获取服务信息
+        PlatformServe platformServe = platformServeService.getOne(new QueryWrapper<PlatformServe>()
+                .eq("id_", productInfo.getServeId()));
+        Optional.ofNullable(platformServe)
+                .map(PlatformServe::getName)
+                .ifPresent(tenantInfoDto::setPlatformServeName);
+        //获取服务详情
+        PlatformServeDetail serveDetail = platformServeDetailService.getOne(new QueryWrapper<PlatformServeDetail>()
+                .eq("id_", productInfo.getServeDetailId()));
+        Optional.ofNullable(serveDetail)
+                .map(PlatformServeDetail::getStudentUpLimit)
+                .ifPresent(tenantInfoDto::setStudentUpLimit);
         return tenantInfoDto;
     }
 
@@ -380,7 +396,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
      */
     @Override
     public Msg orderNotify(Msg msg) {
-        log.info("tenant orderNotify >>>>> " +msg.toString());
+        log.info("tenant orderNotify >>>>> " + msg.toString());
         msg.setMsg("fail");
         Map<String, String> notifyMap = JSON.parseObject(msg.getResponseParameters(), Map.class);
         TenantOrderRecord record = new TenantOrderRecord();

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java

@@ -39,7 +39,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                         "/eduSubject/findSubSubjects", "/eduFinancialExpenditure/batchAdd", "/eduSendNotice/*",
                         "/oaContracts/*", "/eduStudent/organStudentOverView", "/activity/countCloudTeacherActive",
                         "/activity/organDoubleEleven2021Statis", "/activity/doubleEleven2021Statis", "/questionnaireTopic/getDetail", "/questionnaireUserResult/add",
-                        "/tenantInfo/info/*","/tenantInfo/pay/*"
+                        "/tenantInfo/info/*","/tenantInfo/pay/*","/tenantInfo/notify"
                 )
                 .permitAll().anyRequest().authenticated().and().httpBasic();
     }