优化sys-api
This commit is contained in:
parent
1ff73409e8
commit
a9b48463f8
|
|
@ -1,189 +0,0 @@
|
|||
//package cn.qihangerp.sys.common;
|
||||
//
|
||||
//import cn.qihangerp.domain.SysDictData;
|
||||
//import com.alibaba.fastjson2.JSONArray;
|
||||
//import cn.qihangerp.common.config.RedisCache;
|
||||
//import cn.qihangerp.common.constant.CacheConstants;
|
||||
//import cn.qihangerp.common.utils.SpringUtils;
|
||||
//import cn.qihangerp.common.utils.StringUtils;
|
||||
//
|
||||
//
|
||||
//import java.util.Collection;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典工具类
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class DictUtils
|
||||
//{
|
||||
// /**
|
||||
// * 分隔符
|
||||
// */
|
||||
// public static final String SEPARATOR = ",";
|
||||
//
|
||||
// /**
|
||||
// * 设置字典缓存
|
||||
// *
|
||||
// * @param key 参数键
|
||||
// * @param dictDatas 字典数据列表
|
||||
// */
|
||||
// public static void setDictCache(String key, List<SysDictData> dictDatas)
|
||||
// {
|
||||
// SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取字典缓存
|
||||
// *
|
||||
// * @param key 参数键
|
||||
// * @return dictDatas 字典数据列表
|
||||
// */
|
||||
// public static List<SysDictData> getDictCache(String key)
|
||||
// {
|
||||
// JSONArray arrayCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
||||
// if (StringUtils.isNotNull(arrayCache))
|
||||
// {
|
||||
// return arrayCache.toList(SysDictData.class);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典值获取字典标签
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictValue 字典值
|
||||
// * @return 字典标签
|
||||
// */
|
||||
// public static String getDictLabel(String dictType, String dictValue)
|
||||
// {
|
||||
// return getDictLabel(dictType, dictValue, SEPARATOR);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典标签获取字典值
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictLabel 字典标签
|
||||
// * @return 字典值
|
||||
// */
|
||||
// public static String getDictValue(String dictType, String dictLabel)
|
||||
// {
|
||||
// return getDictValue(dictType, dictLabel, SEPARATOR);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典值获取字典标签
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictValue 字典值
|
||||
// * @param separator 分隔符
|
||||
// * @return 字典标签
|
||||
// */
|
||||
// public static String getDictLabel(String dictType, String dictValue, String separator)
|
||||
// {
|
||||
// StringBuilder propertyString = new StringBuilder();
|
||||
// List<SysDictData> datas = getDictCache(dictType);
|
||||
//
|
||||
// if (StringUtils.isNotNull(datas))
|
||||
// {
|
||||
// if (StringUtils.containsAny(separator, dictValue))
|
||||
// {
|
||||
// for (SysDictData dict : datas)
|
||||
// {
|
||||
// for (String value : dictValue.split(separator))
|
||||
// {
|
||||
// if (value.equals(dict.getDictValue()))
|
||||
// {
|
||||
// propertyString.append(dict.getDictLabel()).append(separator);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (SysDictData dict : datas)
|
||||
// {
|
||||
// if (dictValue.equals(dict.getDictValue()))
|
||||
// {
|
||||
// return dict.getDictLabel();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return StringUtils.stripEnd(propertyString.toString(), separator);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典标签获取字典值
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictLabel 字典标签
|
||||
// * @param separator 分隔符
|
||||
// * @return 字典值
|
||||
// */
|
||||
// public static String getDictValue(String dictType, String dictLabel, String separator)
|
||||
// {
|
||||
// StringBuilder propertyString = new StringBuilder();
|
||||
// List<SysDictData> datas = getDictCache(dictType);
|
||||
//
|
||||
// if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas))
|
||||
// {
|
||||
// for (SysDictData dict : datas)
|
||||
// {
|
||||
// for (String label : dictLabel.split(separator))
|
||||
// {
|
||||
// if (label.equals(dict.getDictLabel()))
|
||||
// {
|
||||
// propertyString.append(dict.getDictValue()).append(separator);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (SysDictData dict : datas)
|
||||
// {
|
||||
// if (dictLabel.equals(dict.getDictLabel()))
|
||||
// {
|
||||
// return dict.getDictValue();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return StringUtils.stripEnd(propertyString.toString(), separator);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除指定字典缓存
|
||||
// *
|
||||
// * @param key 字典键
|
||||
// */
|
||||
// public static void removeDictCache(String key)
|
||||
// {
|
||||
// SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 清空字典缓存
|
||||
// */
|
||||
// public static void clearDictCache()
|
||||
// {
|
||||
// Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.SYS_DICT_KEY + "*");
|
||||
// SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 设置cache key
|
||||
// *
|
||||
// * @param configKey 参数键
|
||||
// * @return 缓存键key
|
||||
// */
|
||||
// public static String getCacheKey(String configKey)
|
||||
// {
|
||||
// return CacheConstants.SYS_DICT_KEY + configKey;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
//import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.Date;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
//
|
||||
///**
|
||||
// * Entity基类
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class BaseEntity implements Serializable
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 搜索值 */
|
||||
// @JsonIgnore
|
||||
// private String searchValue;
|
||||
//
|
||||
// /** 创建者 */
|
||||
// private String createBy;
|
||||
//
|
||||
// /** 创建时间 */
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Date createTime;
|
||||
//
|
||||
// /** 更新者 */
|
||||
// private String updateBy;
|
||||
//
|
||||
// /** 更新时间 */
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Date updateTime;
|
||||
//
|
||||
// /** 备注 */
|
||||
// private String remark;
|
||||
//
|
||||
// /** 请求参数 */
|
||||
// @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
// private Map<String, Object> params;
|
||||
//
|
||||
// public String getSearchValue()
|
||||
// {
|
||||
// return searchValue;
|
||||
// }
|
||||
//
|
||||
// public void setSearchValue(String searchValue)
|
||||
// {
|
||||
// this.searchValue = searchValue;
|
||||
// }
|
||||
//
|
||||
// public String getCreateBy()
|
||||
// {
|
||||
// return createBy;
|
||||
// }
|
||||
//
|
||||
// public void setCreateBy(String createBy)
|
||||
// {
|
||||
// this.createBy = createBy;
|
||||
// }
|
||||
//
|
||||
// public Date getCreateTime()
|
||||
// {
|
||||
// return createTime;
|
||||
// }
|
||||
//
|
||||
// public void setCreateTime(Date createTime)
|
||||
// {
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
//
|
||||
// public String getUpdateBy()
|
||||
// {
|
||||
// return updateBy;
|
||||
// }
|
||||
//
|
||||
// public void setUpdateBy(String updateBy)
|
||||
// {
|
||||
// this.updateBy = updateBy;
|
||||
// }
|
||||
//
|
||||
// public Date getUpdateTime()
|
||||
// {
|
||||
// return updateTime;
|
||||
// }
|
||||
//
|
||||
// public void setUpdateTime(Date updateTime)
|
||||
// {
|
||||
// this.updateTime = updateTime;
|
||||
// }
|
||||
//
|
||||
// public String getRemark()
|
||||
// {
|
||||
// return remark;
|
||||
// }
|
||||
//
|
||||
// public void setRemark(String remark)
|
||||
// {
|
||||
// this.remark = remark;
|
||||
// }
|
||||
//
|
||||
// public Map<String, Object> getParams()
|
||||
// {
|
||||
// if (params == null)
|
||||
// {
|
||||
// params = new HashMap<>();
|
||||
// }
|
||||
// return params;
|
||||
// }
|
||||
//
|
||||
// public void setParams(Map<String, Object> params)
|
||||
// {
|
||||
// this.params = params;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
///**
|
||||
// * 用户登录对象
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class LoginBody
|
||||
//{
|
||||
// /**
|
||||
// * 用户名
|
||||
// */
|
||||
// private String username;
|
||||
//
|
||||
// /**
|
||||
// * 用户密码
|
||||
// */
|
||||
// private String password;
|
||||
//
|
||||
// /**
|
||||
// * 验证码
|
||||
// */
|
||||
// private String code;
|
||||
//
|
||||
// /**
|
||||
// * 唯一标识
|
||||
// */
|
||||
// private String uuid;
|
||||
//
|
||||
// public String getUsername()
|
||||
// {
|
||||
// return username;
|
||||
// }
|
||||
//
|
||||
// public void setUsername(String username)
|
||||
// {
|
||||
// this.username = username;
|
||||
// }
|
||||
//
|
||||
// public String getPassword()
|
||||
// {
|
||||
// return password;
|
||||
// }
|
||||
//
|
||||
// public void setPassword(String password)
|
||||
// {
|
||||
// this.password = password;
|
||||
// }
|
||||
//
|
||||
// public String getCode()
|
||||
// {
|
||||
// return code;
|
||||
// }
|
||||
//
|
||||
// public void setCode(String code)
|
||||
// {
|
||||
// this.code = code;
|
||||
// }
|
||||
//
|
||||
// public String getUuid()
|
||||
// {
|
||||
// return uuid;
|
||||
// }
|
||||
//
|
||||
// public void setUuid(String uuid)
|
||||
// {
|
||||
// this.uuid = uuid;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 部门表 sys_dept
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysDept extends BaseEntity
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 部门ID */
|
||||
// private Long deptId;
|
||||
//
|
||||
// /** 父部门ID */
|
||||
// private Long parentId;
|
||||
//
|
||||
// /** 祖级列表 */
|
||||
// private String ancestors;
|
||||
//
|
||||
// /** 部门名称 */
|
||||
// private String deptName;
|
||||
//
|
||||
// /** 显示顺序 */
|
||||
// private Integer orderNum;
|
||||
//
|
||||
// /** 负责人 */
|
||||
// private String leader;
|
||||
//
|
||||
// /** 联系电话 */
|
||||
// private String phone;
|
||||
//
|
||||
// /** 邮箱 */
|
||||
// private String email;
|
||||
//
|
||||
// /** 部门状态:0正常,1停用 */
|
||||
// private String status;
|
||||
//
|
||||
// /** 删除标志(0代表存在 2代表删除) */
|
||||
// private String delFlag;
|
||||
//
|
||||
// /** 父部门名称 */
|
||||
// private String parentName;
|
||||
//
|
||||
// /** 子部门 */
|
||||
// private List<SysDept> children = new ArrayList<SysDept>();
|
||||
//
|
||||
// public Long getDeptId()
|
||||
// {
|
||||
// return deptId;
|
||||
// }
|
||||
//
|
||||
// public void setDeptId(Long deptId)
|
||||
// {
|
||||
// this.deptId = deptId;
|
||||
// }
|
||||
//
|
||||
// public Long getParentId()
|
||||
// {
|
||||
// return parentId;
|
||||
// }
|
||||
//
|
||||
// public void setParentId(Long parentId)
|
||||
// {
|
||||
// this.parentId = parentId;
|
||||
// }
|
||||
//
|
||||
// public String getAncestors()
|
||||
// {
|
||||
// return ancestors;
|
||||
// }
|
||||
//
|
||||
// public void setAncestors(String ancestors)
|
||||
// {
|
||||
// this.ancestors = ancestors;
|
||||
// }
|
||||
//
|
||||
// public String getDeptName()
|
||||
// {
|
||||
// return deptName;
|
||||
// }
|
||||
//
|
||||
// public void setDeptName(String deptName)
|
||||
// {
|
||||
// this.deptName = deptName;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public Integer getOrderNum()
|
||||
// {
|
||||
// return orderNum;
|
||||
// }
|
||||
//
|
||||
// public void setOrderNum(Integer orderNum)
|
||||
// {
|
||||
// this.orderNum = orderNum;
|
||||
// }
|
||||
//
|
||||
// public String getLeader()
|
||||
// {
|
||||
// return leader;
|
||||
// }
|
||||
//
|
||||
// public void setLeader(String leader)
|
||||
// {
|
||||
// this.leader = leader;
|
||||
// }
|
||||
//
|
||||
// public String getPhone()
|
||||
// {
|
||||
// return phone;
|
||||
// }
|
||||
//
|
||||
// public void setPhone(String phone)
|
||||
// {
|
||||
// this.phone = phone;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public String getEmail()
|
||||
// {
|
||||
// return email;
|
||||
// }
|
||||
//
|
||||
// public void setEmail(String email)
|
||||
// {
|
||||
// this.email = email;
|
||||
// }
|
||||
//
|
||||
// public String getStatus()
|
||||
// {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// public void setStatus(String status)
|
||||
// {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// public String getDelFlag()
|
||||
// {
|
||||
// return delFlag;
|
||||
// }
|
||||
//
|
||||
// public void setDelFlag(String delFlag)
|
||||
// {
|
||||
// this.delFlag = delFlag;
|
||||
// }
|
||||
//
|
||||
// public String getParentName()
|
||||
// {
|
||||
// return parentName;
|
||||
// }
|
||||
//
|
||||
// public void setParentName(String parentName)
|
||||
// {
|
||||
// this.parentName = parentName;
|
||||
// }
|
||||
//
|
||||
// public List<SysDept> getChildren()
|
||||
// {
|
||||
// return children;
|
||||
// }
|
||||
//
|
||||
// public void setChildren(List<SysDept> children)
|
||||
// {
|
||||
// this.children = children;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("deptId", getDeptId())
|
||||
// .append("parentId", getParentId())
|
||||
// .append("ancestors", getAncestors())
|
||||
// .append("deptName", getDeptName())
|
||||
// .append("orderNum", getOrderNum())
|
||||
// .append("leader", getLeader())
|
||||
// .append("phone", getPhone())
|
||||
// .append("email", getEmail())
|
||||
// .append("status", getStatus())
|
||||
// .append("delFlag", getDelFlag())
|
||||
// .append("createBy", getCreateBy())
|
||||
// .append("createTime", getCreateTime())
|
||||
// .append("updateBy", getUpdateBy())
|
||||
// .append("updateTime", getUpdateTime())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.common.constant.UserConstants;
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
///**
|
||||
// * 字典数据表 sys_dict_data
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysDictData extends BaseEntity
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 字典编码 */
|
||||
// private Long dictCode;
|
||||
//
|
||||
// /** 字典排序 */
|
||||
// private Long dictSort;
|
||||
//
|
||||
// /** 字典标签 */
|
||||
// private String dictLabel;
|
||||
//
|
||||
// /** 字典键值 */
|
||||
// private String dictValue;
|
||||
//
|
||||
// /** 字典类型 */
|
||||
// private String dictType;
|
||||
//
|
||||
// /** 样式属性(其他样式扩展) */
|
||||
// private String cssClass;
|
||||
//
|
||||
// /** 表格字典样式 */
|
||||
// private String listClass;
|
||||
//
|
||||
// /** 是否默认(Y是 N否) */
|
||||
// private String isDefault;
|
||||
//
|
||||
// /** 状态(0正常 1停用) */
|
||||
// private String status;
|
||||
//
|
||||
// public Long getDictCode()
|
||||
// {
|
||||
// return dictCode;
|
||||
// }
|
||||
//
|
||||
// public void setDictCode(Long dictCode)
|
||||
// {
|
||||
// this.dictCode = dictCode;
|
||||
// }
|
||||
//
|
||||
// public Long getDictSort()
|
||||
// {
|
||||
// return dictSort;
|
||||
// }
|
||||
//
|
||||
// public void setDictSort(Long dictSort)
|
||||
// {
|
||||
// this.dictSort = dictSort;
|
||||
// }
|
||||
//
|
||||
// public String getDictLabel()
|
||||
// {
|
||||
// return dictLabel;
|
||||
// }
|
||||
//
|
||||
// public void setDictLabel(String dictLabel)
|
||||
// {
|
||||
// this.dictLabel = dictLabel;
|
||||
// }
|
||||
//
|
||||
// public String getDictValue()
|
||||
// {
|
||||
// return dictValue;
|
||||
// }
|
||||
//
|
||||
// public void setDictValue(String dictValue)
|
||||
// {
|
||||
// this.dictValue = dictValue;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public String getDictType()
|
||||
// {
|
||||
// return dictType;
|
||||
// }
|
||||
//
|
||||
// public void setDictType(String dictType)
|
||||
// {
|
||||
// this.dictType = dictType;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public String getCssClass()
|
||||
// {
|
||||
// return cssClass;
|
||||
// }
|
||||
//
|
||||
// public void setCssClass(String cssClass)
|
||||
// {
|
||||
// this.cssClass = cssClass;
|
||||
// }
|
||||
//
|
||||
// public String getListClass()
|
||||
// {
|
||||
// return listClass;
|
||||
// }
|
||||
//
|
||||
// public void setListClass(String listClass)
|
||||
// {
|
||||
// this.listClass = listClass;
|
||||
// }
|
||||
//
|
||||
// public boolean getDefault()
|
||||
// {
|
||||
// return UserConstants.YES.equals(this.isDefault);
|
||||
// }
|
||||
//
|
||||
// public String getIsDefault()
|
||||
// {
|
||||
// return isDefault;
|
||||
// }
|
||||
//
|
||||
// public void setIsDefault(String isDefault)
|
||||
// {
|
||||
// this.isDefault = isDefault;
|
||||
// }
|
||||
//
|
||||
// public String getStatus()
|
||||
// {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// public void setStatus(String status)
|
||||
// {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("dictCode", getDictCode())
|
||||
// .append("dictSort", getDictSort())
|
||||
// .append("dictLabel", getDictLabel())
|
||||
// .append("dictValue", getDictValue())
|
||||
// .append("dictType", getDictType())
|
||||
// .append("cssClass", getCssClass())
|
||||
// .append("listClass", getListClass())
|
||||
// .append("isDefault", getIsDefault())
|
||||
// .append("status", getStatus())
|
||||
// .append("createBy", getCreateBy())
|
||||
// .append("createTime", getCreateTime())
|
||||
// .append("updateBy", getUpdateBy())
|
||||
// .append("updateTime", getUpdateTime())
|
||||
// .append("remark", getRemark())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
///**
|
||||
// * 字典类型表 sys_dict_type
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysDictType extends BaseEntity
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 字典主键 */
|
||||
// private Long dictId;
|
||||
//
|
||||
// /** 字典名称 */
|
||||
// private String dictName;
|
||||
//
|
||||
// /** 字典类型 */
|
||||
// private String dictType;
|
||||
//
|
||||
// /** 状态(0正常 1停用) */
|
||||
// private String status;
|
||||
//
|
||||
// public Long getDictId()
|
||||
// {
|
||||
// return dictId;
|
||||
// }
|
||||
//
|
||||
// public void setDictId(Long dictId)
|
||||
// {
|
||||
// this.dictId = dictId;
|
||||
// }
|
||||
//
|
||||
// public String getDictName()
|
||||
// {
|
||||
// return dictName;
|
||||
// }
|
||||
//
|
||||
// public void setDictName(String dictName)
|
||||
// {
|
||||
// this.dictName = dictName;
|
||||
// }
|
||||
//
|
||||
// public String getDictType()
|
||||
// {
|
||||
// return dictType;
|
||||
// }
|
||||
//
|
||||
// public void setDictType(String dictType)
|
||||
// {
|
||||
// this.dictType = dictType;
|
||||
// }
|
||||
//
|
||||
// public String getStatus()
|
||||
// {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// public void setStatus(String status)
|
||||
// {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("dictId", getDictId())
|
||||
// .append("dictName", getDictName())
|
||||
// .append("dictType", getDictType())
|
||||
// .append("status", getStatus())
|
||||
// .append("createBy", getCreateBy())
|
||||
// .append("createTime", getCreateTime())
|
||||
// .append("updateBy", getUpdateBy())
|
||||
// .append("updateTime", getUpdateTime())
|
||||
// .append("remark", getRemark())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,278 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.vo.MenusDetailVo;
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 菜单权限表 sys_menu
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysMenu extends BaseEntity
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 菜单ID */
|
||||
// private Long menuId;
|
||||
//
|
||||
// /** 菜单名称 */
|
||||
//// @JsonProperty("title")
|
||||
// private String menuName;
|
||||
//
|
||||
// /** 父菜单名称 */
|
||||
// private String parentName;
|
||||
//
|
||||
// /** 父菜单ID */
|
||||
// private Long parentId;
|
||||
//
|
||||
// /** 显示顺序 */
|
||||
// private Integer orderNum;
|
||||
//
|
||||
// /** 路由地址 */
|
||||
// private String path;
|
||||
//
|
||||
// /** 组件路径 */
|
||||
// private String component;
|
||||
//
|
||||
// /** 路由参数 */
|
||||
// private String query;
|
||||
//
|
||||
// /** 是否为外链(0是 1否) */
|
||||
// private String isFrame;
|
||||
//
|
||||
// /** 是否缓存(0缓存 1不缓存) */
|
||||
// private String isCache;
|
||||
//
|
||||
// /** 类型(M目录 C菜单 F按钮) */
|
||||
// private String menuType;
|
||||
//
|
||||
// /** 显示状态(0显示 1隐藏) */
|
||||
// private String visible;
|
||||
//
|
||||
// /** 菜单状态(0正常 1停用) */
|
||||
// private String status;
|
||||
//
|
||||
// /** 权限字符串 */
|
||||
// private String perms;
|
||||
//
|
||||
// /** 菜单图标 */
|
||||
// private String icon;
|
||||
// private String redirect;
|
||||
// private String name;
|
||||
//
|
||||
// /** 子菜单 */
|
||||
// private List<SysMenu> children = new ArrayList<SysMenu>();
|
||||
// private MenusDetailVo meta;
|
||||
//
|
||||
// public String getName() {
|
||||
// return name;
|
||||
// }
|
||||
//
|
||||
// public void setName(String name) {
|
||||
// this.name = name;
|
||||
// }
|
||||
//
|
||||
// public String getRedirect() {
|
||||
// return redirect;
|
||||
// }
|
||||
//
|
||||
// public void setRedirect(String redirect) {
|
||||
// this.redirect = redirect;
|
||||
// }
|
||||
//
|
||||
// public MenusDetailVo getMeta() {
|
||||
// return meta;
|
||||
// }
|
||||
//
|
||||
// public void setMeta(MenusDetailVo meta) {
|
||||
// this.meta = meta;
|
||||
// }
|
||||
//
|
||||
// public Long getMenuId()
|
||||
// {
|
||||
// return menuId;
|
||||
// }
|
||||
//
|
||||
// public void setMenuId(Long menuId)
|
||||
// {
|
||||
// this.menuId = menuId;
|
||||
// }
|
||||
//
|
||||
// public String getMenuName()
|
||||
// {
|
||||
// return menuName;
|
||||
// }
|
||||
//
|
||||
// public void setMenuName(String menuName)
|
||||
// {
|
||||
// this.menuName = menuName;
|
||||
// }
|
||||
//
|
||||
// public String getParentName()
|
||||
// {
|
||||
// return parentName;
|
||||
// }
|
||||
//
|
||||
// public void setParentName(String parentName)
|
||||
// {
|
||||
// this.parentName = parentName;
|
||||
// }
|
||||
//
|
||||
// public Long getParentId()
|
||||
// {
|
||||
// return parentId;
|
||||
// }
|
||||
//
|
||||
// public void setParentId(Long parentId)
|
||||
// {
|
||||
// this.parentId = parentId;
|
||||
// }
|
||||
//
|
||||
// public Integer getOrderNum()
|
||||
// {
|
||||
// return orderNum;
|
||||
// }
|
||||
//
|
||||
// public void setOrderNum(Integer orderNum)
|
||||
// {
|
||||
// this.orderNum = orderNum;
|
||||
// }
|
||||
//
|
||||
// public String getPath()
|
||||
// {
|
||||
// return path;
|
||||
// }
|
||||
//
|
||||
// public void setPath(String path)
|
||||
// {
|
||||
// this.path = path;
|
||||
// }
|
||||
//
|
||||
// public String getComponent()
|
||||
// {
|
||||
// return component;
|
||||
// }
|
||||
//
|
||||
// public void setComponent(String component)
|
||||
// {
|
||||
// this.component = component;
|
||||
// }
|
||||
//
|
||||
// public String getQuery()
|
||||
// {
|
||||
// return query;
|
||||
// }
|
||||
//
|
||||
// public void setQuery(String query)
|
||||
// {
|
||||
// this.query = query;
|
||||
// }
|
||||
//
|
||||
// public String getIsFrame()
|
||||
// {
|
||||
// return isFrame;
|
||||
// }
|
||||
//
|
||||
// public void setIsFrame(String isFrame)
|
||||
// {
|
||||
// this.isFrame = isFrame;
|
||||
// }
|
||||
//
|
||||
// public String getIsCache()
|
||||
// {
|
||||
// return isCache;
|
||||
// }
|
||||
//
|
||||
// public void setIsCache(String isCache)
|
||||
// {
|
||||
// this.isCache = isCache;
|
||||
// }
|
||||
//
|
||||
// public String getMenuType()
|
||||
// {
|
||||
// return menuType;
|
||||
// }
|
||||
//
|
||||
// public void setMenuType(String menuType)
|
||||
// {
|
||||
// this.menuType = menuType;
|
||||
// }
|
||||
//
|
||||
// public String getVisible()
|
||||
// {
|
||||
// return visible;
|
||||
// }
|
||||
//
|
||||
// public void setVisible(String visible)
|
||||
// {
|
||||
// this.visible = visible;
|
||||
// }
|
||||
//
|
||||
// public String getStatus()
|
||||
// {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// public void setStatus(String status)
|
||||
// {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// public String getPerms()
|
||||
// {
|
||||
// return perms;
|
||||
// }
|
||||
//
|
||||
// public void setPerms(String perms)
|
||||
// {
|
||||
// this.perms = perms;
|
||||
// }
|
||||
//
|
||||
// public String getIcon()
|
||||
// {
|
||||
// return icon;
|
||||
// }
|
||||
//
|
||||
// public void setIcon(String icon)
|
||||
// {
|
||||
// this.icon = icon;
|
||||
// }
|
||||
//
|
||||
// public List<SysMenu> getChildren()
|
||||
// {
|
||||
// return children;
|
||||
// }
|
||||
//
|
||||
// public void setChildren(List<SysMenu> children)
|
||||
// {
|
||||
// this.children = children;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("menuId", getMenuId())
|
||||
// .append("menuName", getMenuName())
|
||||
// .append("parentId", getParentId())
|
||||
// .append("orderNum", getOrderNum())
|
||||
// .append("path", getPath())
|
||||
// .append("component", getComponent())
|
||||
// .append("isFrame", getIsFrame())
|
||||
// .append("IsCache", getIsCache())
|
||||
// .append("menuType", getMenuType())
|
||||
// .append("visible", getVisible())
|
||||
// .append("status ", getStatus())
|
||||
// .append("perms", getPerms())
|
||||
// .append("icon", getIcon())
|
||||
// .append("createBy", getCreateBy())
|
||||
// .append("createTime", getCreateTime())
|
||||
// .append("updateBy", getUpdateBy())
|
||||
// .append("updateTime", getUpdateTime())
|
||||
// .append("remark", getRemark())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,262 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import java.util.Date;
|
||||
//import java.util.Map;
|
||||
//import java.util.Set;
|
||||
//
|
||||
///**
|
||||
// * 角色表 sys_role
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysRole
|
||||
//{
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /** 角色ID */
|
||||
// private Long roleId;
|
||||
//
|
||||
// /** 角色名称 */
|
||||
// private String roleName;
|
||||
//
|
||||
// /** 角色权限 */
|
||||
// private String roleKey;
|
||||
//
|
||||
// /** 角色排序 */
|
||||
// private Integer roleSort;
|
||||
//
|
||||
// /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */
|
||||
// private String dataScope;
|
||||
//
|
||||
// /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
|
||||
// private boolean menuCheckStrictly;
|
||||
//
|
||||
// /** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
|
||||
// private boolean deptCheckStrictly;
|
||||
//
|
||||
// /** 角色状态(0正常 1停用) */
|
||||
// private String status;
|
||||
//
|
||||
// /** 删除标志(0代表存在 2代表删除) */
|
||||
// private String delFlag;
|
||||
//
|
||||
// /** 用户是否存在此角色标识 默认不存在 */
|
||||
// private boolean flag = false;
|
||||
//
|
||||
// /** 菜单组 */
|
||||
// private Long[] menuIds;
|
||||
//
|
||||
// /** 部门组(数据权限) */
|
||||
// private Long[] deptIds;
|
||||
//
|
||||
// /** 角色菜单权限 */
|
||||
// private Set<String> permissions;
|
||||
//
|
||||
// private String createBy;
|
||||
// private Date createTime;
|
||||
// private String updateBy;
|
||||
//
|
||||
// private Date updateTime;
|
||||
// private String remark;
|
||||
//
|
||||
// public String getRemark() {
|
||||
// return remark;
|
||||
// }
|
||||
//
|
||||
// public void setRemark(String remark) {
|
||||
// this.remark = remark;
|
||||
// }
|
||||
//
|
||||
// public SysRole()
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// public SysRole(Long roleId)
|
||||
// {
|
||||
// this.roleId = roleId;
|
||||
// }
|
||||
//
|
||||
// public Date getCreateTime() {
|
||||
// return createTime;
|
||||
// }
|
||||
//
|
||||
// public void setCreateTime(Date createTime) {
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
//
|
||||
// public Date getUpdateTime() {
|
||||
// return updateTime;
|
||||
// }
|
||||
//
|
||||
// public void setUpdateTime(Date updateTime) {
|
||||
// this.updateTime = updateTime;
|
||||
// }
|
||||
//
|
||||
// public Long getRoleId()
|
||||
// {
|
||||
// return roleId;
|
||||
// }
|
||||
//
|
||||
// public void setRoleId(Long roleId)
|
||||
// {
|
||||
// this.roleId = roleId;
|
||||
// }
|
||||
//
|
||||
// public boolean isAdmin()
|
||||
// {
|
||||
// return isAdmin(this.roleId);
|
||||
// }
|
||||
//
|
||||
// public static boolean isAdmin(Long roleId)
|
||||
// {
|
||||
// return roleId != null && 1L == roleId;
|
||||
// }
|
||||
//
|
||||
// public String getUpdateBy() {
|
||||
// return updateBy;
|
||||
// }
|
||||
//
|
||||
// public void setUpdateBy(String updateBy) {
|
||||
// this.updateBy = updateBy;
|
||||
// }
|
||||
//
|
||||
// public String getCreateBy() {
|
||||
// return createBy;
|
||||
// }
|
||||
//
|
||||
// public void setCreateBy(String createBy) {
|
||||
// this.createBy = createBy;
|
||||
// }
|
||||
//
|
||||
// public String getRoleName()
|
||||
// {
|
||||
// return roleName;
|
||||
// }
|
||||
//
|
||||
// public void setRoleName(String roleName)
|
||||
// {
|
||||
// this.roleName = roleName;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public String getRoleKey()
|
||||
// {
|
||||
// return roleKey;
|
||||
// }
|
||||
//
|
||||
// public void setRoleKey(String roleKey)
|
||||
// {
|
||||
// this.roleKey = roleKey;
|
||||
// }
|
||||
//
|
||||
// public Integer getRoleSort()
|
||||
// {
|
||||
// return roleSort;
|
||||
// }
|
||||
//
|
||||
// public void setRoleSort(Integer roleSort)
|
||||
// {
|
||||
// this.roleSort = roleSort;
|
||||
// }
|
||||
//
|
||||
// public String getDataScope()
|
||||
// {
|
||||
// return dataScope;
|
||||
// }
|
||||
//
|
||||
// public void setDataScope(String dataScope)
|
||||
// {
|
||||
// this.dataScope = dataScope;
|
||||
// }
|
||||
//
|
||||
// public boolean isMenuCheckStrictly()
|
||||
// {
|
||||
// return menuCheckStrictly;
|
||||
// }
|
||||
//
|
||||
// public void setMenuCheckStrictly(boolean menuCheckStrictly)
|
||||
// {
|
||||
// this.menuCheckStrictly = menuCheckStrictly;
|
||||
// }
|
||||
//
|
||||
// public boolean isDeptCheckStrictly()
|
||||
// {
|
||||
// return deptCheckStrictly;
|
||||
// }
|
||||
//
|
||||
// public void setDeptCheckStrictly(boolean deptCheckStrictly)
|
||||
// {
|
||||
// this.deptCheckStrictly = deptCheckStrictly;
|
||||
// }
|
||||
//
|
||||
// public String getStatus()
|
||||
// {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// public void setStatus(String status)
|
||||
// {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// public String getDelFlag()
|
||||
// {
|
||||
// return delFlag;
|
||||
// }
|
||||
//
|
||||
// public void setDelFlag(String delFlag)
|
||||
// {
|
||||
// this.delFlag = delFlag;
|
||||
// }
|
||||
//
|
||||
// public boolean isFlag()
|
||||
// {
|
||||
// return flag;
|
||||
// }
|
||||
//
|
||||
// public void setFlag(boolean flag)
|
||||
// {
|
||||
// this.flag = flag;
|
||||
// }
|
||||
//
|
||||
// public Long[] getMenuIds()
|
||||
// {
|
||||
// return menuIds;
|
||||
// }
|
||||
//
|
||||
// public void setMenuIds(Long[] menuIds)
|
||||
// {
|
||||
// this.menuIds = menuIds;
|
||||
// }
|
||||
//
|
||||
// public Long[] getDeptIds()
|
||||
// {
|
||||
// return deptIds;
|
||||
// }
|
||||
//
|
||||
// public void setDeptIds(Long[] deptIds)
|
||||
// {
|
||||
// this.deptIds = deptIds;
|
||||
// }
|
||||
//
|
||||
// public Set<String> getPermissions()
|
||||
// {
|
||||
// return permissions;
|
||||
// }
|
||||
//
|
||||
// public void setPermissions(Set<String> permissions)
|
||||
// {
|
||||
// this.permissions = permissions;
|
||||
// }
|
||||
//
|
||||
// private Map<String, Object> params;
|
||||
//
|
||||
// public Map<String, Object> getParams() {
|
||||
// return params;
|
||||
// }
|
||||
//
|
||||
// public void setParams(Map<String, Object> params) {
|
||||
// this.params = params;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
///**
|
||||
// * 角色和菜单关联 sys_role_menu
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysRoleMenu
|
||||
//{
|
||||
// /** 角色ID */
|
||||
// private Long roleId;
|
||||
//
|
||||
// /** 菜单ID */
|
||||
// private Long menuId;
|
||||
//
|
||||
// public Long getRoleId()
|
||||
// {
|
||||
// return roleId;
|
||||
// }
|
||||
//
|
||||
// public void setRoleId(Long roleId)
|
||||
// {
|
||||
// this.roleId = roleId;
|
||||
// }
|
||||
//
|
||||
// public Long getMenuId()
|
||||
// {
|
||||
// return menuId;
|
||||
// }
|
||||
//
|
||||
// public void setMenuId(Long menuId)
|
||||
// {
|
||||
// this.menuId = menuId;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("roleId", getRoleId())
|
||||
// .append("menuId", getMenuId())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// *
|
||||
// * @TableName sys_task
|
||||
// */
|
||||
//public class SysTask implements Serializable {
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private Integer id;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private String taskName;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private String cron;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private String method;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private String remark;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// private Date createTime;
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public Integer getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setId(Integer id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public String getTaskName() {
|
||||
// return taskName;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setTaskName(String taskName) {
|
||||
// this.taskName = taskName;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public String getCron() {
|
||||
// return cron;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setCron(String cron) {
|
||||
// this.cron = cron;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public String getMethod() {
|
||||
// return method;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setMethod(String method) {
|
||||
// this.method = method;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public String getRemark() {
|
||||
// return remark;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setRemark(String remark) {
|
||||
// this.remark = remark;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public Date getCreateTime() {
|
||||
// return createTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// public void setCreateTime(Date createTime) {
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean equals(Object that) {
|
||||
// if (this == that) {
|
||||
// return true;
|
||||
// }
|
||||
// if (that == null) {
|
||||
// return false;
|
||||
// }
|
||||
// if (getClass() != that.getClass()) {
|
||||
// return false;
|
||||
// }
|
||||
// SysTask other = (SysTask) that;
|
||||
// return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
// && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
|
||||
// && (this.getCron() == null ? other.getCron() == null : this.getCron().equals(other.getCron()))
|
||||
// && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
|
||||
// && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
|
||||
// && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// final int prime = 31;
|
||||
// int result = 1;
|
||||
// result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
// result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
|
||||
// result = prime * result + ((getCron() == null) ? 0 : getCron().hashCode());
|
||||
// result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
|
||||
// result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
|
||||
// result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// sb.append(getClass().getSimpleName());
|
||||
// sb.append(" [");
|
||||
// sb.append("Hash = ").append(hashCode());
|
||||
// sb.append(", id=").append(id);
|
||||
// sb.append(", taskName=").append(taskName);
|
||||
// sb.append(", cron=").append(cron);
|
||||
// sb.append(", method=").append(method);
|
||||
// sb.append(", remark=").append(remark);
|
||||
// sb.append(", createTime=").append(createTime);
|
||||
// sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
// sb.append("]");
|
||||
// return sb.toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,198 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// *
|
||||
// * @TableName sys_task_logs
|
||||
// */
|
||||
//public class SysTaskLogs implements Serializable {
|
||||
// /**
|
||||
// * 主键ID
|
||||
// */
|
||||
// private Long id;
|
||||
//
|
||||
// /**
|
||||
// * 任务ID
|
||||
// */
|
||||
// private Integer taskId;
|
||||
//
|
||||
// /**
|
||||
// * 结果
|
||||
// */
|
||||
// private String result;
|
||||
//
|
||||
// /**
|
||||
// * 开始运行时间
|
||||
// */
|
||||
// private Date startTime;
|
||||
//
|
||||
// /**
|
||||
// * 结束时间
|
||||
// */
|
||||
// private Date endTime;
|
||||
//
|
||||
// /**
|
||||
// * 状态1运行中,2已结束
|
||||
// */
|
||||
// private Integer status;
|
||||
//
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// private Date createTime;
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// /**
|
||||
// * 主键ID
|
||||
// */
|
||||
// public Long getId() {
|
||||
// return id;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 主键ID
|
||||
// */
|
||||
// public void setId(Long id) {
|
||||
// this.id = id;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 任务ID
|
||||
// */
|
||||
// public Integer getTaskId() {
|
||||
// return taskId;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 任务ID
|
||||
// */
|
||||
// public void setTaskId(Integer taskId) {
|
||||
// this.taskId = taskId;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 结果
|
||||
// */
|
||||
// public String getResult() {
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 结果
|
||||
// */
|
||||
// public void setResult(String result) {
|
||||
// this.result = result;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 开始运行时间
|
||||
// */
|
||||
// public Date getStartTime() {
|
||||
// return startTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 开始运行时间
|
||||
// */
|
||||
// public void setStartTime(Date startTime) {
|
||||
// this.startTime = startTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 结束时间
|
||||
// */
|
||||
// public Date getEndTime() {
|
||||
// return endTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 结束时间
|
||||
// */
|
||||
// public void setEndTime(Date endTime) {
|
||||
// this.endTime = endTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 状态1运行中,2已结束
|
||||
// */
|
||||
// public Integer getStatus() {
|
||||
// return status;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 状态1运行中,2已结束
|
||||
// */
|
||||
// public void setStatus(Integer status) {
|
||||
// this.status = status;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// public Date getCreateTime() {
|
||||
// return createTime;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 创建时间
|
||||
// */
|
||||
// public void setCreateTime(Date createTime) {
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean equals(Object that) {
|
||||
// if (this == that) {
|
||||
// return true;
|
||||
// }
|
||||
// if (that == null) {
|
||||
// return false;
|
||||
// }
|
||||
// if (getClass() != that.getClass()) {
|
||||
// return false;
|
||||
// }
|
||||
// SysTaskLogs other = (SysTaskLogs) that;
|
||||
// return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
// && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
|
||||
// && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()))
|
||||
// && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
|
||||
// && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
|
||||
// && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
// && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int hashCode() {
|
||||
// final int prime = 31;
|
||||
// int result = 1;
|
||||
// result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
// result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
|
||||
// result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
|
||||
// result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
|
||||
// result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
|
||||
// result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
// result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// sb.append(getClass().getSimpleName());
|
||||
// sb.append(" [");
|
||||
// sb.append("Hash = ").append(hashCode());
|
||||
// sb.append(", id=").append(id);
|
||||
// sb.append(", taskId=").append(taskId);
|
||||
// sb.append(", result=").append(result);
|
||||
// sb.append(", startTime=").append(startTime);
|
||||
// sb.append(", endTime=").append(endTime);
|
||||
// sb.append(", status=").append(status);
|
||||
// sb.append(", createTime=").append(createTime);
|
||||
// sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
// sb.append("]");
|
||||
// return sb.toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
//package cn.qihangerp.sys.domain;
|
||||
//
|
||||
//import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
//import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
//
|
||||
///**
|
||||
// * 用户和角色关联 sys_user_role
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public class SysUserRole
|
||||
//{
|
||||
// /** 用户ID */
|
||||
// private Long userId;
|
||||
//
|
||||
// /** 角色ID */
|
||||
// private Long roleId;
|
||||
//
|
||||
// public Long getUserId()
|
||||
// {
|
||||
// return userId;
|
||||
// }
|
||||
//
|
||||
// public void setUserId(Long userId)
|
||||
// {
|
||||
// this.userId = userId;
|
||||
// }
|
||||
//
|
||||
// public Long getRoleId()
|
||||
// {
|
||||
// return roleId;
|
||||
// }
|
||||
//
|
||||
// public void setRoleId(Long roleId)
|
||||
// {
|
||||
// this.roleId = roleId;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
// .append("userId", getUserId())
|
||||
// .append("roleId", getRoleId())
|
||||
// .toString();
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
package cn.qihangerp.sys.domain.vo;
|
||||
|
||||
public class MenuMetaVo {
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package cn.qihangerp.sys.domain.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MenusDetailVo {
|
||||
private String title;
|
||||
private String icon;
|
||||
private Boolean hidden;
|
||||
private String[] roles;
|
||||
// private Boolean keepAlive;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public Boolean getHidden() {
|
||||
return hidden;
|
||||
}
|
||||
|
||||
public void setHidden(Boolean hidden) {
|
||||
this.hidden = hidden;
|
||||
}
|
||||
|
||||
public String[] getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(String[] roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
// public Boolean getKeepAlive() {
|
||||
// return keepAlive;
|
||||
// }
|
||||
//
|
||||
// public void setKeepAlive(Boolean keepAlive) {
|
||||
// this.keepAlive = keepAlive;
|
||||
// }
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
package cn.qihangerp.sys.domain.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MenusVo {
|
||||
private String path;
|
||||
private String component;
|
||||
private String redirect;
|
||||
private String name;
|
||||
private MenusDetailVo meta;
|
||||
private Long parentId;
|
||||
private Long id;
|
||||
private List<MenusVo> children;
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
public void setComponent(String component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public String getRedirect() {
|
||||
return redirect;
|
||||
}
|
||||
|
||||
public void setRedirect(String redirect) {
|
||||
this.redirect = redirect;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MenusDetailVo getMeta() {
|
||||
return meta;
|
||||
}
|
||||
|
||||
public void setMeta(MenusDetailVo meta) {
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
public List<MenusVo> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<MenusVo> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
package cn.qihangerp.sys.domain.vo;
|
||||
|
||||
|
||||
import cn.qihangerp.module.domain.SysDept;
|
||||
import cn.qihangerp.module.domain.SysMenu;
|
||||
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Treeselect树结构实体类
|
||||
*
|
||||
* @author qihang
|
||||
*/
|
||||
public class TreeSelect implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 节点ID */
|
||||
private Long id;
|
||||
|
||||
/** 节点名称 */
|
||||
private String label;
|
||||
|
||||
/** 子节点 */
|
||||
private List<TreeSelect> children;
|
||||
|
||||
public TreeSelect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TreeSelect(SysDept dept)
|
||||
{
|
||||
this.id = dept.getDeptId();
|
||||
this.label = dept.getDeptName();
|
||||
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public TreeSelect(SysMenu menu)
|
||||
{
|
||||
this.id = menu.getMenuId();
|
||||
this.label = menu.getMenuName();
|
||||
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLabel()
|
||||
{
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label)
|
||||
{
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public List<TreeSelect> getChildren()
|
||||
{
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeSelect> children)
|
||||
{
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
package cn.qihangerp.sys.domain.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UserInfoVo {
|
||||
private Integer userId;
|
||||
private String username;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
private String[] roles;
|
||||
private List<String> perms;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public String[] getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(String[] roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public List<String> getPerms() {
|
||||
return perms;
|
||||
}
|
||||
|
||||
public void setPerms(List<String> perms) {
|
||||
this.perms = perms;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysDept;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 部门管理 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysDeptMapper
|
||||
//{
|
||||
// /**
|
||||
// * 查询部门管理数据
|
||||
// *
|
||||
// * @param dept 部门信息
|
||||
// * @return 部门信息集合
|
||||
// */
|
||||
// public List<SysDept> selectDeptList(SysDept dept);
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询部门树信息
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param deptCheckStrictly 部门树选择项是否关联显示
|
||||
// * @return 选中部门列表
|
||||
// */
|
||||
// public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
//
|
||||
// /**
|
||||
// * 根据部门ID查询信息
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 部门信息
|
||||
// */
|
||||
// public SysDept selectDeptById(Long deptId);
|
||||
//
|
||||
// /**
|
||||
// * 根据ID查询所有子部门
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 部门列表
|
||||
// */
|
||||
// public List<SysDept> selectChildrenDeptById(Long deptId);
|
||||
//
|
||||
// /**
|
||||
// * 根据ID查询所有子部门(正常状态)
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 子部门数
|
||||
// */
|
||||
// public int selectNormalChildrenDeptById(Long deptId);
|
||||
//
|
||||
// /**
|
||||
// * 是否存在子节点
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int hasChildByDeptId(Long deptId);
|
||||
//
|
||||
// /**
|
||||
// * 查询部门是否存在用户
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int checkDeptExistUser(Long deptId);
|
||||
//
|
||||
// /**
|
||||
// * 校验部门名称是否唯一
|
||||
// *
|
||||
// * @param deptName 部门名称
|
||||
// * @param parentId 父部门ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
|
||||
//
|
||||
// /**
|
||||
// * 新增部门信息
|
||||
// *
|
||||
// * @param dept 部门信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertDept(SysDept dept);
|
||||
//
|
||||
// /**
|
||||
// * 修改部门信息
|
||||
// *
|
||||
// * @param dept 部门信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDept(SysDept dept);
|
||||
//
|
||||
// /**
|
||||
// * 修改所在部门正常状态
|
||||
// *
|
||||
// * @param deptIds 部门ID组
|
||||
// */
|
||||
// public void updateDeptStatusNormal(Long[] deptIds);
|
||||
//
|
||||
// /**
|
||||
// * 修改子元素关系
|
||||
// *
|
||||
// * @param depts 子元素
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDeptChildren(@Param("depts") List<SysDept> depts);
|
||||
//
|
||||
// /**
|
||||
// * 删除部门管理信息
|
||||
// *
|
||||
// * @param deptId 部门ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteDeptById(Long deptId);
|
||||
//}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysDictData;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysDictDataMapper
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询字典数据
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询字典数据
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// public List<SysDictData> selectDictDataByType(String dictType);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典键值查询字典数据信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictValue 字典键值
|
||||
// * @return 字典标签
|
||||
// */
|
||||
// public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典数据ID查询信息
|
||||
// *
|
||||
// * @param dictCode 字典数据ID
|
||||
// * @return 字典数据
|
||||
// */
|
||||
// public SysDictData selectDictDataById(Long dictCode);
|
||||
//
|
||||
// /**
|
||||
// * 查询字典数据
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典数据
|
||||
// */
|
||||
// public int countDictDataByType(String dictType);
|
||||
//
|
||||
// /**
|
||||
// * 通过字典ID删除字典数据信息
|
||||
// *
|
||||
// * @param dictCode 字典数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteDictDataById(Long dictCode);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典数据信息
|
||||
// *
|
||||
// * @param dictCodes 需要删除的字典数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteDictDataByIds(Long[] dictCodes);
|
||||
//
|
||||
// /**
|
||||
// * 新增字典数据信息
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertDictData(SysDictData dictData);
|
||||
//
|
||||
// /**
|
||||
// * 修改字典数据信息
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDictData(SysDictData dictData);
|
||||
//
|
||||
// /**
|
||||
// * 同步修改字典类型
|
||||
// *
|
||||
// * @param oldDictType 旧字典类型
|
||||
// * @param newDictType 新旧字典类型
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
|
||||
//}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysDictType;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysDictTypeMapper
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询字典类型
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 根据所有字典类型
|
||||
// *
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// public List<SysDictType> selectDictTypeAll();
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型ID查询信息
|
||||
// *
|
||||
// * @param dictId 字典类型ID
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// public SysDictType selectDictTypeById(Long dictId);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// public SysDictType selectDictTypeByType(String dictType);
|
||||
//
|
||||
// /**
|
||||
// * 通过字典ID删除字典信息
|
||||
// *
|
||||
// * @param dictId 字典ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteDictTypeById(Long dictId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典类型信息
|
||||
// *
|
||||
// * @param dictIds 需要删除的字典ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteDictTypeByIds(Long[] dictIds);
|
||||
//
|
||||
// /**
|
||||
// * 新增字典类型信息
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertDictType(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 修改字典类型信息
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDictType(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 校验字典类型称是否唯一
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysDictType checkDictTypeUnique(String dictType);
|
||||
//}
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysMenu;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 菜单表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysMenuMapper
|
||||
//{
|
||||
// /**
|
||||
// * 查询系统菜单列表
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuList(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户所有权限
|
||||
// *
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public List<String> selectMenuPerms();
|
||||
//
|
||||
// /**
|
||||
// * 根据用户查询系统菜单列表
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuListByUserId(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询权限
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public List<String> selectMenuPermsByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询权限
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public List<String> selectMenuPermsByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询菜单
|
||||
// *
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuTreeAll();
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询菜单
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询菜单树信息
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param menuCheckStrictly 菜单树选择项是否关联显示
|
||||
// * @return 选中菜单列表
|
||||
// */
|
||||
// public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
|
||||
//
|
||||
// /**
|
||||
// * 根据菜单ID查询信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 菜单信息
|
||||
// */
|
||||
// public SysMenu selectMenuById(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 是否存在菜单子节点
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int hasChildByMenuId(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 新增菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertMenu(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 修改菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateMenu(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 删除菜单管理信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteMenuById(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 校验菜单名称是否唯一
|
||||
// *
|
||||
// * @param menuName 菜单名称
|
||||
// * @param parentId 父菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
|
||||
//}
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysRole;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 角色表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysRoleMapper
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询角色数据
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 角色数据集合信息
|
||||
// */
|
||||
// public List<SysRole> selectRoleList(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询角色
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// public List<SysRole> selectRolePermissionByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 查询所有角色
|
||||
// *
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// public List<SysRole> selectRoleAll();
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID获取角色选择框列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 选中角色ID列表
|
||||
// */
|
||||
// public List<Long> selectRoleListByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 角色对象信息
|
||||
// */
|
||||
// public SysRole selectRoleById(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询角色
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// public List<SysRole> selectRolesByUserName(String userName);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色名称是否唯一
|
||||
// *
|
||||
// * @param roleName 角色名称
|
||||
// * @return 角色信息
|
||||
// */
|
||||
// public SysRole checkRoleNameUnique(String roleName);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色权限是否唯一
|
||||
// *
|
||||
// * @param roleKey 角色权限
|
||||
// * @return 角色信息
|
||||
// */
|
||||
// public SysRole checkRoleKeyUnique(String roleKey);
|
||||
//
|
||||
// /**
|
||||
// * 修改角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateRole(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 新增角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertRole(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID删除角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleById(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除角色信息
|
||||
// *
|
||||
// * @param roleIds 需要删除的角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleByIds(Long[] roleIds);
|
||||
//}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysRoleMenu;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 角色与菜单关联表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysRoleMenuMapper
|
||||
//{
|
||||
// /**
|
||||
// * 查询菜单使用数量
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int checkMenuExistRole(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID删除角色和菜单关联
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleMenuByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除角色菜单关联信息
|
||||
// *
|
||||
// * @param ids 需要删除的数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleMenu(Long[] ids);
|
||||
//
|
||||
// /**
|
||||
// * 批量新增角色菜单信息
|
||||
// *
|
||||
// * @param roleMenuList 角色菜单列表
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int batchRoleMenu(List<SysRoleMenu> roleMenuList);
|
||||
//}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysTaskLogs;
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task_logs】的数据库操作Mapper
|
||||
//* @createDate 2024-03-22 20:07:56
|
||||
//* @Entity com.qihang.sys.api.domain.SysTaskLogs
|
||||
//*/
|
||||
//public interface SysTaskLogsMapper extends BaseMapper<SysTaskLogs> {
|
||||
//
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysTask;
|
||||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task】的数据库操作Mapper
|
||||
//* @createDate 2024-03-22 19:34:41
|
||||
//* @Entity com.qihang.sys.api.domain.SysTask
|
||||
//*/
|
||||
//public interface SysTaskMapper extends BaseMapper<SysTask> {
|
||||
//
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.domain.SysUser;
|
||||
//import org.apache.ibatis.annotations.Mapper;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 用户表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Mapper
|
||||
//public interface SysUserMapper
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询用户列表
|
||||
// *
|
||||
// * @param sysUser 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// public List<SysUser> selectUserList(SysUser sysUser);
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询已配用户角色列表
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// public List<SysUser> selectAllocatedList(SysUser user);
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询未分配用户角色列表
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// public List<SysUser> selectUnallocatedList(SysUser user);
|
||||
//
|
||||
// /**
|
||||
// * 通过用户名查询用户
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @return 用户对象信息
|
||||
// */
|
||||
// public SysUser selectUserByUserName(String userName);
|
||||
//
|
||||
// /**
|
||||
// * 通过用户ID查询用户
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 用户对象信息
|
||||
// */
|
||||
// public SysUser selectUserById(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 新增用户信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertUser(SysUser user);
|
||||
//
|
||||
// /**
|
||||
// * 修改用户信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateUser(SysUser user);
|
||||
//
|
||||
// /**
|
||||
// * 修改用户头像
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @param avatar 头像地址
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar);
|
||||
//
|
||||
// /**
|
||||
// * 重置用户密码
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @param password 密码
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int resetUserPwd(@Param("userName") String userName, @Param("password") String password);
|
||||
//
|
||||
// /**
|
||||
// * 通过用户ID删除用户
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserById(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除用户信息
|
||||
// *
|
||||
// * @param userIds 需要删除的用户ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserByIds(Long[] userIds);
|
||||
//
|
||||
// /**
|
||||
// * 校验用户名称是否唯一
|
||||
// *
|
||||
// * @param userName 用户名称
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysUser checkUserNameUnique(String userName);
|
||||
//
|
||||
// /**
|
||||
// * 校验手机号码是否唯一
|
||||
// *
|
||||
// * @param phonenumber 手机号码
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysUser checkPhoneUnique(String phonenumber);
|
||||
//
|
||||
// /**
|
||||
// * 校验email是否唯一
|
||||
// *
|
||||
// * @param email 用户邮箱
|
||||
// * @return 结果
|
||||
// */
|
||||
// public SysUser checkEmailUnique(String email);
|
||||
//}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
//package cn.qihangerp.sys.mapper;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysUserRole;
|
||||
//import org.apache.ibatis.annotations.Param;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 用户与角色关联表 数据层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface SysUserRoleMapper
|
||||
//{
|
||||
// /**
|
||||
// * 通过用户ID删除用户和角色关联
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserRoleByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除用户和角色关联
|
||||
// *
|
||||
// * @param ids 需要删除的数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserRole(Long[] ids);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色使用数量
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int countUserRoleByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 批量新增用户角色信息
|
||||
// *
|
||||
// * @param userRoleList 用户角色列表
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int batchUserRole(List<SysUserRole> userRoleList);
|
||||
//
|
||||
// /**
|
||||
// * 删除用户和角色关联信息
|
||||
// *
|
||||
// * @param userRole 用户和角色关联信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserRoleInfo(SysUserRole userRole);
|
||||
//
|
||||
// /**
|
||||
// * 批量取消授权用户角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param userIds 需要删除的用户数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
|
||||
//}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysDictData;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典 业务层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface ISysDictDataService
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询字典数据
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// public List<SysDictData> selectDictDataList(SysDictData dictData);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典键值查询字典数据信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictValue 字典键值
|
||||
// * @return 字典标签
|
||||
// */
|
||||
// public String selectDictLabel(String dictType, String dictValue);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典数据ID查询信息
|
||||
// *
|
||||
// * @param dictCode 字典数据ID
|
||||
// * @return 字典数据
|
||||
// */
|
||||
// public SysDictData selectDictDataById(Long dictCode);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典数据信息
|
||||
// *
|
||||
// * @param dictCodes 需要删除的字典数据ID
|
||||
// */
|
||||
// public void deleteDictDataByIds(Long[] dictCodes);
|
||||
//
|
||||
// /**
|
||||
// * 新增保存字典数据信息
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertDictData(SysDictData dictData);
|
||||
//
|
||||
// /**
|
||||
// * 修改保存字典数据信息
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDictData(SysDictData dictData);
|
||||
//}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysDictData;
|
||||
//import cn.qihangerp.sys.domain.SysDictType;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典 业务层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface ISysDictTypeService
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询字典类型
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// public List<SysDictType> selectDictTypeList(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 根据所有字典类型
|
||||
// *
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// public List<SysDictType> selectDictTypeAll();
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询字典数据
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// public List<SysDictData> selectDictDataByType(String dictType);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型ID查询信息
|
||||
// *
|
||||
// * @param dictId 字典类型ID
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// public SysDictType selectDictTypeById(Long dictId);
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// public SysDictType selectDictTypeByType(String dictType);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典信息
|
||||
// *
|
||||
// * @param dictIds 需要删除的字典ID
|
||||
// */
|
||||
// public void deleteDictTypeByIds(Long[] dictIds);
|
||||
//
|
||||
// /**
|
||||
// * 加载字典缓存数据
|
||||
// */
|
||||
// public void loadingDictCache();
|
||||
//
|
||||
// /**
|
||||
// * 清空字典缓存数据
|
||||
// */
|
||||
// public void clearDictCache();
|
||||
//
|
||||
// /**
|
||||
// * 重置字典缓存数据
|
||||
// */
|
||||
// public void resetDictCache();
|
||||
//
|
||||
// /**
|
||||
// * 新增保存字典类型信息
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertDictType(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 修改保存字典类型信息
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateDictType(SysDictType dictType);
|
||||
//
|
||||
// /**
|
||||
// * 校验字典类型称是否唯一
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean checkDictTypeUnique(SysDictType dictType);
|
||||
//}
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysMenu;
|
||||
//import cn.qihangerp.sys.domain.vo.TreeSelect;
|
||||
//import cn.qihangerp.security.vo.RouterVo;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Set;
|
||||
//
|
||||
///**
|
||||
// * 菜单 业务层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface ISysMenuService
|
||||
//{
|
||||
// /**
|
||||
// * 根据用户查询系统菜单列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuList(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户查询系统菜单列表
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @param userId 用户ID
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuList(SysMenu menu, Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询权限
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public Set<String> selectMenuPermsByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询权限
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public Set<String> selectMenuPermsByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询菜单树信息
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// public List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询菜单树信息
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 选中菜单列表
|
||||
// */
|
||||
// public List<Long> selectMenuListByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 构建前端路由所需要的菜单
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 路由列表
|
||||
// */
|
||||
// public List<RouterVo> buildMenus(List<SysMenu> menus);
|
||||
//
|
||||
// /**
|
||||
// * 构建前端所需要树结构
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 树结构列表
|
||||
// */
|
||||
// public List<SysMenu> buildMenuTree(List<SysMenu> menus);
|
||||
//
|
||||
// /**
|
||||
// * 构建前端所需要下拉树结构
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 下拉树结构列表
|
||||
// */
|
||||
// public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus);
|
||||
//
|
||||
// /**
|
||||
// * 根据菜单ID查询信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 菜单信息
|
||||
// */
|
||||
// public SysMenu selectMenuById(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 是否存在菜单子节点
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果 true 存在 false 不存在
|
||||
// */
|
||||
// public boolean hasChildByMenuId(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 查询菜单是否存在角色
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果 true 存在 false 不存在
|
||||
// */
|
||||
//// public boolean checkMenuExistRole(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 新增保存菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertMenu(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 修改保存菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateMenu(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 删除菜单管理信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteMenuById(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 校验菜单名称是否唯一
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean checkMenuNameUnique(SysMenu menu);
|
||||
//
|
||||
// /**
|
||||
// * 查询菜单是否存在角色
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果 true 存在 false 不存在
|
||||
// */
|
||||
// public boolean checkMenuExistRole(Long menuId);
|
||||
//}
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//import cn.qihangerp.sys.domain.SysRole;
|
||||
//import cn.qihangerp.sys.domain.SysUserRole;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Set;
|
||||
//
|
||||
///**
|
||||
// * 角色业务层
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//public interface ISysRoleService
|
||||
//{
|
||||
// /**
|
||||
// * 根据条件分页查询角色数据
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 角色数据集合信息
|
||||
// */
|
||||
// public List<SysRole> selectRoleList(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询角色列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// public List<SysRole> selectRolesByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询角色权限
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// public Set<String> selectRolePermissionByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 查询所有角色
|
||||
// *
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// public List<SysRole> selectRoleAll();
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID获取角色选择框列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 选中角色ID列表
|
||||
// */
|
||||
// public List<Long> selectRoleListByUserId(Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 角色对象信息
|
||||
// */
|
||||
// public SysRole selectRoleById(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色名称是否唯一
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean checkRoleNameUnique(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色权限是否唯一
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean checkRoleKeyUnique(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色是否允许操作
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// */
|
||||
// public void checkRoleAllowed(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 校验角色是否有数据权限
|
||||
// *
|
||||
// * @param roleId 角色id
|
||||
// */
|
||||
// public void checkRoleDataScope(Long roleId,Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色使用数量
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int countUserRoleByRoleId(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 新增保存角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertRole(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 修改保存角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateRole(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 修改角色状态
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int updateRoleStatus(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 修改数据权限信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int authDataScope(SysRole role);
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID删除角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleById(Long roleId);
|
||||
//
|
||||
// /**
|
||||
// * 批量删除角色信息
|
||||
// *
|
||||
// * @param roleIds 需要删除的角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteRoleByIds(Long[] roleIds,Long userId);
|
||||
//
|
||||
// /**
|
||||
// * 取消授权用户角色
|
||||
// *
|
||||
// * @param userRole 用户和角色关联信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteAuthUser(SysUserRole userRole);
|
||||
//
|
||||
// /**
|
||||
// * 批量取消授权用户角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param userIds 需要取消授权的用户数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int deleteAuthUsers(Long roleId, Long[] userIds);
|
||||
//
|
||||
// /**
|
||||
// * 批量选择授权用户角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param userIds 需要删除的用户数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// public int insertAuthUsers(Long roleId, Long[] userIds);
|
||||
//}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//import com.qihang.security.vo.RouterVo;
|
||||
//import cn.qihangerp.sys.domain.SysMenu;
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Set;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_menu(菜单权限表)】的数据库操作Service
|
||||
//* @createDate 2024-05-15 10:14:01
|
||||
//*/
|
||||
//public interface SysMenuService extends IService<SysMenu> {
|
||||
// Set<String> selectMenuPermsByUserId(Long userId);
|
||||
// List<SysMenu> selectMenuTreeByUserId(Long userId);
|
||||
// List<RouterVo> buildMenus(List<SysMenu> menus);
|
||||
//
|
||||
// boolean checkMenuNameUnique(SysMenu menu);
|
||||
// /**
|
||||
// * 是否存在菜单子节点
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果 true 存在 false 不存在
|
||||
// */
|
||||
// public boolean hasChildByMenuId(Long menuId);
|
||||
//
|
||||
// /**
|
||||
// * 查询菜单是否存在角色
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果 true 存在 false 不存在
|
||||
// */
|
||||
// public boolean checkMenuExistRole(Long menuId);
|
||||
//}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.domain.SysUser;
|
||||
//import cn.qihangerp.module.service.ISysMenuService;
|
||||
//import cn.qihangerp.module.service.ISysRoleService;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import java.util.HashSet;
|
||||
//import java.util.Set;
|
||||
//
|
||||
///**
|
||||
// * 用户权限处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Component
|
||||
//public class SysPermissionService
|
||||
//{
|
||||
// @Autowired
|
||||
// private ISysRoleService roleService;
|
||||
//
|
||||
// @Autowired
|
||||
// private ISysMenuService menuService;
|
||||
//
|
||||
// /**
|
||||
// * 获取角色数据权限
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 角色权限信息
|
||||
// */
|
||||
// public Set<String> getRolePermission(SysUser user)
|
||||
// {
|
||||
// Set<String> roles = new HashSet<String>();
|
||||
// // 管理员拥有所有权限
|
||||
// if (user.isAdmin())
|
||||
// {
|
||||
// roles.add("admin");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//// roles.addAll(roleService.selectRolePermissionByUserId(user.getUserId()));
|
||||
// roles.add("admin");
|
||||
// }
|
||||
// return roles;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取菜单数据权限
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 菜单权限信息
|
||||
// */
|
||||
// public Set<String> getMenuPermission(SysUser user)
|
||||
// {
|
||||
// Set<String> perms = new HashSet<String>();
|
||||
// // 管理员拥有所有权限
|
||||
// if (user.isAdmin())
|
||||
// {
|
||||
// perms.add("*:*:*");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//// List<SysRole> roles = user.getRoles();
|
||||
//// if (!CollectionUtils.isEmpty(roles))
|
||||
//// {
|
||||
//// // 多角色设置permissions属性,以便数据权限匹配权限
|
||||
//// for (SysRole role : roles)
|
||||
//// {
|
||||
//// Set<String> rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId());
|
||||
//// role.setPermissions(rolePerms);
|
||||
//// perms.addAll(rolePerms);
|
||||
//// }
|
||||
//// }
|
||||
//// else
|
||||
//// {
|
||||
// perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
|
||||
//// }
|
||||
// }
|
||||
// return perms;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//import cn.qihangerp.common.PageQuery;
|
||||
//import cn.qihangerp.common.PageResult;
|
||||
//import cn.qihangerp.sys.domain.SysTaskLogs;
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task_logs】的数据库操作Service
|
||||
//* @createDate 2024-03-22 20:07:56
|
||||
//*/
|
||||
//public interface SysTaskLogsService extends IService<SysTaskLogs> {
|
||||
// PageResult<SysTaskLogs> queryPageList(Integer taskId,PageQuery pageQuery);
|
||||
//}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
//package cn.qihangerp.sys.service;
|
||||
//
|
||||
//import cn.qihangerp.common.PageQuery;
|
||||
//import cn.qihangerp.common.PageResult;
|
||||
//import cn.qihangerp.sys.domain.SysTask;
|
||||
//import com.baomidou.mybatisplus.extension.service.IService;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task】的数据库操作Service
|
||||
//* @createDate 2024-03-22 19:34:41
|
||||
//*/
|
||||
//public interface SysTaskService extends IService<SysTask> {
|
||||
// PageResult<SysTask> queryPageList(PageQuery pageQuery);
|
||||
//}
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//import cn.qihangerp.sys.mapper.SysDictDataMapper;
|
||||
//import cn.qihangerp.sys.service.ISysDictDataService;
|
||||
//import cn.qihangerp.sys.common.DictUtils;
|
||||
//import cn.qihangerp.sys.domain.SysDictData;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 字典 业务层处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Service
|
||||
//public class SysDictDataServiceImpl implements ISysDictDataService
|
||||
//{
|
||||
// @Autowired
|
||||
// private SysDictDataMapper dictDataMapper;
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询字典数据
|
||||
// *
|
||||
// * @param dictData 字典数据信息
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysDictData> selectDictDataList(SysDictData dictData)
|
||||
// {
|
||||
// return dictDataMapper.selectDictDataList(dictData);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型和字典键值查询字典数据信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @param dictValue 字典键值
|
||||
// * @return 字典标签
|
||||
// */
|
||||
// @Override
|
||||
// public String selectDictLabel(String dictType, String dictValue)
|
||||
// {
|
||||
// return dictDataMapper.selectDictLabel(dictType, dictValue);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典数据ID查询信息
|
||||
// *
|
||||
// * @param dictCode 字典数据ID
|
||||
// * @return 字典数据
|
||||
// */
|
||||
// @Override
|
||||
// public SysDictData selectDictDataById(Long dictCode)
|
||||
// {
|
||||
// return dictDataMapper.selectDictDataById(dictCode);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典数据信息
|
||||
// *
|
||||
// * @param dictCodes 需要删除的字典数据ID
|
||||
// */
|
||||
// @Override
|
||||
// public void deleteDictDataByIds(Long[] dictCodes)
|
||||
// {
|
||||
// for (Long dictCode : dictCodes)
|
||||
// {
|
||||
// SysDictData data = selectDictDataById(dictCode);
|
||||
// dictDataMapper.deleteDictDataById(dictCode);
|
||||
// List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
// DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增保存字典数据信息
|
||||
// *
|
||||
// * @param data 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int insertDictData(SysDictData data)
|
||||
// {
|
||||
// int row = dictDataMapper.insertDictData(data);
|
||||
// if (row > 0)
|
||||
// {
|
||||
// List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
// DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
// }
|
||||
// return row;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改保存字典数据信息
|
||||
// *
|
||||
// * @param data 字典数据信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int updateDictData(SysDictData data)
|
||||
// {
|
||||
// int row = dictDataMapper.updateDictData(data);
|
||||
// if (row > 0)
|
||||
// {
|
||||
// List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
// DictUtils.setDictCache(data.getDictType(), dictDatas);
|
||||
// }
|
||||
// return row;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,231 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//import cn.qihangerp.common.ServiceException;
|
||||
//import cn.qihangerp.sys.mapper.SysDictDataMapper;
|
||||
//import cn.qihangerp.sys.mapper.SysDictTypeMapper;
|
||||
//import cn.qihangerp.sys.service.ISysDictTypeService;
|
||||
//
|
||||
//import cn.qihangerp.common.constant.UserConstants;
|
||||
//import cn.qihangerp.common.utils.StringUtils;
|
||||
//import cn.qihangerp.sys.common.DictUtils;
|
||||
//import cn.qihangerp.sys.domain.SysDictData;
|
||||
//import cn.qihangerp.sys.domain.SysDictType;
|
||||
//import org.slf4j.Logger;
|
||||
//import org.slf4j.LoggerFactory;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//import java.util.Comparator;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * 字典 业务层处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Service
|
||||
//public class SysDictTypeServiceImpl implements ISysDictTypeService
|
||||
//{
|
||||
// private Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
// @Autowired
|
||||
// private SysDictTypeMapper dictTypeMapper;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysDictDataMapper dictDataMapper;
|
||||
//
|
||||
// /**
|
||||
// * 项目启动时,初始化字典到缓存
|
||||
// */
|
||||
//// @PostConstruct
|
||||
//// public void init()
|
||||
//// {
|
||||
//// logger.info("初始化项目缓存-dictCache");
|
||||
//// try {
|
||||
//// loadingDictCache();
|
||||
//// }catch (Exception ex){
|
||||
//// logger.info("初始化项目缓存-dictCache失败"+ex.getMessage());
|
||||
//// }
|
||||
//// }
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询字典类型
|
||||
// *
|
||||
// * @param dictType 字典类型信息
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysDictType> selectDictTypeList(SysDictType dictType)
|
||||
// {
|
||||
// return dictTypeMapper.selectDictTypeList(dictType);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据所有字典类型
|
||||
// *
|
||||
// * @return 字典类型集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysDictType> selectDictTypeAll()
|
||||
// {
|
||||
// return dictTypeMapper.selectDictTypeAll();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询字典数据
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典数据集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysDictData> selectDictDataByType(String dictType)
|
||||
// {
|
||||
// List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
// if (StringUtils.isNotEmpty(dictDatas))
|
||||
// {
|
||||
// return dictDatas;
|
||||
// }
|
||||
// dictDatas = dictDataMapper.selectDictDataByType(dictType);
|
||||
// if (StringUtils.isNotEmpty(dictDatas))
|
||||
// {
|
||||
// DictUtils.setDictCache(dictType, dictDatas);
|
||||
// return dictDatas;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型ID查询信息
|
||||
// *
|
||||
// * @param dictId 字典类型ID
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// @Override
|
||||
// public SysDictType selectDictTypeById(Long dictId)
|
||||
// {
|
||||
// return dictTypeMapper.selectDictTypeById(dictId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据字典类型查询信息
|
||||
// *
|
||||
// * @param dictType 字典类型
|
||||
// * @return 字典类型
|
||||
// */
|
||||
// @Override
|
||||
// public SysDictType selectDictTypeByType(String dictType)
|
||||
// {
|
||||
// return dictTypeMapper.selectDictTypeByType(dictType);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除字典类型信息
|
||||
// *
|
||||
// * @param dictIds 需要删除的字典ID
|
||||
// */
|
||||
// @Override
|
||||
// public void deleteDictTypeByIds(Long[] dictIds)
|
||||
// {
|
||||
// for (Long dictId : dictIds)
|
||||
// {
|
||||
// SysDictType dictType = selectDictTypeById(dictId);
|
||||
// if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0)
|
||||
// {
|
||||
// throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
|
||||
// }
|
||||
// dictTypeMapper.deleteDictTypeById(dictId);
|
||||
// DictUtils.removeDictCache(dictType.getDictType());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 加载字典缓存数据
|
||||
// */
|
||||
// @Override
|
||||
// public void loadingDictCache()
|
||||
// {
|
||||
// SysDictData dictData = new SysDictData();
|
||||
// dictData.setStatus("0");
|
||||
// Map<String, List<SysDictData>> dictDataMap = dictDataMapper.selectDictDataList(dictData).stream().collect(Collectors.groupingBy(SysDictData::getDictType));
|
||||
// for (Map.Entry<String, List<SysDictData>> entry : dictDataMap.entrySet())
|
||||
// {
|
||||
// DictUtils.setDictCache(entry.getKey(), entry.getValue().stream().sorted(Comparator.comparing(SysDictData::getDictSort)).collect(Collectors.toList()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 清空字典缓存数据
|
||||
// */
|
||||
// @Override
|
||||
// public void clearDictCache()
|
||||
// {
|
||||
// DictUtils.clearDictCache();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 重置字典缓存数据
|
||||
// */
|
||||
// @Override
|
||||
// public void resetDictCache()
|
||||
// {
|
||||
// clearDictCache();
|
||||
// loadingDictCache();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增保存字典类型信息
|
||||
// *
|
||||
// * @param dict 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int insertDictType(SysDictType dict)
|
||||
// {
|
||||
// int row = dictTypeMapper.insertDictType(dict);
|
||||
// if (row > 0)
|
||||
// {
|
||||
// DictUtils.setDictCache(dict.getDictType(), null);
|
||||
// }
|
||||
// return row;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改保存字典类型信息
|
||||
// *
|
||||
// * @param dict 字典类型信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int updateDictType(SysDictType dict)
|
||||
// {
|
||||
// SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());
|
||||
// dictDataMapper.updateDictDataType(oldDict.getDictType(), dict.getDictType());
|
||||
// int row = dictTypeMapper.updateDictType(dict);
|
||||
// if (row > 0)
|
||||
// {
|
||||
// List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dict.getDictType());
|
||||
// DictUtils.setDictCache(dict.getDictType(), dictDatas);
|
||||
// }
|
||||
// return row;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验字典类型称是否唯一
|
||||
// *
|
||||
// * @param dict 字典类型
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkDictTypeUnique(SysDictType dict)
|
||||
// {
|
||||
// Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId();
|
||||
// SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType());
|
||||
// if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,548 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.domain.SysUser;
|
||||
//import cn.qihangerp.sys.domain.SysMenu;
|
||||
//import cn.qihangerp.sys.domain.SysRole;
|
||||
//import cn.qihangerp.sys.domain.vo.TreeSelect;
|
||||
//import cn.qihangerp.sys.mapper.SysMenuMapper;
|
||||
//import cn.qihangerp.sys.mapper.SysRoleMapper;
|
||||
//import cn.qihangerp.sys.mapper.SysRoleMenuMapper;
|
||||
//import cn.qihangerp.sys.service.ISysMenuService;
|
||||
//import cn.qihangerp.common.constant.Constants;
|
||||
//import cn.qihangerp.common.constant.UserConstants;
|
||||
//import cn.qihangerp.common.utils.StringUtils;
|
||||
//
|
||||
//import cn.qihangerp.security.vo.MetaVo;
|
||||
//import cn.qihangerp.security.vo.RouterVo;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import java.util.*;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * 菜单 业务层处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Service
|
||||
//public class SysMenuServiceImpl implements ISysMenuService
|
||||
//{
|
||||
// public static final String PREMISSION_STRING = "perms[\"{0}\"]";
|
||||
//
|
||||
// @Autowired
|
||||
// private SysMenuMapper menuMapper;
|
||||
// @Autowired
|
||||
// private SysRoleMapper roleMapper;
|
||||
// @Autowired
|
||||
// private SysRoleMenuMapper roleMenuMapper;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据用户查询系统菜单列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysMenu> selectMenuList(Long userId)
|
||||
// {
|
||||
// return selectMenuList(new SysMenu(), userId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询系统菜单列表
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysMenu> selectMenuList(SysMenu menu, Long userId)
|
||||
// {
|
||||
// List<SysMenu> menuList = null;
|
||||
// // 管理员显示所有菜单信息
|
||||
// if (SysUser.isAdmin(userId))
|
||||
// {
|
||||
// menuList = menuMapper.selectMenuList(menu);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// menu.getParams().put("userId", userId);
|
||||
// menuList = menuMapper.selectMenuListByUserId(menu);
|
||||
// }
|
||||
// return menuList;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询权限
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// @Override
|
||||
// public Set<String> selectMenuPermsByUserId(Long userId)
|
||||
// {
|
||||
// List<String> perms = menuMapper.selectMenuPermsByUserId(userId);
|
||||
// Set<String> permsSet = new HashSet<>();
|
||||
// for (String perm : perms)
|
||||
// {
|
||||
// if (StringUtils.isNotEmpty(perm))
|
||||
// {
|
||||
// permsSet.addAll(Arrays.asList(perm.trim().split(",")));
|
||||
// }
|
||||
// }
|
||||
// return permsSet;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询权限
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// @Override
|
||||
// public Set<String> selectMenuPermsByRoleId(Long roleId)
|
||||
// {
|
||||
// List<String> perms = menuMapper.selectMenuPermsByRoleId(roleId);
|
||||
// Set<String> permsSet = new HashSet<>();
|
||||
// for (String perm : perms)
|
||||
// {
|
||||
// if (StringUtils.isNotEmpty(perm))
|
||||
// {
|
||||
// permsSet.addAll(Arrays.asList(perm.trim().split(",")));
|
||||
// }
|
||||
// }
|
||||
// return permsSet;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询菜单
|
||||
// *
|
||||
// * @param userId 用户名称
|
||||
// * @return 菜单列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysMenu> selectMenuTreeByUserId(Long userId)
|
||||
// {
|
||||
// List<SysMenu> menus = null;
|
||||
//
|
||||
// if (isAdmin(userId))
|
||||
// {
|
||||
// menus = menuMapper.selectMenuTreeAll();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// menus = menuMapper.selectMenuTreeByUserId(userId);
|
||||
// }
|
||||
//// menus = menuMapper.selectMenuTreeAll();
|
||||
// return getChildPerms(menus, 0);
|
||||
// }
|
||||
// private static boolean isAdmin(Long userId)
|
||||
// {
|
||||
// return userId != null && 1L == userId;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据角色ID查询菜单树信息
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 选中菜单列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<Long> selectMenuListByRoleId(Long roleId)
|
||||
// {
|
||||
// SysRole role = roleMapper.selectRoleById(roleId);
|
||||
// return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 构建前端路由所需要的菜单
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 路由列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<RouterVo> buildMenus(List<SysMenu> menus)
|
||||
// {
|
||||
// List<RouterVo> routers = new LinkedList<RouterVo>();
|
||||
// for (SysMenu menu : menus)
|
||||
// {
|
||||
// RouterVo router = new RouterVo();
|
||||
// router.setHidden("1".equals(menu.getVisible()));
|
||||
// router.setName(getRouteName(menu));
|
||||
// router.setPath(getRouterPath(menu));
|
||||
// router.setComponent(getComponent(menu));
|
||||
// router.setQuery(menu.getQuery());
|
||||
// router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
|
||||
// List<SysMenu> cMenus = menu.getChildren();
|
||||
// if (StringUtils.isNotEmpty(cMenus) && UserConstants.TYPE_DIR.equals(menu.getMenuType()))
|
||||
// {
|
||||
// router.setAlwaysShow(true);
|
||||
// router.setRedirect("noRedirect");
|
||||
// router.setChildren(buildMenus(cMenus));
|
||||
// }
|
||||
// else if (isMenuFrame(menu))
|
||||
// {
|
||||
// router.setMeta(null);
|
||||
// List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||
// RouterVo children = new RouterVo();
|
||||
// children.setPath(menu.getPath());
|
||||
// children.setComponent(menu.getComponent());
|
||||
// children.setName(StringUtils.capitalize(menu.getPath()));
|
||||
// children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath()));
|
||||
// children.setQuery(menu.getQuery());
|
||||
// childrenList.add(children);
|
||||
// router.setChildren(childrenList);
|
||||
// }
|
||||
// else if (menu.getParentId().intValue() == 0 && isInnerLink(menu))
|
||||
// {
|
||||
// router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
||||
// router.setPath("/");
|
||||
// List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||
// RouterVo children = new RouterVo();
|
||||
// String routerPath = innerLinkReplaceEach(menu.getPath());
|
||||
// children.setPath(routerPath);
|
||||
// children.setComponent(UserConstants.INNER_LINK);
|
||||
// children.setName(StringUtils.capitalize(routerPath));
|
||||
// children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath()));
|
||||
// childrenList.add(children);
|
||||
// router.setChildren(childrenList);
|
||||
// }
|
||||
// routers.add(router);
|
||||
// }
|
||||
// return routers;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 构建前端所需要树结构
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 树结构列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysMenu> buildMenuTree(List<SysMenu> menus)
|
||||
// {
|
||||
// List<SysMenu> returnList = new ArrayList<SysMenu>();
|
||||
// List<Long> tempList = menus.stream().map(SysMenu::getMenuId).collect(Collectors.toList());
|
||||
// for (Iterator<SysMenu> iterator = menus.iterator(); iterator.hasNext();)
|
||||
// {
|
||||
// SysMenu menu = (SysMenu) iterator.next();
|
||||
// // 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
// if (!tempList.contains(menu.getParentId()))
|
||||
// {
|
||||
// recursionFn(menus, menu);
|
||||
// returnList.add(menu);
|
||||
// }
|
||||
// }
|
||||
// if (returnList.isEmpty())
|
||||
// {
|
||||
// returnList = menus;
|
||||
// }
|
||||
// return returnList;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 构建前端所需要下拉树结构
|
||||
// *
|
||||
// * @param menus 菜单列表
|
||||
// * @return 下拉树结构列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<TreeSelect> buildMenuTreeSelect(List<SysMenu> menus)
|
||||
// {
|
||||
// List<SysMenu> menuTrees = buildMenuTree(menus);
|
||||
// return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据菜单ID查询信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 菜单信息
|
||||
// */
|
||||
// @Override
|
||||
// public SysMenu selectMenuById(Long menuId)
|
||||
// {
|
||||
// return menuMapper.selectMenuById(menuId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否存在菜单子节点
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean hasChildByMenuId(Long menuId)
|
||||
// {
|
||||
// int result = menuMapper.hasChildByMenuId(menuId);
|
||||
// return result > 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询菜单使用数量
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
//// @Override
|
||||
//// public boolean checkMenuExistRole(Long menuId)
|
||||
//// {
|
||||
//// int result = roleMenuMapper.checkMenuExistRole(menuId);
|
||||
//// return result > 0;
|
||||
//// }
|
||||
//
|
||||
// /**
|
||||
// * 新增保存菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int insertMenu(SysMenu menu)
|
||||
// {
|
||||
// return menuMapper.insertMenu(menu);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改保存菜单信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int updateMenu(SysMenu menu)
|
||||
// {
|
||||
// return menuMapper.updateMenu(menu);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除菜单管理信息
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int deleteMenuById(Long menuId)
|
||||
// {
|
||||
// return menuMapper.deleteMenuById(menuId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验菜单名称是否唯一
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkMenuNameUnique(SysMenu menu)
|
||||
// {
|
||||
// Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
|
||||
// SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
|
||||
// if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询菜单使用数量
|
||||
// *
|
||||
// * @param menuId 菜单ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkMenuExistRole(Long menuId)
|
||||
// {
|
||||
// int result = roleMenuMapper.checkMenuExistRole(menuId);
|
||||
// return result > 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取路由名称
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 路由名称
|
||||
// */
|
||||
// public String getRouteName(SysMenu menu)
|
||||
// {
|
||||
// String routerName = StringUtils.capitalize(menu.getPath());
|
||||
// // 非外链并且是一级目录(类型为目录)
|
||||
// if (isMenuFrame(menu))
|
||||
// {
|
||||
// routerName = StringUtils.EMPTY;
|
||||
// }
|
||||
// return routerName;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取路由地址
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 路由地址
|
||||
// */
|
||||
// public String getRouterPath(SysMenu menu)
|
||||
// {
|
||||
// String routerPath = menu.getPath();
|
||||
// // 内链打开外网方式
|
||||
// if (menu.getParentId().intValue() != 0 && isInnerLink(menu))
|
||||
// {
|
||||
// routerPath = innerLinkReplaceEach(routerPath);
|
||||
// }
|
||||
// // 非外链并且是一级目录(类型为目录)
|
||||
// if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType())
|
||||
// && UserConstants.NO_FRAME.equals(menu.getIsFrame()))
|
||||
// {
|
||||
// routerPath = "/" + menu.getPath();
|
||||
// }
|
||||
// // 非外链并且是一级目录(类型为菜单)
|
||||
// else if (isMenuFrame(menu))
|
||||
// {
|
||||
// routerPath = "/";
|
||||
// }
|
||||
// return routerPath;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取组件信息
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 组件信息
|
||||
// */
|
||||
// public String getComponent(SysMenu menu)
|
||||
// {
|
||||
// String component = UserConstants.LAYOUT;
|
||||
// if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu))
|
||||
// {
|
||||
// component = menu.getComponent();
|
||||
// }
|
||||
// else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 && isInnerLink(menu))
|
||||
// {
|
||||
// component = UserConstants.INNER_LINK;
|
||||
// }
|
||||
// else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu))
|
||||
// {
|
||||
// component = UserConstants.PARENT_VIEW;
|
||||
// }
|
||||
// return component;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否为菜单内部跳转
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean isMenuFrame(SysMenu menu)
|
||||
// {
|
||||
// return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType())
|
||||
// && menu.getIsFrame().equals(UserConstants.NO_FRAME);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否为内链组件
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean isInnerLink(SysMenu menu)
|
||||
// {
|
||||
// return menu.getIsFrame().equals(UserConstants.NO_FRAME) && StringUtils.ishttp(menu.getPath());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 是否为parent_view组件
|
||||
// *
|
||||
// * @param menu 菜单信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// public boolean isParentView(SysMenu menu)
|
||||
// {
|
||||
// return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据父节点的ID获取所有子节点
|
||||
// *
|
||||
// * @param list 分类表
|
||||
// * @param parentId 传入的父节点ID
|
||||
// * @return String
|
||||
// */
|
||||
// public List<SysMenu> getChildPerms(List<SysMenu> list, int parentId)
|
||||
// {
|
||||
// List<SysMenu> returnList = new ArrayList<SysMenu>();
|
||||
// for (Iterator<SysMenu> iterator = list.iterator(); iterator.hasNext();)
|
||||
// {
|
||||
// SysMenu t = (SysMenu) iterator.next();
|
||||
// // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点
|
||||
// if (t.getParentId() == parentId)
|
||||
// {
|
||||
// recursionFn(list, t);
|
||||
// returnList.add(t);
|
||||
// }
|
||||
// }
|
||||
// return returnList;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 递归列表
|
||||
// *
|
||||
// * @param list 分类表
|
||||
// * @param t 子节点
|
||||
// */
|
||||
// private void recursionFn(List<SysMenu> list, SysMenu t)
|
||||
// {
|
||||
// // 得到子节点列表
|
||||
// List<SysMenu> childList = getChildList(list, t);
|
||||
// t.setChildren(childList);
|
||||
// for (SysMenu tChild : childList)
|
||||
// {
|
||||
// if (hasChild(list, tChild))
|
||||
// {
|
||||
// recursionFn(list, tChild);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 得到子节点列表
|
||||
// */
|
||||
// private List<SysMenu> getChildList(List<SysMenu> list, SysMenu t)
|
||||
// {
|
||||
// List<SysMenu> tlist = new ArrayList<SysMenu>();
|
||||
// Iterator<SysMenu> it = list.iterator();
|
||||
// while (it.hasNext())
|
||||
// {
|
||||
// SysMenu n = (SysMenu) it.next();
|
||||
// if (n.getParentId().longValue() == t.getMenuId().longValue())
|
||||
// {
|
||||
// tlist.add(n);
|
||||
// }
|
||||
// }
|
||||
// return tlist;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 判断是否有子节点
|
||||
// */
|
||||
// private boolean hasChild(List<SysMenu> list, SysMenu t)
|
||||
// {
|
||||
// return getChildList(list, t).size() > 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 内链域名特殊字符替换
|
||||
// *
|
||||
// * @return 替换后的内链域名
|
||||
// */
|
||||
// public String innerLinkReplaceEach(String path)
|
||||
// {
|
||||
// return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, "." },
|
||||
// new String[] { "", "", "", "/" });
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,420 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//
|
||||
//
|
||||
//import cn.qihangerp.domain.SysUser;
|
||||
//import cn.qihangerp.sys.domain.SysRole;
|
||||
//import cn.qihangerp.sys.domain.SysRoleMenu;
|
||||
//import cn.qihangerp.sys.domain.SysUserRole;
|
||||
//import cn.qihangerp.sys.mapper.SysRoleMapper;
|
||||
//import cn.qihangerp.sys.mapper.SysRoleMenuMapper;
|
||||
//import cn.qihangerp.sys.mapper.SysUserRoleMapper;
|
||||
//import cn.qihangerp.sys.service.ISysRoleService;
|
||||
//import cn.qihangerp.common.ServiceException;
|
||||
//import cn.qihangerp.common.constant.UserConstants;
|
||||
//import cn.qihangerp.common.utils.SpringUtils;
|
||||
//import cn.qihangerp.common.utils.StringUtils;
|
||||
//
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.util.*;
|
||||
//
|
||||
///**
|
||||
// * 角色 业务层处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Service
|
||||
//public class SysRoleServiceImpl implements ISysRoleService
|
||||
//{
|
||||
// @Autowired
|
||||
// private SysRoleMapper roleMapper;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysRoleMenuMapper roleMenuMapper;
|
||||
//
|
||||
// @Autowired
|
||||
// private SysUserRoleMapper userRoleMapper;
|
||||
//
|
||||
//// @Autowired
|
||||
//// private SysRoleDeptMapper roleDeptMapper;
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询角色数据
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 角色数据集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysRole> selectRoleList(SysRole role)
|
||||
// {
|
||||
// return roleMapper.selectRoleList(role);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询角色
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysRole> selectRolesByUserId(Long userId)
|
||||
// {
|
||||
// List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId);
|
||||
// List<SysRole> roles = selectRoleAll();
|
||||
// for (SysRole role : roles)
|
||||
// {
|
||||
// for (SysRole userRole : userRoles)
|
||||
// {
|
||||
// if (role.getRoleId().longValue() == userRole.getRoleId().longValue())
|
||||
// {
|
||||
// role.setFlag(true);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return roles;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID查询权限
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 权限列表
|
||||
// */
|
||||
// @Override
|
||||
// public Set<String> selectRolePermissionByUserId(Long userId)
|
||||
// {
|
||||
// List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
|
||||
// Set<String> permsSet = new HashSet<>();
|
||||
// for (SysRole perm : perms)
|
||||
// {
|
||||
// if (StringUtils.isNotNull(perm))
|
||||
// {
|
||||
// permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
|
||||
// }
|
||||
// }
|
||||
// return permsSet;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询所有角色
|
||||
// *
|
||||
// * @return 角色列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysRole> selectRoleAll()
|
||||
// {
|
||||
//// return SpringUtils.getAopProxy(this).selectRoleList(new SysRole());
|
||||
// return this.selectRoleList(new SysRole());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据用户ID获取角色选择框列表
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 选中角色ID列表
|
||||
// */
|
||||
// @Override
|
||||
// public List<Long> selectRoleListByUserId(Long userId)
|
||||
// {
|
||||
// return roleMapper.selectRoleListByUserId(userId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 角色对象信息
|
||||
// */
|
||||
// @Override
|
||||
// public SysRole selectRoleById(Long roleId)
|
||||
// {
|
||||
// return roleMapper.selectRoleById(roleId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验角色名称是否唯一
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkRoleNameUnique(SysRole role)
|
||||
// {
|
||||
// Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
|
||||
// SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName());
|
||||
// if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验角色权限是否唯一
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkRoleKeyUnique(SysRole role)
|
||||
// {
|
||||
// Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId();
|
||||
// SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey());
|
||||
// if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验角色是否允许操作
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// */
|
||||
// @Override
|
||||
// public void checkRoleAllowed(SysRole role)
|
||||
// {
|
||||
// if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin())
|
||||
// {
|
||||
// throw new ServiceException("不允许操作超级管理员角色");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验角色是否有数据权限
|
||||
// *
|
||||
// * @param roleId 角色id
|
||||
// */
|
||||
// @Override
|
||||
// public void checkRoleDataScope(Long roleId,Long userId)
|
||||
// {
|
||||
// if (!SysUser.isAdmin(userId))
|
||||
// {
|
||||
// SysRole role = new SysRole();
|
||||
// role.setRoleId(roleId);
|
||||
// List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role);
|
||||
// if (StringUtils.isEmpty(roles))
|
||||
// {
|
||||
// throw new ServiceException("没有权限访问角色数据!");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID查询角色使用数量
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int countUserRoleByRoleId(Long roleId)
|
||||
// {
|
||||
// return userRoleMapper.countUserRoleByRoleId(roleId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增保存角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int insertRole(SysRole role)
|
||||
// {
|
||||
// // 新增角色信息
|
||||
// roleMapper.insertRole(role);
|
||||
// return insertRoleMenu(role);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改保存角色信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int updateRole(SysRole role)
|
||||
// {
|
||||
// // 修改角色信息
|
||||
// roleMapper.updateRole(role);
|
||||
// // 删除角色与菜单关联
|
||||
// roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
|
||||
// return insertRoleMenu(role);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改角色状态
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int updateRoleStatus(SysRole role)
|
||||
// {
|
||||
// return roleMapper.updateRole(role);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改数据权限信息
|
||||
// *
|
||||
// * @param role 角色信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int authDataScope(SysRole role)
|
||||
// {
|
||||
// // 修改角色信息
|
||||
// roleMapper.updateRole(role);
|
||||
// // 删除角色与部门关联
|
||||
//// roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId());
|
||||
// // 新增角色和部门信息(数据权限)
|
||||
// return insertRoleDept(role);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增角色菜单信息
|
||||
// *
|
||||
// * @param role 角色对象
|
||||
// */
|
||||
// public int insertRoleMenu(SysRole role)
|
||||
// {
|
||||
// int rows = 1;
|
||||
// // 新增用户与角色管理
|
||||
// List<SysRoleMenu> list = new ArrayList<SysRoleMenu>();
|
||||
// for (Long menuId : role.getMenuIds())
|
||||
// {
|
||||
// SysRoleMenu rm = new SysRoleMenu();
|
||||
// rm.setRoleId(role.getRoleId());
|
||||
// rm.setMenuId(menuId);
|
||||
// list.add(rm);
|
||||
// }
|
||||
// if (list.size() > 0)
|
||||
// {
|
||||
// rows = roleMenuMapper.batchRoleMenu(list);
|
||||
// }
|
||||
// return rows;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增角色部门信息(数据权限)
|
||||
// *
|
||||
// * @param role 角色对象
|
||||
// */
|
||||
// public int insertRoleDept(SysRole role)
|
||||
// {
|
||||
// int rows = 1;
|
||||
//// // 新增角色与部门(数据权限)管理
|
||||
//// List<SysRoleDept> list = new ArrayList<SysRoleDept>();
|
||||
//// for (Long deptId : role.getDeptIds())
|
||||
//// {
|
||||
//// SysRoleDept rd = new SysRoleDept();
|
||||
//// rd.setRoleId(role.getRoleId());
|
||||
//// rd.setDeptId(deptId);
|
||||
//// list.add(rd);
|
||||
//// }
|
||||
//// if (list.size() > 0)
|
||||
//// {
|
||||
//// rows = roleDeptMapper.batchRoleDept(list);
|
||||
//// }
|
||||
// return rows;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过角色ID删除角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int deleteRoleById(Long roleId)
|
||||
// {
|
||||
// // 删除角色与菜单关联
|
||||
// roleMenuMapper.deleteRoleMenuByRoleId(roleId);
|
||||
// // 删除角色与部门关联
|
||||
//// roleDeptMapper.deleteRoleDeptByRoleId(roleId);
|
||||
// return roleMapper.deleteRoleById(roleId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除角色信息
|
||||
// *
|
||||
// * @param roleIds 需要删除的角色ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int deleteRoleByIds(Long[] roleIds,Long userId)
|
||||
// {
|
||||
// for (Long roleId : roleIds)
|
||||
// {
|
||||
// checkRoleAllowed(new SysRole(roleId));
|
||||
// checkRoleDataScope(roleId,userId);
|
||||
// SysRole role = selectRoleById(roleId);
|
||||
// if (countUserRoleByRoleId(roleId) > 0)
|
||||
// {
|
||||
// throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
|
||||
// }
|
||||
// }
|
||||
// // 删除角色与菜单关联
|
||||
// roleMenuMapper.deleteRoleMenu(roleIds);
|
||||
// // 删除角色与部门关联
|
||||
//// roleDeptMapper.deleteRoleDept(roleIds);
|
||||
// return roleMapper.deleteRoleByIds(roleIds);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 取消授权用户角色
|
||||
// *
|
||||
// * @param userRole 用户和角色关联信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int deleteAuthUser(SysUserRole userRole)
|
||||
// {
|
||||
// return userRoleMapper.deleteUserRoleInfo(userRole);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量取消授权用户角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param userIds 需要取消授权的用户数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int deleteAuthUsers(Long roleId, Long[] userIds)
|
||||
// {
|
||||
// return userRoleMapper.deleteUserRoleInfos(roleId, userIds);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量选择授权用户角色
|
||||
// *
|
||||
// * @param roleId 角色ID
|
||||
// * @param userIds 需要授权的用户数据ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int insertAuthUsers(Long roleId, Long[] userIds)
|
||||
// {
|
||||
// // 新增用户与角色管理
|
||||
// List<SysUserRole> list = new ArrayList<SysUserRole>();
|
||||
// for (Long userId : userIds)
|
||||
// {
|
||||
// SysUserRole ur = new SysUserRole();
|
||||
// ur.setUserId(userId);
|
||||
// ur.setRoleId(roleId);
|
||||
// list.add(ur);
|
||||
// }
|
||||
// return userRoleMapper.batchUserRole(list);
|
||||
// }
|
||||
//}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//import cn.qihangerp.sys.mapper.SysTaskLogsMapper;
|
||||
//import cn.qihangerp.sys.service.SysTaskLogsService;
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import cn.qihangerp.common.PageQuery;
|
||||
//import cn.qihangerp.common.PageResult;
|
||||
//import cn.qihangerp.sys.domain.SysTaskLogs;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task_logs】的数据库操作Service实现
|
||||
//* @createDate 2024-03-22 20:07:56
|
||||
//*/
|
||||
//@AllArgsConstructor
|
||||
//@Service
|
||||
//public class SysTaskLogsServiceImpl extends ServiceImpl<SysTaskLogsMapper, SysTaskLogs>
|
||||
// implements SysTaskLogsService {
|
||||
// private final SysTaskLogsMapper mapper;
|
||||
//
|
||||
// @Override
|
||||
// public PageResult<SysTaskLogs> queryPageList(Integer taskId, PageQuery pageQuery) {
|
||||
// LambdaQueryWrapper<SysTaskLogs> queryWrapper = new LambdaQueryWrapper<SysTaskLogs>().eq(SysTaskLogs::getTaskId,taskId);
|
||||
// Page<SysTaskLogs> pages = mapper.selectPage(pageQuery.build(), queryWrapper);
|
||||
// return PageResult.build(pages);
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//import cn.qihangerp.sys.mapper.SysTaskMapper;
|
||||
//import cn.qihangerp.sys.service.SysTaskService;
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
//import cn.qihangerp.common.PageQuery;
|
||||
//import cn.qihangerp.common.PageResult;
|
||||
//import cn.qihangerp.sys.domain.SysTask;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
///**
|
||||
//* @author TW
|
||||
//* @description 针对表【sys_task】的数据库操作Service实现
|
||||
//* @createDate 2024-03-22 19:34:41
|
||||
//*/
|
||||
//@AllArgsConstructor
|
||||
//@Service
|
||||
//public class SysTaskServiceImpl extends ServiceImpl<SysTaskMapper, SysTask>
|
||||
// implements SysTaskService {
|
||||
// private final SysTaskMapper mapper;
|
||||
//
|
||||
// @Override
|
||||
// public PageResult<SysTask> queryPageList(PageQuery pageQuery) {
|
||||
// LambdaQueryWrapper<SysTask> queryWrapper = new LambdaQueryWrapper<SysTask>();
|
||||
// Page<SysTask> pages = mapper.selectPage(pageQuery.build(), queryWrapper);
|
||||
// return PageResult.build(pages);
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
@ -1,309 +0,0 @@
|
|||
//package cn.qihangerp.sys.service.impl;
|
||||
//
|
||||
//import cn.qihangerp.domain.SysUser;
|
||||
//import cn.qihangerp.sys.mapper.SysUserMapper;
|
||||
//import cn.qihangerp.common.ServiceException;
|
||||
//import cn.qihangerp.common.constant.UserConstants;
|
||||
//import cn.qihangerp.common.utils.SpringUtils;
|
||||
//import cn.qihangerp.common.utils.StringUtils;
|
||||
//import cn.qihangerp.security.common.SecurityUtils;
|
||||
//import cn.qihangerp.security.service.ISysUserService;
|
||||
//import org.slf4j.Logger;
|
||||
//import org.slf4j.LoggerFactory;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 用户 业务层处理
|
||||
// *
|
||||
// * @author qihang
|
||||
// */
|
||||
//@Service
|
||||
//public class SysUserServiceImpl implements ISysUserService
|
||||
//{
|
||||
// private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
||||
//
|
||||
// @Autowired
|
||||
// private SysUserMapper userMapper;
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询用户列表
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysUser> selectUserList(SysUser user)
|
||||
// {
|
||||
// return userMapper.selectUserList(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询已分配用户角色列表
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysUser> selectAllocatedList(SysUser user)
|
||||
// {
|
||||
// return userMapper.selectAllocatedList(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 根据条件分页查询未分配用户角色列表
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 用户信息集合信息
|
||||
// */
|
||||
// @Override
|
||||
// public List<SysUser> selectUnallocatedList(SysUser user)
|
||||
// {
|
||||
// return userMapper.selectUnallocatedList(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过用户名查询用户
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @return 用户对象信息
|
||||
// */
|
||||
// @Override
|
||||
// public SysUser selectUserByUserName(String userName)
|
||||
// {
|
||||
// return userMapper.selectUserByUserName(userName);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 通过用户ID查询用户
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 用户对象信息
|
||||
// */
|
||||
// @Override
|
||||
// public SysUser selectUserById(Long userId)
|
||||
// {
|
||||
// return userMapper.selectUserById(userId);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验用户名称是否唯一
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkUserNameUnique(SysUser user)
|
||||
// {
|
||||
// Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
|
||||
// SysUser info = userMapper.checkUserNameUnique(user.getUserName());
|
||||
// if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验手机号码是否唯一
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkPhoneUnique(SysUser user)
|
||||
// {
|
||||
// Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
|
||||
// SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber());
|
||||
// if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验email是否唯一
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return
|
||||
// */
|
||||
// @Override
|
||||
// public boolean checkEmailUnique(SysUser user)
|
||||
// {
|
||||
// Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
|
||||
// SysUser info = userMapper.checkEmailUnique(user.getEmail());
|
||||
// if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
|
||||
// {
|
||||
// return UserConstants.NOT_UNIQUE;
|
||||
// }
|
||||
// return UserConstants.UNIQUE;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 校验用户是否允许操作
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// */
|
||||
// @Override
|
||||
// public void checkUserAllowed(SysUser user)
|
||||
// {
|
||||
// if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin())
|
||||
// {
|
||||
// throw new ServiceException("不允许操作超级管理员用户");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增保存用户信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int insertUser(SysUser user)
|
||||
// {
|
||||
// // 新增用户信息
|
||||
// int rows = userMapper.insertUser(user);
|
||||
//// // 新增用户岗位关联
|
||||
//// insertUserPost(user);
|
||||
//// // 新增用户与角色管理
|
||||
//// insertUserRole(user);
|
||||
// return rows;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 注册用户信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean registerUser(SysUser user)
|
||||
// {
|
||||
// return userMapper.insertUser(user) > 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改保存用户信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int updateUser(SysUser user)
|
||||
// {
|
||||
// Long userId = user.getUserId();
|
||||
//// // 删除用户与角色关联
|
||||
//// userRoleMapper.deleteUserRoleByUserId(userId);
|
||||
//// // 新增用户与角色管理
|
||||
//// insertUserRole(user);
|
||||
//// // 删除用户与岗位关联
|
||||
//// userPostMapper.deleteUserPostByUserId(userId);
|
||||
// // 新增用户与岗位管理
|
||||
//// insertUserPost(user);
|
||||
// return userMapper.updateUser(user);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 修改用户状态
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int updateUserStatus(SysUser user)
|
||||
// {
|
||||
// return userMapper.updateUser(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改用户基本信息
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int updateUserProfile(SysUser user)
|
||||
// {
|
||||
// return userMapper.updateUser(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改用户头像
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @param avatar 头像地址
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public boolean updateUserAvatar(String userName, String avatar)
|
||||
// {
|
||||
// return userMapper.updateUserAvatar(userName, avatar) > 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 重置用户密码
|
||||
// *
|
||||
// * @param user 用户信息
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int resetPwd(SysUser user)
|
||||
// {
|
||||
// return userMapper.updateUser(user);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 重置用户密码
|
||||
// *
|
||||
// * @param userName 用户名
|
||||
// * @param password 密码
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// public int resetUserPwd(String userName, String password)
|
||||
// {
|
||||
// return userMapper.resetUserPwd(userName, password);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 通过用户ID删除用户
|
||||
// *
|
||||
// * @param userId 用户ID
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public int deleteUserById(Long userId)
|
||||
// {
|
||||
//// // 删除用户与角色关联
|
||||
//// userRoleMapper.deleteUserRoleByUserId(userId);
|
||||
//// // 删除用户与岗位表
|
||||
//// userPostMapper.deleteUserPostByUserId(userId);
|
||||
// return userMapper.deleteUserById(userId);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void checkUserDataScope(Long userId) {
|
||||
// if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
||||
// {
|
||||
// SysUser user = new SysUser();
|
||||
// user.setUserId(userId);
|
||||
// List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user);
|
||||
// if (StringUtils.isEmpty(users))
|
||||
// {
|
||||
// throw new ServiceException("没有权限访问用户数据!");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
Loading…
Reference in New Issue