|
@@ -36,6 +36,7 @@ import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -95,6 +96,9 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
@Autowired
|
|
@Autowired
|
|
private ContractService contractService;
|
|
private ContractService contractService;
|
|
|
|
|
|
|
|
+ @Value("${spring.profiles.active:dev}")
|
|
|
|
+ private String profiles;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 新增机构
|
|
* 新增机构
|
|
*/
|
|
*/
|
|
@@ -125,6 +129,14 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
//添加机构产品信息
|
|
//添加机构产品信息
|
|
setIdByApply(tenantId, dto.getProductInfo(), dto.getProductInfo()::setTenantId,
|
|
setIdByApply(tenantId, dto.getProductInfo(), dto.getProductInfo()::setTenantId,
|
|
tenantProductInfoService::addTenantProduct);
|
|
tenantProductInfoService::addTenantProduct);
|
|
|
|
+ //新建机构是0元时,直接默认支付成功
|
|
|
|
+ if (dto.getProductInfo().getPayAmount().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
|
+ //修机构相关的改付款时间
|
|
|
|
+ tenantOpen(tenantId);
|
|
|
|
+ String orderNo = idGenerator.generatorId("payment") + "";
|
|
|
|
+ //写入付款记录
|
|
|
|
+ createOrderRecord(tenantId, BigDecimal.ZERO, orderNo, TenantOrderRecordEnum.TENANT_OPEN, 1, null);
|
|
|
|
+ }
|
|
//添加机构配置
|
|
//添加机构配置
|
|
setIdByApply(tenantId, dto.getConfig(), dto.getConfig()::setTenantId, tenantConfigService::addConfig);
|
|
setIdByApply(tenantId, dto.getConfig(), dto.getConfig()::setTenantId, tenantConfigService::addConfig);
|
|
//释放
|
|
//释放
|
|
@@ -336,8 +348,10 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
//建立角色和菜单关系数据
|
|
//建立角色和菜单关系数据
|
|
Lists.partition(collectMenuId, 50)
|
|
Lists.partition(collectMenuId, 50)
|
|
.forEach(idList -> employeeService.batchInsertRoleMenu(roleId, idList, tenantId));
|
|
.forEach(idList -> employeeService.batchInsertRoleMenu(roleId, idList, tenantId));
|
|
- //添加签章信息
|
|
|
|
- contractService.addTsign(tenantInfo.getTsignCode(), tenantInfo.getTsignName());
|
|
|
|
|
|
+ if (!profiles.equals("dev")) {
|
|
|
|
+ //添加签章信息
|
|
|
|
+ contractService.addTsign(tenantInfo.getTsignCode(), tenantInfo.getTsignName());
|
|
|
|
+ }
|
|
|
|
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
|
|
|