|
|
@@ -183,12 +183,12 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
// 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);
|
|
|
-// }
|
|
|
+ // 标准版默认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("公司状态-通过");
|
|
|
//获取具体服务的地址
|
|
|
company.setSvcCode(companyMapper.selectServiceAllot(company.getGradeCode()));
|
|
|
@@ -214,20 +214,23 @@ 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);
|
|
|
+ // 专业版才插入交易记录
|
|
|
+ if(Constant.GradeCode.PRO.getName().equals(company.getGradeCode())) {
|
|
|
+ // 生成交易记录
|
|
|
+ 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
|