增加获取租户列表的接口
This commit is contained in:
parent
3ea067e645
commit
d7238058ab
@ -50,11 +50,6 @@ public class SysUser extends BaseEntity
|
|||||||
*/
|
*/
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户名称
|
|
||||||
*/
|
|
||||||
private String tenantName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户昵称
|
* 用户昵称
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -83,13 +83,11 @@
|
|||||||
r.status as role_status,
|
r.status as role_status,
|
||||||
u.user_type,
|
u.user_type,
|
||||||
u.tenant_id,
|
u.tenant_id,
|
||||||
t.tenant_name,
|
|
||||||
u.operator_id
|
u.operator_id
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
left join sys_role r on r.role_id = ur.role_id
|
left join sys_role r on r.role_id = ur.role_id
|
||||||
inner join xhpc_tenant t on u.tenant_id=t.tenant_id and t.is_deleted=0 and t.status=1
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="com.xhpc.system.api.domain.SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="com.xhpc.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import com.xhpc.common.util.LogUserUtils;
|
|||||||
import com.xhpc.system.api.model.LoginUser;
|
import com.xhpc.system.api.model.LoginUser;
|
||||||
import com.xhpc.tenant.domain.XhpcTenantDomain;
|
import com.xhpc.tenant.domain.XhpcTenantDomain;
|
||||||
import com.xhpc.tenant.service.XhpcTenantService;
|
import com.xhpc.tenant.service.XhpcTenantService;
|
||||||
import org.apache.tools.ant.taskdefs.condition.Http;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -39,8 +38,15 @@ public class XhpcTenantController extends BaseController {
|
|||||||
params.put("tenantId", tenantId);
|
params.put("tenantId", tenantId);
|
||||||
params.put("tenantName", tenantName);
|
params.put("tenantName", tenantName);
|
||||||
params.put("contactName", contactName);
|
params.put("contactName", contactName);
|
||||||
return getDataTable(tenantService.getList(params));
|
return getDataTable(tenantService.getPage(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/getNameList")
|
||||||
|
public R getNameList(){
|
||||||
|
return R.ok(tenantService.getNameList());
|
||||||
|
}
|
||||||
|
|
||||||
// 到期前15填短信通知联系人
|
// 到期前15填短信通知联系人
|
||||||
// 1点定时更新状态
|
// 1点定时更新状态
|
||||||
//停用状态不能登陆PC,小程序正常
|
//停用状态不能登陆PC,小程序正常
|
||||||
|
|||||||
@ -11,6 +11,8 @@ public interface XhpcTenantMapper {
|
|||||||
|
|
||||||
List<XhpcTenantDomain> getList(@Param("params") Map params);
|
List<XhpcTenantDomain> getList(@Param("params") Map params);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getNameList();
|
||||||
|
|
||||||
int deleteByPrimaryKey(String tenantId);
|
int deleteByPrimaryKey(String tenantId);
|
||||||
|
|
||||||
int deleteLogicByPrimaryKey(String tenantId);
|
int deleteLogicByPrimaryKey(String tenantId);
|
||||||
|
|||||||
@ -7,7 +7,10 @@ import java.util.Map;
|
|||||||
|
|
||||||
public interface XhpcTenantService {
|
public interface XhpcTenantService {
|
||||||
|
|
||||||
List<XhpcTenantDomain> getList(Map<String, Object> params);
|
List<XhpcTenantDomain> getPage(Map<String, Object> params);
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String, Object>> getNameList();
|
||||||
|
|
||||||
XhpcTenantDomain getInfoByPk(String tenantId);
|
XhpcTenantDomain getInfoByPk(String tenantId);
|
||||||
|
|
||||||
|
|||||||
@ -21,11 +21,16 @@ public class XhpcTenantServiceImpl implements XhpcTenantService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<XhpcTenantDomain> getList(Map<String, Object> params){
|
public List<XhpcTenantDomain> getPage(Map<String, Object> params){
|
||||||
return tenantMapper.getList(params);
|
return tenantMapper.getList(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getNameList(){
|
||||||
|
return tenantMapper.getNameList();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XhpcTenantDomain getInfoByPk(String tenantId){
|
public XhpcTenantDomain getInfoByPk(String tenantId){
|
||||||
return tenantMapper.selectByPrimaryKey(tenantId);
|
return tenantMapper.selectByPrimaryKey(tenantId);
|
||||||
|
|||||||
@ -26,6 +26,14 @@
|
|||||||
update_user, update_time, `status`, is_deleted
|
update_user, update_time, `status`, is_deleted
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<select id="getNameList" resultType="map">
|
||||||
|
select
|
||||||
|
tenant_id as 'tenantId',
|
||||||
|
tenant_name as 'tenantName'
|
||||||
|
from xhpc_tenant where is_deleted=0 and status=1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getList" resultType="com.xhpc.tenant.domain.XhpcTenantDomain">
|
<select id="getList" resultType="com.xhpc.tenant.domain.XhpcTenantDomain">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user