|
|
@@ -15,6 +15,7 @@ import com.tuoheng.model.po.ClientUserRolePo; |
|
|
|
import com.tuoheng.model.po.TenantPo; |
|
|
|
import com.tuoheng.model.po.UserPo; |
|
|
|
import com.tuoheng.model.query.TenantQuery; |
|
|
|
import com.tuoheng.model.query.UserQuery; |
|
|
|
import com.tuoheng.model.vo.BusinessSystemVo; |
|
|
|
import com.tuoheng.model.vo.TenantVo; |
|
|
|
import com.tuoheng.service.ClientUserSevice; |
|
|
@@ -221,13 +222,19 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
/** |
|
|
|
* 查询对应租户下的所有用户数据 |
|
|
|
* |
|
|
|
* @param tenantId |
|
|
|
* @param query |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public JsonResult findUserList(Long tenantId) { |
|
|
|
List<UserPo> userPos = clientUserMapper.selectByTenantId(tenantId); |
|
|
|
return JsonResult.success(userPos); |
|
|
|
public JsonResult findUserList(UserQuery query) { |
|
|
|
|
|
|
|
if (ObjectUtil.isNull(query.getPage()) || ObjectUtil.isNull(query.getLimit())) { |
|
|
|
return JsonResult.error("分页参数不能为空"); |
|
|
|
} |
|
|
|
//开启分页 |
|
|
|
IPage<UserPo> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
IPage<UserPo> pageData = clientUserMapper.selectByTenantIdAndPage(query.getTenantId(), page); |
|
|
|
return JsonResult.success(pageData); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -469,7 +476,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
String url = platform.getPlatformUrl(); |
|
|
|
|
|
|
|
//根据不同业务平台进行动态匹配 |
|
|
|
switch (platform.getPlatformCode()){ |
|
|
|
switch (platform.getPlatformCode()) { |
|
|
|
//河湖长 |
|
|
|
case HhzUrlConstant.HHZ_CLIENT: |
|
|
|
url = url + HhzUrlConstant.CREATE_TENANT; |
|
|
@@ -487,7 +494,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
log.info("请求url:{}",url); |
|
|
|
log.info("请求url:{}", url); |
|
|
|
ResponseEntity<JsonResult> response; |
|
|
|
try { |
|
|
|
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); |
|
|
@@ -527,7 +534,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
//设置地址(hhz平台) |
|
|
|
String url = platform.getPlatformUrl(); |
|
|
|
//根据不同业务平台进行动态匹配 |
|
|
|
switch (platform.getPlatformCode()){ |
|
|
|
switch (platform.getPlatformCode()) { |
|
|
|
//河湖长 |
|
|
|
case HhzUrlConstant.HHZ_CLIENT: |
|
|
|
url = url + HhzUrlConstant.UPDATE_TENANT; |
|
|
@@ -545,10 +552,10 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
log.info("请求url:{}",url); |
|
|
|
log.info("请求url:{}", url); |
|
|
|
ResponseEntity<JsonResult> response; |
|
|
|
try { |
|
|
|
log.info("请求url:{}",url); |
|
|
|
log.info("请求url:{}", url); |
|
|
|
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "业务平台更新租户失败"); |
|
|
@@ -586,7 +593,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
//设置地址(hhz平台) |
|
|
|
String url = platform.getPlatformUrl(); |
|
|
|
//根据不同业务平台进行动态匹配 |
|
|
|
switch (platform.getPlatformCode()){ |
|
|
|
switch (platform.getPlatformCode()) { |
|
|
|
//河湖长 |
|
|
|
case HhzUrlConstant.HHZ_CLIENT: |
|
|
|
url = url + HhzUrlConstant.DELETE_TENANT; |
|
|
@@ -604,7 +611,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
log.info("请求url:{}",url); |
|
|
|
log.info("请求url:{}", url); |
|
|
|
ResponseEntity<JsonResult> response; |
|
|
|
try { |
|
|
|
response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, JsonResult.class); |