main
parent
957dc48d0f
commit
526021e88e
@ -1,20 +0,0 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysMenuEntity;
|
||||
|
||||
public interface SysMenuMapper extends SuperMapper<SysMenuEntity>{
|
||||
|
||||
List<SysMenuEntity> queryList(Map<String, Object> hashMap , Pagination page);
|
||||
|
||||
List<SysMenuEntity> queryNotButtonList();
|
||||
|
||||
SysMenuEntity queryByParentId(String parentId);
|
||||
|
||||
SysMenuEntity queryByUid(String uid);
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleEntity;
|
||||
|
||||
public interface SysRoleMapper extends SuperMapper<SysRoleEntity>{
|
||||
|
||||
List<SysRoleEntity> selectPageByName(SysRoleEntity sysRoleEntity, Pagination page);
|
||||
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.config.dao.SuperEntity;
|
||||
|
||||
/**
|
||||
* The persistent class for the reaps_sys_menu database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_menu")
|
||||
public class SysMenuEntity extends SuperEntity<SysMenuEntity> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private Integer orderNum;
|
||||
private String parentId;
|
||||
private Integer type;
|
||||
private String url;
|
||||
private String perms;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<SysMenuEntity> menuList;
|
||||
|
||||
@TableField(exist=false)
|
||||
private String parentName;
|
||||
|
||||
@TableField(exist=false)
|
||||
private Boolean open;
|
||||
|
||||
public SysMenuEntity() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
return this.orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public List<SysMenuEntity> getMenuList() {
|
||||
return menuList;
|
||||
}
|
||||
|
||||
public void setMenuList(List<SysMenuEntity> menuList) {
|
||||
this.menuList = menuList;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public Boolean getOpen() {
|
||||
return open;
|
||||
}
|
||||
|
||||
public void setOpen(Boolean open) {
|
||||
this.open = open;
|
||||
}
|
||||
|
||||
public String getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(String perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
|
||||
}
|
@ -1,111 +1,247 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.config.dao.SuperEntity;
|
||||
import com.tamguo.modules.sys.model.enums.SysOfficeStatusEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysOfficeTypeEnum;
|
||||
|
||||
@TableName(value="sys_office")
|
||||
public class SysOfficeEntity extends SuperEntity<SysOfficeEntity> implements Serializable{
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_office database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_office")
|
||||
public class SysOfficeEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String parentId;
|
||||
private String name;
|
||||
private String fullName;
|
||||
private String officeCode;
|
||||
private Integer sorts;
|
||||
private SysOfficeTypeEnum sysOfficeTypeEnum;
|
||||
private String leader;
|
||||
private String tel;
|
||||
private String address;
|
||||
private String zipCode;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String email;
|
||||
private String fullName;
|
||||
private String leader;
|
||||
private String officeName;
|
||||
private String officeType;
|
||||
private String parentCode;
|
||||
private String parentCodes;
|
||||
private String phone;
|
||||
private String remarks;
|
||||
private SysOfficeStatusEnum sysOfficeStatusEnum;
|
||||
private String status;
|
||||
private String treeLeaf;
|
||||
private BigDecimal treeLevel;
|
||||
private String treeNames;
|
||||
private BigDecimal treeSort;
|
||||
private String treeSorts;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
private String viewCode;
|
||||
private String zipCode;
|
||||
|
||||
public SysOfficeEntity() {
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
public String getOfficeCode() {
|
||||
return this.officeCode;
|
||||
}
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
public String getOfficeCode() {
|
||||
return officeCode;
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
public Integer getSorts() {
|
||||
return sorts;
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
public void setSorts(Integer sorts) {
|
||||
this.sorts = sorts;
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public SysOfficeTypeEnum getSysOfficeTypeEnum() {
|
||||
return sysOfficeTypeEnum;
|
||||
|
||||
public String getFullName() {
|
||||
return this.fullName;
|
||||
}
|
||||
public void setSysOfficeTypeEnum(SysOfficeTypeEnum sysOfficeTypeEnum) {
|
||||
this.sysOfficeTypeEnum = sysOfficeTypeEnum;
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
return this.leader;
|
||||
}
|
||||
|
||||
public void setLeader(String leader) {
|
||||
this.leader = leader;
|
||||
}
|
||||
public String getTel() {
|
||||
return tel;
|
||||
|
||||
public String getOfficeName() {
|
||||
return this.officeName;
|
||||
}
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
|
||||
public void setOfficeName(String officeName) {
|
||||
this.officeName = officeName;
|
||||
}
|
||||
public String getAddress() {
|
||||
return address;
|
||||
|
||||
public String getOfficeType() {
|
||||
return this.officeType;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
|
||||
public void setOfficeType(String officeType) {
|
||||
this.officeType = officeType;
|
||||
}
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
|
||||
public String getParentCode() {
|
||||
return this.parentCode;
|
||||
}
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
|
||||
public String getParentCodes() {
|
||||
return this.parentCodes;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
public SysOfficeStatusEnum getSysOfficeStatusEnum() {
|
||||
return sysOfficeStatusEnum;
|
||||
|
||||
public String getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTreeLeaf() {
|
||||
return this.treeLeaf;
|
||||
}
|
||||
|
||||
public void setTreeLeaf(String treeLeaf) {
|
||||
this.treeLeaf = treeLeaf;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeLevel() {
|
||||
return this.treeLevel;
|
||||
}
|
||||
|
||||
public void setTreeLevel(BigDecimal treeLevel) {
|
||||
this.treeLevel = treeLevel;
|
||||
}
|
||||
|
||||
public String getTreeNames() {
|
||||
return this.treeNames;
|
||||
}
|
||||
|
||||
public void setTreeNames(String treeNames) {
|
||||
this.treeNames = treeNames;
|
||||
}
|
||||
|
||||
public BigDecimal getTreeSort() {
|
||||
return this.treeSort;
|
||||
}
|
||||
|
||||
public void setTreeSort(BigDecimal treeSort) {
|
||||
this.treeSort = treeSort;
|
||||
}
|
||||
|
||||
public String getTreeSorts() {
|
||||
return this.treeSorts;
|
||||
}
|
||||
|
||||
public void setTreeSorts(String treeSorts) {
|
||||
this.treeSorts = treeSorts;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
public String getViewCode() {
|
||||
return this.viewCode;
|
||||
}
|
||||
public void setSysOfficeStatusEnum(SysOfficeStatusEnum sysOfficeStatusEnum) {
|
||||
this.sysOfficeStatusEnum = sysOfficeStatusEnum;
|
||||
|
||||
public void setViewCode(String viewCode) {
|
||||
this.viewCode = viewCode;
|
||||
}
|
||||
|
||||
public String getZipCode() {
|
||||
return this.zipCode;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
}
|
@ -1,84 +1,131 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.config.dao.SuperEntity;
|
||||
import com.tamguo.modules.sys.model.enums.SysPostStatusEnum;
|
||||
import com.tamguo.modules.sys.model.enums.SysPostTypeEnum;
|
||||
|
||||
@TableName(value="sys_post")
|
||||
public class SysPostEntity extends SuperEntity<SysPostEntity> implements Serializable{
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_post database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_post")
|
||||
public class SysPostEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysPostTypeEnum postType;
|
||||
|
||||
private Integer sorts;
|
||||
private String remarks;
|
||||
private String postCode;
|
||||
private String corpCode;
|
||||
private String corpName;
|
||||
private String createBy;
|
||||
private Date createDate;
|
||||
private String postName;
|
||||
private BigDecimal postSort;
|
||||
private String postType;
|
||||
private String remarks;
|
||||
private SysPostStatusEnum status;
|
||||
private String updateBy;
|
||||
private Date updateDate;
|
||||
|
||||
@JSONField(serialzeFeatures= SerializerFeature.WriteEnumUsingToString)
|
||||
private SysPostStatusEnum status;
|
||||
public SysPostEntity() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getPostCode() {
|
||||
return this.postCode;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
|
||||
public String getCorpCode() {
|
||||
return this.corpCode;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
public SysPostTypeEnum getPostType() {
|
||||
return postType;
|
||||
|
||||
public String getCorpName() {
|
||||
return this.corpName;
|
||||
}
|
||||
public void setPostType(String postType) {
|
||||
this.postType = SysPostTypeEnum.getPostType(postType);
|
||||
|
||||
public void setCorpName(String corpName) {
|
||||
this.corpName = corpName;
|
||||
}
|
||||
public Integer getSorts() {
|
||||
return sorts;
|
||||
|
||||
public String getCreateBy() {
|
||||
return this.createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return this.createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
public void setSorts(Integer sorts) {
|
||||
this.sorts = sorts;
|
||||
|
||||
public String getPostName() {
|
||||
return this.postName;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public BigDecimal getPostSort() {
|
||||
return this.postSort;
|
||||
}
|
||||
|
||||
public void setPostSort(BigDecimal postSort) {
|
||||
this.postSort = postSort;
|
||||
}
|
||||
|
||||
public String getPostType() {
|
||||
return this.postType;
|
||||
}
|
||||
|
||||
public void setPostType(String postType) {
|
||||
this.postType = postType;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
|
||||
public SysPostStatusEnum getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
|
||||
public void setStatus(SysPostStatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
|
||||
public String getUpdateBy() {
|
||||
return this.updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateDate() {
|
||||
return updateDate;
|
||||
return this.updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(Date updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
public SysPostStatusEnum getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(SysPostStatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotations.TableField;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.config.dao.SuperEntity;
|
||||
|
||||
|
||||
/**
|
||||
* The persistent class for the reaps_sys_role database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_role")
|
||||
public class SysRoleEntity extends SuperEntity<SysRoleEntity> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String perms;
|
||||
private String name;
|
||||
|
||||
@TableField(exist=false)
|
||||
private List<String> menuIdList;
|
||||
|
||||
public SysRoleEntity() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<String> getMenuIdList() {
|
||||
return menuIdList;
|
||||
}
|
||||
|
||||
public void setMenuIdList(List<String> menuIdList) {
|
||||
this.menuIdList = menuIdList;
|
||||
}
|
||||
|
||||
public String getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(String perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.tamguo.modules.sys.model.SysRoleEntity;
|
||||
|
||||
public interface ISysRoleService {
|
||||
|
||||
public List<SysRoleEntity> findAll();
|
||||
|
||||
public Page<SysRoleEntity> queryList(SysRoleEntity role, Page<SysRoleEntity> page);
|
||||
|
||||
public SysRoleEntity select(String uid);
|
||||
|
||||
public void save(SysRoleEntity role);
|
||||
|
||||
public void update(SysRoleEntity role);
|
||||
|
||||
public void deleteBatch(String[] roleIds);
|
||||
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysRoleMapper;
|
||||
import com.tamguo.modules.sys.model.SysRoleEntity;
|
||||
import com.tamguo.modules.sys.service.ISysRoleService;
|
||||
|
||||
@Service
|
||||
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRoleEntity> implements ISysRoleService{
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Override
|
||||
public List<SysRoleEntity> findAll() {
|
||||
return sysRoleMapper.selectList(null);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=true)
|
||||
@Override
|
||||
public Page<SysRoleEntity> queryList(SysRoleEntity sysRoleEntity, Page<SysRoleEntity> page) {
|
||||
List<SysRoleEntity> list = sysRoleMapper.selectPageByName(sysRoleEntity , page);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysRoleEntity select(String uid) {
|
||||
return sysRoleMapper.selectById(uid);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void save(SysRoleEntity role) {
|
||||
role.setPerms(StringUtils.join(role.getMenuIdList(), ","));
|
||||
sysRoleMapper.insert(role);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void update(SysRoleEntity role) {
|
||||
role.setPerms(StringUtils.join(role.getMenuIdList(), ","));
|
||||
sysRoleMapper.updateById(role);
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
public void deleteBatch(String[] roleIds) {
|
||||
sysRoleMapper.deleteBatchIds(Arrays.asList(roleIds));
|
||||
}
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
<?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="com.tamguo.modules.sys.dao.SysMenuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.tamguo.modules.sys.model.SysMenuEntity" >
|
||||
<id column="id" property="id" jdbcType="VARCHAR" />
|
||||
<result column="parent_id" property="parentId" jdbcType="BIGINT" />
|
||||
<result column="name" property="name" jdbcType="VARCHAR" />
|
||||
<result column="url" property="url" jdbcType="VARCHAR" />
|
||||
<result column="type" property="type" jdbcType="INTEGER" />
|
||||
<result column="perms" property="perms" jdbcType="INTEGER" />
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER" />
|
||||
<result column="parentName" property="parentName" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
id, parent_id, name, url, type, perms , order_num
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryList" resultMap="BaseResultMap">
|
||||
select m.*,(select p.name from sys_menu p where p.uid = m.parent_id) as parentName
|
||||
from sys_menu m order by m.order_num asc
|
||||
</select>
|
||||
|
||||
<select id="queryNotButtonList" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List" />
|
||||
from sys_menu where type != 2 order by order_num asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByUid" resultMap="BaseResultMap">
|
||||
select m.*,(select p.name from sys_menu p where p.uid = m.parent_id) as parentName
|
||||
from sys_menu m where m.uid = #{uid}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1,17 +0,0 @@
|
||||
<?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="com.tamguo.modules.sys.dao.SysRoleMapper">
|
||||
|
||||
<select id="selectPageByName" resultType="SysRoleEntity">
|
||||
SELECT
|
||||
r.id , r.name , r.perms
|
||||
FROM
|
||||
sys_role r
|
||||
<where>
|
||||
<if test="name!=null and name !=''">
|
||||
t.name like #{name}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue