Commit a1703569 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.天气数据接收定时任务,解决代码扫描问题,修改文件读取相关代码,解决资源未关流问题;
2.修改登录验证码生成工具类,解决代码扫描问题,修复随机数不安全问题;
3.删除除主程序启动类外其他启动类模块,解决代码扫描问题;
4.删除自定义httputlis类,解决代码扫描问题,替换部分代码远程调用方法;
5.重构光伏预测模块下载电站实际发电数据导入模板接口,解决代码扫描问题;
6.重构光伏预测模块导入电站实际发电数据接口,解决代码扫描问题;
7.删除公用excel导入导出工具类及poi相关pom依赖,解决代码扫描问题;
8.光伏功率预测模块,增加查询线路列表接口,解决页面接口报错问题;
9.增加测试用历史数据导入接口;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 6c97e203
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user_group")
public class SysUserGroupEnt implements Serializable {
@XText("用户组ID(主键)")
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("组织机构ID")
@TableField
private String ouId;
@XText("用户组名称")
@TableField
private String userGroupName;
@XText("备注")
@TableField
private String remark;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("修改时间")
@TableField
private Date modifyTime;
@XText("序号")
@TableField
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user_group_role_rel")
public class SysUserGroupRoleRelEnt implements Serializable {
@XText("用户组角色关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("角色ID")
@TableField
private String roleId;
@XText("用户组ID")
@TableField
private String userGroupId;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("修改时间")
@TableField
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
public class SysUserGroupRoleRelView implements Serializable {
@XText("用户组角色关系id(主键)")
@TableField
private String id;
@XText("角色ID")
@TableField
private String roleId;
@XText("用户组ID")
@TableField
private String userGroupId;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("角色名称")
@TableField
private String roleName;
@XText("修改时间")
@TableField
private Date modifyTime;
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
public class SysUserGroupView implements Serializable {
@XText("用户组ID(主键)")
@TableField
private String id;
@XText("组织机构ID")
@TableField
private String ouId;
@XText("用户组名称")
@TableField
private String userGroupName;
@XText("备注")
@TableField
private String remark;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("组织机构名称")
@TableField
private String ouName;
@XText("修改时间")
@TableField
private Date modifyTime;
@XText("序号")
@TableField
private Integer sort;
public String getOuName() {
return ouName;
}
public void setOuName(String ouName) {
this.ouName = ouName;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
@TableName("sys_user_with_user_group_rel")
public class SysUserWithUserGroupRelEnt implements Serializable {
@XText("用户用户组关系id(主键)")
@TableId(type = IdType.ASSIGN_UUID)
private String id;
@XText("用户ID")
@TableField
private String userId;
@XText("用户组ID")
@TableField
private String userGroupId;
@XText("排序")
@TableField
private Integer sort;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("修改时间")
@TableField
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
public class SysUserWithUserGroupRelView implements Serializable {
@XText("用户用户组关系id(主键)")
@TableField
private String id;
@XText("用户ID")
@TableField
private String userId;
@XText("用户名称")
private String userName;
@XText("用户组ID")
@TableField
private String userGroupId;
@XText("用户组名称")
private String userGroupName;
@XText("排序")
@TableField
private Integer sort;
@XText("创建人")
@TableField
private String createById;
@XText("创建人名称")
@TableField
private String createByName;
@XText("创建时间")
@TableField
private Date createTime;
@XText("修改人")
@TableField
private String modifyById;
@XText("修改人名称")
@TableField
private String modifyByName;
@XText("修改时间")
@TableField
private Date modifyTime;
@XText("用户组ID")
@TableField
private List<String> userGroupIds;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String value) {
this.userId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserGroupName() {
return userGroupName;
}
public void setUserGroupName(String userGroupName) {
this.userGroupName = userGroupName;
}
public List<String> getUserGroupIds() {
return userGroupIds;
}
public void setUserGroupIds(List<String> userGroupIds) {
this.userGroupIds = userGroupIds;
}
}
package pps.core.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserGroupEnt;
@Repository(value = "pps.core.system.mapper.SysUserGroupMapper")
public interface SysUserGroupMapper extends BaseMapper<SysUserGroupEnt> {
}
package pps.core.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserGroupRoleRelEnt;
@Repository(value = "pps.core.system.mapper.SysUserGroupRoleRelMapper")
public interface SysUserGroupRoleRelMapper extends BaseMapper<SysUserGroupRoleRelEnt> {
}
package pps.core.system.mapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserGroupRoleRelView;
import java.util.List;
@Repository(value = "pps.core.system.mapper.SysUserGroupRoleRelViewMapper")
public interface SysUserGroupRoleRelViewMapper {
SysUserGroupRoleRelView selectOne(SysUserGroupRoleRelView record);
List<SysUserGroupRoleRelView> selectList(SysUserGroupRoleRelView record);
void batchInsert(List<SysUserGroupRoleRelView> viewList);
}
package pps.core.system.mapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserGroupView;
import java.util.List;
@Repository(value = "pps.core.system.mapper.SysUserGroupViewMapper")
public interface SysUserGroupViewMapper {
SysUserGroupView selectOne(SysUserGroupView record);
List<SysUserGroupView> selectList(SysUserGroupView record);
}
package pps.core.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserWithUserGroupRelEnt;
@Repository(value = "pps.core.system.mapper.SysUserWithUserGroupRelMapper")
public interface SysUserWithUserGroupRelMapper extends BaseMapper<SysUserWithUserGroupRelEnt> {
}
package pps.core.system.mapper;
import org.springframework.stereotype.Repository;
import pps.core.system.entity.SysUserWithUserGroupRelView;
import java.util.List;
@Repository(value = "pps.core.system.mapper.SysUserWithUserGroupRelViewMapper")
public interface SysUserWithUserGroupRelViewMapper {
SysUserWithUserGroupRelView selectOne(SysUserWithUserGroupRelView record);
List<SysUserWithUserGroupRelView> selectList(SysUserWithUserGroupRelView record);
List<SysUserWithUserGroupRelView> selectListWithGroup(SysUserWithUserGroupRelView record);
void batchInsert(List<SysUserWithUserGroupRelView> viewList);
List<SysUserWithUserGroupRelView> selectListByUserId(SysUserWithUserGroupRelView record);
List<SysUserWithUserGroupRelView> selectListByUserGroupId(SysUserWithUserGroupRelView record);
List<SysUserWithUserGroupRelView> selectListWithGroupIds(SysUserWithUserGroupRelView record);
}
package pps.core.system.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.system.entity.SysUserGroupRoleRelEnt;
import pps.core.system.entity.SysUserGroupRoleRelView;
import pps.core.system.mapper.SysUserGroupRoleRelMapper;
import pps.core.system.mapper.SysUserGroupRoleRelViewMapper;
import pps.core.system.service.data.sys_user_group_role_rel.*;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import java.util.List;
@XText("用户组和角色关系")
@XService
public class SysUserGroupRoleRelService {
@XApiPost
public XServiceResult createSysUserGroupRoleRel(XContext context, CreateSysUserGroupRoleRelInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
SysUserGroupRoleRelEnt entity = new SysUserGroupRoleRelEnt();
XCopyUtils.copyObject(input, entity);
mapper.insert(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult updateSysUserGroupRoleRel(XContext context, UpdateSysUserGroupRoleRelInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
SysUserGroupRoleRelEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupRoleRelEnt>()
.lambda()
.eq(SysUserGroupRoleRelEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult deleteSysUserGroupRoleRel(XContext context, DeleteSysUserGroupRoleRelInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
SysUserGroupRoleRelEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupRoleRelEnt>()
.lambda()
.eq(SysUserGroupRoleRelEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
return XServiceResult.OK;
}
@XApiPost
public XSingleResult<GetSysUserGroupRoleRelOutput> getSysUserGroupRoleRel(XContext context, GetSysUserGroupRoleRelInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
SysUserGroupRoleRelEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupRoleRelEnt>()
.lambda().
eq(SysUserGroupRoleRelEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysUserGroupRoleRelOutput output = new GetSysUserGroupRoleRelOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XApiPost
public XPageResult<QuerySysUserGroupRoleRelOutput> querySysUserGroupRoleRel(XContext context, QuerySysUserGroupRoleRelInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
QueryWrapper<SysUserGroupRoleRelEnt> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().like(SysUserGroupRoleRelEnt::getId, input.getId())
.like(SysUserGroupRoleRelEnt::getRoleId, input.getRoleId())
.like(SysUserGroupRoleRelEnt::getUserGroupId, input.getUserGroupId())
.like(SysUserGroupRoleRelEnt::getCreateById, input.getCreateById())
.like(SysUserGroupRoleRelEnt::getCreateByName, input.getCreateByName())
.eq(SysUserGroupRoleRelEnt::getCreateTime, input.getCreateTime())
.like(SysUserGroupRoleRelEnt::getModifyById, input.getModifyById())
.like(SysUserGroupRoleRelEnt::getModifyByName, input.getModifyByName())
.eq(SysUserGroupRoleRelEnt::getModifyTime, input.getModifyTime());
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysUserGroupRoleRelOutput.class);
}
@XApiPost
public XPageResult<QuerySysUserGroupRoleRelOutput> dynamicQuerySysUserGroupRoleRel(XContext context, CustomQueryInput input) {
SysUserGroupRoleRelMapper mapper = context.getBean(SysUserGroupRoleRelMapper.class);
return XMapperHelper.query(mapper, input, SysUserGroupRoleRelEnt.class, QuerySysUserGroupRoleRelOutput.class);
}
@XApiPost
public XSingleResult<GetSysUserGroupRoleRelViewOutput> getSysUserGroupRoleRelView(XContext context, GetSysUserGroupRoleRelViewInput input) {
SysUserGroupRoleRelViewMapper mapper = context.getBean(SysUserGroupRoleRelViewMapper.class);
SysUserGroupRoleRelView record = new SysUserGroupRoleRelView();
XCopyUtils.copyObject(input, record);
SysUserGroupRoleRelView view = mapper.selectOne(record);
if (ObjectUtil.isNull(view)) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysUserGroupRoleRelViewOutput output = new GetSysUserGroupRoleRelViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XText("根据用户组id查询选中的角色")
@XApiPost
public XPageResult<QuerySysUserGroupRoleRelViewOutput> querySysUserGroupRoleRelView(XContext context, QuerySysUserGroupRoleRelViewInput input) {
SysUserGroupRoleRelViewMapper mapper = context.getBean(SysUserGroupRoleRelViewMapper.class);
SysUserGroupRoleRelView record = new SysUserGroupRoleRelView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<SysUserGroupRoleRelView> list = mapper.selectList(record);
PageInfo<SysUserGroupRoleRelView> pageInfo = new PageInfo<>(list);
List<QuerySysUserGroupRoleRelViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysUserGroupRoleRelViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
package pps.core.system.service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import pps.core.system.entity.*;
import pps.core.system.mapper.*;
import pps.core.system.service.data.sys_auth_ou_scope.CreateSysAuthOuScopeInput;
import pps.core.system.service.data.sys_user_group.*;
import pps.core.system.service.data.sys_user_group_role_rel.CreateSysUserGroupRoleRelInput;
import pps.core.system.service.data.sys_user_with_user_group_rel.CreateSysUserWithUserGroupRelInput;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.data.CustomQueryInput;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.feature.mybatis.helper.XMapperHelper;
import xstartup.helper.XTransactionHelper;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
@XText("用户组管理")
@XService
public class SysUserGroupService {
@XText("创建用户组")
@XApiPost
public XServiceResult createSysUserGroup(XContext context, CreateSysUserGroupInput input) {
return XTransactionHelper.begin(context, () -> {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
SysUserGroupEnt entity = new SysUserGroupEnt();
XCopyUtils.copyObject(input, entity);
entity.setId(UUID.randomUUID().toString());
entity.setCreateByName(context.getUser().getName());
entity.setCreateTime(new Date());
mapper.insert(entity);
return XServiceResult.OK;
});
}
@XText("创建用户组和角色关系")
@XApiPost
public XServiceResult createSysUserGroupRoleRel(XContext context, CreateSysUserGroupRoleRelInput input) {
return XTransactionHelper.begin(context, () -> {
SysUserGroupRoleRelMapper userGroupWithRole = context.getBean(SysUserGroupRoleRelMapper.class);
SysUserGroupRoleRelViewMapper viewUserGroupWithRole = context.getBean(SysUserGroupRoleRelViewMapper.class);
//删除原关系
PageHelper.startPage(1, 1000);
List<SysUserGroupRoleRelEnt> sysUserGroupRoleRelEnts = userGroupWithRole.selectList(new QueryWrapper<SysUserGroupRoleRelEnt>()
.lambda()
.eq(SysUserGroupRoleRelEnt::getUserGroupId, input.getUserGroupId()));
if (CollUtil.isNotEmpty(sysUserGroupRoleRelEnts)) {
userGroupWithRole.deleteBatchIds(sysUserGroupRoleRelEnts.stream().map(SysUserGroupRoleRelEnt::getId).collect(Collectors.toList()));
}
//创建新关系
List<String> items = input.getItems();
Date now = new Date();
List<SysUserGroupRoleRelView> viewList = new ArrayList<>();
for (String role : items) {
SysUserGroupRoleRelView entity = new SysUserGroupRoleRelView();
entity.setRoleId(role);
entity.setUserGroupId(input.getUserGroupId());
entity.setId(UUID.randomUUID().toString());
entity.setCreateByName(context.getUser().getName());
entity.setCreateTime(now);
viewList.add(entity);
}
if (CollUtil.isNotEmpty(viewList)) {
viewUserGroupWithRole.batchInsert(viewList);
}
return XServiceResult.OK;
});
}
@XText("创建用户组和菜单、组织机构关系表")
@XApiPost
public XServiceResult createSysAuthOuScope(XContext context, CreateSysAuthOuScopeInput input) {
return XTransactionHelper.begin(context, () -> {
SysAuthOuScopeMapper userGroupWithRole = context.getBean(SysAuthOuScopeMapper.class);
SysAuthOuScopeViewMapper viewUserGroupWithRole = context.getBean(SysAuthOuScopeViewMapper.class);
//删除原关系
PageHelper.startPage(1, 1000);
List<SysAuthOuScopeEnt> sysAuthOuScopeEnts = userGroupWithRole.selectList(new QueryWrapper<SysAuthOuScopeEnt>()
.lambda()
.eq(SysAuthOuScopeEnt::getUserGroupId, input.getUserGroupId()));
if (CollUtil.isNotEmpty(sysAuthOuScopeEnts)) {
userGroupWithRole.deleteBatchIds(sysAuthOuScopeEnts.stream().map(SysAuthOuScopeEnt::getId).collect(Collectors.toList()));
}
//创建新关系
List<SysAuthOuScopeView> viewList = new ArrayList<>();
List<String> ouIds = input.getOuIds();
for (String ouId : ouIds) {
List<String> menuIds = input.getMenuIds();
Date now = new Date();
for (String menuId : menuIds) {
SysAuthOuScopeView entity = new SysAuthOuScopeView();
entity.setMenuId(menuId);
entity.setOuId(ouId);
entity.setUserGroupId(input.getUserGroupId());
entity.setId(UUID.randomUUID().toString());
entity.setCreateByName(context.getUser().getName());
entity.setCreateTime(now);
viewList.add(entity);
}
}
if (CollUtil.isNotEmpty(viewList)) {
viewUserGroupWithRole.batchInsert(viewList);
}
return XServiceResult.OK;
});
}
@XText("创建用户组和用户关系表")
@XApiPost
public XServiceResult createSysUserWithUserGroupRel(XContext context, CreateSysUserWithUserGroupRelInput input) {
return XTransactionHelper.begin(context, () -> {
SysUserWithUserGroupRelMapper userGroupWithRole = context.getBean(SysUserWithUserGroupRelMapper.class);
SysUserWithUserGroupRelViewMapper userWithUserGroupRelViewMapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
//删除原关系
PageHelper.startPage(1, 1000);
List<SysUserWithUserGroupRelEnt> sysAuthOuScopeEnts = userGroupWithRole.selectList(new QueryWrapper<SysUserWithUserGroupRelEnt>()
.lambda()
.eq(SysUserWithUserGroupRelEnt::getUserGroupId, input.getUserGroupId()));
if (CollUtil.isNotEmpty(sysAuthOuScopeEnts)) {
userGroupWithRole.deleteBatchIds(sysAuthOuScopeEnts.stream().map(SysUserWithUserGroupRelEnt::getId).collect(Collectors.toList()));
}
//创建新关系
List<SysUserWithUserGroupRelView> items = input.getItems();
Date now = new Date();
List<SysUserWithUserGroupRelView> viewList = new ArrayList<>();
for (SysUserWithUserGroupRelView obj : items) {
SysUserWithUserGroupRelView entity = new SysUserWithUserGroupRelView();
entity.setUserId(obj.getUserId());
entity.setUserGroupId(input.getUserGroupId());
entity.setId(UUID.randomUUID().toString());
entity.setCreateByName(context.getUser().getName());
entity.setCreateTime(now);
viewList.add(entity);
}
if (CollUtil.isNotEmpty(viewList)) {
userWithUserGroupRelViewMapper.batchInsert(viewList);
}
return XServiceResult.OK;
});
}
@XText("修改用户组")
@XApiPost
public XServiceResult updateSysUserGroup(XContext context, UpdateSysUserGroupInput input) {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
SysUserGroupEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupEnt>()
.lambda()
.eq(SysUserGroupEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
XCopyUtils.copyObject(input, entity);
mapper.updateById(entity);
return XServiceResult.OK;
}
@XText("删除用户组")
@XApiPost
public XServiceResult deleteSysUserGroup(XContext context, DeleteSysUserGroupInput input) {
return XTransactionHelper.begin(context, () -> {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
SysUserGroupEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupEnt>()
.lambda()
.eq(SysUserGroupEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XServiceResult.error(context, XError.NotFound);
}
mapper.deleteById(entity);
//删除角色用户组信息
SysUserGroupRoleRelMapper groupRoleMapper = context.getBean(SysUserGroupRoleRelMapper.class);
List<SysUserGroupRoleRelEnt> sysUserGroupEnts = groupRoleMapper.selectList(new QueryWrapper<SysUserGroupRoleRelEnt>()
.lambda()
.eq(SysUserGroupRoleRelEnt::getUserGroupId, entity.getId()));
if (CollUtil.isNotEmpty(sysUserGroupEnts)) {
for (SysUserGroupRoleRelEnt obj : sysUserGroupEnts) {
mapper.deleteById(obj);
}
}
//删除菜单用户组信息
SysAuthOuScopeMapper groupMenuMapper = context.getBean(SysAuthOuScopeMapper.class);
List<SysAuthOuScopeEnt> menuGroupEnts = groupMenuMapper.selectList(new QueryWrapper<SysAuthOuScopeEnt>()
.lambda()
.eq(SysAuthOuScopeEnt::getUserGroupId, entity.getId()));
if (CollUtil.isNotEmpty(menuGroupEnts)) {
for (SysAuthOuScopeEnt obj : menuGroupEnts) {
groupMenuMapper.deleteById(obj);
}
}
//删除用户用户组信息
SysUserWithUserGroupRelMapper groupUserMapper = context.getBean(SysUserWithUserGroupRelMapper.class);
List<SysUserWithUserGroupRelEnt> userGroupEnts = groupUserMapper.selectList(new QueryWrapper<SysUserWithUserGroupRelEnt>()
.lambda()
.eq(SysUserWithUserGroupRelEnt::getUserGroupId, entity.getId()));
if (CollUtil.isNotEmpty(userGroupEnts)) {
for (SysUserWithUserGroupRelEnt obj : userGroupEnts) {
groupUserMapper.deleteById(obj);
}
}
return XServiceResult.OK;
});
}
@XText("根据id查询用户组详情")
@XApiPost
public XSingleResult<GetSysUserGroupOutput> getSysUserGroup(XContext context, GetSysUserGroupInput input) {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
SysUserGroupEnt entity = mapper.selectOne(new QueryWrapper<SysUserGroupEnt>()
.lambda()
.eq(SysUserGroupEnt::getId, input.getId()));
if (ObjectUtil.isNull(entity)) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysUserGroupOutput output = new GetSysUserGroupOutput();
XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output);
}
@XText("分页查询用户组信息")
@XApiPost
public XPageResult<QuerySysUserGroupOutput> querySysUserGroup(XContext context, QuerySysUserGroupInput input) {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
QueryWrapper<SysUserGroupEnt> queryWrapper = new QueryWrapper<>();
if (CharSequenceUtil.isNotBlank(input.getUserGroupName())) {
queryWrapper.lambda().like(SysUserGroupEnt::getUserGroupName, input.getUserGroupName());
}
if (CharSequenceUtil.isNotBlank(input.getOuId())) {
queryWrapper.lambda().like(SysUserGroupEnt::getOuId, input.getOuId());
}
return XMapperHelper.query(mapper, input, queryWrapper, QuerySysUserGroupOutput.class);
}
@XApiPost
public XPageResult<QuerySysUserGroupOutput> dynamicQuerySysUserGroup(XContext context, CustomQueryInput input) {
SysUserGroupMapper mapper = context.getBean(SysUserGroupMapper.class);
return XMapperHelper.query(mapper, input, SysUserGroupEnt.class, QuerySysUserGroupOutput.class);
}
@XApiPost
public XSingleResult<GetSysUserGroupViewOutput> getSysUserGroupView(XContext context, GetSysUserGroupViewInput input) {
SysUserGroupViewMapper mapper = context.getBean(SysUserGroupViewMapper.class);
SysUserGroupView record = new SysUserGroupView();
XCopyUtils.copyObject(input, record);
SysUserGroupView view = mapper.selectOne(record);
if (ObjectUtil.isNull(view)) {
return XSingleResult.error(context, XError.NotFound);
}
GetSysUserGroupViewOutput output = new GetSysUserGroupViewOutput();
XCopyUtils.copyObject(view, output);
return XSingleResult.success(output);
}
@XText("分页查询用户组信息(带组组织机构名称)")
@XApiPost
public XPageResult<QuerySysUserGroupViewOutput> querySysUserGroupView(XContext context, QuerySysUserGroupViewInput input) {
SysUserGroupViewMapper mapper = context.getBean(SysUserGroupViewMapper.class);
SysUserGroupView record = new SysUserGroupView();
XCopyUtils.copyObject(input, record);
PageHelper.startPage(input.getPage(), input.getLimit());
List<SysUserGroupView> list = mapper.selectList(record);
PageInfo<SysUserGroupView> pageInfo = new PageInfo<>(list);
List<QuerySysUserGroupViewOutput> outputs = XCopyUtils.copyNewList(pageInfo.getList(), QuerySysUserGroupViewOutput.class);
return XPageResult.success(outputs, input, pageInfo.getTotal());
}
}
\ No newline at end of file
...@@ -72,6 +72,9 @@ public class SysUserService { ...@@ -72,6 +72,9 @@ public class SysUserService {
@XText("新增用户") @XText("新增用户")
@XApiPost @XApiPost
public XServiceResult createSysUser(XContext context, CreateSysUserInput input) throws XServiceException { public XServiceResult createSysUser(XContext context, CreateSysUserInput input) throws XServiceException {
if (CharSequenceUtil.isBlank(input.getPassword())) {
return XServiceResult.error(context, LoginError.Missing_Pd);
}
return XTransactionHelper.begin(context, () -> { return XTransactionHelper.begin(context, () -> {
SysUserMapper mapper = context.getBean(SysUserMapper.class); SysUserMapper mapper = context.getBean(SysUserMapper.class);
//查询是否存在相同的登录名,如果存在,提示错误信息 //查询是否存在相同的登录名,如果存在,提示错误信息
...@@ -90,9 +93,6 @@ public class SysUserService { ...@@ -90,9 +93,6 @@ public class SysUserService {
} }
SysUserEnt entity = new SysUserEnt(); SysUserEnt entity = new SysUserEnt();
XCopyUtils.copyObject(input, entity); XCopyUtils.copyObject(input, entity);
if (CharSequenceUtil.isNotBlank(input.getPassword())) {
return XServiceResult.error(context, LoginError.Missing_Pd);
}
entity.setPassword(input.getPassword()); entity.setPassword(input.getPassword());
String uuid = BaseUtils.randomUUIDString(); String uuid = BaseUtils.randomUUIDString();
entity.setId(uuid); entity.setId(uuid);
......
package pps.core.system.service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import pps.core.common.session.PpsUserSession;
import pps.core.common.utils.BaseUtils;
import pps.core.system.entity.SysUserWithUserGroupRelEnt;
import pps.core.system.entity.SysUserWithUserGroupRelView;
import pps.core.system.error.LoginError;
import pps.core.system.mapper.SysUserWithUserGroupRelMapper;
import pps.core.system.mapper.SysUserWithUserGroupRelViewMapper;
import pps.core.system.service.data.sys_user_with_user_group_rel.*;
import xstartup.annotation.XService;
import xstartup.annotation.XText;
import xstartup.base.XContext;
import xstartup.base.util.XCopyUtils;
import xstartup.data.XListResult;
import xstartup.data.XServiceResult;
import xstartup.feature.api.annotation.XApiPost;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
@XText("用户与用户组关系管理")
@XService
public class SysUserWithUserGroupRelService {
@XText("根据用户查询所绑定的用户组")
@XApiPost
public XListResult<QuerySysUserWithUserGroupRelViewOutput> queryUserGroupByUserId(XContext context, QuerySysUserWithUserGroupRelViewInput input) {
SysUserWithUserGroupRelViewMapper mapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
SysUserWithUserGroupRelView record = new SysUserWithUserGroupRelView();
XCopyUtils.copyObject(input, record);
List<SysUserWithUserGroupRelView> list = mapper.selectListByUserId(record);
List<QuerySysUserWithUserGroupRelViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysUserWithUserGroupRelViewOutput.class);
return XListResult.success(outputs);
}
@XText("创建用户组和用户关系表")
@XApiPost
public XServiceResult createSysUserWithUserGroup(XContext context, CreateSysUserWithUserGroupRelInput input) {
//SysUserWithUserGroupRel
SysUserWithUserGroupRelMapper userGroupWithRole = context.getBean(SysUserWithUserGroupRelMapper.class);
SysUserWithUserGroupRelViewMapper userWithUserGroupRelViewMapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
//删除原关系
QueryWrapper<SysUserWithUserGroupRelEnt> queryWrapper = new QueryWrapper<>();
if (CharSequenceUtil.equals("1", input.getType())) {
queryWrapper.lambda().eq(SysUserWithUserGroupRelEnt::getUserGroupId, input.getUserGroupId());
} else {
queryWrapper.lambda().eq(SysUserWithUserGroupRelEnt::getUserId, input.getUserId());
}
PageHelper.startPage(1, 1000);
List<SysUserWithUserGroupRelEnt> sysAuthOuScopeEnts = userGroupWithRole.selectList(queryWrapper);
if (CollUtil.isNotEmpty(sysAuthOuScopeEnts)) {
userGroupWithRole.deleteBatchIds(sysAuthOuScopeEnts.stream().map(SysUserWithUserGroupRelEnt::getId).collect(Collectors.toList()));
}
//创建新关系
Date now = new Date();
List<String> groupIdList = input.getUserGroupIdList();
List<SysUserWithUserGroupRelView> viewList = new ArrayList<>();
for (String groupId : groupIdList) {
SysUserWithUserGroupRelView entity = new SysUserWithUserGroupRelView();
if (CharSequenceUtil.equals("1", input.getType())) {
entity.setUserId(groupId);
entity.setUserGroupId(input.getUserGroupId());
} else {
entity.setUserId(input.getUserId());
entity.setUserGroupId(groupId);
}
entity.setId(UUID.randomUUID().toString());
PpsUserSession session = context.getSession(PpsUserSession.class);
entity.setCreateById(session.getId());
entity.setCreateByName(session.getUserName());
entity.setCreateTime(now);
viewList.add(entity);
}
if (CollUtil.isNotEmpty(viewList)) {
userWithUserGroupRelViewMapper.batchInsert(viewList);
}
return XServiceResult.OK;
}
@XApiPost
public XServiceResult createSysUserWithUserGroupRel(XContext context, CreateSysUserWithUserGroupRelInput input) {
if (CharSequenceUtil.isBlank(input.getUserId()) || CollUtil.isEmpty(input.getUserGroupIdList())) {
return XServiceResult.error(context, LoginError.Trade_ParamIsNull);
}
//删除原关系
SysUserWithUserGroupRelMapper delMapper = context.getBean(SysUserWithUserGroupRelMapper.class);
delMapper.delete(new LambdaQueryWrapper<SysUserWithUserGroupRelEnt>()
.eq(SysUserWithUserGroupRelEnt::getUserId, input.getUserId())
);
PpsUserSession session = context.getSession(PpsUserSession.class);
String userId = session.getId();
String userName = session.getUserName();
DateTime now = DateUtil.date();
Integer sort = ObjectUtil.defaultIfNull(input.getSort(), 0);
List<SysUserWithUserGroupRelView> list = new ArrayList<>(input.getUserGroupIdList().size());
for (String userGroupId : input.getUserGroupIdList()) {
SysUserWithUserGroupRelView entity = new SysUserWithUserGroupRelView();
entity.setId(BaseUtils.randomUUIDString());
entity.setUserId(input.getUserId());
entity.setUserGroupId(userGroupId);
entity.setSort(sort);
entity.setCreateById(userId);
entity.setCreateByName(userName);
entity.setCreateTime(now);
list.add(entity);
}
SysUserWithUserGroupRelViewMapper mapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
mapper.batchInsert(list);
return XServiceResult.OK;
}
@XApiPost
public XServiceResult createSysUserGroupWithUserRel(XContext context, CreateSysUserGroupWithUserRelInput input) {
//删除原关系
SysUserWithUserGroupRelMapper delMapper = context.getBean(SysUserWithUserGroupRelMapper.class);
PageHelper.startPage(1, 1000);
List<SysUserWithUserGroupRelEnt> sysUserGroupEnts = delMapper.selectList(new QueryWrapper<SysUserWithUserGroupRelEnt>()
.lambda()
.eq(SysUserWithUserGroupRelEnt::getUserGroupId, input.getUserGroupId()));
if (CollUtil.isNotEmpty(sysUserGroupEnts)) {
delMapper.deleteBatchIds(sysUserGroupEnts.stream().map(SysUserWithUserGroupRelEnt::getId).collect(Collectors.toList()));
}
List<SysUserWithUserGroupRelEnt> list = new ArrayList<>();
for (String userId : input.getUserIdList()) {
SysUserWithUserGroupRelEnt entity = new SysUserWithUserGroupRelEnt();
entity.setUserId(userId);
entity.setUserGroupId(input.getUserGroupId());
entity.setSort(input.getSort());
list.add(entity);
}
SysUserWithUserGroupRelMapper mapper = context.getBean(SysUserWithUserGroupRelMapper.class);
for (SysUserWithUserGroupRelEnt sysUserWithUserGroupRelEnt : list) {
mapper.insert(sysUserWithUserGroupRelEnt);
}
return XServiceResult.OK;
}
@XApiPost
public XListResult<QuerySysUserWithUserGroupRelViewOutput> querySysUserWithUserGroupRelView(XContext context, QuerySysUserWithUserGroupRelViewInput input) {
SysUserWithUserGroupRelViewMapper mapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
SysUserWithUserGroupRelView record = new SysUserWithUserGroupRelView();
XCopyUtils.copyObject(input, record);
List<SysUserWithUserGroupRelView> list = mapper.selectList(record);
List<QuerySysUserWithUserGroupRelViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysUserWithUserGroupRelViewOutput.class);
return XListResult.success(outputs);
}
@XApiPost
public XListResult<QuerySysUserGroupWithUserRelViewOutput> querySysUserGroupWithUserRelView(XContext context, QuerySysUserGroupWithUserRelViewInput input) {
SysUserWithUserGroupRelViewMapper mapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
SysUserWithUserGroupRelView record = new SysUserWithUserGroupRelView();
XCopyUtils.copyObject(input, record);
List<SysUserWithUserGroupRelView> list = mapper.selectList(record);
List<QuerySysUserGroupWithUserRelViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysUserGroupWithUserRelViewOutput.class);
return XListResult.success(outputs);
}
@XText("根据用户组id查询选中的用户")
@XApiPost
public XListResult<QuerySysUserGroupWithUserRelViewOutput> querySysUserGroupWithUserRelViewByUserGroupId(XContext context, QuerySysUserGroupWithUserRelViewInput input) {
SysUserWithUserGroupRelViewMapper mapper = context.getBean(SysUserWithUserGroupRelViewMapper.class);
SysUserWithUserGroupRelView record = new SysUserWithUserGroupRelView();
XCopyUtils.copyObject(input, record);
List<SysUserWithUserGroupRelView> list = mapper.selectListByUserGroupId(record);
List<QuerySysUserGroupWithUserRelViewOutput> outputs = XCopyUtils.copyNewList(list, QuerySysUserGroupWithUserRelViewOutput.class);
return XListResult.success(outputs);
}
}
\ No newline at end of file
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class CreateSysUserGroupInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class DeleteSysUserGroupInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupOutput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupViewInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupViewOutput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupInput extends XPageInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupOutput extends XPageInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupViewInput extends XPageInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import com.baomidou.mybatisplus.annotation.TableField;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupViewOutput extends XPageInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
@XText("组织机构名称")
@TableField
private String ouName;
public String getOuName() {
return ouName;
}
public void setOuName(String ouName) {
this.ouName = ouName;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group;
import xstartup.annotation.XText;
import java.util.Date;
public class UpdateSysUserGroupInput {
@XText("用户组ID(主键)")
private String id;
@XText("组织机构ID")
private String ouId;
@XText("用户组名称")
private String userGroupName;
@XText("备注")
private String remark;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("序号")
private Integer sort;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUserGroupName() {
return this.userGroupName;
}
public void setUserGroupName(String value) {
this.userGroupName = value;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String value) {
this.remark = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
import java.util.List;
public class CreateSysUserGroupRoleRelInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("用户组对应角色列表")
private List<String> items;
public List<String> getItems() {
return items;
}
public void setItems(List<String> items) {
this.items = items;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class DeleteSysUserGroupRoleRelInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupRoleRelInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupRoleRelOutput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupRoleRelViewInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class GetSysUserGroupRoleRelViewOutput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupRoleRelInput extends XPageInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupRoleRelOutput extends XPageInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupRoleRelViewInput extends XPageInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import xstartup.base.data.XPageInput;
import java.util.Date;
public class QuerySysUserGroupRoleRelViewOutput extends XPageInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("角色名称")
private String roleName;
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_group_role_rel;
import xstartup.annotation.XText;
import java.util.Date;
public class UpdateSysUserGroupRoleRelInput {
@XText("用户组角色关系id(主键)")
private String id;
@XText("角色ID")
private String roleId;
@XText("用户组ID")
private String userGroupId;
@XText("创建人")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getRoleId() {
return this.roleId;
}
public void setRoleId(String value) {
this.roleId = value;
}
public String getUserGroupId() {
return this.userGroupId;
}
public void setUserGroupId(String value) {
this.userGroupId = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import xstartup.annotation.XText;
import java.util.List;
public class CreateSysUserGroupWithUserRelInput {
@XText("用户组ID")
private String userGroupId;
@XText("用户ID列表(数组)")
private List<String> userIdList;
@XText("排序")
private Integer sort;
public String getUserGroupId() {
return userGroupId;
}
public void setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
}
public List<String> getUserIdList() {
return userIdList;
}
public void setUserIdList(List<String> userIdList) {
this.userIdList = userIdList;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import pps.core.system.entity.SysUserWithUserGroupRelView;
import xstartup.annotation.XText;
import java.util.List;
public class CreateSysUserWithUserGroupRelInput {
@XText("用户ID")
private String userId;
@XText("用户组ID列表(数组)")
private List<String> userGroupIdList;
@XText("用户组ID")
private String userGroupId;
@XText("排序")
private Integer sort;
@XText("用户组对应用户和菜单")
private List<SysUserWithUserGroupRelView> items;
@XText("识别创建来源页面")
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUserGroupId() {
return userGroupId;
}
public void setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
}
public List<SysUserWithUserGroupRelView> getItems() {
return items;
}
public void setItems(List<SysUserWithUserGroupRelView> items) {
this.items = items;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public List<String> getUserGroupIdList() {
return userGroupIdList;
}
public void setUserGroupIdList(List<String> userGroupIdList) {
this.userGroupIdList = userGroupIdList;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import xstartup.annotation.XText;
public class QuerySysUserGroupWithUserRelViewInput {
@XText("用户组ID")
private String userGroupId;
@XText("用户名称")
private String userName;
public String getUserGroupId() {
return userGroupId;
}
public void setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import xstartup.annotation.XText;
public class QuerySysUserGroupWithUserRelViewOutput {
@XText("用户用户组关系id(主键)")
private String id;
@XText("用户ID")
private String userId;
@XText("用户组ID")
private String userGroupId;
@XText("用户名称")
private String userName;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserGroupId() {
return userGroupId;
}
public void setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import xstartup.annotation.XText;
public class QuerySysUserWithUserGroupRelViewInput {
@XText("用户ID")
private String userId;
@XText("用户组名称")
private String userGroupName;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserGroupName() {
return userGroupName;
}
public void setUserGroupName(String userGroupName) {
this.userGroupName = userGroupName;
}
}
package pps.core.system.service.data.sys_user_with_user_group_rel;
import xstartup.annotation.XText;
public class QuerySysUserWithUserGroupRelViewOutput {
@XText("用户用户组关系id(主键)")
private String id;
@XText("用户ID")
private String userId;
@XText("用户组ID")
private String userGroupId;
@XText("用户组名称")
private String userGroupName;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserGroupId() {
return userGroupId;
}
public void setUserGroupId(String userGroupId) {
this.userGroupId = userGroupId;
}
public String getUserGroupName() {
return userGroupName;
}
public void setUserGroupName(String userGroupName) {
this.userGroupName = userGroupName;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserGroupRoleRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserGroupRoleRelView">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="role_id" property="roleId" jdbcType="VARCHAR"/>
<result column="user_group_id" property="userGroupId" jdbcType="VARCHAR"/>
<result column="create_by_id" property="createById" jdbcType="VARCHAR"/>
<result column="create_by_name" property="createByName" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="modify_by_id" property="modifyById" jdbcType="VARCHAR"/>
<result column="modify_by_name" property="modifyByName" jdbcType="VARCHAR"/>
<result column="role_name" property="roleName" jdbcType="VARCHAR"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id
,
role_id,
user_group_id,
create_by_id,
create_by_name,
create_time,
modify_by_id,
modify_by_name,
modify_time
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysUserGroupRoleRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_group_role_rel
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserGroupRoleRelView" resultMap="BaseResultMap">
select
sugrr.id,
sugrr.role_id,
sugrr.user_group_id,
sugrr.create_by_id,
sugrr.create_by_name,
sugrr.create_time,
sugrr.modify_by_id,
sugrr.modify_by_name,
sugrr.modify_time,sr.role_name
from sys_user_group_role_rel sugrr
left join sys_role sr on sr.id=sugrr.role_id
<where>
<if test="userGroupId != null and userGroupId !=''">
and sugrr.user_group_id=#{userGroupId}
</if>
</where>
</select>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO sys_user_group_role_rel
(id, role_id, user_group_id, create_by_id, create_by_name, create_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.roleId}, #{item.userGroupId}, #{item.createById}, #{item.createByName},
#{item.createTime})
</foreach>
</insert>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserGroupViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserGroupView">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="ou_id" property="ouId" jdbcType="VARCHAR"/>
<result column="user_group_name" property="userGroupName" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="create_by_id" property="createById" jdbcType="VARCHAR"/>
<result column="create_by_name" property="createByName" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="modify_by_id" property="modifyById" jdbcType="VARCHAR"/>
<result column="modify_by_name" property="modifyByName" jdbcType="VARCHAR"/>
<result column="ou_name" property="ouName" jdbcType="VARCHAR"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
<result column="sort" property="sort" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id
,
ou_id,
user_group_name,
remark,
create_by_id,
create_by_name,
create_time,
modify_by_id,
modify_by_name,
modify_time,
sort
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysUserGroupView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_group
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserGroupView" resultMap="BaseResultMap">
select
sug.id,
sug.ou_id,
sug.user_group_name,
sug.remark,
sug.create_by_id,
sug.create_by_name,
sug.create_time,
sug.modify_by_id,
sug.modify_by_name,
sug.modify_time,
sug.sort,so.ou_name
from sys_user_group sug
left join sys_organization so on so.id=sug.ou_id
<where>
<if test="ouId != null and ouId !=''">
and ou_id= #{ouId}
</if>
<if test="userGroupName != null and userGroupName !=''">
and user_group_name like concat('%',#{userGroupName},'%')
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserWithUserGroupRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserWithUserGroupRelView">
<id column="id" property="id" jdbcType="VARCHAR"/>
<result column="user_id" property="userId" jdbcType="VARCHAR"/>
<result column="user_group_id" property="userGroupId" jdbcType="VARCHAR"/>
<result column="sort" property="sort" jdbcType="INTEGER"/>
<result column="create_by_id" property="createById" jdbcType="VARCHAR"/>
<result column="create_by_name" property="createByName" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="modify_by_id" property="modifyById" jdbcType="VARCHAR"/>
<result column="modify_by_name" property="modifyByName" jdbcType="VARCHAR"/>
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id
,
user_id,
user_group_id,
sort,
create_by_id,
create_by_name,
create_time,
modify_by_id,
modify_by_name,
modify_time
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_with_user_group_rel
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView"
resultMap="BaseResultMap">
select b.id ,b.user_group_name from sys_user_group b,sys_user_with_user_group_rel c where b.id = c.user_group_id
and c.user_id=#{userId}
<if test="user_group_name!=null and user_group_name!='' ">
and b.user_group_name like concat('%',#{userGroupName,jdbcType=VARCHAR},'%')
</if>
</select>
<select id="selectListByUserGroupId" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView"
resultMap="BaseResultMap">
select
sug.id,
sug.user_id,
sug.user_group_id,
sug.sort,
sug.create_by_id,
sug.create_by_name,
sug.create_time,
sug.modify_by_id,
sug.modify_by_name,
sug.modify_time,su.user_name
from sys_user_with_user_group_rel sug
left join sys_user su on su.id=sug.user_id
<where>
<if test="userGroupId != null and userGroupId !=''">
and sug.user_group_id=#{userGroupId}
</if>
</where>
</select>
<select id="selectListWithGroup" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView"
resultMap="BaseResultMap">
select b.id ,b.user_name from sys_user b,sys_user_with_user_group_rel c where b.id = c.user_id and
c.user_group_id=#{userGroupId}
<if test="user_name!=null and user_name!='' ">
and b.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%')
</if>
</select>
<select id="selectListByUserId" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from sys_user_with_user_group_rel
where
user_id=#{userId}
</select>
<insert id="batchInsert" parameterType="java.util.List">
INSERT INTO sys_user_with_user_group_rel(id, user_id, user_group_id, sort, create_by_id, create_by_name,
create_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.userId}, #{item.userGroupId}, #{item.sort},
#{item.createById}, #{item.createByName}, #{item.createTime})
</foreach>
</insert>
<select id="selectListWithGroupIds" parameterType="pps.core.system.entity.SysUserWithUserGroupRelView"
resultMap="BaseResultMap">
select distinct
b.id ,
b.user_name,
b.phone
from
sys_user_with_user_group_rel c
left join sys_user b on b.id = c.user_id
<where>
<if test="userGroupIds != null and userGroupIds.size()>0">
and c.user_group_id in
<foreach collection="userGroupIds" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment