|
|
@@ -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);
|