增加获取租户列表的接口
This commit is contained in:
parent
3ea067e645
commit
d7238058ab
@ -50,11 +50,6 @@ public class SysUser extends BaseEntity
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 租户名称
|
||||
*/
|
||||
private String tenantName;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
|
||||
@ -83,13 +83,11 @@
|
||||
r.status as role_status,
|
||||
u.user_type,
|
||||
u.tenant_id,
|
||||
t.tenant_name,
|
||||
u.operator_id
|
||||
from sys_user u
|
||||
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_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>
|
||||
|
||||
<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.tenant.domain.XhpcTenantDomain;
|
||||
import com.xhpc.tenant.service.XhpcTenantService;
|
||||
import org.apache.tools.ant.taskdefs.condition.Http;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -39,8 +38,15 @@ public class XhpcTenantController extends BaseController {
|
||||
params.put("tenantId", tenantId);
|
||||
params.put("tenantName", tenantName);
|
||||
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填短信通知联系人
|
||||
// 1点定时更新状态
|
||||
//停用状态不能登陆PC,小程序正常
|
||||
|
||||
@ -11,6 +11,8 @@ public interface XhpcTenantMapper {
|
||||
|
||||
List<XhpcTenantDomain> getList(@Param("params") Map params);
|
||||
|
||||
List<Map<String, Object>> getNameList();
|
||||
|
||||
int deleteByPrimaryKey(String tenantId);
|
||||
|
||||
int deleteLogicByPrimaryKey(String tenantId);
|
||||
|
||||
@ -7,7 +7,10 @@ import java.util.Map;
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@ -21,11 +21,16 @@ public class XhpcTenantServiceImpl implements XhpcTenantService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<XhpcTenantDomain> getList(Map<String, Object> params){
|
||||
public List<XhpcTenantDomain> getPage(Map<String, Object> params){
|
||||
return tenantMapper.getList(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getNameList(){
|
||||
return tenantMapper.getNameList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public XhpcTenantDomain getInfoByPk(String tenantId){
|
||||
return tenantMapper.selectByPrimaryKey(tenantId);
|
||||
|
||||
@ -26,6 +26,14 @@
|
||||
update_user, update_time, `status`, is_deleted
|
||||
</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
|
||||
<include refid="Base_Column_List" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user