Преглед на файлове

1、修改企业注册问题

zhoux преди 1 година
родител
ревизия
462e5f9dc3

+ 2 - 0
src/main/java/com/dk/oauth/entity/Company.java

@@ -254,11 +254,13 @@ public class Company extends PageInfo<Company> implements Serializable {
     /**
      * 授权
      */
+    @ApiModelProperty(value = "授权")
     private String license;
 
     /**
      * 临时授权
      */
+    @ApiModelProperty(value = "临时授权")
     private String licenseSocial;
 
     /*

+ 16 - 10
src/main/java/com/dk/oauth/service/impl/CompanyServiceImpl.java

@@ -171,16 +171,15 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
             return ResponseResultUtil.error(ErrorCodeEnum.COMPANY_CODE_EXISTS.getCode(),
                     ErrorCodeEnum.COMPANY_CODE_EXISTS.getMessage());
         }
-        if ("PRO".equals(company.getGradeCode())){
-            company.setCurStaffNum(100);
-            company.setMaxStaffNum(100);
-            company.setCpStatus("公司状态-待审");
-        }else {
-            company.setCurStaffNum(10);
-            company.setMaxStaffNum(10);
-            company.setCpStatus("公司状态-通过");
+        company.setMaxStaffNum(1); // todo
+        company.setCurStaffNum(1);
+        company.setCpStatus("公司状态-通过");
+        // 标准版默认2099年,1PC授权,1WX授权
+        if(Constant.GradeCode.STD.getName().equals(company.getGradeCode())){
+            company.setEndDate(LocalDate.parse("2099-12-31"));
+            companyVO.setWebMaxNum(0);
+            companyVO.setWxMaxNum(1);
         }
-
         //获取具体服务的地址
         company.setSvcCode(companyMapper.selectServiceAllot(company.getGradeCode()));
         // 生成临时license授权
@@ -189,7 +188,12 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         licenseMap.put("end_date",company.getEndDate());
         licenseMap.put("web_max_num",companyVO.getWebMaxNum());
         licenseMap.put("wx_max_num",companyVO.getWxMaxNum());
-        company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
+        // 标准版
+        if(Constant.GradeCode.STD.getName().equals(company.getGradeCode())){
+            company.setLicense(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
+        }else{
+            company.setLicenseSocial(AESUtil.aesEncrypt(JSON.toJSONString(licenseMap)) );
+        }
         companyMapper.insert(company);
         // 动态设置服务的地址
         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder
@@ -315,8 +319,10 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
             m.put("macName",moneyAccountResponses.get(i).getMacName());
             m.put("macType",moneyAccountResponses.get(i).getMacType());
             m.put("balance",moneyAccountResponses.get(i).getBalance());
+            m.put("accDate",moneyAccountResponses.get(i).getAccDate());
             m.put("displayNo",moneyAccountResponses.get(i).getDisplayNo());
             m.put("flgDefault",moneyAccountResponses.get(i).getFlgDefault());
+            m.put("flgNegative",moneyAccountResponses.get(i).getFlgNegative());
             listMoneyAccounts.add(m);
         }
         map.put("moneyAccounts",listMoneyAccounts);

+ 6 - 2
src/main/resources/mapper/CompanyMapper.xml

@@ -172,7 +172,9 @@
          cp_size,
          shop_size,
          cp_status,
-         feedback)
+         feedback,
+         license,
+         license_social)
         values (#{cpName},
                 dkic_a.f_allot_service(#{gradeCode}) ,
                 #{gradeCode}  ,
@@ -184,7 +186,9 @@
                 #{cpSize},
                 #{shopSize},
                 #{cpStatus},
-                #{feedback}
+                #{feedback},
+                #{license},
+                #{licenseSocial}
                 )
 
     </insert>

+ 1 - 0
src/main/resources/mapper/MoneyAccountMapper.xml

@@ -80,6 +80,7 @@
                t.mac_receipt_code,
                t.acc_date,
                t.flg_negative,
+               t.flg_default,
                t.remarks,
                t.flg_valid,
                t.cp_id,