|
@@ -124,10 +124,10 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
}
|
|
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
|
|
Long tenantId = loginUser.getTenantId();
|
|
|
+ Long userId = createSystemUser(createReqVO);
|
|
|
if (createReqVO.getType() == 2) {
|
|
|
//若为旅行社,则创建新租户
|
|
|
try {
|
|
|
- Long userId = createSystemUser(createReqVO);
|
|
|
if (userId==null) {
|
|
|
throw exception(OTA_TENANT_EXISTS);
|
|
|
} else {
|
|
@@ -139,15 +139,14 @@ public class DistributorServiceImpl implements DistributorService {
|
|
|
throw exception(DISTRIBUTOR_TENANT_EXISTS);
|
|
|
}
|
|
|
} else {
|
|
|
- Long userId = createSystemUser(createReqVO);
|
|
|
if (userId==null) {
|
|
|
throw exception(OTA_TENANT_EXISTS);
|
|
|
} else {
|
|
|
//创建分销商默认绑定分销商角色
|
|
|
createSystemUserRole(userId, "ota");
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
+ distributor.setUserId(userId);
|
|
|
distributor.setAccountTenantId(tenantId);
|
|
|
distributorMapper.insert(distributor);
|
|
|
// 返回
|