Prechádzať zdrojové kódy

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss-server-oauth

zhoux 1 rok pred
rodič
commit
eed81c2d5b

+ 11 - 2
src/main/java/com/dk/oauth/service/impl/CompanyServiceImpl.java

@@ -91,8 +91,17 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     public ResponseResultVO getCompanyMaxStaffNum(Integer id) {
         Company company = companyMapper.selectById(id);
         Map<String,Object> mp = new HashMap<>();
-        mp.put("maxStaffNum",company.getMaxStaffNum());
-        mp.put("curStaffNum",company.getCurStaffNum());
+        // 解析license信息
+        String licenseStr = AESUtil.desEncrypt(company.getLicense());
+        if(licenseStr != null ){
+            Map<String,Object> licenseMap = JSON.parseObject(licenseStr,Map.class);
+            mp.put("web_max_num",Integer.parseInt(licenseMap.get("web_max_num").toString()));
+            mp.put("wx_max_num",Integer.parseInt(licenseMap.get("wx_max_num").toString()));
+        }else{
+            mp.put("web_max_num",1);
+            mp.put("wx_max_num",1);
+        }
+
         return ResponseResultUtil.success(mp);
     }