|
@@ -546,6 +546,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
Date expiryDate;
|
|
|
//如果本次协议是开通服务则直接取开通时的价格并在现在的时间计算到期时间
|
|
|
if (TenantContractRecordEnum.OPEN.equals(en)) {
|
|
|
+ val = tenantInfo.getExpiryCount();
|
|
|
tenantInfo.setContractPrice(tenantInfo.getOpenPrice());
|
|
|
expiryDate = getExpiryDate(val, tenantInfo.getExpiryUnit(), now);
|
|
|
} else {
|
|
@@ -829,7 +830,6 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
productInfo.setExpiryDate(expiryDate);
|
|
|
productInfo.setPayAmount(productInfo.getPayAmount().add(amount));
|
|
|
productInfo.setExpiryCount(productInfo.getExpiryCount() + val);
|
|
|
- tenantProductInfoService.updateById(productInfo);
|
|
|
|
|
|
//生成协议并上传得到地址
|
|
|
TenantContractRecordEnum renew = TenantContractRecordEnum.RENEW;
|
|
@@ -839,7 +839,8 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
}
|
|
|
//写入协议记录
|
|
|
tenantContractRecordService.insertContractRecord(tenantId, contractPath, renew);
|
|
|
-
|
|
|
+ //更新产品信息
|
|
|
+ tenantProductInfoService.updateById(productInfo);
|
|
|
//发送邮件短信
|
|
|
Map<String, Object> par = new HashMap<>();
|
|
|
par.put("tenantId", tenantId);
|