|
|
@@ -180,15 +180,16 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
return ResponseResultUtil.error(ErrorCodeEnum.COMPANY_CODE_EXISTS.getCode(),
|
|
|
ErrorCodeEnum.COMPANY_CODE_EXISTS.getMessage());
|
|
|
}
|
|
|
- company.setMaxStaffNum(1); // todo
|
|
|
- company.setCurStaffNum(1);
|
|
|
+// company.setMaxStaffNum(1); // todo
|
|
|
+// company.setCurStaffNum(1);
|
|
|
+
|
|
|
+// // 标准版默认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.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授权
|
|
|
@@ -213,6 +214,21 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
request.setAttribute("svcCode", company.getSvcCode().replace("_", "-"));
|
|
|
}
|
|
|
|
|
|
+ // 生成交易记录
|
|
|
+ Trade trade = new Trade();
|
|
|
+ trade.setTradeNo(companyVO.getTradeNo());
|
|
|
+ trade.setCpId(company.getCpId());
|
|
|
+ trade.setWxUserId(companyVO.getWxUserId());
|
|
|
+ trade.setTradeAmount(companyVO.getTradeAmount());
|
|
|
+ trade.setTradeType(Constant.TradeType.REGISTER.getName());
|
|
|
+ trade.setBuyLong(companyVO.getBuyLong());
|
|
|
+ trade.setBuyBeginDate(companyVO.getBuyBeginDate());
|
|
|
+ trade.setBuyEndDate(companyVO.getBuyEndDate());
|
|
|
+ trade.setExtendDays(companyVO.getExtendDays());
|
|
|
+ trade.setBuyGradeCode(companyVO.getGradeCode());
|
|
|
+ trade.setTradeStatus(Constant.TradeStatus.INEFFECTIVE.getName());
|
|
|
+ tradeMapper.insert(trade);
|
|
|
+
|
|
|
// 组织机构 -顶级 和公司的名称一样
|
|
|
// 二级 名称叫做 运营中心 返回的业务部门的id是运营中新的id
|
|
|
OrgVO orgVO = new OrgVO();
|
|
|
@@ -397,8 +413,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
// String rid = listResponseResultVO.getData();
|
|
|
// roleids.add(rid);
|
|
|
}
|
|
|
-
|
|
|
- return ResponseResultUtil.success(company);
|
|
|
+ companyVO.setCpId(company.getCpId()).setTradeAmount(trade.getTradeAmount()).setTradeNo(trade.getTradeNo());
|
|
|
+ return ResponseResultUtil.success(companyVO);
|
|
|
}
|
|
|
|
|
|
/**
|