parent
03ca9de286
commit
173d40de55
|
@ -11,6 +11,7 @@ import com.ff.base.enums.LoginType;
|
|||
import com.ff.base.enums.OperationType;
|
||||
import com.ff.base.enums.QuotaType;
|
||||
import com.ff.base.exception.ServiceException;
|
||||
import com.ff.base.exception.base.BaseException;
|
||||
import com.ff.base.exception.user.UserPasswordNotMatchException;
|
||||
import com.ff.base.manager.AsyncManager;
|
||||
import com.ff.base.manager.factory.AsyncFactory;
|
||||
|
@ -218,6 +219,13 @@ public class TenantSecretKeyServiceImpl implements ITenantSecretKeyService {
|
|||
int insertedTenantSecretKey = this.insertTenantSecretKey(tenantSecretKey);
|
||||
if (insertedTenantSecretKey > 0) {
|
||||
for (TenantPlatform tenantPlatform : createTenantDTO.getTenantPlatforms()) {
|
||||
|
||||
TenantPlatform platformById = tenantPlatformService.selectTenantPlatformById(tenantPlatform.getId());
|
||||
// 成本比平台成本大
|
||||
if (platformById.getCost().compareTo(tenantPlatform.getCost())>0){
|
||||
throw new BaseException("成本比例不允许比最低比例小");
|
||||
}
|
||||
|
||||
tenantPlatform.setTenantId(tenantSecretKey.getId());
|
||||
tenantPlatform.setCreateBy(createTenantDTO.getAccount());
|
||||
tenantPlatformService.insertTenantPlatform(tenantPlatform);
|
||||
|
|
Loading…
Reference in New Issue