Commit a283f243 authored by 赵啸非's avatar 赵啸非

修改用户登录,数据库表,删除资源resource

parent 6cb61c56
<component name="libraryTable">
<library name="Maven: org.springframework:spring-test:5.3.20">
<CLASSES>
<root url="jar://$PROJECT_DIR$/../../MavenRepository/maven_jar/org/springframework/spring-test/5.3.20/spring-test-5.3.20.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$PROJECT_DIR$/../../MavenRepository/maven_jar/org/springframework/spring-test/5.3.20/spring-test-5.3.20-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$PROJECT_DIR$/../../MavenRepository/maven_jar/org/springframework/spring-test/5.3.20/spring-test-5.3.20-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
package com.mortals.xhx.common.code;
/**
* @author karlhoo
*/
public enum ApiRespCodeEnum {
/** 接收成功 */
SUCCESS(1, "接收成功"),
/** 执行失败 */
FAILED(2,"执行失败"),
;
private final Integer value;
private final String label;
ApiRespCodeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
public int getValue() {
return this.value;
}
public String getLabel() {
return this.label;
}
}
package com.mortals.xhx.feign.area;
import com.alibaba.fastjson.JSON;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
import com.mortals.xhx.feign.IFeign;
import com.mortals.xhx.feign.req.BaseUserQuery;
import com.mortals.xhx.feign.req.BaseUserReq;
......@@ -43,7 +45,10 @@ class AreaFeignFallbackFactory implements FallbackFactory<IApiAreaFeign> {
public String getListByParentId(String parentId, String token) {
log.error("暂时无法获取区域信息,请稍后再试!parentId:{},token:{}", parentId, token);
log.error(t.getMessage());
return null;
ApiResp<String> failResp = new ApiResp<>();
failResp.setCode(ApiRespCodeEnum.FAILED.getValue());
failResp.setMsg("暂时无法获取区域信息,请稍后再试!");
return JSON.toJSONString(failResp);
}
};
}
......
......@@ -7,7 +7,7 @@ CREATE TABLE mortals_xhx_user(
`loginName` varchar(50) COMMENT '登录名',
`loginPwd` varchar(128) COMMENT '登录密码,使用md5双次加密',
`loginLimitAddress` varchar(200) COMMENT '登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录',
`realName` varchar(50) COMMENT '用户名',
`realName` varchar(64) COMMENT '用户名',
`mobile` varchar(21) COMMENT '用户手机号',
`phone` varchar(21) COMMENT '用户联系电话',
`email` varchar(50) COMMENT '用户邮箱',
......@@ -15,9 +15,7 @@ CREATE TABLE mortals_xhx_user(
`userType` tinyint(2) COMMENT '用户类型(0.系统用户,1.普通用户,2.工作人员)',
`siteIds` varchar(512) COMMENT '所属站点id,多个逗号分隔',
`areaCodes` varchar(512) COMMENT '所属区域code,多个逗号分隔',
`modeIds` varchar(512) COMMENT '拥有系统模块,多个逗号分隔',
`status` tinyint(2) COMMENT '用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)',
`customerId` bigint(20) COMMENT '客户ID',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
......@@ -27,71 +25,25 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户信息业务';
-- ----------------------------
-- 参数信息业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_param`;
CREATE TABLE mortals_xhx_param(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`name` varchar(100) COMMENT '参数名称',
`firstOrganize` varchar(100) COMMENT '一级组织,如:平台配置',
`secondOrganize` varchar(100) COMMENT '二级组织,如:基础配置',
`paramKey` varchar(100) COMMENT '参数键,全局唯一',
`paramValue` varchar(2000) COMMENT '参数值',
`validStatus` tinyint(2) COMMENT '参数有效状态,(0.禁用,1.启用)',
`modStatus` tinyint(2) COMMENT '参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)',
`displayType` tinyint(2) COMMENT '展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)',
`remark` varchar(200) COMMENT '备注',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='参数信息业务';
-- ----------------------------
-- 资源信息业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_resource`;
CREATE TABLE mortals_xhx_resource(
`id` bigint(20) AUTO_INCREMENT COMMENT '菜单ID,主键,自增长',
`name` varchar(50) COMMENT '名称',
`url` varchar(2000) COMMENT '连接地址,多个地址以逗号分隔',
`authType` tinyint(2) COMMENT '权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)',
`sourceType` tinyint(2) COMMENT '资源类型(0.系统资源,1.开放资源)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
`userType` tinyint(2) COMMENT '用户类型(0.系统用户,1.代理商用户,2.品牌商用户)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='资源信息业务';
-- ----------------------------
-- 角色信息业务表
-- 角色信息表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_role`;
CREATE TABLE mortals_xhx_role(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`name` varchar(50) COMMENT '角色名称',
`remark` varchar(200) COMMENT '备注',
`name` varchar(128) COMMENT '角色名称',
`roleCode` varchar(128) COMMENT '角色编码',
`roleSort` int(4) COMMENT '角色排序字段',
`roleType` tinyint(2) COMMENT '角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)',
`remark` varchar(256) COMMENT '备注',
`roleType` tinyint(2) COMMENT '角色状态(0.停用,1.启用)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色信息业务';
-- ----------------------------
-- 角色资源权限业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_role_auth`;
CREATE TABLE mortals_xhx_role_auth(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`roleId` bigint(20) COMMENT '角色ID',
`resourceId` bigint(20) COMMENT '资源ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色资源权限业务';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色信息';
-- ----------------------------
-- 角色用户业务
-- 角色用户关联
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_role_user`;
CREATE TABLE mortals_xhx_role_user(
......@@ -99,44 +51,42 @@ CREATE TABLE mortals_xhx_role_user(
`roleId` bigint(20) COMMENT '角色ID',
`userId` bigint(20) COMMENT '用户ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色用户业务';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色用户关联';
-- ----------------------------
-- 分索引信息业务
-- 角色菜单权限关联
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_table_index`;
CREATE TABLE mortals_xhx_table_index(
`id` bigint(20) AUTO_INCREMENT COMMENT '菜单ID,主键,自增长',
`tableName` varchar(100) COMMENT '表名称',
`tableMark` varchar(100) COMMENT '表标识',
`createTime` datetime COMMENT '创建时间',
DROP TABLE IF EXISTS `mortals_xhx_role_auth`;
CREATE TABLE mortals_xhx_role_auth(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`roleId` bigint(20) COMMENT '角色ID',
`menuId` bigint(20) COMMENT '菜单ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分索引信息业务';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色菜单权限关联';
-- ----------------------------
-- 任务信息业务表
-- 菜单信息业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_task`;
CREATE TABLE mortals_xhx_task(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`name` varchar(100) COMMENT '任务名称',
`taskKey` varchar(100) COMMENT '任务关键字,区分任务执行流程',
`status` tinyint(2) COMMENT '任务状态,(0,未启动,1.执行中)',
`excuteService` varchar(100) COMMENT '任务执行服务',
`excuteParam` text COMMENT '任务执行参数',
`excuteHost` varchar(200) COMMENT '任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔',
`excuteStrategy` tinyint(2) COMMENT '执行策略(1.按日,2.按周,3.按月,4.按间隔时间)',
`excuteDate` int(11) COMMENT '执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;',
`excuteTime` varchar(10) COMMENT '执行时间,格式:HH:mm,',
`remark` varchar(200) COMMENT '备注',
`lastExcuteHost` varchar(32) COMMENT '最后执行主机',
`lastExcuteTime` datetime COMMENT '最后执行时间',
`interimExcuteStatus` tinyint(2) COMMENT '临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)',
DROP TABLE IF EXISTS `mortals_xhx_menu`;
CREATE TABLE mortals_xhx_menu(
`id` bigint(20) AUTO_INCREMENT COMMENT '菜单ID,主键,自增长',
`name` varchar(50) COMMENT '菜单名称',
`url` varchar(256) COMMENT '连接地址',
`parentId` bigint(20) COMMENT '父菜单ID,一级菜单的该字段值为-1',
`linkType` tinyint(2) COMMENT '链接方式,(0.普通,1.弹出,2.脚本)',
`imgPath` varchar(128) COMMENT '主菜单图标,主菜单图标的css样式名',
`buttonImgPath` varchar(128) COMMENT '按钮图标',
`imgCommPath` varchar(128) COMMENT '常用菜单图标',
`visible` tinyint(2) COMMENT '菜单显示(0.隐藏,1.显示)',
`menuType` tinyint(2) COMMENT '菜单类型(0.目录,1.菜单,2.按钮)',
`status` tinyint(2) COMMENT '菜单状态(0.禁用,1.启用)',
`authType` tinyint(2) COMMENT '权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)',
`orderId` int(4) COMMENT '排序编号',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务信息业务';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单信息业务';
-- ----------------------------
-- 上传文件业务表
......@@ -152,24 +102,6 @@ CREATE TABLE mortals_xhx_uploadfile(
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='上传文件业务';
-- ----------------------------
-- 验证码信息业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_valid_code`;
CREATE TABLE mortals_xhx_valid_code(
`id` bigint(20) AUTO_INCREMENT COMMENT '菜单ID,主键,自增长',
`code` varchar(10) COMMENT '验证码',
`url` varchar(500) COMMENT '校验地址,email校验使用',
`mobile` varchar(21) COMMENT '校验手机号',
`email` varchar(50) COMMENT '校验邮箱',
`type` tinyint(2) COMMENT '校验方式(0.图片校验,1.手机校验,2.邮箱校验)',
`sessionId` varchar(50) COMMENT '会话ID',
`ip` varchar(50) COMMENT 'IP地址',
`createTime` datetime COMMENT '创建时间',
`lapseTime` datetime COMMENT '失效时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='验证码信息业务';
-- ----------------------------
-- API服务表
-- ----------------------------
......@@ -209,49 +141,50 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='API服务';
-- ----------------------------
-- 菜单信息业务表
-- 参数信息业务表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_menu`;
CREATE TABLE mortals_xhx_menu(
`id` bigint(20) AUTO_INCREMENT COMMENT '菜单ID,主键,自增长',
`name` varchar(50) COMMENT '菜单名称',
`url` varchar(256) COMMENT '连接地址',
`parentId` bigint(20) COMMENT '父菜单ID,一级菜单的该字段值为-1',
`orderId` int(11) COMMENT '排序编号',
`status` tinyint(2) COMMENT '菜单状态(0.禁用,1.启用)',
`linkType` tinyint(2) COMMENT '链接方式,(0.普通,1.弹出,2.脚本)',
`groupId` int(11) COMMENT '分组编号,使用菜单分隔符按该值分隔,默认1',
`groupName` varchar(255) COMMENT '',
`imgPath` varchar(128) COMMENT '主菜单图标,主菜单图标的css样式名',
`buttonImgPath` varchar(128) COMMENT '按钮图标,按钮图标的css样式名',
`imgCommPath` varchar(128) COMMENT '常用菜单图标,常用菜单图标的css样式名',
`commMenu` tinyint(2) COMMENT '是否常用菜单(0.非常用,1:常用)',
`menuType` tinyint(2) COMMENT '菜单类型(0.主菜单,1.非主菜单)',
`authType` tinyint(2) COMMENT '权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)',
DROP TABLE IF EXISTS `mortals_xhx_param`;
CREATE TABLE mortals_xhx_param(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`name` varchar(100) COMMENT '参数名称',
`firstOrganize` varchar(100) COMMENT '一级组织,如:平台配置',
`secondOrganize` varchar(100) COMMENT '二级组织,如:基础配置',
`paramKey` varchar(100) COMMENT '参数键,全局唯一',
`paramValue` varchar(2000) COMMENT '参数值',
`validStatus` tinyint(2) COMMENT '参数有效状态,(0.禁用,1.启用)',
`modStatus` tinyint(2) COMMENT '参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)',
`displayType` tinyint(2) COMMENT '展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)',
`remark` varchar(200) COMMENT '备注',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='菜单信息业务';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='参数信息业务';
-- ----------------------------
-- 系统模块
-- 任务信息业务
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_model`;
CREATE TABLE mortals_sys_model(
DROP TABLE IF EXISTS `mortals_xhx_task`;
CREATE TABLE mortals_xhx_task(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`modelName` varchar(64) COMMENT '系统模块名称',
`modelCode` varchar(64) COMMENT '模块编码',
`modelIcon` varchar(64) COMMENT '模块图标',
`modelUrl` varchar(64) COMMENT '地址',
`remark` varchar(64) COMMENT '备注信息',
`sort` int(4) COMMENT '排序',
`name` varchar(100) COMMENT '任务名称',
`taskKey` varchar(100) COMMENT '任务关键字,区分任务执行流程',
`status` tinyint(2) COMMENT '任务状态,(0,未启动,1.执行中)',
`excuteService` varchar(100) COMMENT '任务执行服务',
`excuteParam` text COMMENT '任务执行参数',
`excuteHost` varchar(200) COMMENT '任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔',
`excuteStrategy` tinyint(2) COMMENT '执行策略(1.按日,2.按周,3.按月,4.按间隔时间)',
`excuteDate` int(11) COMMENT '执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;',
`excuteTime` varchar(10) COMMENT '执行时间,格式:HH:mm,',
`remark` varchar(200) COMMENT '备注',
`lastExcuteHost` varchar(32) COMMENT '最后执行主机',
`lastExcuteTime` datetime COMMENT '最后执行时间',
`interimExcuteStatus` tinyint(2) COMMENT '临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateTime` datetime COMMENT '修改时间',
`updateUserId` bigint(20) COMMENT '修改用户',
`createUserName` varchar(50) COMMENT '创建用户名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统模块';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任务信息业务';
-- ----------------------------
-- 操作日志业务表
......@@ -268,9 +201,12 @@ CREATE TABLE mortals_xhx_oper_log(
`ip` varchar(30) COMMENT '操作IP地址',
`logDate` datetime COMMENT '操作时间',
`operType` tinyint(2) COMMENT '操作类型,(0.新增,1.修改,2.删除)',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='操作日志业务';
-- ----------------------------
-- Records of mortals_xhx_role
-- ----------------------------
......@@ -280,4 +216,4 @@ INSERT INTO `mortals_xhx_role` VALUES (1, '管理员', '类似admin', 0, now(),
-- ----------------------------
INSERT INTO `mortals_xhx_task` VALUES (2, '分表创建任务', 'tableIndexService', 0, 'tableIndexService', NULL, NULL, 1, 0, '00:30', NULL, '192.168.1.106', '2021-08-18 00:30:01', 0, '2021-08-12 11:07:23', 1, '系统管理员');
INSERT INTO `mortals_xhx_user` VALUES (1, 'admin', '43442676c74ae59f219c2d87fd6bad52', NULL, '系统管理员', '13808095770', NULL, NULL, NULL, 1,"","","", 1, 1, now(), 1, 'admin', now(), '127.0.0.1');
INSERT INTO `mortals_xhx_user` VALUES (1, 'admin', '43442676c74ae59f219c2d87fd6bad52', NULL, '系统管理员', '13808095770', NULL, NULL, 1,"","","", 1, 1, now(), 1, 'admin', now(), '127.0.0.1');
......@@ -21,134 +21,80 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '用户状态', 'User', 'status',
INSERT INTO `mortals_xhx_param` VALUES (null, '用户状态', 'User', 'status', '3', '销户', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '用户状态', 'User', 'status', '4', '离职', 1, 4, 0, 'status', NULL, NULL, NULL);
-- ----------------------------
-- 参数信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '参数信息业务', '/param/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 参数信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '参数信息业务-菜单管理-查看', '/param/list,/param/view,/param/info,/param/export,/param/exportExcel,/param/downloadTemplate,/param/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '参数信息业务-菜单管理-维护', '/param/add,/param/edit,/param/delete,/param/logicDelete,/param/save,/param/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 参数信息业务参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '参数有效状态,', 'Param', 'validStatus', '0', '禁用', 1, 4, 0, 'validStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数有效状态,', 'Param', 'validStatus', '1', '启用', 1, 4, 0, 'validStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '0', '隐藏', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '1', '页面仅查看', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '2', '页面可修改', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '3', '页面可删除', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '4', '页面可修改删除', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '0', '普通文本框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '1', '多行文本框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '2', '开关', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '3', '块输入框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
-- ----------------------------
-- 资源信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '资源信息业务', '/resource/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 资源信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '资源信息业务-菜单管理-查看', '/resource/list,/resource/view,/resource/info,/resource/export,/resource/exportExcel,/resource/downloadTemplate,/resource/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '资源信息业务-菜单管理-维护', '/resource/add,/resource/edit,/resource/delete,/resource/logicDelete,/resource/save,/resource/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 资源信息业务参数 SQL
-- 角色信息菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Resource', 'authType', '0', '无限制', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Resource', 'authType', '1', '无需登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Resource', 'authType', '2', '需要登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Resource', 'authType', '3', '需要角色权限查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '资源类型', 'Resource', 'sourceType', '0', '系统资源', 1, 4, 0, 'sourceType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '资源类型', 'Resource', 'sourceType', '1', '开放资源', 1, 4, 0, 'sourceType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '用户类型', 'Resource', 'userType', '0', '系统用户', 1, 4, 0, 'userType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '用户类型', 'Resource', 'userType', '1', '代理商用户', 1, 4, 0, 'userType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '用户类型', 'Resource', 'userType', '2', '品牌商用户', 1, 4, 0, 'userType', NULL, NULL, NULL);
-- ----------------------------
-- 角色信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色信息业务', '/role/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色信息', '/role/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 角色信息业务资源路径 SQL
-- 角色信息资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色信息业务-菜单管理-查看', '/role/list,/role/view,/role/info,/role/export,/role/exportExcel,/role/downloadTemplate,/role/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色信息业务-菜单管理-维护', '/role/add,/role/edit,/role/delete,/role/logicDelete,/role/save,/role/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色信息-菜单管理-查看', '/role/list,/role/view,/role/info,/role/export,/role/exportExcel,/role/downloadTemplate,/role/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色信息-菜单管理-维护', '/role/add,/role/edit,/role/delete,/role/logicDelete,/role/save,/role/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 角色信息业务参数 SQL
-- 角色信息参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '角色类型', 'Role', 'roleType', '0', '系统内置角色', 1, 4, 0, 'roleType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '角色类型', 'Role', 'roleType', '1', '默认系统角色', 1, 4, 0, 'roleType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '角色类型', 'Role', 'roleType', '2', '普通角色', 1, 4, 0, 'roleType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '角色状态', 'Role', 'roleType', '0', '停用', 1, 4, 0, 'roleType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '角色状态', 'Role', 'roleType', '1', '启用', 1, 4, 0, 'roleType', NULL, NULL, NULL);
-- ----------------------------
-- 角色资源权限业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色资源权限业务', '/role/auth/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 角色资源权限业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色资源权限业务-菜单管理-查看', '/role/auth/list,/role/auth/view,/role/auth/info,/role/auth/export,/role/auth/exportExcel,/role/auth/downloadTemplate,/role/auth/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色资源权限业务-菜单管理-维护', '/role/auth/add,/role/auth/edit,/role/auth/delete,/role/auth/logicDelete,/role/auth/save,/role/auth/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 角色资源权限业务参数 SQL
-- 角色用户关联菜单 SQL
-- ----------------------------
-- ----------------------------
-- 角色用户业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色用户业务', '/role/user/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色用户关联', '/role/user/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 角色用户业务资源路径 SQL
-- 角色用户关联资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色用户业务-菜单管理-查看', '/role/user/list,/role/user/view,/role/user/info,/role/user/export,/role/user/exportExcel,/role/user/downloadTemplate,/role/user/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色用户业务-菜单管理-维护', '/role/user/add,/role/user/edit,/role/user/delete,/role/user/logicDelete,/role/user/save,/role/user/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色用户关联-菜单管理-查看', '/role/user/list,/role/user/view,/role/user/info,/role/user/export,/role/user/exportExcel,/role/user/downloadTemplate,/role/user/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色用户关联-菜单管理-维护', '/role/user/add,/role/user/edit,/role/user/delete,/role/user/logicDelete,/role/user/save,/role/user/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 角色用户业务参数 SQL
-- 角色用户关联参数 SQL
-- ----------------------------
-- ----------------------------
-- 分索引信息业务菜单 SQL
-- 角色菜单权限关联菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '分索引信息业务', '/table/index/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '角色菜单权限关联', '/role/auth/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 分索引信息业务资源路径 SQL
-- 角色菜单权限关联资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '分索引信息业务-菜单管理-查看', '/table/index/list,/table/index/view,/table/index/info,/table/index/export,/table/index/exportExcel,/table/index/downloadTemplate,/table/index/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '分索引信息业务-菜单管理-维护', '/table/index/add,/table/index/edit,/table/index/delete,/table/index/logicDelete,/table/index/save,/table/index/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色菜单权限关联-菜单管理-查看', '/role/auth/list,/role/auth/view,/role/auth/info,/role/auth/export,/role/auth/exportExcel,/role/auth/downloadTemplate,/role/auth/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '角色菜单权限关联-菜单管理-维护', '/role/auth/add,/role/auth/edit,/role/auth/delete,/role/auth/logicDelete,/role/auth/save,/role/auth/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 分索引信息业务参数 SQL
-- 角色菜单权限关联参数 SQL
-- ----------------------------
-- ----------------------------
-- 任务信息业务菜单 SQL
-- 菜单信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '任务信息业务', '/task/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '菜单信息业务', '/menu/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 任务信息业务资源路径 SQL
-- 菜单信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '任务信息业务-菜单管理-查看', '/task/list,/task/view,/task/info,/task/export,/task/exportExcel,/task/downloadTemplate,/task/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '任务信息业务-菜单管理-维护', '/task/add,/task/edit,/task/delete,/task/logicDelete,/task/save,/task/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '菜单信息业务-菜单管理-查看', '/menu/list,/menu/view,/menu/info,/menu/export,/menu/exportExcel,/menu/downloadTemplate,/menu/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '菜单信息业务-菜单管理-维护', '/menu/add,/menu/edit,/menu/delete,/menu/logicDelete,/menu/save,/menu/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 任务信息业务参数 SQL
-- 菜单信息业务参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '任务状态,', 'Task', 'status', '1', '执行中', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '1', '按日', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '2', '按周', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '3', '按月', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '4', '按间隔时间', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '0', '未启用', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '1', '立即执行并保留', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '2', '立即执行并删除', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '0', '普通', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '1', '弹出', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '2', '脚本', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单显示', 'Menu', 'visible', '0', '隐藏', 1, 4, 0, 'visible', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单显示', 'Menu', 'visible', '1', '显示', 1, 4, 0, 'visible', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单类型', 'Menu', 'menuType', '0', '目录', 1, 4, 0, 'menuType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单类型', 'Menu', 'menuType', '1', '菜单', 1, 4, 0, 'menuType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单类型', 'Menu', 'menuType', '2', '按钮', 1, 4, 0, 'menuType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单状态', 'Menu', 'status', '0', '禁用', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单状态', 'Menu', 'status', '1', '启用', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '0', '无限制', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '1', '无需登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '2', '需要登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '3', '需要角色权限查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
-- ----------------------------
-- 上传文件业务菜单 SQL
-- ----------------------------
......@@ -168,23 +114,6 @@ INSERT INTO `mortals_xhx_param` VALUES (null, '文件类型,', 'Uploadfile', '
INSERT INTO `mortals_xhx_param` VALUES (null, '文件类型,', 'Uploadfile', 'fileType', '3', 'zip', 1, 4, 0, 'fileType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '文件类型,', 'Uploadfile', 'fileType', '4', 'pdf', 1, 4, 0, 'fileType', NULL, NULL, NULL);
-- ----------------------------
-- 验证码信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '验证码信息业务', '/valid/code/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 验证码信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '验证码信息业务-菜单管理-查看', '/valid/code/list,/valid/code/view,/valid/code/info,/valid/code/export,/valid/code/exportExcel,/valid/code/downloadTemplate,/valid/code/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '验证码信息业务-菜单管理-维护', '/valid/code/add,/valid/code/edit,/valid/code/delete,/valid/code/logicDelete,/valid/code/save,/valid/code/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 验证码信息业务参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '校验方式', 'ValidCode', 'type', '0', '图片校验', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '校验方式', 'ValidCode', 'type', '1', '手机校验', 1, 4, 0, 'type', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '校验方式', 'ValidCode', 'type', '2', '邮箱校验', 1, 4, 0, 'type', NULL, NULL, NULL);
-- ----------------------------
-- API服务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, 'API服务', '/system/service/api/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
......@@ -213,45 +142,52 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, 'API服务-菜单管理-维护'
-- API服务参数 SQL
-- ----------------------------
-- ----------------------------
-- 菜单信息业务菜单 SQL
-- 参数信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '菜单信息业务', '/menu/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '参数信息业务', '/param/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 菜单信息业务资源路径 SQL
-- 参数信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '菜单信息业务-菜单管理-查看', '/menu/list,/menu/view,/menu/info,/menu/export,/menu/exportExcel,/menu/downloadTemplate,/menu/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '菜单信息业务-菜单管理-维护', '/menu/add,/menu/edit,/menu/delete,/menu/logicDelete,/menu/save,/menu/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '参数信息业务-菜单管理-查看', '/param/list,/param/view,/param/info,/param/export,/param/exportExcel,/param/downloadTemplate,/param/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '参数信息业务-菜单管理-维护', '/param/add,/param/edit,/param/delete,/param/logicDelete,/param/save,/param/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 菜单信息业务参数 SQL
-- 参数信息业务参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单状态', 'Menu', 'status', '0', '禁用', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单状态', 'Menu', 'status', '1', '启用', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '0', '普通', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '1', '弹出', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '链接方式,', 'Menu', 'linkType', '2', '脚本', 1, 4, 0, 'linkType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '是否常用菜单', 'Menu', 'commMenu', '0', '非常用', 1, 4, 0, 'commMenu', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单类型', 'Menu', 'menuType', '0', '主菜单', 1, 4, 0, 'menuType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '菜单类型', 'Menu', 'menuType', '1', '非主菜单', 1, 4, 0, 'menuType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '0', '无限制', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '1', '无需登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '2', '需要登录查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '权限类型', 'Menu', 'authType', '3', '需要角色权限查看', 1, 4, 0, 'authType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数有效状态,', 'Param', 'validStatus', '0', '禁用', 1, 4, 0, 'validStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数有效状态,', 'Param', 'validStatus', '1', '启用', 1, 4, 0, 'validStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '0', '隐藏', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '1', '页面仅查看', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '2', '页面可修改', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '3', '页面可删除', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '参数修改状态', 'Param', 'modStatus', '4', '页面可修改删除', 1, 4, 0, 'modStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '0', '普通文本框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '1', '多行文本框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '2', '开关', 1, 4, 0, 'displayType', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '展现类型', 'Param', 'displayType', '3', '块输入框', 1, 4, 0, 'displayType', NULL, NULL, NULL);
-- ----------------------------
-- 系统模块菜单 SQL
-- 任务信息业务菜单 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_menu` VALUES (null, '系统模块', '/model/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
INSERT INTO `mortals_xhx_menu` VALUES (null, '任务信息业务', '/task/list', 0, 1, 1, 0, 0,'',NULL, NULL, NULL, 0, 0, 1, NULL, NULL, NULL);
-- ----------------------------
-- 系统模块资源路径 SQL
-- 任务信息业务资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '系统模块-菜单管理-查看', '/model/list,/model/view,/model/info,/model/export,/model/exportExcel,/model/downloadTemplate,/model/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '系统模块-菜单管理-维护', '/model/add,/model/edit,/model/delete,/model/logicDelete,/model/save,/model/importData', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '任务信息业务-菜单管理-查看', '/task/list,/task/view,/task/info,/task/export,/task/exportExcel,/task/downloadTemplate,/task/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '任务信息业务-菜单管理-维护', '/task/add,/task/edit,/task/delete,/task/logicDelete,/task/save,/task/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 系统模块参数 SQL
-- 任务信息业务参数 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_param` VALUES (null, '任务状态,', 'Task', 'status', '1', '执行中', 1, 4, 0, 'status', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '1', '按日', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '2', '按周', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '3', '按月', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '执行策略', 'Task', 'excuteStrategy', '4', '按间隔时间', 1, 4, 0, 'excuteStrategy', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '0', '未启用', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '1', '立即执行并保留', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
INSERT INTO `mortals_xhx_param` VALUES (null, '临时执行状态,', 'Task', 'interimExcuteStatus', '2', '立即执行并删除', 1, 4, 0, 'interimExcuteStatus', NULL, NULL, NULL);
-- ----------------------------
-- 操作日志业务菜单 SQL
-- ----------------------------
......
......@@ -175,6 +175,8 @@ data|object|数据对象
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|用户ID,主键,自增长
&emsp;&emsp;loginName|String|登录名
&emsp;&emsp;loginPwd|String|登录密码,使用md5双次加密
&emsp;&emsp;loginLimitAddress|String|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录
&emsp;&emsp;realName|String|用户名
&emsp;&emsp;mobile|String|用户手机号
......@@ -183,6 +185,7 @@ data|object|数据对象
&emsp;&emsp;qq|String|QQ号码
&emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
&emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;&emsp;status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
......@@ -230,6 +233,8 @@ code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|用户ID,主键,自增长
&emsp;loginName|String|登录名
&emsp;loginPwd|String|登录密码,使用md5双次加密
&emsp;loginLimitAddress|String|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录
&emsp;realName|String|用户名
&emsp;mobile|String|用户手机号
......@@ -238,6 +243,7 @@ data|object|数据对象
&emsp;qq|String|QQ号码
&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
......@@ -253,24 +259,24 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":465,
"loginName":"nvbhsg",
"loginPwd":"rg5k2g",
"loginLimitAddress":"gu87p4",
"realName":"epll4d",
"mobile":"7hgrvk",
"phone":"mrd0cm",
"email":"83hlrj",
"qq":"296aa1",
"userType":5537,
"siteIds":"2s8dzm",
"status":1817,
"customerId":7725,
"createTime":"2022-06-01",
"createUserId":9017,
"createUserName":"7ww5wz",
"lastLoginTime":"2022-06-01",
"lastLoginAddress":"b3iswe"
"id":3476,
"loginName":"pvnl27",
"loginPwd":"izbru3",
"loginLimitAddress":"bpvgc9",
"realName":"3y7knu",
"mobile":"02xs3t",
"phone":"aoqnmo",
"email":"ecyoti",
"qq":"420syx",
"userType":4214,
"siteIds":"m54eoc",
"areaCodes":"utuj9d",
"status":8589,
"createTime":"2022-06-02",
"createUserId":9375,
"createUserName":"ts6g6e",
"lastLoginTime":"2022-06-02",
"lastLoginAddress":"mwpz6s"
}
}
```
......@@ -290,7 +296,7 @@ dict|object|字典对象
参数名称|类型|必填|描述
:---|:---|:---|:-------
loginName|String|是|登录名
loginPwd|String|是|登录密码
loginPwd|String|是|登录密码,使用md5双次加密
loginLimitAddress|String|是|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录
realName|String|是|用户名
mobile|String|是|用户手机号
......@@ -299,6 +305,7 @@ email|String|是|用户邮箱
qq|String|是|QQ号码
userType|Integer|是|用户类型(0.系统用户,1.普通用户,2.工作人员)
siteIds|String|是|所属站点id,多个逗号分隔
areaCodes|String|是|所属区域code,多个逗号分隔
status|Integer|是|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
createUserName|String|是|创建用户名称
lastLoginTime|Date|是|最后一次登录时间
......@@ -307,20 +314,21 @@ lastLoginAddress|String|是|最后一次登录地址
**请求样例:**
```
{
"loginName":"bkvanw",
"loginPwd":"91cpes",
"loginLimitAddress":"ksgpqx",
"realName":"m1r0zk",
"mobile":"fnb6mx",
"phone":"wajgl7",
"email":"lgagpk",
"qq":"dwnbpe",
"userType":987,
"siteIds":"vfon7y",
"status":8832,
"createUserName":"ktzh0r",
"lastLoginTime":"2022-06-01",
"lastLoginAddress":"a4vq7h"
"loginName":"6njc9h",
"loginPwd":"e8iiea",
"loginLimitAddress":"ljhkil",
"realName":"coyvcd",
"mobile":"avklzq",
"phone":"6da3c3",
"email":"yyl8wf",
"qq":"y8tw1p",
"userType":4441,
"siteIds":"hgh6s1",
"areaCodes":"a4cexd",
"status":710,
"createUserName":"p1hifg",
"lastLoginTime":"2022-06-02",
"lastLoginAddress":"gcs2a3"
}
```
......@@ -334,6 +342,8 @@ data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|用户ID,主键,自增长
&emsp;&emsp;loginName|String|登录名
&emsp;&emsp;loginPwd|String|登录密码,使用md5双次加密
&emsp;&emsp;loginLimitAddress|String|登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录
&emsp;&emsp;realName|String|用户名
&emsp;&emsp;mobile|String|用户手机号
......@@ -342,6 +352,7 @@ data|object|数据对象
&emsp;&emsp;qq|String|QQ号码
&emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.普通用户,2.工作人员)
&emsp;&emsp;siteIds|String|所属站点id,多个逗号分隔
&emsp;&emsp;areaCodes|String|所属区域code,多个逗号分隔
&emsp;&emsp;status|Integer|用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
......@@ -395,17 +406,17 @@ msg|String|消息|-
}
```
## 参数信息业务
## 角色信息
### 查询参数信息业务列表
### 查询角色信息列表
**请求URL:** param/list
**请求URL:** role/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询参数信息业务
**简要描述:** 查询角色信息
**请求参数:**
......@@ -435,22 +446,18 @@ data|object|数据对象
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|参数名称
&emsp;&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;&emsp;paramKey|String|参数键,全局唯一
&emsp;&emsp;paramValue|String|参数值
&emsp;&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;&emsp;name|String|角色名称
&emsp;&emsp;roleCode|String|角色编码
&emsp;&emsp;roleSort|Integer|角色排序字段
&emsp;&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;&emsp;remark|String|备注
&emsp;&emsp;roleType|Integer|角色状态(0.停用,1.启用)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;validStatus|object|字典属性对象,详见附录
&emsp;modStatus|object|字典属性对象,详见附录
&emsp;displayType|object|字典属性对象,详见附录
&emsp;roleType|object|字典属性对象,详见附录
&emsp;roleType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -461,15 +468,15 @@ dict|object|字典对象
}
```
### 查看参数信息业务
### 查看角色信息
**请求URL:** param/info
**请求URL:** role/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看参数信息业务,返回实例详细信息
**简要描述:** 查看角色信息,返回实例详细信息
**请求参数:**
......@@ -479,7 +486,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/param/info?id=549
http://localhost/role/info?id=549
```
**响应参数:**
......@@ -489,83 +496,70 @@ code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;name|String|参数名称
&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;paramKey|String|参数键,全局唯一
&emsp;paramValue|String|参数值
&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;name|String|角色名称
&emsp;roleCode|String|角色编码
&emsp;roleSort|Integer|角色排序字段
&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;remark|String|备注
&emsp;roleType|Integer|角色状态(0.停用,1.启用)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;validStatus|object|字典属性对象,详见附录
&emsp;modStatus|object|字典属性对象,详见附录
&emsp;displayType|object|字典属性对象,详见附录
&emsp;roleType|object|字典属性对象,详见附录
&emsp;roleType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7708,
"name":"xa3ggs",
"firstOrganize":"7xbsm4",
"secondOrganize":"i9pwyh",
"paramKey":"1vkyjx",
"paramValue":"25am76",
"validStatus":9460,
"modStatus":7112,
"displayType":727,
"remark":"5ahorh",
"createTime":"2022-06-01",
"createUserId":2062,
"createUserName":"5uyu03"
"id":7241,
"name":"c9szsk",
"roleCode":"c2f41g",
"roleSort":2788,
"roleType":541,
"remark":"tym2dx",
"roleType":3737,
"createTime":"2022-06-02",
"createUserId":5091,
"createUserName":"zx9ud1"
}
}
```
### 保存更新参数信息业务
### 保存更新角色信息
**请求URL:** param/save
**请求URL:** role/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新参数信息业务:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新角色信息:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
name|String|是|参数名称
firstOrganize|String|是|一级组织,如:平台配置
secondOrganize|String|是|二级组织,如:基础配置
paramKey|String|是|参数键,全局唯一
paramValue|String|是|参数值
validStatus|Integer|是|参数有效状态,(0.禁用,1.启用)
modStatus|Integer|是|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
displayType|Integer|是|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
name|String|是|角色名称
roleCode|String|是|角色编码
roleSort|Integer|是|角色排序字段
roleType|Integer|是|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
remark|String|是|备注
roleType|Integer|是|角色状态(0.停用,1.启用)
createUserName|String|是|创建用户名称
**请求样例:**
```
{
"name":"im4hre",
"firstOrganize":"w6c1r0",
"secondOrganize":"k22ro6",
"paramKey":"c0w8jb",
"paramValue":"0w0qsz",
"validStatus":9030,
"modStatus":6190,
"displayType":146,
"remark":"dz5o3d",
"createUserName":"gzc4v4"
"name":"i8scn3",
"roleCode":"nthtg2",
"roleSort":3063,
"roleType":6039,
"remark":"32xaq6",
"roleType":3352,
"createUserName":"ztwqjn"
}
```
......@@ -579,15 +573,12 @@ data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|参数名称
&emsp;&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;&emsp;paramKey|String|参数键,全局唯一
&emsp;&emsp;paramValue|String|参数值
&emsp;&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;&emsp;name|String|角色名称
&emsp;&emsp;roleCode|String|角色编码
&emsp;&emsp;roleSort|Integer|角色排序字段
&emsp;&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;&emsp;remark|String|备注
&emsp;&emsp;roleType|Integer|角色状态(0.停用,1.启用)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
......@@ -603,15 +594,15 @@ data|object|数据对象
```
### 删除参数信息业务
### 删除角色信息
**请求URL:** param/delete
**请求URL:** role/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除参数信息业务
**简要描述:** 删除角色信息
**请求参数:**
......@@ -621,7 +612,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/param/delete?id=1&id=2'
http://localhost:8080/role/delete?id=1&id=2'
```
**响应参数:**
......@@ -638,17 +629,17 @@ msg|String|消息|-
}
```
## 资源信息业务
## 角色用户关联
### 查询资源信息业务列表
### 查询角色用户关联列表
**请求URL:** resource/list
**请求URL:** role/user/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询资源信息业务
**简要描述:** 查询角色用户关联
**请求参数:**
......@@ -677,19 +668,10 @@ data|object|数据对象
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|名称
&emsp;&emsp;url|String|连接地址,多个地址以逗号分隔
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;sourceType|Integer|资源类型(0.系统资源,1.开放资源)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
&emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;userId|Long|用户ID
dict|object|字典对象
&emsp;authType|object|字典属性对象,详见附录
&emsp;sourceType|object|字典属性对象,详见附录
&emsp;userType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -700,15 +682,15 @@ dict|object|字典对象
}
```
### 查看资源信息业务
### 查看角色用户关联
**请求URL:** resource/info
**请求URL:** role/user/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看资源信息业务,返回实例详细信息
**简要描述:** 查看角色用户关联,返回实例详细信息
**请求参数:**
......@@ -718,7 +700,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/resource/info?id=549
http://localhost/role/user/info?id=549
```
**响应参数:**
......@@ -727,68 +709,45 @@ id|Long|是|ID
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|菜单ID,主键,自增长
&emsp;name|String|名称
&emsp;url|String|连接地址,多个地址以逗号分隔
&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;sourceType|Integer|资源类型(0.系统资源,1.开放资源)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
&emsp;userType|Integer|用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
&emsp;id|Long|序号,主键,自增长
&emsp;roleId|Long|角色ID
&emsp;userId|Long|用户ID
dict|object|字典对象
&emsp;authType|object|字典属性对象,详见附录
&emsp;sourceType|object|字典属性对象,详见附录
&emsp;userType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":147,
"name":"17hbey",
"url":"58e3h9",
"authType":3805,
"sourceType":7062,
"createTime":"2022-06-01",
"createUserId":0,
"createUserName":"xit18z",
"userType":2361
"id":5721,
"roleId":1782,
"userId":9790
}
}
```
### 保存更新资源信息业务
### 保存更新角色用户关联
**请求URL:** resource/save
**请求URL:** role/user/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新资源信息业务:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新角色用户关联:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
name|String|是|名称
url|String|是|连接地址,多个地址以逗号分隔
authType|Integer|是|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
sourceType|Integer|是|资源类型(0.系统资源,1.开放资源)
createUserName|String|是|创建用户名称
userType|Integer|是|用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
roleId|Long|是|角色ID
userId|Long|是|用户ID
**请求样例:**
```
{
"name":"fo99cz",
"url":"mwgj88",
"authType":5428,
"sourceType":2467,
"createUserName":"4fhmwx",
"userType":1368
"roleId":2572,
"userId":3424
}
```
......@@ -801,15 +760,9 @@ msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|名称
&emsp;&emsp;url|String|连接地址,多个地址以逗号分隔
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;sourceType|Integer|资源类型(0.系统资源,1.开放资源)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
&emsp;&emsp;userType|Integer|用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;userId|Long|用户ID
**响应消息样例:**
```
......@@ -822,15 +775,15 @@ data|object|数据对象
```
### 删除资源信息业务
### 删除角色用户关联
**请求URL:** resource/delete
**请求URL:** role/user/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除资源信息业务
**简要描述:** 删除角色用户关联
**请求参数:**
......@@ -840,7 +793,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/resource/delete?id=1&id=2'
http://localhost:8080/role/user/delete?id=1&id=2'
```
**响应参数:**
......@@ -857,17 +810,17 @@ msg|String|消息|-
}
```
## 角色信息业务
## 角色菜单权限关联
### 查询角色信息业务列表
### 查询角色菜单权限关联列表
**请求URL:** role/list
**请求URL:** role/auth/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询角色信息业务
**简要描述:** 查询角色菜单权限关联
**请求参数:**
......@@ -897,14 +850,9 @@ data|object|数据对象
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|角色名称
&emsp;&emsp;remark|String|备注
&emsp;&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;menuId|Long|菜单ID
dict|object|字典对象
&emsp;roleType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -915,15 +863,15 @@ dict|object|字典对象
}
```
### 查看角色信息业务
### 查看角色菜单权限关联
**请求URL:** role/info
**请求URL:** role/auth/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看角色信息业务,返回实例详细信息
**简要描述:** 查看角色菜单权限关联,返回实例详细信息
**请求参数:**
......@@ -933,7 +881,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/role/info?id=549
http://localhost/role/auth/info?id=549
```
**响应参数:**
......@@ -943,57 +891,44 @@ code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;name|String|角色名称
&emsp;remark|String|备注
&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
&emsp;roleId|Long|角色ID
&emsp;menuId|Long|菜单ID
dict|object|字典对象
&emsp;roleType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":343,
"name":"zdacj1",
"remark":"4kqidw",
"roleType":346,
"createTime":"2022-06-01",
"createUserId":5027,
"createUserName":"gsxewv"
"id":3015,
"roleId":8288,
"menuId":5161
}
}
```
### 保存更新角色信息业务
### 保存更新角色菜单权限关联
**请求URL:** role/save
**请求URL:** role/auth/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新角色信息业务:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新角色菜单权限关联:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
name|String|是|角色名称
remark|String|是|备注
roleType|Integer|是|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
createUserName|String|是|创建用户名称
roleId|Long|是|角色ID
menuId|Long|是|菜单ID
**请求样例:**
```
{
"name":"2smryz",
"remark":"n1mc0s",
"roleType":3959,
"createUserName":"63ehb4"
"roleId":3061,
"menuId":7805
}
```
......@@ -1007,12 +942,8 @@ data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|角色名称
&emsp;&emsp;remark|String|备注
&emsp;&emsp;roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;menuId|Long|菜单ID
**响应消息样例:**
```
......@@ -1025,15 +956,15 @@ data|object|数据对象
```
### 删除角色信息业务
### 删除角色菜单权限关联
**请求URL:** role/delete
**请求URL:** role/auth/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除角色信息业务
**简要描述:** 删除角色菜单权限关联
**请求参数:**
......@@ -1043,7 +974,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/role/delete?id=1&id=2'
http://localhost:8080/role/auth/delete?id=1&id=2'
```
**响应参数:**
......@@ -1060,17 +991,17 @@ msg|String|消息|-
}
```
## 角色资源权限业务
## 菜单信息业务
### 查询角色资源权限业务列表
### 查询菜单信息业务列表
**请求URL:** role/auth/list
**请求URL:** menu/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询角色资源权限业务
**简要描述:** 查询菜单信息业务
**请求参数:**
......@@ -1099,10 +1030,28 @@ data|object|数据对象
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;resourceId|Long|资源ID
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|菜单名称
&emsp;&emsp;url|String|连接地址
&emsp;&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;&emsp;buttonImgPath|String|按钮图标
&emsp;&emsp;imgCommPath|String|常用菜单图标
&emsp;&emsp;visible|Integer|菜单显示(0.隐藏,1.显示)
&emsp;&emsp;menuType|Integer|菜单类型(0.目录,1.菜单,2.按钮)
&emsp;&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;orderId|Integer|排序编号
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;linkType|object|字典属性对象,详见附录
&emsp;visible|object|字典属性对象,详见附录
&emsp;menuType|object|字典属性对象,详见附录
&emsp;status|object|字典属性对象,详见附录
&emsp;authType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -1113,15 +1062,15 @@ dict|object|字典对象
}
```
### 查看角色资源权限业务
### 查看菜单信息业务
**请求URL:** role/auth/info
**请求URL:** menu/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看角色资源权限业务,返回实例详细信息
**简要描述:** 查看菜单信息业务,返回实例详细信息
**请求参数:**
......@@ -1131,7 +1080,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/role/auth/info?id=549
http://localhost/menu/info?id=549
```
**响应参数:**
......@@ -1140,45 +1089,98 @@ id|Long|是|ID
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;roleId|Long|角色ID
&emsp;resourceId|Long|资源ID
&emsp;id|Long|菜单ID,主键,自增长
&emsp;name|String|菜单名称
&emsp;url|String|连接地址
&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;buttonImgPath|String|按钮图标
&emsp;imgCommPath|String|常用菜单图标
&emsp;visible|Integer|菜单显示(0.隐藏,1.显示)
&emsp;menuType|Integer|菜单类型(0.目录,1.菜单,2.按钮)
&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;orderId|Integer|排序编号
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;linkType|object|字典属性对象,详见附录
&emsp;visible|object|字典属性对象,详见附录
&emsp;menuType|object|字典属性对象,详见附录
&emsp;status|object|字典属性对象,详见附录
&emsp;authType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":2261,
"roleId":262,
"resourceId":8608
"id":6665,
"name":"4hfb9i",
"url":"aozik5",
"parentId":7827,
"linkType":6399,
"imgPath":"3q4cuk",
"buttonImgPath":"ctbxdj",
"imgCommPath":"ie3v9e",
"visible":5636,
"menuType":6851,
"status":7330,
"authType":9906,
"orderId":6861,
"createTime":"2022-06-02",
"createUserId":2189,
"createUserName":"zov8bo"
}
}
```
### 保存更新角色资源权限业务
### 保存更新菜单信息业务
**请求URL:** role/auth/save
**请求URL:** menu/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新角色资源权限业务:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新菜单信息业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
roleId|Long|是|角色ID
resourceId|Long|是|资源ID
name|String|是|菜单名称
url|String|是|连接地址
parentId|Long|是|父菜单ID,一级菜单的该字段值为-1
linkType|Integer|是|链接方式,(0.普通,1.弹出,2.脚本)
imgPath|String|是|主菜单图标,主菜单图标的css样式名
buttonImgPath|String|是|按钮图标
imgCommPath|String|是|常用菜单图标
visible|Integer|是|菜单显示(0.隐藏,1.显示)
menuType|Integer|是|菜单类型(0.目录,1.菜单,2.按钮)
status|Integer|是|菜单状态(0.禁用,1.启用)
authType|Integer|是|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
orderId|Integer|是|排序编号
createUserName|String|是|创建用户名称
**请求样例:**
```
{
"roleId":3780,
"resourceId":2309
"name":"et5j3o",
"url":"v2m86a",
"parentId":9580,
"linkType":5726,
"imgPath":"o42z3k",
"buttonImgPath":"fo569j",
"imgCommPath":"vvt1wp",
"visible":6295,
"menuType":1691,
"status":6170,
"authType":1321,
"orderId":5749,
"createUserName":"kjjdbc"
}
```
......@@ -1191,9 +1193,22 @@ msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;resourceId|Long|资源ID
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|菜单名称
&emsp;&emsp;url|String|连接地址
&emsp;&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;&emsp;buttonImgPath|String|按钮图标
&emsp;&emsp;imgCommPath|String|常用菜单图标
&emsp;&emsp;visible|Integer|菜单显示(0.隐藏,1.显示)
&emsp;&emsp;menuType|Integer|菜单类型(0.目录,1.菜单,2.按钮)
&emsp;&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;orderId|Integer|排序编号
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
**响应消息样例:**
```
......@@ -1206,15 +1221,15 @@ data|object|数据对象
```
### 删除角色资源权限业务
### 删除菜单信息业务
**请求URL:** role/auth/delete
**请求URL:** menu/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除角色资源权限业务
**简要描述:** 删除菜单信息业务
**请求参数:**
......@@ -1224,7 +1239,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/role/auth/delete?id=1&id=2'
http://localhost:8080/menu/delete?id=1&id=2'
```
**响应参数:**
......@@ -1241,17 +1256,17 @@ msg|String|消息|-
}
```
## 角色用户业务
## 上传文件业务
### 查询角色用户业务列表
### 查询上传文件业务列表
**请求URL:** role/user/list
**请求URL:** uploadfile/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询角色用户业务
**简要描述:** 查询上传文件业务
**请求参数:**
......@@ -1280,10 +1295,14 @@ data|object|数据对象
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;userId|Long|用户ID
&emsp;&emsp;id|Long|ID,主键,自增长
&emsp;&emsp;fileName|String|文件名称
&emsp;&emsp;filePath|String|文件路径
&emsp;&emsp;fileType|Integer|文件类型,(1.excel ,2. img,3.zip, 4.pdf)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUser|String|创建用户
dict|object|字典对象
&emsp;fileType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -1294,15 +1313,15 @@ dict|object|字典对象
}
```
### 查看角色用户业务
### 查看上传文件业务
**请求URL:** role/user/info
**请求URL:** uploadfile/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看角色用户业务,返回实例详细信息
**简要描述:** 查看上传文件业务,返回实例详细信息
**请求参数:**
......@@ -1312,7 +1331,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/role/user/info?id=549
http://localhost/uploadfile/info?id=549
```
**响应参数:**
......@@ -1321,486 +1340,33 @@ id|Long|是|ID
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;roleId|Long|角色ID
&emsp;userId|Long|用户ID
&emsp;id|Long|ID,主键,自增长
&emsp;fileName|String|文件名称
&emsp;filePath|String|文件路径
&emsp;fileType|Integer|文件类型,(1.excel ,2. img,3.zip, 4.pdf)
&emsp;createTime|Date|创建时间
&emsp;createUser|String|创建用户
dict|object|字典对象
&emsp;fileType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":8035,
"roleId":7677,
"userId":4964
"id":333,
"fileName":"hoic00",
"filePath":"59xnyt",
"fileType":1497,
"createTime":"2022-06-02",
"createUser":"l5t7ok"
}
}
```
### 保存更新角色用户业务
### 保存更新上传文件业务
**请求URL:** role/user/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新角色用户业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
roleId|Long|是|角色ID
userId|Long|是|用户ID
**请求样例:**
```
{
"roleId":6997,
"userId":4499
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;roleId|Long|角色ID
&emsp;&emsp;userId|Long|用户ID
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除角色用户业务
**请求URL:** role/user/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除角色用户业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/role/user/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
## 任务信息业务
### 查询任务信息业务列表
**请求URL:** task/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询任务信息业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|任务名称
&emsp;&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;&emsp;excuteService|String|任务执行服务
&emsp;&emsp;excuteParam|String|任务执行参数
&emsp;&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;&emsp;remark|String|备注
&emsp;&emsp;lastExcuteHost|String|最后执行主机
&emsp;&emsp;lastExcuteTime|Date|最后执行时间
&emsp;&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;excuteStrategy|object|字典属性对象,详见附录
&emsp;interimExcuteStatus|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看任务信息业务
**请求URL:** task/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看任务信息业务,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/task/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;name|String|任务名称
&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;excuteService|String|任务执行服务
&emsp;excuteParam|String|任务执行参数
&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;remark|String|备注
&emsp;lastExcuteHost|String|最后执行主机
&emsp;lastExcuteTime|Date|最后执行时间
&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;excuteStrategy|object|字典属性对象,详见附录
&emsp;interimExcuteStatus|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":9690,
"name":"jx0zum",
"taskKey":"ag8pod",
"status":2458,
"excuteService":"7dtpvu",
"excuteParam":"3eztll",
"excuteHost":"zwy0io",
"excuteStrategy":2549,
"excuteDate":1255,
"excuteTime":"xm0e7b",
"remark":"7mu3v0",
"lastExcuteHost":"yyzs7b",
"lastExcuteTime":"2022-06-01",
"interimExcuteStatus":6206,
"createTime":"2022-06-01",
"createUserId":8675,
"createUserName":"p5bbvb"
}
}
```
### 保存更新任务信息业务
**请求URL:** task/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新任务信息业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
name|String|是|任务名称
taskKey|String|是|任务关键字,区分任务执行流程
status|Integer|是|任务状态,(0,未启动,1.执行中)
excuteService|String|是|任务执行服务
excuteParam|String|是|任务执行参数
excuteHost|String|是|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
excuteStrategy|Integer|是|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
excuteDate|Long|是|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
excuteTime|String|是|执行时间,格式:HH:mm,
remark|String|是|备注
lastExcuteHost|String|是|最后执行主机
lastExcuteTime|Date|是|最后执行时间
interimExcuteStatus|Integer|是|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
createUserName|String|是|创建用户名称
**请求样例:**
```
{
"name":"opdgwz",
"taskKey":"hqxqfb",
"status":8986,
"excuteService":"rdxj6g",
"excuteParam":"q2qd9j",
"excuteHost":"ztbivi",
"excuteStrategy":7802,
"excuteDate":9812,
"excuteTime":"ct807n",
"remark":"eje2pu",
"lastExcuteHost":"5z6uk9",
"lastExcuteTime":"2022-06-01",
"interimExcuteStatus":4560,
"createUserName":"gmbxot"
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|任务名称
&emsp;&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;&emsp;excuteService|String|任务执行服务
&emsp;&emsp;excuteParam|String|任务执行参数
&emsp;&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;&emsp;remark|String|备注
&emsp;&emsp;lastExcuteHost|String|最后执行主机
&emsp;&emsp;lastExcuteTime|Date|最后执行时间
&emsp;&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除任务信息业务
**请求URL:** task/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除任务信息业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/task/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
## 上传文件业务
### 查询上传文件业务列表
**请求URL:** uploadfile/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询上传文件业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|ID,主键,自增长
&emsp;&emsp;fileName|String|文件名称
&emsp;&emsp;filePath|String|文件路径
&emsp;&emsp;fileType|Integer|文件类型,(1.excel ,2. img,3.zip, 4.pdf)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUser|String|创建用户
dict|object|字典对象
&emsp;fileType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看上传文件业务
**请求URL:** uploadfile/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看上传文件业务,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/uploadfile/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|ID,主键,自增长
&emsp;fileName|String|文件名称
&emsp;filePath|String|文件路径
&emsp;fileType|Integer|文件类型,(1.excel ,2. img,3.zip, 4.pdf)
&emsp;createTime|Date|创建时间
&emsp;createUser|String|创建用户
dict|object|字典对象
&emsp;fileType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":155,
"fileName":"ykfckx",
"filePath":"djrjeh",
"fileType":2682,
"createTime":"2022-06-01",
"createUser":"5b6gwd"
}
}
```
### 保存更新上传文件业务
**请求URL:** uploadfile/save
**请求URL:** uploadfile/save
**请求方式:** POST
......@@ -1819,9 +1385,9 @@ fileType|Integer|是|文件类型,(1.excel ,2. img,3.zip, 4.pdf)
**请求样例:**
```
{
"fileName":"cnc7a8",
"filePath":"rly6g1",
"fileType":6122,
"fileName":"bznd4w",
"filePath":"10n94m",
"fileType":6866,
}
```
......@@ -1887,7 +1453,6 @@ msg|String|消息|-
}
```
## API服务
### 查询API服务列表
......@@ -1994,17 +1559,17 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":4237,
"systemServiceName":"y60cdw",
"systemServiceCode":"1kg0qp",
"systemServiceUrl":"l0arw8",
"apiName":"wbdz7k",
"apiUrl":"vnenf9",
"apiVersion":"b2dfea",
"apiStatus":4494,
"createTime":"2022-06-01",
"lapseTime":"2022-06-01",
"apiRemark":"alma0r"
"id":7011,
"systemServiceName":"tygqb6",
"systemServiceCode":"bvuijc",
"systemServiceUrl":"rrzv6a",
"apiName":"37zhe1",
"apiUrl":"b5x1bd",
"apiVersion":"hjsc6r",
"apiStatus":9227,
"createTime":"2022-06-02",
"lapseTime":"2022-06-02",
"apiRemark":"1s93wj"
}
}
```
......@@ -2036,15 +1601,15 @@ apiRemark|String|是|API接口说明
**请求样例:**
```
{
"systemServiceName":"796zco",
"systemServiceCode":"c0ex6p",
"systemServiceUrl":"rhsrmh",
"apiName":"2puxgm",
"apiUrl":"bsl9ul",
"apiVersion":"mqn419",
"apiStatus":6246,
"lapseTime":"2022-06-01",
"apiRemark":"3obfab"
"systemServiceName":"qjphl0",
"systemServiceCode":"d5huw6",
"systemServiceUrl":"51krbp",
"apiName":"hmaj25",
"apiUrl":"hvikv5",
"apiVersion":"angohp",
"apiStatus":8269,
"lapseTime":"2022-06-02",
"apiRemark":"la6o62"
}
```
......@@ -2221,17 +1786,17 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":258,
"systemServiceName":"pfmgr5",
"systemServiceCode":"cix1d9",
"systemServiceUrl":"vfq4n9",
"packageName":"ewfqr5",
"packagePath":"m4mm8f",
"packageVersion":"56i99k",
"apiStatus":738,
"createTime":"2022-06-01",
"lapseTime":"2022-06-01",
"packageRemark":"1lqyef"
"id":9737,
"systemServiceName":"79g6p0",
"systemServiceCode":"muoxnm",
"systemServiceUrl":"fwy71w",
"packageName":"rxiw2c",
"packagePath":"knwyb3",
"packageVersion":"slmu46",
"apiStatus":4063,
"createTime":"2022-06-02",
"lapseTime":"2022-06-02",
"packageRemark":"uaovbk"
}
}
```
......@@ -2263,15 +1828,15 @@ packageRemark|String|是|包的说明
**请求样例:**
```
{
"systemServiceName":"f09zrr",
"systemServiceCode":"8vl5mf",
"systemServiceUrl":"p8g9us",
"packageName":"w8l85q",
"packagePath":"wh8v9v",
"packageVersion":"ibm08k",
"apiStatus":7037,
"lapseTime":"2022-06-01",
"packageRemark":"b70dfs"
"systemServiceName":"72pftp",
"systemServiceCode":"5r4y52",
"systemServiceUrl":"yq978x",
"packageName":"ow8fl3",
"packagePath":"juz77b",
"packageVersion":"55quoy",
"apiStatus":2792,
"lapseTime":"2022-06-02",
"packageRemark":"j31p56"
}
```
......@@ -2342,17 +1907,17 @@ msg|String|消息|-
}
```
## 菜单信息业务
## 参数信息业务
### 查询菜单信息业务列表
### 查询参数信息业务列表
**请求URL:** menu/list
**请求URL:** param/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询菜单信息业务
**简要描述:** 查询参数信息业务
**请求参数:**
......@@ -2381,30 +1946,23 @@ data|object|数据对象
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|菜单名称
&emsp;&emsp;url|String|连接地址
&emsp;&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;&emsp;orderId|Long|排序编号
&emsp;&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;&emsp;groupId|Long|分组编号,使用菜单分隔符按该值分隔,默认1
&emsp;&emsp;groupName|String|
&emsp;&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;&emsp;buttonImgPath|String|按钮图标,按钮图标的css样式名
&emsp;&emsp;imgCommPath|String|常用菜单图标,常用菜单图标的css样式名
&emsp;&emsp;commMenu|Integer|是否常用菜单(0.非常用,1:常用)
&emsp;&emsp;menuType|Integer|菜单类型(0.主菜单,1.非主菜单)
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|参数名称
&emsp;&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;&emsp;paramKey|String|参数键,全局唯一
&emsp;&emsp;paramValue|String|参数值
&emsp;&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;&emsp;remark|String|备注
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;linkType|object|字典属性对象,详见附录
&emsp;commMenu|object|字典属性对象,详见附录
&emsp;menuType|object|字典属性对象,详见附录
&emsp;authType|object|字典属性对象,详见附录
&emsp;validStatus|object|字典属性对象,详见附录
&emsp;modStatus|object|字典属性对象,详见附录
&emsp;displayType|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -2415,15 +1973,15 @@ dict|object|字典对象
}
```
### 查看菜单信息业务
### 查看参数信息业务
**请求URL:** menu/info
**请求URL:** param/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看菜单信息业务,返回实例详细信息
**简要描述:** 查看参数信息业务,返回实例详细信息
**请求参数:**
......@@ -2433,7 +1991,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/menu/info?id=549
http://localhost/param/info?id=549
```
**响应参数:**
......@@ -2442,106 +2000,84 @@ id|Long|是|ID
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|菜单ID,主键,自增长
&emsp;name|String|菜单名称
&emsp;url|String|连接地址
&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;orderId|Long|排序编号
&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;groupId|Long|分组编号,使用菜单分隔符按该值分隔,默认1
&emsp;groupName|String|
&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;buttonImgPath|String|按钮图标,按钮图标的css样式名
&emsp;imgCommPath|String|常用菜单图标,常用菜单图标的css样式名
&emsp;commMenu|Integer|是否常用菜单(0.非常用,1:常用)
&emsp;menuType|Integer|菜单类型(0.主菜单,1.非主菜单)
&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;id|Long|序号,主键,自增长
&emsp;name|String|参数名称
&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;paramKey|String|参数键,全局唯一
&emsp;paramValue|String|参数值
&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;remark|String|备注
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;linkType|object|字典属性对象,详见附录
&emsp;commMenu|object|字典属性对象,详见附录
&emsp;menuType|object|字典属性对象,详见附录
&emsp;authType|object|字典属性对象,详见附录
&emsp;validStatus|object|字典属性对象,详见附录
&emsp;modStatus|object|字典属性对象,详见附录
&emsp;displayType|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7975,
"name":"2xmjn8",
"url":"mggze8",
"parentId":8776,
"orderId":8018,
"status":2651,
"linkType":6832,
"groupId":2070,
"groupName":"07j98g",
"imgPath":"u1axwc",
"buttonImgPath":"rs408h",
"imgCommPath":"0r02zf",
"commMenu":38,
"menuType":4832,
"authType":138,
"createTime":"2022-06-01",
"createUserId":5108,
"createUserName":"ycfwxu"
"id":1964,
"name":"ki4jof",
"firstOrganize":"n8hp8g",
"secondOrganize":"vytdjr",
"paramKey":"2va33d",
"paramValue":"uvqalw",
"validStatus":95,
"modStatus":8891,
"displayType":118,
"remark":"1igdsr",
"createTime":"2022-06-02",
"createUserId":9470,
"createUserName":"hf2ro7"
}
}
```
### 保存更新菜单信息业务
### 保存更新参数信息业务
**请求URL:** menu/save
**请求URL:** param/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新菜单信息业务:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新参数信息业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
name|String|是|菜单名称
url|String|是|连接地址
parentId|Long|是|父菜单ID,一级菜单的该字段值为-1
orderId|Long|是|排序编号
status|Integer|是|菜单状态(0.禁用,1.启用)
linkType|Integer|是|链接方式,(0.普通,1.弹出,2.脚本)
groupId|Long|是|分组编号,使用菜单分隔符按该值分隔,默认1
groupName|String|是|
imgPath|String|是|主菜单图标,主菜单图标的css样式名
buttonImgPath|String|是|按钮图标,按钮图标的css样式名
imgCommPath|String|是|常用菜单图标,常用菜单图标的css样式名
commMenu|Integer|是|是否常用菜单(0.非常用,1:常用)
menuType|Integer|是|菜单类型(0.主菜单,1.非主菜单)
authType|Integer|是|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
name|String|是|参数名称
firstOrganize|String|是|一级组织,如:平台配置
secondOrganize|String|是|二级组织,如:基础配置
paramKey|String|是|参数键,全局唯一
paramValue|String|是|参数值
validStatus|Integer|是|参数有效状态,(0.禁用,1.启用)
modStatus|Integer|是|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
displayType|Integer|是|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
remark|String|是|备注
createUserName|String|是|创建用户名称
**请求样例:**
```
{
"name":"skvc3m",
"url":"7bjfvi",
"parentId":8397,
"orderId":5986,
"status":7017,
"linkType":7560,
"groupId":7989,
"groupName":"c3fvyb",
"imgPath":"dnmzmd",
"buttonImgPath":"2lilan",
"imgCommPath":"2n50yf",
"commMenu":3521,
"menuType":5729,
"authType":1358,
"createUserName":"p1zfvk"
"name":"f07rkf",
"firstOrganize":"bdwqlr",
"secondOrganize":"zfi108",
"paramKey":"f9vj9x",
"paramValue":"m1yxt4",
"validStatus":6996,
"modStatus":6263,
"displayType":4365,
"remark":"cnu1t0",
"createUserName":"l31hcb"
}
```
......@@ -2554,21 +2090,16 @@ msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|菜单ID,主键,自增长
&emsp;&emsp;name|String|菜单名称
&emsp;&emsp;url|String|连接地址
&emsp;&emsp;parentId|Long|父菜单ID,一级菜单的该字段值为-1
&emsp;&emsp;orderId|Long|排序编号
&emsp;&emsp;status|Integer|菜单状态(0.禁用,1.启用)
&emsp;&emsp;linkType|Integer|链接方式,(0.普通,1.弹出,2.脚本)
&emsp;&emsp;groupId|Long|分组编号,使用菜单分隔符按该值分隔,默认1
&emsp;&emsp;groupName|String|
&emsp;&emsp;imgPath|String|主菜单图标,主菜单图标的css样式名
&emsp;&emsp;buttonImgPath|String|按钮图标,按钮图标的css样式名
&emsp;&emsp;imgCommPath|String|常用菜单图标,常用菜单图标的css样式名
&emsp;&emsp;commMenu|Integer|是否常用菜单(0.非常用,1:常用)
&emsp;&emsp;menuType|Integer|菜单类型(0.主菜单,1.非主菜单)
&emsp;&emsp;authType|Integer|权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;name|String|参数名称
&emsp;&emsp;firstOrganize|String|一级组织,如:平台配置
&emsp;&emsp;secondOrganize|String|二级组织,如:基础配置
&emsp;&emsp;paramKey|String|参数键,全局唯一
&emsp;&emsp;paramValue|String|参数值
&emsp;&emsp;validStatus|Integer|参数有效状态,(0.禁用,1.启用)
&emsp;&emsp;modStatus|Integer|参数修改状态(0.隐藏,1.页面仅查看,2.页面可修改,3.页面可删除,4.页面可修改删除)
&emsp;&emsp;displayType|Integer|展现类型(0.普通文本框,1.多行文本框,2.开关,3.块输入框)
&emsp;&emsp;remark|String|备注
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createUserName|String|创建用户名称
......@@ -2584,15 +2115,15 @@ data|object|数据对象
```
### 删除菜单信息业务
### 删除参数信息业务
**请求URL:** menu/delete
**请求URL:** param/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除菜单信息业务
**简要描述:** 删除参数信息业务
**请求参数:**
......@@ -2602,7 +2133,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/menu/delete?id=1&id=2'
http://localhost:8080/param/delete?id=1&id=2'
```
**响应参数:**
......@@ -2619,17 +2150,17 @@ msg|String|消息|-
}
```
## 系统模块
## 任务信息业务
### 查询系统模块列表
### 查询任务信息业务列表
**请求URL:** model/list
**请求URL:** task/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询系统模块
**简要描述:** 查询任务信息业务
**请求参数:**
......@@ -2659,17 +2190,26 @@ data|object|数据对象
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;modelName|String|系统模块名称
&emsp;&emsp;modelCode|String|模块编码
&emsp;&emsp;modelIcon|String|模块图标
&emsp;&emsp;modelUrl|String|地址
&emsp;&emsp;remark|String|备注信息
&emsp;&emsp;sort|Integer|排序
&emsp;&emsp;name|String|任务名称
&emsp;&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;&emsp;excuteService|String|任务执行服务
&emsp;&emsp;excuteParam|String|任务执行参数
&emsp;&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;&emsp;remark|String|备注
&emsp;&emsp;lastExcuteHost|String|最后执行主机
&emsp;&emsp;lastExcuteTime|Date|最后执行时间
&emsp;&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateTime|Date|修改时间
&emsp;&emsp;updateUserId|Long|修改用户
&emsp;&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;excuteStrategy|object|字典属性对象,详见附录
&emsp;interimExcuteStatus|object|字典属性对象,详见附录
**响应消息样例:**
```
......@@ -2680,15 +2220,15 @@ dict|object|字典对象
}
```
### 查看系统模块
### 查看任务信息业务
**请求URL:** model/info
**请求URL:** task/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看系统模块,返回实例详细信息
**简要描述:** 查看任务信息业务,返回实例详细信息
**请求参数:**
......@@ -2698,7 +2238,7 @@ id|Long|是|ID
**请求样例:**
```
http://localhost/model/info?id=549
http://localhost/task/info?id=549
```
**响应参数:**
......@@ -2708,68 +2248,99 @@ code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|序号,主键,自增长
&emsp;modelName|String|系统模块名称
&emsp;modelCode|String|模块编码
&emsp;modelIcon|String|模块图标
&emsp;modelUrl|String|地址
&emsp;remark|String|备注信息
&emsp;sort|Integer|排序
&emsp;name|String|任务名称
&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;excuteService|String|任务执行服务
&emsp;excuteParam|String|任务执行参数
&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;remark|String|备注
&emsp;lastExcuteHost|String|最后执行主机
&emsp;lastExcuteTime|Date|最后执行时间
&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;updateTime|Date|修改时间
&emsp;updateUserId|Long|修改用户
&emsp;createUserName|String|创建用户名称
dict|object|字典对象
&emsp;status|object|字典属性对象,详见附录
&emsp;excuteStrategy|object|字典属性对象,详见附录
&emsp;interimExcuteStatus|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7228,
"modelName":"7dxgjf",
"modelCode":"lo088m",
"modelIcon":"pb8o6i",
"modelUrl":"h58wdr",
"remark":"g01xj4",
"sort":9478,
"createTime":"2022-06-01",
"createUserId":8075,
"updateTime":"2022-06-01",
"updateUserId":6048
"id":6172,
"name":"hbt2lp",
"taskKey":"x6t812",
"status":8987,
"excuteService":"pvba97",
"excuteParam":"0x3ln2",
"excuteHost":"n0eg2u",
"excuteStrategy":9806,
"excuteDate":3911,
"excuteTime":"ayetg0",
"remark":"ldtl5d",
"lastExcuteHost":"jcztp4",
"lastExcuteTime":"2022-06-02",
"interimExcuteStatus":7901,
"createTime":"2022-06-02",
"createUserId":1471,
"createUserName":"mmso1q"
}
}
```
### 保存更新系统模块
### 保存更新任务信息业务
**请求URL:** model/save
**请求URL:** task/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新系统模块:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新任务信息业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
modelName|String|是|系统模块名称
modelCode|String|是|模块编码
modelIcon|String|是|模块图标
modelUrl|String|是|地址
remark|String|是|备注信息
sort|Integer|是|排序
name|String|是|任务名称
taskKey|String|是|任务关键字,区分任务执行流程
status|Integer|是|任务状态,(0,未启动,1.执行中)
excuteService|String|是|任务执行服务
excuteParam|String|是|任务执行参数
excuteHost|String|是|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
excuteStrategy|Integer|是|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
excuteDate|Long|是|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
excuteTime|String|是|执行时间,格式:HH:mm,
remark|String|是|备注
lastExcuteHost|String|是|最后执行主机
lastExcuteTime|Date|是|最后执行时间
interimExcuteStatus|Integer|是|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
createUserName|String|是|创建用户名称
**请求样例:**
```
{
"modelName":"wgqvro",
"modelCode":"k8mi80",
"modelIcon":"x8cbns",
"modelUrl":"oh4vu1",
"remark":"9u71o9",
"sort":8394,
"name":"mw99q3",
"taskKey":"ik0shq",
"status":1748,
"excuteService":"x9xq4q",
"excuteParam":"k1x6jh",
"excuteHost":"5qha0s",
"excuteStrategy":2523,
"excuteDate":9933,
"excuteTime":"fgiec0",
"remark":"khc1mc",
"lastExcuteHost":"rbntny",
"lastExcuteTime":"2022-06-02",
"interimExcuteStatus":8141,
"createUserName":"cb5yx5"
}
```
......@@ -2783,16 +2354,22 @@ data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;modelName|String|系统模块名称
&emsp;&emsp;modelCode|String|模块编码
&emsp;&emsp;modelIcon|String|模块图标
&emsp;&emsp;modelUrl|String|地址
&emsp;&emsp;remark|String|备注信息
&emsp;&emsp;sort|Integer|排序
&emsp;&emsp;name|String|任务名称
&emsp;&emsp;taskKey|String|任务关键字,区分任务执行流程
&emsp;&emsp;status|Integer|任务状态,(0,未启动,1.执行中)
&emsp;&emsp;excuteService|String|任务执行服务
&emsp;&emsp;excuteParam|String|任务执行参数
&emsp;&emsp;excuteHost|String|任务执行主机,为空表示不限制任务的执行主机,多个用逗号分隔
&emsp;&emsp;excuteStrategy|Integer|执行策略(1.按日,2.按周,3.按月,4.按间隔时间)
&emsp;&emsp;excuteDate|Long|执行日期,按日:则为0;按周:则为1-7;按月:则为:1-31;按间隔时间:则为间隔时间,单位:秒;
&emsp;&emsp;excuteTime|String|执行时间,格式:HH:mm,
&emsp;&emsp;remark|String|备注
&emsp;&emsp;lastExcuteHost|String|最后执行主机
&emsp;&emsp;lastExcuteTime|Date|最后执行时间
&emsp;&emsp;interimExcuteStatus|Integer|临时执行状态,(0.未启用,1.立即执行并保留,2.立即执行并删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateTime|Date|修改时间
&emsp;&emsp;updateUserId|Long|修改用户
&emsp;&emsp;createUserName|String|创建用户名称
**响应消息样例:**
```
......@@ -2805,15 +2382,15 @@ data|object|数据对象
```
### 删除系统模块
### 删除任务信息业务
**请求URL:** model/delete
**请求URL:** task/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除系统模块
**简要描述:** 删除任务信息业务
**请求参数:**
......@@ -2823,7 +2400,7 @@ id|String|是|数组
**请求样例:**
```
http://localhost:8080/model/delete?id=1&id=2'
http://localhost:8080/task/delete?id=1&id=2'
```
**响应参数:**
......@@ -2889,6 +2466,8 @@ data|object|数据对象
&emsp;&emsp;ip|String|操作IP地址
&emsp;&emsp;logDate|Date|操作时间
&emsp;&emsp;operType|Integer|操作类型,(0.新增,1.修改,2.删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
dict|object|字典对象
&emsp;operType|object|字典属性对象,详见附录
......@@ -2938,6 +2517,8 @@ data|object|数据对象
&emsp;ip|String|操作IP地址
&emsp;logDate|Date|操作时间
&emsp;operType|Integer|操作类型,(0.新增,1.修改,2.删除)
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
dict|object|字典对象
&emsp;operType|object|字典属性对象,详见附录
......@@ -2946,20 +2527,93 @@ dict|object|字典对象
{
"code": 1,
"data": {
"id":4790,
"platformMark":"l5gry2",
"userId":3910,
"userName":"9hv9qg",
"loginName":"3eep9k",
"requestUrl":"r0ohr4",
"content":"7wvgpb",
"ip":"9g5nrc",
"logDate":"2022-06-01",
"operType":6946
"id":6064,
"platformMark":"8kzvmw",
"userId":261,
"userName":"197cjh",
"loginName":"0sku2y",
"requestUrl":"bim4px",
"content":"udmwqz",
"ip":"kyeyk0",
"logDate":"2022-06-02",
"operType":2651,
"createTime":"2022-06-02",
"createUserId":2668
}
}
```
### 保存更新操作日志业务
**请求URL:** oper/log/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新操作日志业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
platformMark|String|是|平台标识
userId|Long|是|用户id
userName|String|是|用户名称
loginName|String|是|用户登录名
requestUrl|String|是|请求地址
content|String|是|操作内容,记录操作具体信息,如修改前修改或的数据
ip|String|是|操作IP地址
logDate|Date|是|操作时间
operType|Integer|是|操作类型,(0.新增,1.修改,2.删除)
**请求样例:**
```
{
"platformMark":"zd7mbs",
"userId":3160,
"userName":"vl8g4v",
"loginName":"qk4e4v",
"requestUrl":"e2rkbv",
"content":"exflzy",
"ip":"hmem4i",
"logDate":"2022-06-02",
"operType":8740,
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|序号,主键,自增长
&emsp;&emsp;platformMark|String|平台标识
&emsp;&emsp;userId|Long|用户id
&emsp;&emsp;userName|String|用户名称
&emsp;&emsp;loginName|String|用户登录名
&emsp;&emsp;requestUrl|String|请求地址
&emsp;&emsp;content|String|操作内容,记录操作具体信息,如修改前修改或的数据
&emsp;&emsp;ip|String|操作IP地址
&emsp;&emsp;logDate|Date|操作时间
&emsp;&emsp;operType|Integer|操作类型,(0.新增,1.修改,2.删除)
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除操作日志业务
......@@ -3011,26 +2665,39 @@ msg|String|消息|-
2|冻结|-
3|销户|-
4|离职|-
### validStatus
### roleType
字典参数key|字典参数值|其它
:---|:---|:---
0|禁用|-
0|系统内置角色|-
1|默认系统角色|-
2|普通角色|-
### roleType
字典参数key|字典参数值|其它
:---|:---|:---
0|停用|-
1|启用|-
### modStatus
### linkType
字典参数key|字典参数值|其它
:---|:---|:---
0|普通|-
1|弹出|-
2|脚本|-
### visible
字典参数key|字典参数值|其它
:---|:---|:---
0|隐藏|-
1|页面仅查看|-
2|页面可修改|-
3|页面可删除|-
4|页面可修改删除|-
### displayType
1|显示|-
### menuType
字典参数key|字典参数值|其它
:---|:---|:---
0|普通文本框|-
1|多行文本框|-
2|开关|-
3|块输入框|-
0|目录|-
1|菜单|-
2|按钮|-
### status
字典参数key|字典参数值|其它
:---|:---|:---
0|禁用|-
1|启用|-
### authType
字典参数key|字典参数值|其它
:---|:---|:---
......@@ -3038,23 +2705,33 @@ msg|String|消息|-
1|无需登录查看|-
2|需要登录查看|-
3|需要角色权限查看|-
### sourceType
### fileType
字典参数key|字典参数值|其它
:---|:---|:---
0|系统资源|-
1|开放资源|-
### userType
1|excel|-
2|img|-
3|zip|-
4|pdf|-
### validStatus
字典参数key|字典参数值|其它
:---|:---|:---
0|系统用户|-
1|代理商用户|-
2|品牌商用户|-
### roleType
0|禁用|-
1|启用|-
### modStatus
字典参数key|字典参数值|其它
:---|:---|:---
0|系统内置角色|-
1|默认系统角色|-
2|普通角色|-
0|隐藏|-
1|页面仅查看|-
2|页面可修改|-
3|页面可删除|-
4|页面可修改删除|-
### displayType
字典参数key|字典参数值|其它
:---|:---|:---
0|普通文本框|-
1|多行文本框|-
2|开关|-
3|块输入框|-
### status
字典参数key|字典参数值|其它
:---|:---|:---
......@@ -3072,46 +2749,6 @@ msg|String|消息|-
0|未启用|-
1|立即执行并保留|-
2|立即执行并删除|-
### fileType
字典参数key|字典参数值|其它
:---|:---|:---
1|excel|-
2|img|-
3|zip|-
4|pdf|-
### type
字典参数key|字典参数值|其它
:---|:---|:---
0|图片校验|-
1|手机校验|-
2|邮箱校验|-
### status
字典参数key|字典参数值|其它
:---|:---|:---
0|禁用|-
1|启用|-
### linkType
字典参数key|字典参数值|其它
:---|:---|:---
0|普通|-
1|弹出|-
2|脚本|-
### commMenu
字典参数key|字典参数值|其它
:---|:---|:---
0|非常用|-
### menuType
字典参数key|字典参数值|其它
:---|:---|:---
0|主菜单|-
1|非主菜单|-
### authType
字典参数key|字典参数值|其它
:---|:---|:---
0|无限制|-
1|无需登录查看|-
2|需要登录查看|-
3|需要角色权限查看|-
### operType
字典参数key|字典参数值|其它
:---|:---|:---
......
......@@ -2,30 +2,21 @@ package com.mortals.xhx.base.login.web;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.service.IAuthTokenService;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.ITokenService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.AESUtil;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.valid.service.ValidCodeService;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.menu.service.MenuService;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.resource.service.ResourceService;
import com.mortals.xhx.module.user.model.UserEntity;
import com.mortals.xhx.module.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -35,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -47,16 +37,10 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@Autowired
private UserService userService;
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
// @Autowired
// private ITokenService tokenService;
@Autowired
private ICacheService cacheService;
@Autowired
private ModelService modelService;
@Autowired
private IAuthTokenService authTokenService;
@RequestMapping("login")
......@@ -77,20 +61,20 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
userEntity = userService.doLogin(loginName, password, ip);
userEntity.setLastLoginAddress(ip);
recordSysLog(request, userEntity, "用户登录系统成功!");
// 返回拥有的菜单数据
Set<String> urls = resourceService.findUrlSetByUserId(userEntity.getId());
//菜单列表
List<MenuEntity> menuList = menuService.findTreeMenu(userEntity, urls);
userEntity.setMenuList(menuList);
List<ModelEntity> modelList = this.service.findModelList(userEntity.getId());
userEntity.setModelList(modelList);
//根据用户id获取角色所分配的资源路径
// Set<String> urls = resourceService.findUrlSetByUserId(userEntity.getId());
// //菜单列表
// List<MenuEntity> menuList = menuService.findTreeMenu(userEntity, urls);
// userEntity.setMenuList(menuList);
// List<ModelEntity> modelList = this.service.findModelList(userEntity.getId());
// userEntity.setModelList(modelList);
userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
userEntity.setMenuUrl(generateMenuUrlCode(urls));
//userEntity.setMenuUrl(generateMenuUrlCode(urls));
String token = authTokenService.createToken(userEntity);
generateMenuUrlCode(urls);
//generateMenuUrlCode(urls);
//this.generateBlackCookie(request, response, loginName, urls);
data.put("token", token);
......@@ -98,7 +82,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
//ret.put("resources", urls);
return ret.toJSONString();
} catch (Exception e) {
log.error("login error ", e);
......@@ -111,7 +95,6 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
@RequestMapping("logout")
public void logout() throws Exception {
recordSysLog(request, "退出登录");
authTokenService.delUser(authTokenService.getToken(request));
super.removeCurrUser(request);
}
......@@ -122,21 +105,21 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
if (user == null) {
return "";
}
Set<String> urls = resourceService.findUrlSetByUserId(user.getId());
List<MenuEntity> outlookBarList = menuService.findTreeMenu(user, urls);
//Set<String> urls = resourceService.findUrlSetByUserId(user.getId());
//List<MenuEntity> outlookBarList = menuService.findTreeMenu(user, urls);
String currUserName = user.getRealName();
if (currUserName == null || currUserName.trim().length() == 0) {
currUserName = "管理员";
}
JSONObject data = new JSONObject();
data.put("barList", outlookBarList);
//data.put("barList", outlookBarList);
data.put("id", user.getId());
data.put("userType", user.getUserType());
ret.put(KEY_RESULT_DATA, data);
//this.generateBlackCookie(request, response, user.getLoginName(), urls);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
//ret.put("resources", urls);
return ret.toJSONString();
}
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.menu.model.vo.MenuVo;
* 菜单信息业务实体对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class MenuEntity extends MenuVo {
......@@ -29,50 +29,42 @@ public class MenuEntity extends MenuVo {
*/
private Long parentId;
/**
* 排序编号
*/
private Long orderId;
/**
* 菜单状态,0:禁用,1:启用,默认1
*/
private Integer status;
/**
* 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 链接方式,(0.普通,1.弹出,2.脚本)
*/
private Integer linkType;
/**
* 分组编号,使用菜单分隔符按该值分隔,默认1
*/
private Long groupId;
/**
*
*/
private String groupName;
/**
* 主菜单图标,主菜单图标的css样式名
*/
private String imgPath;
/**
* 按钮图标,按钮图标的css样式名
* 按钮图标
*/
private String buttonImgPath;
/**
* 常用菜单图标,常用菜单图标的css样式名
* 常用菜单图标
*/
private String imgCommPath;
/**
* 是否常用菜单,0:非常用,1:常用,默认0
* 菜单显示(0.隐藏,1.显示)
*/
private Integer commMenu;
private Integer visible;
/**
* 菜单类型,0:主菜单,1:非主菜单,默认0
* 菜单类型(0.目录,1.菜单,2.按钮)
*/
private Integer menuType;
/**
* 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 菜单状态(0.禁用,1.启用)
*/
private Integer status;
/**
* 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
*/
private Integer authType;
/**
* 排序编号
*/
private Integer orderId;
/**
* 创建用户名称
*/
private String createUserName;
......@@ -123,76 +115,20 @@ public class MenuEntity extends MenuVo {
this.parentId = parentId;
}
/**
* 获取 排序编号
* @return Long
*/
public Long getOrderId(){
return orderId;
}
/**
* 设置 排序编号
* @param orderId
*/
public void setOrderId(Long orderId){
this.orderId = orderId;
}
/**
* 获取 菜单状态,0:禁用,1:启用,默认1
* @return Integer
*/
public Integer getStatus(){
return status;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param status
*/
public void setStatus(Integer status){
this.status = status;
}
/**
* 获取 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 获取 链接方式,(0.普通,1.弹出,2.脚本)
* @return Integer
*/
public Integer getLinkType(){
return linkType;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkType
*/
public void setLinkType(Integer linkType){
this.linkType = linkType;
}
/**
* 获取 分组编号,使用菜单分隔符按该值分隔,默认1
* @return Long
*/
public Long getGroupId(){
return groupId;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupId
*/
public void setGroupId(Long groupId){
this.groupId = groupId;
}
/**
* 获取
* @return String
*/
public String getGroupName(){
return groupName;
}
/**
* 设置
* @param groupName
*/
public void setGroupName(String groupName){
this.groupName = groupName;
}
/**
* 获取 主菜单图标,主菜单图标的css样式名
* @return String
*/
......@@ -207,76 +143,104 @@ public class MenuEntity extends MenuVo {
this.imgPath = imgPath;
}
/**
* 获取 按钮图标,按钮图标的css样式名
* 获取 按钮图标
* @return String
*/
public String getButtonImgPath(){
return buttonImgPath;
}
/**
* 设置 按钮图标,按钮图标的css样式名
* 设置 按钮图标
* @param buttonImgPath
*/
public void setButtonImgPath(String buttonImgPath){
this.buttonImgPath = buttonImgPath;
}
/**
* 获取 常用菜单图标,常用菜单图标的css样式名
* 获取 常用菜单图标
* @return String
*/
public String getImgCommPath(){
return imgCommPath;
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* 设置 常用菜单图标
* @param imgCommPath
*/
public void setImgCommPath(String imgCommPath){
this.imgCommPath = imgCommPath;
}
/**
* 获取 是否常用菜单,0:非常用,1:常用,默认0
* 获取 菜单显示(0.隐藏,1.显示)
* @return Integer
*/
public Integer getCommMenu(){
return commMenu;
public Integer getVisible(){
return visible;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenu
* 设置 菜单显示(0.隐藏,1.显示)
* @param visible
*/
public void setCommMenu(Integer commMenu){
this.commMenu = commMenu;
public void setVisible(Integer visible){
this.visible = visible;
}
/**
* 获取 菜单类型,0:主菜单,1:非主菜单,默认0
* 获取 菜单类型(0.目录,1.菜单,2.按钮)
* @return Integer
*/
public Integer getMenuType(){
return menuType;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuType
*/
public void setMenuType(Integer menuType){
this.menuType = menuType;
}
/**
* 获取 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 获取 菜单状态(0.禁用,1.启用)
* @return Integer
*/
public Integer getStatus(){
return status;
}
/**
* 设置 菜单状态(0.禁用,1.启用)
* @param status
*/
public void setStatus(Integer status){
this.status = status;
}
/**
* 获取 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return Integer
*/
public Integer getAuthType(){
return authType;
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authType
*/
public void setAuthType(Integer authType){
this.authType = authType;
}
/**
* 获取 排序编号
* @return Integer
*/
public Integer getOrderId(){
return orderId;
}
/**
* 设置 排序编号
* @param orderId
*/
public void setOrderId(Integer orderId){
this.orderId = orderId;
}
/**
* 获取 创建用户名称
* @return String
*/
......@@ -315,17 +279,15 @@ public class MenuEntity extends MenuVo {
sb.append(",name:").append(getName());
sb.append(",url:").append(getUrl());
sb.append(",parentId:").append(getParentId());
sb.append(",orderId:").append(getOrderId());
sb.append(",status:").append(getStatus());
sb.append(",linkType:").append(getLinkType());
sb.append(",groupId:").append(getGroupId());
sb.append(",groupName:").append(getGroupName());
sb.append(",imgPath:").append(getImgPath());
sb.append(",buttonImgPath:").append(getButtonImgPath());
sb.append(",imgCommPath:").append(getImgCommPath());
sb.append(",commMenu:").append(getCommMenu());
sb.append(",visible:").append(getVisible());
sb.append(",menuType:").append(getMenuType());
sb.append(",status:").append(getStatus());
sb.append(",authType:").append(getAuthType());
sb.append(",orderId:").append(getOrderId());
sb.append(",createUserName:").append(getCreateUserName());
return sb.toString();
}
......@@ -338,28 +300,24 @@ public class MenuEntity extends MenuVo {
this.parentId = null;
this.orderId = null;
this.status = 1;
this.linkType = 0;
this.groupId = 1L;
this.groupName = "";
this.imgPath = "";
this.buttonImgPath = "";
this.imgCommPath = "";
this.commMenu = 0;
this.visible = 1;
this.menuType = 0;
this.status = 1;
this.authType = 3;
this.orderId = 0;
this.createUserName = "";
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.menu.model.MenuEntity;
* 菜单信息业务查询对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class MenuQuery extends MenuEntity {
/** 开始 菜单ID,主键,自增长 */
......@@ -39,102 +39,87 @@ public class MenuQuery extends MenuEntity {
/** 父菜单ID,一级菜单的该字段值为-1列表 */
private List <Long> parentIdList;
/** 开始 排序编号 */
private Long orderIdStart;
/** 结束 排序编号 */
private Long orderIdEnd;
/** 增加 排序编号 */
private Long orderIdIncrement;
/** 排序编号列表 */
private List <Long> orderIdList;
/** 开始 菜单状态,0:禁用,1:启用,默认1 */
private Integer statusStart;
/** 结束 菜单状态,0:禁用,1:启用,默认1 */
private Integer statusEnd;
/** 增加 菜单状态,0:禁用,1:启用,默认1 */
private Integer statusIncrement;
/** 菜单状态,0:禁用,1:启用,默认1列表 */
private List <Integer> statusList;
/** 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */
/** 开始 链接方式,(0.普通,1.弹出,2.脚本) */
private Integer linkTypeStart;
/** 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */
/** 结束 链接方式,(0.普通,1.弹出,2.脚本) */
private Integer linkTypeEnd;
/** 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0 */
/** 增加 链接方式,(0.普通,1.弹出,2.脚本) */
private Integer linkTypeIncrement;
/** 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0列表 */
/** 链接方式,(0.普通,1.弹出,2.脚本)列表 */
private List <Integer> linkTypeList;
/** 开始 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Long groupIdStart;
/** 结束 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Long groupIdEnd;
/** 增加 分组编号,使用菜单分隔符按该值分隔,默认1 */
private Long groupIdIncrement;
/** 分组编号,使用菜单分隔符按该值分隔,默认1列表 */
private List <Long> groupIdList;
/** */
private List<String> groupNameList;
/** 主菜单图标,主菜单图标的css样式名 */
private List<String> imgPathList;
/** 按钮图标,按钮图标的css样式名 */
/** 按钮图标 */
private List<String> buttonImgPathList;
/** 常用菜单图标,常用菜单图标的css样式名 */
/** 常用菜单图标 */
private List<String> imgCommPathList;
/** 开始 是否常用菜单,0:非常用,1:常用,默认0 */
private Integer commMenuStart;
/** 开始 菜单显示(0.隐藏,1.显示) */
private Integer visibleStart;
/** 结束 是否常用菜单,0:非常用,1:常用,默认0 */
private Integer commMenuEnd;
/** 结束 菜单显示(0.隐藏,1.显示) */
private Integer visibleEnd;
/** 增加 是否常用菜单,0:非常用,1:常用,默认0 */
private Integer commMenuIncrement;
/** 增加 菜单显示(0.隐藏,1.显示) */
private Integer visibleIncrement;
/** 是否常用菜单,0:非常用,1:常用,默认0列表 */
private List <Integer> commMenuList;
/** 菜单显示(0.隐藏,1.显示)列表 */
private List <Integer> visibleList;
/** 开始 菜单类型,0:主菜单,1:非主菜单,默认0 */
/** 开始 菜单类型(0.目录,1.菜单,2.按钮) */
private Integer menuTypeStart;
/** 结束 菜单类型,0:主菜单,1:非主菜单,默认0 */
/** 结束 菜单类型(0.目录,1.菜单,2.按钮) */
private Integer menuTypeEnd;
/** 增加 菜单类型,0:主菜单,1:非主菜单,默认0 */
/** 增加 菜单类型(0.目录,1.菜单,2.按钮) */
private Integer menuTypeIncrement;
/** 菜单类型,0:主菜单,1:非主菜单,默认0列表 */
/** 菜单类型(0.目录,1.菜单,2.按钮)列表 */
private List <Integer> menuTypeList;
/** 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看 */
/** 开始 菜单状态(0.禁用,1.启用) */
private Integer statusStart;
/** 结束 菜单状态(0.禁用,1.启用) */
private Integer statusEnd;
/** 增加 菜单状态(0.禁用,1.启用) */
private Integer statusIncrement;
/** 菜单状态(0.禁用,1.启用)列表 */
private List <Integer> statusList;
/** 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeStart;
/** 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看 */
/** 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeEnd;
/** 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看 */
/** 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeIncrement;
/** 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看列表 */
/** 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)列表 */
private List <Integer> authTypeList;
/** 开始 排序编号 */
private Integer orderIdStart;
/** 结束 排序编号 */
private Integer orderIdEnd;
/** 增加 排序编号 */
private Integer orderIdIncrement;
/** 排序编号列表 */
private List <Integer> orderIdList;
/** 开始 创建时间 */
private String createTimeStart;
......@@ -323,135 +308,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 开始 排序编号
* @return orderIdStart
*/
public Long getOrderIdStart(){
return this.orderIdStart;
}
/**
* 设置 开始 排序编号
* @param orderIdStart
*/
public void setOrderIdStart(Long orderIdStart){
this.orderIdStart = orderIdStart;
}
/**
* 获取 结束 排序编号
* @return $orderIdEnd
*/
public Long getOrderIdEnd(){
return this.orderIdEnd;
}
/**
* 设置 结束 排序编号
* @param orderIdEnd
*/
public void setOrderIdEnd(Long orderIdEnd){
this.orderIdEnd = orderIdEnd;
}
/**
* 获取 增加 排序编号
* @return orderIdIncrement
*/
public Long getOrderIdIncrement(){
return this.orderIdIncrement;
}
/**
* 设置 增加 排序编号
* @param orderIdIncrement
*/
public void setOrderIdIncrement(Long orderIdIncrement){
this.orderIdIncrement = orderIdIncrement;
}
/**
* 获取 排序编号
* @return orderIdList
*/
public List<Long> getOrderIdList(){
return this.orderIdList;
}
/**
* 设置 排序编号
* @param orderIdList
*/
public void setOrderIdList(List<Long> orderIdList){
this.orderIdList = orderIdList;
}
/**
* 获取 开始 菜单状态,0:禁用,1:启用,默认1
* @return statusStart
*/
public Integer getStatusStart(){
return this.statusStart;
}
/**
* 设置 开始 菜单状态,0:禁用,1:启用,默认1
* @param statusStart
*/
public void setStatusStart(Integer statusStart){
this.statusStart = statusStart;
}
/**
* 获取 结束 菜单状态,0:禁用,1:启用,默认1
* @return $statusEnd
*/
public Integer getStatusEnd(){
return this.statusEnd;
}
/**
* 设置 结束 菜单状态,0:禁用,1:启用,默认1
* @param statusEnd
*/
public void setStatusEnd(Integer statusEnd){
this.statusEnd = statusEnd;
}
/**
* 获取 增加 菜单状态,0:禁用,1:启用,默认1
* @return statusIncrement
*/
public Integer getStatusIncrement(){
return this.statusIncrement;
}
/**
* 设置 增加 菜单状态,0:禁用,1:启用,默认1
* @param statusIncrement
*/
public void setStatusIncrement(Integer statusIncrement){
this.statusIncrement = statusIncrement;
}
/**
* 获取 菜单状态,0:禁用,1:启用,默认1
* @return statusList
*/
public List<Integer> getStatusList(){
return this.statusList;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param statusList
*/
public void setStatusList(List<Integer> statusList){
this.statusList = statusList;
}
/**
* 获取 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 获取 开始 链接方式,(0.普通,1.弹出,2.脚本)
* @return linkTypeStart
*/
public Integer getLinkTypeStart(){
......@@ -459,7 +316,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 开始 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeStart
*/
public void setLinkTypeStart(Integer linkTypeStart){
......@@ -467,7 +324,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 获取 结束 链接方式,(0.普通,1.弹出,2.脚本)
* @return $linkTypeEnd
*/
public Integer getLinkTypeEnd(){
......@@ -475,7 +332,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 结束 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeEnd
*/
public void setLinkTypeEnd(Integer linkTypeEnd){
......@@ -483,7 +340,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 获取 增加 链接方式,(0.普通,1.弹出,2.脚本)
* @return linkTypeIncrement
*/
public Integer getLinkTypeIncrement(){
......@@ -491,7 +348,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 增加 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeIncrement
*/
public void setLinkTypeIncrement(Integer linkTypeIncrement){
......@@ -499,7 +356,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 获取 链接方式,(0.普通,1.弹出,2.脚本)
* @return linkTypeList
*/
public List<Integer> getLinkTypeList(){
......@@ -507,92 +364,13 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeList
*/
public void setLinkTypeList(List<Integer> linkTypeList){
this.linkTypeList = linkTypeList;
}
/**
* 获取 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdStart
*/
public Long getGroupIdStart(){
return this.groupIdStart;
}
/**
* 设置 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdStart
*/
public void setGroupIdStart(Long groupIdStart){
this.groupIdStart = groupIdStart;
}
/**
* 获取 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @return $groupIdEnd
*/
public Long getGroupIdEnd(){
return this.groupIdEnd;
}
/**
* 设置 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdEnd
*/
public void setGroupIdEnd(Long groupIdEnd){
this.groupIdEnd = groupIdEnd;
}
/**
* 获取 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdIncrement
*/
public Long getGroupIdIncrement(){
return this.groupIdIncrement;
}
/**
* 设置 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdIncrement
*/
public void setGroupIdIncrement(Long groupIdIncrement){
this.groupIdIncrement = groupIdIncrement;
}
/**
* 获取 分组编号,使用菜单分隔符按该值分隔,默认1
* @return groupIdList
*/
public List<Long> getGroupIdList(){
return this.groupIdList;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdList
*/
public void setGroupIdList(List<Long> groupIdList){
this.groupIdList = groupIdList;
}
/**
* 获取
* @return groupNameList
*/
public List<String> getGroupNameList(){
return this.groupNameList;
}
/**
* 设置
* @param groupNameList
*/
public void setGroupNameList(List<String> groupNameList){
this.groupNameList = groupNameList;
}
/**
* 获取 主菜单图标,主菜单图标的css样式名
* @return imgPathList
......@@ -609,7 +387,7 @@ public class MenuQuery extends MenuEntity {
this.imgPathList = imgPathList;
}
/**
* 获取 按钮图标,按钮图标的css样式名
* 获取 按钮图标
* @return buttonImgPathList
*/
public List<String> getButtonImgPathList(){
......@@ -617,14 +395,14 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 按钮图标,按钮图标的css样式名
* 设置 按钮图标
* @param buttonImgPathList
*/
public void setButtonImgPathList(List<String> buttonImgPathList){
this.buttonImgPathList = buttonImgPathList;
}
/**
* 获取 常用菜单图标,常用菜单图标的css样式名
* 获取 常用菜单图标
* @return imgCommPathList
*/
public List<String> getImgCommPathList(){
......@@ -632,78 +410,78 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* 设置 常用菜单图标
* @param imgCommPathList
*/
public void setImgCommPathList(List<String> imgCommPathList){
this.imgCommPathList = imgCommPathList;
}
/**
* 获取 开始 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuStart
* 获取 开始 菜单显示(0.隐藏,1.显示)
* @return visibleStart
*/
public Integer getCommMenuStart(){
return this.commMenuStart;
public Integer getVisibleStart(){
return this.visibleStart;
}
/**
* 设置 开始 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuStart
* 设置 开始 菜单显示(0.隐藏,1.显示)
* @param visibleStart
*/
public void setCommMenuStart(Integer commMenuStart){
this.commMenuStart = commMenuStart;
public void setVisibleStart(Integer visibleStart){
this.visibleStart = visibleStart;
}
/**
* 获取 结束 是否常用菜单,0:非常用,1:常用,默认0
* @return $commMenuEnd
* 获取 结束 菜单显示(0.隐藏,1.显示)
* @return $visibleEnd
*/
public Integer getCommMenuEnd(){
return this.commMenuEnd;
public Integer getVisibleEnd(){
return this.visibleEnd;
}
/**
* 设置 结束 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuEnd
* 设置 结束 菜单显示(0.隐藏,1.显示)
* @param visibleEnd
*/
public void setCommMenuEnd(Integer commMenuEnd){
this.commMenuEnd = commMenuEnd;
public void setVisibleEnd(Integer visibleEnd){
this.visibleEnd = visibleEnd;
}
/**
* 获取 增加 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuIncrement
* 获取 增加 菜单显示(0.隐藏,1.显示)
* @return visibleIncrement
*/
public Integer getCommMenuIncrement(){
return this.commMenuIncrement;
public Integer getVisibleIncrement(){
return this.visibleIncrement;
}
/**
* 设置 增加 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuIncrement
* 设置 增加 菜单显示(0.隐藏,1.显示)
* @param visibleIncrement
*/
public void setCommMenuIncrement(Integer commMenuIncrement){
this.commMenuIncrement = commMenuIncrement;
public void setVisibleIncrement(Integer visibleIncrement){
this.visibleIncrement = visibleIncrement;
}
/**
* 获取 是否常用菜单,0:非常用,1:常用,默认0
* @return commMenuList
* 获取 菜单显示(0.隐藏,1.显示)
* @return visibleList
*/
public List<Integer> getCommMenuList(){
return this.commMenuList;
public List<Integer> getVisibleList(){
return this.visibleList;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuList
* 设置 菜单显示(0.隐藏,1.显示)
* @param visibleList
*/
public void setCommMenuList(List<Integer> commMenuList){
this.commMenuList = commMenuList;
public void setVisibleList(List<Integer> visibleList){
this.visibleList = visibleList;
}
/**
* 获取 开始 菜单类型,0:主菜单,1:非主菜单,默认0
* 获取 开始 菜单类型(0.目录,1.菜单,2.按钮)
* @return menuTypeStart
*/
public Integer getMenuTypeStart(){
......@@ -711,7 +489,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 开始 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeStart
*/
public void setMenuTypeStart(Integer menuTypeStart){
......@@ -719,7 +497,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 结束 菜单类型,0:主菜单,1:非主菜单,默认0
* 获取 结束 菜单类型(0.目录,1.菜单,2.按钮)
* @return $menuTypeEnd
*/
public Integer getMenuTypeEnd(){
......@@ -727,7 +505,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 结束 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeEnd
*/
public void setMenuTypeEnd(Integer menuTypeEnd){
......@@ -735,7 +513,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 增加 菜单类型,0:主菜单,1:非主菜单,默认0
* 获取 增加 菜单类型(0.目录,1.菜单,2.按钮)
* @return menuTypeIncrement
*/
public Integer getMenuTypeIncrement(){
......@@ -743,7 +521,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 增加 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeIncrement
*/
public void setMenuTypeIncrement(Integer menuTypeIncrement){
......@@ -751,7 +529,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 菜单类型,0:主菜单,1:非主菜单,默认0
* 获取 菜单类型(0.目录,1.菜单,2.按钮)
* @return menuTypeList
*/
public List<Integer> getMenuTypeList(){
......@@ -759,7 +537,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeList
*/
public void setMenuTypeList(List<Integer> menuTypeList){
......@@ -767,7 +545,71 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 获取 开始 菜单状态(0.禁用,1.启用)
* @return statusStart
*/
public Integer getStatusStart(){
return this.statusStart;
}
/**
* 设置 开始 菜单状态(0.禁用,1.启用)
* @param statusStart
*/
public void setStatusStart(Integer statusStart){
this.statusStart = statusStart;
}
/**
* 获取 结束 菜单状态(0.禁用,1.启用)
* @return $statusEnd
*/
public Integer getStatusEnd(){
return this.statusEnd;
}
/**
* 设置 结束 菜单状态(0.禁用,1.启用)
* @param statusEnd
*/
public void setStatusEnd(Integer statusEnd){
this.statusEnd = statusEnd;
}
/**
* 获取 增加 菜单状态(0.禁用,1.启用)
* @return statusIncrement
*/
public Integer getStatusIncrement(){
return this.statusIncrement;
}
/**
* 设置 增加 菜单状态(0.禁用,1.启用)
* @param statusIncrement
*/
public void setStatusIncrement(Integer statusIncrement){
this.statusIncrement = statusIncrement;
}
/**
* 获取 菜单状态(0.禁用,1.启用)
* @return statusList
*/
public List<Integer> getStatusList(){
return this.statusList;
}
/**
* 设置 菜单状态(0.禁用,1.启用)
* @param statusList
*/
public void setStatusList(List<Integer> statusList){
this.statusList = statusList;
}
/**
* 获取 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeStart
*/
public Integer getAuthTypeStart(){
......@@ -775,7 +617,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeStart
*/
public void setAuthTypeStart(Integer authTypeStart){
......@@ -783,7 +625,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 获取 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return $authTypeEnd
*/
public Integer getAuthTypeEnd(){
......@@ -791,7 +633,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeEnd
*/
public void setAuthTypeEnd(Integer authTypeEnd){
......@@ -799,7 +641,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 获取 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeIncrement
*/
public Integer getAuthTypeIncrement(){
......@@ -807,7 +649,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeIncrement
*/
public void setAuthTypeIncrement(Integer authTypeIncrement){
......@@ -815,7 +657,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 获取 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeList
*/
public List<Integer> getAuthTypeList(){
......@@ -823,13 +665,77 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeList
*/
public void setAuthTypeList(List<Integer> authTypeList){
this.authTypeList = authTypeList;
}
/**
* 获取 开始 排序编号
* @return orderIdStart
*/
public Integer getOrderIdStart(){
return this.orderIdStart;
}
/**
* 设置 开始 排序编号
* @param orderIdStart
*/
public void setOrderIdStart(Integer orderIdStart){
this.orderIdStart = orderIdStart;
}
/**
* 获取 结束 排序编号
* @return $orderIdEnd
*/
public Integer getOrderIdEnd(){
return this.orderIdEnd;
}
/**
* 设置 结束 排序编号
* @param orderIdEnd
*/
public void setOrderIdEnd(Integer orderIdEnd){
this.orderIdEnd = orderIdEnd;
}
/**
* 获取 增加 排序编号
* @return orderIdIncrement
*/
public Integer getOrderIdIncrement(){
return this.orderIdIncrement;
}
/**
* 设置 增加 排序编号
* @param orderIdIncrement
*/
public void setOrderIdIncrement(Integer orderIdIncrement){
this.orderIdIncrement = orderIdIncrement;
}
/**
* 获取 排序编号
* @return orderIdList
*/
public List<Integer> getOrderIdList(){
return this.orderIdList;
}
/**
* 设置 排序编号
* @param orderIdList
*/
public void setOrderIdList(List<Integer> orderIdList){
this.orderIdList = orderIdList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
......@@ -1070,97 +976,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 排序编号
* @param orderId
*/
public MenuQuery orderId(Long orderId){
setOrderId(orderId);
return this;
}
/**
* 设置 开始 排序编号
* @param orderIdStart
*/
public MenuQuery orderIdStart(Long orderIdStart){
this.orderIdStart = orderIdStart;
return this;
}
/**
* 设置 结束 排序编号
* @param orderIdEnd
*/
public MenuQuery orderIdEnd(Long orderIdEnd){
this.orderIdEnd = orderIdEnd;
return this;
}
/**
* 设置 增加 排序编号
* @param orderIdIncrement
*/
public MenuQuery orderIdIncrement(Long orderIdIncrement){
this.orderIdIncrement = orderIdIncrement;
return this;
}
/**
* 设置 排序编号
* @param orderIdList
*/
public MenuQuery orderIdList(List<Long> orderIdList){
this.orderIdList = orderIdList;
return this;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param status
*/
public MenuQuery status(Integer status){
setStatus(status);
return this;
}
/**
* 设置 开始 菜单状态,0:禁用,1:启用,默认1
* @param statusStart
*/
public MenuQuery statusStart(Integer statusStart){
this.statusStart = statusStart;
return this;
}
/**
* 设置 结束 菜单状态,0:禁用,1:启用,默认1
* @param statusEnd
*/
public MenuQuery statusEnd(Integer statusEnd){
this.statusEnd = statusEnd;
return this;
}
/**
* 设置 增加 菜单状态,0:禁用,1:启用,默认1
* @param statusIncrement
*/
public MenuQuery statusIncrement(Integer statusIncrement){
this.statusIncrement = statusIncrement;
return this;
}
/**
* 设置 菜单状态,0:禁用,1:启用,默认1
* @param statusList
*/
public MenuQuery statusList(List<Integer> statusList){
this.statusList = statusList;
return this;
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkType
*/
public MenuQuery linkType(Integer linkType){
......@@ -1169,7 +985,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 开始 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeStart
*/
public MenuQuery linkTypeStart(Integer linkTypeStart){
......@@ -1178,7 +994,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 结束 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeEnd
*/
public MenuQuery linkTypeEnd(Integer linkTypeEnd){
......@@ -1187,7 +1003,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 增加 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeIncrement
*/
public MenuQuery linkTypeIncrement(Integer linkTypeIncrement){
......@@ -1196,7 +1012,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 链接方式,0:普通,1:弹出,2:脚本(JavaScript),默认0
* 设置 链接方式,(0.普通,1.弹出,2.脚本)
* @param linkTypeList
*/
public MenuQuery linkTypeList(List<Integer> linkTypeList){
......@@ -1204,70 +1020,6 @@ public class MenuQuery extends MenuEntity {
return this;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupId
*/
public MenuQuery groupId(Long groupId){
setGroupId(groupId);
return this;
}
/**
* 设置 开始 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdStart
*/
public MenuQuery groupIdStart(Long groupIdStart){
this.groupIdStart = groupIdStart;
return this;
}
/**
* 设置 结束 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdEnd
*/
public MenuQuery groupIdEnd(Long groupIdEnd){
this.groupIdEnd = groupIdEnd;
return this;
}
/**
* 设置 增加 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdIncrement
*/
public MenuQuery groupIdIncrement(Long groupIdIncrement){
this.groupIdIncrement = groupIdIncrement;
return this;
}
/**
* 设置 分组编号,使用菜单分隔符按该值分隔,默认1
* @param groupIdList
*/
public MenuQuery groupIdList(List<Long> groupIdList){
this.groupIdList = groupIdList;
return this;
}
/**
* 设置
* @param groupName
*/
public MenuQuery groupName(String groupName){
setGroupName(groupName);
return this;
}
/**
* 设置
* @param groupNameList
*/
public MenuQuery groupNameList(List<String> groupNameList){
this.groupNameList = groupNameList;
return this;
}
/**
* 设置 主菜单图标,主菜单图标的css样式名
......@@ -1289,7 +1041,7 @@ public class MenuQuery extends MenuEntity {
/**
* 设置 按钮图标,按钮图标的css样式名
* 设置 按钮图标
* @param buttonImgPath
*/
public MenuQuery buttonImgPath(String buttonImgPath){
......@@ -1298,7 +1050,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 按钮图标,按钮图标的css样式名
* 设置 按钮图标
* @param buttonImgPathList
*/
public MenuQuery buttonImgPathList(List<String> buttonImgPathList){
......@@ -1308,7 +1060,7 @@ public class MenuQuery extends MenuEntity {
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* 设置 常用菜单图标
* @param imgCommPath
*/
public MenuQuery imgCommPath(String imgCommPath){
......@@ -1317,7 +1069,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 常用菜单图标,常用菜单图标的css样式名
* 设置 常用菜单图标
* @param imgCommPathList
*/
public MenuQuery imgCommPathList(List<String> imgCommPathList){
......@@ -1326,52 +1078,52 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenu
* 设置 菜单显示(0.隐藏,1.显示)
* @param visible
*/
public MenuQuery commMenu(Integer commMenu){
setCommMenu(commMenu);
public MenuQuery visible(Integer visible){
setVisible(visible);
return this;
}
/**
* 设置 开始 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuStart
* 设置 开始 菜单显示(0.隐藏,1.显示)
* @param visibleStart
*/
public MenuQuery commMenuStart(Integer commMenuStart){
this.commMenuStart = commMenuStart;
public MenuQuery visibleStart(Integer visibleStart){
this.visibleStart = visibleStart;
return this;
}
/**
* 设置 结束 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuEnd
* 设置 结束 菜单显示(0.隐藏,1.显示)
* @param visibleEnd
*/
public MenuQuery commMenuEnd(Integer commMenuEnd){
this.commMenuEnd = commMenuEnd;
public MenuQuery visibleEnd(Integer visibleEnd){
this.visibleEnd = visibleEnd;
return this;
}
/**
* 设置 增加 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuIncrement
* 设置 增加 菜单显示(0.隐藏,1.显示)
* @param visibleIncrement
*/
public MenuQuery commMenuIncrement(Integer commMenuIncrement){
this.commMenuIncrement = commMenuIncrement;
public MenuQuery visibleIncrement(Integer visibleIncrement){
this.visibleIncrement = visibleIncrement;
return this;
}
/**
* 设置 是否常用菜单,0:非常用,1:常用,默认0
* @param commMenuList
* 设置 菜单显示(0.隐藏,1.显示)
* @param visibleList
*/
public MenuQuery commMenuList(List<Integer> commMenuList){
this.commMenuList = commMenuList;
public MenuQuery visibleList(List<Integer> visibleList){
this.visibleList = visibleList;
return this;
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuType
*/
public MenuQuery menuType(Integer menuType){
......@@ -1380,7 +1132,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 开始 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeStart
*/
public MenuQuery menuTypeStart(Integer menuTypeStart){
......@@ -1389,7 +1141,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 结束 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeEnd
*/
public MenuQuery menuTypeEnd(Integer menuTypeEnd){
......@@ -1398,7 +1150,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 增加 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeIncrement
*/
public MenuQuery menuTypeIncrement(Integer menuTypeIncrement){
......@@ -1407,7 +1159,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 菜单类型,0:主菜单,1:非主菜单,默认0
* 设置 菜单类型(0.目录,1.菜单,2.按钮)
* @param menuTypeList
*/
public MenuQuery menuTypeList(List<Integer> menuTypeList){
......@@ -1416,7 +1168,52 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 菜单状态(0.禁用,1.启用)
* @param status
*/
public MenuQuery status(Integer status){
setStatus(status);
return this;
}
/**
* 设置 开始 菜单状态(0.禁用,1.启用)
* @param statusStart
*/
public MenuQuery statusStart(Integer statusStart){
this.statusStart = statusStart;
return this;
}
/**
* 设置 结束 菜单状态(0.禁用,1.启用)
* @param statusEnd
*/
public MenuQuery statusEnd(Integer statusEnd){
this.statusEnd = statusEnd;
return this;
}
/**
* 设置 增加 菜单状态(0.禁用,1.启用)
* @param statusIncrement
*/
public MenuQuery statusIncrement(Integer statusIncrement){
this.statusIncrement = statusIncrement;
return this;
}
/**
* 设置 菜单状态(0.禁用,1.启用)
* @param statusList
*/
public MenuQuery statusList(List<Integer> statusList){
this.statusList = statusList;
return this;
}
/**
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authType
*/
public MenuQuery authType(Integer authType){
......@@ -1425,7 +1222,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 开始 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeStart
*/
public MenuQuery authTypeStart(Integer authTypeStart){
......@@ -1434,7 +1231,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 结束 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeEnd
*/
public MenuQuery authTypeEnd(Integer authTypeEnd){
......@@ -1443,7 +1240,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 增加 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeIncrement
*/
public MenuQuery authTypeIncrement(Integer authTypeIncrement){
......@@ -1452,7 +1249,7 @@ public class MenuQuery extends MenuEntity {
}
/**
* 设置 权限类型,0:无限制,1:无需登录查看,2:需要登录查看,3:需要角色权限查看
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeList
*/
public MenuQuery authTypeList(List<Integer> authTypeList){
......@@ -1460,6 +1257,51 @@ public class MenuQuery extends MenuEntity {
return this;
}
/**
* 设置 排序编号
* @param orderId
*/
public MenuQuery orderId(Integer orderId){
setOrderId(orderId);
return this;
}
/**
* 设置 开始 排序编号
* @param orderIdStart
*/
public MenuQuery orderIdStart(Integer orderIdStart){
this.orderIdStart = orderIdStart;
return this;
}
/**
* 设置 结束 排序编号
* @param orderIdEnd
*/
public MenuQuery orderIdEnd(Integer orderIdEnd){
this.orderIdEnd = orderIdEnd;
return this;
}
/**
* 设置 增加 排序编号
* @param orderIdIncrement
*/
public MenuQuery orderIdIncrement(Integer orderIdIncrement){
this.orderIdIncrement = orderIdIncrement;
return this;
}
/**
* 设置 排序编号
* @param orderIdList
*/
public MenuQuery orderIdList(List<Integer> orderIdList){
this.orderIdList = orderIdList;
return this;
}
/**
* 设置 创建用户
......
......@@ -13,6 +13,6 @@ import java.util.List;
*/
@Data
public class MenuVo extends BaseEntityLong {
private List<MenuEntity> childList = new ArrayList<MenuEntity>();
private List<MenuEntity> childList = new ArrayList<>();
}
\ No newline at end of file
......@@ -38,8 +38,10 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
@Override
public List<MenuEntity> findTreeMenu(IUser user, Set<String> urls) throws AppException {
//保存已有菜单
Set<Long> authIds = new HashSet<>();
Map<Long, MenuEntity> menuMap = new HashMap<>();
//获取所有启用的菜单
List<MenuEntity> userModuleList = this.findAllEnable();
for (MenuEntity sysModule : userModuleList) {
if (sysModule == null) {
......@@ -54,14 +56,15 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
Long[] ids = authIds.toArray(new Long[authIds.size()]);
for (Long id : ids) {
MenuEntity menu = menuMap.get(id);
//找父节点
while (menu != null) {
authIds.add(menu.getId());
menu = menuMap.get(menu.getParentId());
}
}
}
List<MenuEntity> outlookBar = new ArrayList<MenuEntity>();
List<MenuEntity> norightList = new ArrayList<MenuEntity>();
List<MenuEntity> outlookBar = new ArrayList<>();
List<MenuEntity> norightList = new ArrayList<>();
for (MenuEntity sysModule : userModuleList) {
if (!user.isAdmin() && !authIds.contains(sysModule.getId())) {
norightList.add(sysModule);
......@@ -80,7 +83,7 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
}
public List<MenuEntity> findTreeMenu() throws AppException {
Map<Long, MenuEntity> menuMap = new HashMap<Long, MenuEntity>();
Map<Long, MenuEntity> menuMap = new HashMap<>();
List<MenuEntity> userModuleList = this.findAllEnable();
for (MenuEntity sysModule : userModuleList) {
if (sysModule == null) {
......@@ -88,7 +91,7 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
}
menuMap.put(sysModule.getId(), sysModule);
}
List<MenuEntity> outlookBar = new ArrayList<MenuEntity>();
List<MenuEntity> outlookBar = new ArrayList<>();
for (MenuEntity sysModule : userModuleList) {
if (sysModule.getParentId() == null || sysModule.getParentId().longValue() == 0) {
outlookBar.add(sysModule);
......@@ -145,7 +148,7 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
if (preEntity != null && curEntity != null) {
//交换
Long temp = preEntity.getOrderId();
Integer temp = preEntity.getOrderId();
preEntity.setOrderId(curEntity.getOrderId());
curEntity.setOrderId(temp);
......@@ -159,8 +162,8 @@ public class MenuServiceImpl extends AbstractCRUDServiceImpl<MenuDao, MenuEntity
protected void saveBefore(MenuEntity entity, Context context) throws AppException {
MenuQuery query = new MenuQuery();
query.setParentId(entity.getParentId());
Comparator<Long> comparator = Comparator.comparing(Long::longValue);
Optional<Long> maxOptional = this.find(query).stream().map(MenuEntity::getOrderId).filter(f->f!=9999).max(comparator);
Comparator<Integer> comparator = Comparator.comparing(Integer::intValue);
Optional<Integer> maxOptional = this.find(query).stream().map(MenuEntity::getOrderId).filter(f->f!=9999).max(comparator);
maxOptional.ifPresent(e -> {
e=e+1;
entity.setOrderId(e);
......
......@@ -34,7 +34,6 @@ public class MenuController extends BaseCRUDJsonBodyMappingController<MenuServic
private ParamService paramService;
public MenuController() {
super.setFormClass(MenuForm.class);
super.setModuleDesc("菜单信息业务");
}
......
package com.mortals.xhx.module.menu.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.menu.model.MenuQuery;
/**
* Menu
*
* 菜单信息业务 Form
*
* @author zxfei
* @date 2022-05-25
*/
public class MenuForm extends BaseCRUDFormLong<MenuEntity> {
private MenuEntity entity = new MenuEntity();
private MenuQuery query = new MenuQuery();
public MenuForm(){
}
@Override
public MenuEntity getEntity() {
return entity;
}
public void setMenu(MenuEntity entity) {
this.entity = entity;
}
@Override
public MenuQuery getQuery() {
return query;
}
public void setQuery(MenuQuery query) {
this.query = query;
}
}
\ No newline at end of file
package com.mortals.xhx.module.model.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.model.model.ModelEntity;
import java.util.List;
/**
* 系统模块Dao
* 系统模块 DAO接口
*
* @author zxfei
* @date 2022-06-01
*/
public interface ModelDao extends ICRUDDao<ModelEntity,Long>{
}
package com.mortals.xhx.module.model.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.model.dao.ModelDao;
import com.mortals.xhx.module.model.model.ModelEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 系统模块DaoImpl DAO接口
*
* @author zxfei
* @date 2022-06-01
*/
@Repository("modelDao")
public class ModelDaoImpl extends BaseCRUDDaoMybatis<ModelEntity,Long> implements ModelDao {
}
package com.mortals.xhx.module.model.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.model.model.vo.ModelVo;
/**
* 系统模块实体对象
*
* @author zxfei
* @date 2022-06-01
*/
public class ModelEntity extends ModelVo {
private static final long serialVersionUID = 1L;
/**
* 系统模块名称
*/
private String modelName;
/**
* 模块编码
*/
private String modelCode;
/**
* 模块图标
*/
private String modelIcon;
/**
* 地址
*/
private String modelUrl;
/**
* 备注信息
*/
private String remark;
/**
* 排序
*/
private Integer sort;
public ModelEntity(){}
/**
* 获取 系统模块名称
* @return String
*/
public String getModelName(){
return modelName;
}
/**
* 设置 系统模块名称
* @param modelName
*/
public void setModelName(String modelName){
this.modelName = modelName;
}
/**
* 获取 模块编码
* @return String
*/
public String getModelCode(){
return modelCode;
}
/**
* 设置 模块编码
* @param modelCode
*/
public void setModelCode(String modelCode){
this.modelCode = modelCode;
}
/**
* 获取 模块图标
* @return String
*/
public String getModelIcon(){
return modelIcon;
}
/**
* 设置 模块图标
* @param modelIcon
*/
public void setModelIcon(String modelIcon){
this.modelIcon = modelIcon;
}
/**
* 获取 地址
* @return String
*/
public String getModelUrl(){
return modelUrl;
}
/**
* 设置 地址
* @param modelUrl
*/
public void setModelUrl(String modelUrl){
this.modelUrl = modelUrl;
}
/**
* 获取 备注信息
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注信息
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 排序
* @return Integer
*/
public Integer getSort(){
return sort;
}
/**
* 设置 排序
* @param sort
*/
public void setSort(Integer sort){
this.sort = sort;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof ModelEntity) {
ModelEntity tmp = (ModelEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",modelName:").append(getModelName());
sb.append(",modelCode:").append(getModelCode());
sb.append(",modelIcon:").append(getModelIcon());
sb.append(",modelUrl:").append(getModelUrl());
sb.append(",remark:").append(getRemark());
sb.append(",sort:").append(getSort());
return sb.toString();
}
public void initAttrValue(){
this.modelName = "";
this.modelCode = "";
this.modelIcon = "";
this.modelUrl = "";
this.remark = "";
this.sort = 1;
}
}
\ No newline at end of file
package com.mortals.xhx.module.model.model;
import java.util.List;
import com.mortals.xhx.module.model.model.ModelEntity;
/**
* 系统模块查询对象
*
* @author zxfei
* @date 2022-06-01
*/
public class ModelQuery extends ModelEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
/** 结束 序号,主键,自增长 */
private Long idEnd;
/** 增加 序号,主键,自增长 */
private Long idIncrement;
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 系统模块名称 */
private List<String> modelNameList;
/** 模块编码 */
private List<String> modelCodeList;
/** 模块图标 */
private List<String> modelIconList;
/** 地址 */
private List<String> modelUrlList;
/** 备注信息 */
private List<String> remarkList;
/** 开始 排序 */
private Integer sortStart;
/** 结束 排序 */
private Integer sortEnd;
/** 增加 排序 */
private Integer sortIncrement;
/** 排序列表 */
private List <Integer> sortList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 开始 修改时间 */
private String updateTimeStart;
/** 结束 修改时间 */
private String updateTimeEnd;
/** 开始 修改用户 */
private Long updateUserIdStart;
/** 结束 修改用户 */
private Long updateUserIdEnd;
/** 增加 修改用户 */
private Long updateUserIdIncrement;
/** 修改用户列表 */
private List <Long> updateUserIdList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ModelQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<ModelQuery> andConditionList;
public ModelQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 系统模块名称
* @return modelNameList
*/
public List<String> getModelNameList(){
return this.modelNameList;
}
/**
* 设置 系统模块名称
* @param modelNameList
*/
public void setModelNameList(List<String> modelNameList){
this.modelNameList = modelNameList;
}
/**
* 获取 模块编码
* @return modelCodeList
*/
public List<String> getModelCodeList(){
return this.modelCodeList;
}
/**
* 设置 模块编码
* @param modelCodeList
*/
public void setModelCodeList(List<String> modelCodeList){
this.modelCodeList = modelCodeList;
}
/**
* 获取 模块图标
* @return modelIconList
*/
public List<String> getModelIconList(){
return this.modelIconList;
}
/**
* 设置 模块图标
* @param modelIconList
*/
public void setModelIconList(List<String> modelIconList){
this.modelIconList = modelIconList;
}
/**
* 获取 地址
* @return modelUrlList
*/
public List<String> getModelUrlList(){
return this.modelUrlList;
}
/**
* 设置 地址
* @param modelUrlList
*/
public void setModelUrlList(List<String> modelUrlList){
this.modelUrlList = modelUrlList;
}
/**
* 获取 备注信息
* @return remarkList
*/
public List<String> getRemarkList(){
return this.remarkList;
}
/**
* 设置 备注信息
* @param remarkList
*/
public void setRemarkList(List<String> remarkList){
this.remarkList = remarkList;
}
/**
* 获取 开始 排序
* @return sortStart
*/
public Integer getSortStart(){
return this.sortStart;
}
/**
* 设置 开始 排序
* @param sortStart
*/
public void setSortStart(Integer sortStart){
this.sortStart = sortStart;
}
/**
* 获取 结束 排序
* @return $sortEnd
*/
public Integer getSortEnd(){
return this.sortEnd;
}
/**
* 设置 结束 排序
* @param sortEnd
*/
public void setSortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
}
/**
* 获取 增加 排序
* @return sortIncrement
*/
public Integer getSortIncrement(){
return this.sortIncrement;
}
/**
* 设置 增加 排序
* @param sortIncrement
*/
public void setSortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
}
/**
* 获取 排序
* @return sortList
*/
public List<Integer> getSortList(){
return this.sortList;
}
/**
* 设置 排序
* @param sortList
*/
public void setSortList(List<Integer> sortList){
this.sortList = sortList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 开始 修改时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 修改时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 修改时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 修改时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 修改用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 修改用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 修改用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 修改用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 修改用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 修改用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 修改用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 修改用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
public ModelQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public ModelQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public ModelQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public ModelQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public ModelQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 系统模块名称
* @param modelName
*/
public ModelQuery modelName(String modelName){
setModelName(modelName);
return this;
}
/**
* 设置 系统模块名称
* @param modelNameList
*/
public ModelQuery modelNameList(List<String> modelNameList){
this.modelNameList = modelNameList;
return this;
}
/**
* 设置 模块编码
* @param modelCode
*/
public ModelQuery modelCode(String modelCode){
setModelCode(modelCode);
return this;
}
/**
* 设置 模块编码
* @param modelCodeList
*/
public ModelQuery modelCodeList(List<String> modelCodeList){
this.modelCodeList = modelCodeList;
return this;
}
/**
* 设置 模块图标
* @param modelIcon
*/
public ModelQuery modelIcon(String modelIcon){
setModelIcon(modelIcon);
return this;
}
/**
* 设置 模块图标
* @param modelIconList
*/
public ModelQuery modelIconList(List<String> modelIconList){
this.modelIconList = modelIconList;
return this;
}
/**
* 设置 地址
* @param modelUrl
*/
public ModelQuery modelUrl(String modelUrl){
setModelUrl(modelUrl);
return this;
}
/**
* 设置 地址
* @param modelUrlList
*/
public ModelQuery modelUrlList(List<String> modelUrlList){
this.modelUrlList = modelUrlList;
return this;
}
/**
* 设置 备注信息
* @param remark
*/
public ModelQuery remark(String remark){
setRemark(remark);
return this;
}
/**
* 设置 备注信息
* @param remarkList
*/
public ModelQuery remarkList(List<String> remarkList){
this.remarkList = remarkList;
return this;
}
/**
* 设置 排序
* @param sort
*/
public ModelQuery sort(Integer sort){
setSort(sort);
return this;
}
/**
* 设置 开始 排序
* @param sortStart
*/
public ModelQuery sortStart(Integer sortStart){
this.sortStart = sortStart;
return this;
}
/**
* 设置 结束 排序
* @param sortEnd
*/
public ModelQuery sortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
return this;
}
/**
* 设置 增加 排序
* @param sortIncrement
*/
public ModelQuery sortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
return this;
}
/**
* 设置 排序
* @param sortList
*/
public ModelQuery sortList(List<Integer> sortList){
this.sortList = sortList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public ModelQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public ModelQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public ModelQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public ModelQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public ModelQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 修改用户
* @param updateUserId
*/
public ModelQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 修改用户
* @param updateUserIdStart
*/
public ModelQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 修改用户
* @param updateUserIdEnd
*/
public ModelQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 修改用户
* @param updateUserIdIncrement
*/
public ModelQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 修改用户
* @param updateUserIdList
*/
public ModelQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<ModelQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<ModelQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<ModelQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<ModelQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.model.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.model.model.ModelEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 系统模块视图对象
*
* @author zxfei
* @date 2022-06-01
*/
@Data
public class ModelVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.model.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.model.model.ModelEntity;
/**
* ModelService
*
* 系统模块 service接口
*
* @author zxfei
* @date 2022-06-01
*/
public interface ModelService extends ICRUDService<ModelEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.model.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.model.dao.ModelDao;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.service.ModelService;
/**
* ModelService
* 系统模块 service实现
*
* @author zxfei
* @date 2022-06-01
*/
@Service("modelService")
public class ModelServiceImpl extends AbstractCRUDServiceImpl<ModelDao, ModelEntity, Long> implements ModelService {
}
\ No newline at end of file
package com.mortals.xhx.module.model.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 系统模块
*
* @author zxfei
* @date 2022-06-01
*/
@RestController
@RequestMapping("model")
public class ModelController extends BaseCRUDJsonBodyMappingController<ModelService,ModelEntity,Long> {
@Autowired
private ParamService paramService;
public ModelController(){
super.setFormClass(ModelForm.class);
super.setModuleDesc( "系统模块");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
package com.mortals.xhx.module.resource.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import java.util.List;
/**
* 资源信息业务Dao
* 资源信息业务 DAO接口
*
* @author zxfei
* @date 2022-05-25
*/
public interface ResourceDao extends ICRUDDao<ResourceEntity,Long>{
List<ResourceEntity> getListByUserId(Long userId);
List<ResourceEntity> getAll(int userType);
}
package com.mortals.xhx.module.resource.dao.ibatis;
import com.mortals.framework.model.ParamDto;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.resource.dao.ResourceDao;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.HashMap;
import java.util.List;
/**
* 资源信息业务DaoImpl DAO接口
*
* @author zxfei
* @date 2022-05-25
*/
@Repository("resourceDao")
public class ResourceDaoImpl extends BaseCRUDDaoMybatis<ResourceEntity, Long> implements ResourceDao {
@Override
public List<ResourceEntity> getListByUserId(Long userId) {
ParamDto param = new ParamDto();
param.getCondition().put("userId", userId);
return getSqlSession().selectList(getSqlId("getListByUserId"), param);
}
@Override
public List<ResourceEntity> getAll(final int userType) {
return getSqlSession().selectList(getSqlId("getAllByUserType"), new HashMap<String, Object>() {
{
put("userType", userType);
}
});
}
}
package com.mortals.xhx.module.resource.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.resource.model.vo.ResourceVo;
/**
* 资源信息业务实体对象
*
* @author zxfei
* @date 2022-05-25
*/
public class ResourceEntity extends ResourceVo {
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 连接地址,多个地址以逗号分隔
*/
private String url;
/**
* 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
*/
private Integer authType;
/**
* 资源类型(0.系统资源,1.开放资源)
*/
private Integer sourceType;
/**
* 创建用户名称
*/
private String createUserName;
/**
* 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
*/
private Integer userType;
public ResourceEntity(){}
/**
* 获取 名称
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 名称
* @param name
*/
public void setName(String name){
this.name = name;
}
/**
* 获取 连接地址,多个地址以逗号分隔
* @return String
*/
public String getUrl(){
return url;
}
/**
* 设置 连接地址,多个地址以逗号分隔
* @param url
*/
public void setUrl(String url){
this.url = url;
}
/**
* 获取 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return Integer
*/
public Integer getAuthType(){
return authType;
}
/**
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authType
*/
public void setAuthType(Integer authType){
this.authType = authType;
}
/**
* 获取 资源类型(0.系统资源,1.开放资源)
* @return Integer
*/
public Integer getSourceType(){
return sourceType;
}
/**
* 设置 资源类型(0.系统资源,1.开放资源)
* @param sourceType
*/
public void setSourceType(Integer sourceType){
this.sourceType = sourceType;
}
/**
* 获取 创建用户名称
* @return String
*/
public String getCreateUserName(){
return createUserName;
}
/**
* 设置 创建用户名称
* @param createUserName
*/
public void setCreateUserName(String createUserName){
this.createUserName = createUserName;
}
/**
* 获取 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @return Integer
*/
public Integer getUserType(){
return userType;
}
/**
* 设置 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userType
*/
public void setUserType(Integer userType){
this.userType = userType;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof ResourceEntity) {
ResourceEntity tmp = (ResourceEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",name:").append(getName());
sb.append(",url:").append(getUrl());
sb.append(",authType:").append(getAuthType());
sb.append(",sourceType:").append(getSourceType());
sb.append(",createUserName:").append(getCreateUserName());
sb.append(",userType:").append(getUserType());
return sb.toString();
}
public void initAttrValue(){
this.name = "";
this.url = "";
this.authType = 3;
this.sourceType = 0;
this.createUserName = "";
this.userType = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.resource.model;
import java.util.List;
import com.mortals.xhx.module.resource.model.ResourceEntity;
/**
* 资源信息业务查询对象
*
* @author zxfei
* @date 2022-05-25
*/
public class ResourceQuery extends ResourceEntity {
/** 开始 菜单ID,主键,自增长 */
private Long idStart;
/** 结束 菜单ID,主键,自增长 */
private Long idEnd;
/** 增加 菜单ID,主键,自增长 */
private Long idIncrement;
/** 菜单ID,主键,自增长列表 */
private List <Long> idList;
/** 名称 */
private List<String> nameList;
/** 连接地址,多个地址以逗号分隔 */
private List<String> urlList;
/** 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeStart;
/** 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeEnd;
/** 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看) */
private Integer authTypeIncrement;
/** 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)列表 */
private List <Integer> authTypeList;
/** 开始 资源类型(0.系统资源,1.开放资源) */
private Integer sourceTypeStart;
/** 结束 资源类型(0.系统资源,1.开放资源) */
private Integer sourceTypeEnd;
/** 增加 资源类型(0.系统资源,1.开放资源) */
private Integer sourceTypeIncrement;
/** 资源类型(0.系统资源,1.开放资源)列表 */
private List <Integer> sourceTypeList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户名称 */
private List<String> createUserNameList;
/** 开始 用户类型(0.系统用户,1.代理商用户,2.品牌商用户) */
private Integer userTypeStart;
/** 结束 用户类型(0.系统用户,1.代理商用户,2.品牌商用户) */
private Integer userTypeEnd;
/** 增加 用户类型(0.系统用户,1.代理商用户,2.品牌商用户) */
private Integer userTypeIncrement;
/** 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)列表 */
private List <Integer> userTypeList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ResourceQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<ResourceQuery> andConditionList;
public ResourceQuery(){}
/**
* 获取 开始 菜单ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 菜单ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 菜单ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 菜单ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 菜单ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 菜单ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 菜单ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 菜单ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 名称
* @return nameList
*/
public List<String> getNameList(){
return this.nameList;
}
/**
* 设置 名称
* @param nameList
*/
public void setNameList(List<String> nameList){
this.nameList = nameList;
}
/**
* 获取 连接地址,多个地址以逗号分隔
* @return urlList
*/
public List<String> getUrlList(){
return this.urlList;
}
/**
* 设置 连接地址,多个地址以逗号分隔
* @param urlList
*/
public void setUrlList(List<String> urlList){
this.urlList = urlList;
}
/**
* 获取 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeStart
*/
public Integer getAuthTypeStart(){
return this.authTypeStart;
}
/**
* 设置 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeStart
*/
public void setAuthTypeStart(Integer authTypeStart){
this.authTypeStart = authTypeStart;
}
/**
* 获取 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return $authTypeEnd
*/
public Integer getAuthTypeEnd(){
return this.authTypeEnd;
}
/**
* 设置 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeEnd
*/
public void setAuthTypeEnd(Integer authTypeEnd){
this.authTypeEnd = authTypeEnd;
}
/**
* 获取 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeIncrement
*/
public Integer getAuthTypeIncrement(){
return this.authTypeIncrement;
}
/**
* 设置 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeIncrement
*/
public void setAuthTypeIncrement(Integer authTypeIncrement){
this.authTypeIncrement = authTypeIncrement;
}
/**
* 获取 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @return authTypeList
*/
public List<Integer> getAuthTypeList(){
return this.authTypeList;
}
/**
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeList
*/
public void setAuthTypeList(List<Integer> authTypeList){
this.authTypeList = authTypeList;
}
/**
* 获取 开始 资源类型(0.系统资源,1.开放资源)
* @return sourceTypeStart
*/
public Integer getSourceTypeStart(){
return this.sourceTypeStart;
}
/**
* 设置 开始 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeStart
*/
public void setSourceTypeStart(Integer sourceTypeStart){
this.sourceTypeStart = sourceTypeStart;
}
/**
* 获取 结束 资源类型(0.系统资源,1.开放资源)
* @return $sourceTypeEnd
*/
public Integer getSourceTypeEnd(){
return this.sourceTypeEnd;
}
/**
* 设置 结束 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeEnd
*/
public void setSourceTypeEnd(Integer sourceTypeEnd){
this.sourceTypeEnd = sourceTypeEnd;
}
/**
* 获取 增加 资源类型(0.系统资源,1.开放资源)
* @return sourceTypeIncrement
*/
public Integer getSourceTypeIncrement(){
return this.sourceTypeIncrement;
}
/**
* 设置 增加 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeIncrement
*/
public void setSourceTypeIncrement(Integer sourceTypeIncrement){
this.sourceTypeIncrement = sourceTypeIncrement;
}
/**
* 获取 资源类型(0.系统资源,1.开放资源)
* @return sourceTypeList
*/
public List<Integer> getSourceTypeList(){
return this.sourceTypeList;
}
/**
* 设置 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeList
*/
public void setSourceTypeList(List<Integer> sourceTypeList){
this.sourceTypeList = sourceTypeList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户名称
* @return createUserNameList
*/
public List<String> getCreateUserNameList(){
return this.createUserNameList;
}
/**
* 设置 创建用户名称
* @param createUserNameList
*/
public void setCreateUserNameList(List<String> createUserNameList){
this.createUserNameList = createUserNameList;
}
/**
* 获取 开始 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @return userTypeStart
*/
public Integer getUserTypeStart(){
return this.userTypeStart;
}
/**
* 设置 开始 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeStart
*/
public void setUserTypeStart(Integer userTypeStart){
this.userTypeStart = userTypeStart;
}
/**
* 获取 结束 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @return $userTypeEnd
*/
public Integer getUserTypeEnd(){
return this.userTypeEnd;
}
/**
* 设置 结束 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeEnd
*/
public void setUserTypeEnd(Integer userTypeEnd){
this.userTypeEnd = userTypeEnd;
}
/**
* 获取 增加 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @return userTypeIncrement
*/
public Integer getUserTypeIncrement(){
return this.userTypeIncrement;
}
/**
* 设置 增加 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeIncrement
*/
public void setUserTypeIncrement(Integer userTypeIncrement){
this.userTypeIncrement = userTypeIncrement;
}
/**
* 获取 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @return userTypeList
*/
public List<Integer> getUserTypeList(){
return this.userTypeList;
}
/**
* 设置 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeList
*/
public void setUserTypeList(List<Integer> userTypeList){
this.userTypeList = userTypeList;
}
/**
* 设置 菜单ID,主键,自增长
* @param id
*/
public ResourceQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 菜单ID,主键,自增长
* @param idStart
*/
public ResourceQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 菜单ID,主键,自增长
* @param idEnd
*/
public ResourceQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 菜单ID,主键,自增长
* @param idIncrement
*/
public ResourceQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 菜单ID,主键,自增长
* @param idList
*/
public ResourceQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 名称
* @param name
*/
public ResourceQuery name(String name){
setName(name);
return this;
}
/**
* 设置 名称
* @param nameList
*/
public ResourceQuery nameList(List<String> nameList){
this.nameList = nameList;
return this;
}
/**
* 设置 连接地址,多个地址以逗号分隔
* @param url
*/
public ResourceQuery url(String url){
setUrl(url);
return this;
}
/**
* 设置 连接地址,多个地址以逗号分隔
* @param urlList
*/
public ResourceQuery urlList(List<String> urlList){
this.urlList = urlList;
return this;
}
/**
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authType
*/
public ResourceQuery authType(Integer authType){
setAuthType(authType);
return this;
}
/**
* 设置 开始 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeStart
*/
public ResourceQuery authTypeStart(Integer authTypeStart){
this.authTypeStart = authTypeStart;
return this;
}
/**
* 设置 结束 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeEnd
*/
public ResourceQuery authTypeEnd(Integer authTypeEnd){
this.authTypeEnd = authTypeEnd;
return this;
}
/**
* 设置 增加 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeIncrement
*/
public ResourceQuery authTypeIncrement(Integer authTypeIncrement){
this.authTypeIncrement = authTypeIncrement;
return this;
}
/**
* 设置 权限类型(0.无限制,1.无需登录查看,2.需要登录查看,3.需要角色权限查看)
* @param authTypeList
*/
public ResourceQuery authTypeList(List<Integer> authTypeList){
this.authTypeList = authTypeList;
return this;
}
/**
* 设置 资源类型(0.系统资源,1.开放资源)
* @param sourceType
*/
public ResourceQuery sourceType(Integer sourceType){
setSourceType(sourceType);
return this;
}
/**
* 设置 开始 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeStart
*/
public ResourceQuery sourceTypeStart(Integer sourceTypeStart){
this.sourceTypeStart = sourceTypeStart;
return this;
}
/**
* 设置 结束 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeEnd
*/
public ResourceQuery sourceTypeEnd(Integer sourceTypeEnd){
this.sourceTypeEnd = sourceTypeEnd;
return this;
}
/**
* 设置 增加 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeIncrement
*/
public ResourceQuery sourceTypeIncrement(Integer sourceTypeIncrement){
this.sourceTypeIncrement = sourceTypeIncrement;
return this;
}
/**
* 设置 资源类型(0.系统资源,1.开放资源)
* @param sourceTypeList
*/
public ResourceQuery sourceTypeList(List<Integer> sourceTypeList){
this.sourceTypeList = sourceTypeList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public ResourceQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public ResourceQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public ResourceQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public ResourceQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public ResourceQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户名称
* @param createUserName
*/
public ResourceQuery createUserName(String createUserName){
setCreateUserName(createUserName);
return this;
}
/**
* 设置 创建用户名称
* @param createUserNameList
*/
public ResourceQuery createUserNameList(List<String> createUserNameList){
this.createUserNameList = createUserNameList;
return this;
}
/**
* 设置 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userType
*/
public ResourceQuery userType(Integer userType){
setUserType(userType);
return this;
}
/**
* 设置 开始 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeStart
*/
public ResourceQuery userTypeStart(Integer userTypeStart){
this.userTypeStart = userTypeStart;
return this;
}
/**
* 设置 结束 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeEnd
*/
public ResourceQuery userTypeEnd(Integer userTypeEnd){
this.userTypeEnd = userTypeEnd;
return this;
}
/**
* 设置 增加 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeIncrement
*/
public ResourceQuery userTypeIncrement(Integer userTypeIncrement){
this.userTypeIncrement = userTypeIncrement;
return this;
}
/**
* 设置 用户类型(0.系统用户,1.代理商用户,2.品牌商用户)
* @param userTypeList
*/
public ResourceQuery userTypeList(List<Integer> userTypeList){
this.userTypeList = userTypeList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<ResourceQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<ResourceQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<ResourceQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<ResourceQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.resource.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* 资源信息业务视图对象
*
* @author zxfei
* @date 2022-05-25
*/
@Data
public class ResourceVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.resource.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import java.util.List;
import java.util.Set;
/**
* ResourceService
*
* 资源信息业务 service接口
*
* @author zxfei
* @date 2022-05-25
*/
public interface ResourceService extends ICRUDService<ResourceEntity,Long>{
/**
* 查询所有可用资源
* @return
* @throws AppException
*/
public List<ResourceEntity> findAllEnable() throws AppException;
/**
* 根据用户查询可用资源
* @param userId
* @return
* @throws AppException
*/
public List<ResourceEntity> findListByUserId(Long userId) throws AppException;
/**
* 查询用户可用资源
* @param userId
* @return 字符串,多个以逗号分隔
* @throws AppException
*/
public String findUrlByUserId(Long userId) throws AppException;
/**
* 查询用户用资源集合
* @param userId
* @return
* @throws AppException
*/
public Set<String> findUrlSetByUserId(Long userId) throws AppException;
/**
* 获取所有资源,不分页
* @return
* @param userType
*/
List<ResourceEntity> findAll(int userType);
}
\ No newline at end of file
package com.mortals.xhx.module.resource.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.resource.model.ResourceQuery;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.resource.dao.ResourceDao;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import com.mortals.xhx.module.resource.service.ResourceService;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* ResourceService
* 资源信息业务 service实现
*
* @author zxfei
* @date 2022-05-25
*/
@Service("resourceService")
public class ResourceServiceImpl extends AbstractCRUDServiceImpl<ResourceDao, ResourceEntity, Long> implements ResourceService {
@Override
public List<ResourceEntity> findAllEnable() throws AppException {
ResourceQuery params = new ResourceQuery();
return dao.getList(params);
}
@Override
public List<ResourceEntity> findListByUserId(Long userId) throws AppException {
return dao.getListByUserId(userId);
}
@Override
public String findUrlByUserId(Long userId) throws AppException {
Set<String> urls = this.findUrlSetByUserId(userId);
return StringUtils.converArray2Str(urls.toArray(new String[urls.size()]));
}
@Override
public Set<String> findUrlSetByUserId(Long userId) throws AppException {
Set<String> urls = new HashSet<String>();
List<ResourceEntity> resList = this.findListByUserId(userId);
for (ResourceEntity res : resList) {
String url = res.getUrl();
if (StringUtils.isEmpty(url)) {
continue;
}
url = url.replaceAll(",", ",");
urls.addAll(StringUtils.converStr2Set(url));
}
return urls;
}
@Override
public List<ResourceEntity> findAll(int userType) {
return dao.getAll(userType);
}
}
\ No newline at end of file
package com.mortals.xhx.module.resource.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.AuthType;
import com.mortals.xhx.common.code.SourceType;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import com.mortals.xhx.module.resource.service.ResourceService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
*
* 资源信息业务
*
* @author zxfei
* @date 2022-05-25
*/
@RestController
@RequestMapping("resource")
public class ResourceController extends BaseCRUDJsonBodyMappingController<ResourceService,ResourceEntity,Long> {
public ResourceController(){
super.setFormClass(ResourceForm.class);
super.setModuleDesc( "资源信息业务");
}
@Override
protected void init(Map<String, Object> model, Context context) {
Map<String, Object> statsus = new HashMap<String, Object>();
statsus.put("authType", AuthType.getEnumMap());
statsus.put("sourceType", SourceType.getEnumMap());
if (getCurUser().isAdmin()) {
statsus.put("userType", IBaseEnum.getEnumMap(UserType.class));
} else {
statsus.put("userType", UserType.findByValue(getCurUser().getUserType()));
}
model.put(KEY_RESULT_DICT, statsus);
}
/**
* 获取所有资源
*
* @return
*/
@PostMapping("allResources")
public String allResources(int userType) {
JSONObject ret = new JSONObject();
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "所有的customer以及user");
ret.put(KEY_RESULT_DATA, service.findAll(userType));
return ret.toJSONString();
}
}
\ No newline at end of file
package com.mortals.xhx.module.resource.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import com.mortals.xhx.module.resource.model.ResourceQuery;
/**
* Resource
*
* 资源信息业务 Form
*
* @author zxfei
* @date 2022-05-25
*/
public class ResourceForm extends BaseCRUDFormLong<ResourceEntity> {
private ResourceEntity entity = new ResourceEntity();
private ResourceQuery query = new ResourceQuery();
public ResourceForm(){
}
@Override
public ResourceEntity getEntity() {
return entity;
}
public void setResource(ResourceEntity entity) {
this.entity = entity;
}
@Override
public ResourceQuery getQuery() {
return query;
}
public void setQuery(ResourceQuery query) {
this.query = query;
}
}
\ No newline at end of file
......@@ -7,10 +7,10 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.role.model.vo.RoleAuthVo;
/**
* 角色资源权限业务实体对象
* 角色菜单权限关联实体对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleAuthEntity extends RoleAuthVo {
......@@ -21,9 +21,9 @@ public class RoleAuthEntity extends RoleAuthVo {
*/
private Long roleId;
/**
* 资源ID
* 菜单ID
*/
private Long resourceId;
private Long menuId;
......@@ -43,18 +43,18 @@ public class RoleAuthEntity extends RoleAuthVo {
this.roleId = roleId;
}
/**
* 获取 资源ID
* 获取 菜单ID
* @return Long
*/
public Long getResourceId(){
return resourceId;
public Long getMenuId(){
return menuId;
}
/**
* 设置 资源ID
* @param resourceId
* 设置 菜单ID
* @param menuId
*/
public void setResourceId(Long resourceId){
this.resourceId = resourceId;
public void setMenuId(Long menuId){
this.menuId = menuId;
}
......@@ -79,7 +79,7 @@ public class RoleAuthEntity extends RoleAuthVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",roleId:").append(getRoleId());
sb.append(",resourceId:").append(getResourceId());
sb.append(",menuId:").append(getMenuId());
return sb.toString();
}
......@@ -87,6 +87,6 @@ public class RoleAuthEntity extends RoleAuthVo {
this.roleId = null;
this.resourceId = null;
this.menuId = null;
}
}
\ No newline at end of file
......@@ -3,10 +3,10 @@ package com.mortals.xhx.module.role.model;
import java.util.List;
import com.mortals.xhx.module.role.model.RoleAuthEntity;
/**
* 角色资源权限业务查询对象
* 角色菜单权限关联查询对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleAuthQuery extends RoleAuthEntity {
/** 开始 序号,主键,自增长 */
......@@ -33,17 +33,17 @@ public class RoleAuthQuery extends RoleAuthEntity {
/** 角色ID列表 */
private List <Long> roleIdList;
/** 开始 资源ID */
private Long resourceIdStart;
/** 开始 菜单ID */
private Long menuIdStart;
/** 结束 资源ID */
private Long resourceIdEnd;
/** 结束 菜单ID */
private Long menuIdEnd;
/** 增加 资源ID */
private Long resourceIdIncrement;
/** 增加 菜单ID */
private Long menuIdIncrement;
/** 资源ID列表 */
private List <Long> resourceIdList;
/** 菜单ID列表 */
private List <Long> menuIdList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<RoleAuthQuery> orConditionList;
......@@ -182,67 +182,67 @@ public class RoleAuthQuery extends RoleAuthEntity {
}
/**
* 获取 开始 资源ID
* @return resourceIdStart
* 获取 开始 菜单ID
* @return menuIdStart
*/
public Long getResourceIdStart(){
return this.resourceIdStart;
public Long getMenuIdStart(){
return this.menuIdStart;
}
/**
* 设置 开始 资源ID
* @param resourceIdStart
* 设置 开始 菜单ID
* @param menuIdStart
*/
public void setResourceIdStart(Long resourceIdStart){
this.resourceIdStart = resourceIdStart;
public void setMenuIdStart(Long menuIdStart){
this.menuIdStart = menuIdStart;
}
/**
* 获取 结束 资源ID
* @return $resourceIdEnd
* 获取 结束 菜单ID
* @return $menuIdEnd
*/
public Long getResourceIdEnd(){
return this.resourceIdEnd;
public Long getMenuIdEnd(){
return this.menuIdEnd;
}
/**
* 设置 结束 资源ID
* @param resourceIdEnd
* 设置 结束 菜单ID
* @param menuIdEnd
*/
public void setResourceIdEnd(Long resourceIdEnd){
this.resourceIdEnd = resourceIdEnd;
public void setMenuIdEnd(Long menuIdEnd){
this.menuIdEnd = menuIdEnd;
}
/**
* 获取 增加 资源ID
* @return resourceIdIncrement
* 获取 增加 菜单ID
* @return menuIdIncrement
*/
public Long getResourceIdIncrement(){
return this.resourceIdIncrement;
public Long getMenuIdIncrement(){
return this.menuIdIncrement;
}
/**
* 设置 增加 资源ID
* @param resourceIdIncrement
* 设置 增加 菜单ID
* @param menuIdIncrement
*/
public void setResourceIdIncrement(Long resourceIdIncrement){
this.resourceIdIncrement = resourceIdIncrement;
public void setMenuIdIncrement(Long menuIdIncrement){
this.menuIdIncrement = menuIdIncrement;
}
/**
* 获取 资源ID
* @return resourceIdList
* 获取 菜单ID
* @return menuIdList
*/
public List<Long> getResourceIdList(){
return this.resourceIdList;
public List<Long> getMenuIdList(){
return this.menuIdList;
}
/**
* 设置 资源ID
* @param resourceIdList
* 设置 菜单ID
* @param menuIdList
*/
public void setResourceIdList(List<Long> resourceIdList){
this.resourceIdList = resourceIdList;
public void setMenuIdList(List<Long> menuIdList){
this.menuIdList = menuIdList;
}
/**
......@@ -336,47 +336,47 @@ public class RoleAuthQuery extends RoleAuthEntity {
}
/**
* 设置 资源ID
* @param resourceId
* 设置 菜单ID
* @param menuId
*/
public RoleAuthQuery resourceId(Long resourceId){
setResourceId(resourceId);
public RoleAuthQuery menuId(Long menuId){
setMenuId(menuId);
return this;
}
/**
* 设置 开始 资源ID
* @param resourceIdStart
* 设置 开始 菜单ID
* @param menuIdStart
*/
public RoleAuthQuery resourceIdStart(Long resourceIdStart){
this.resourceIdStart = resourceIdStart;
public RoleAuthQuery menuIdStart(Long menuIdStart){
this.menuIdStart = menuIdStart;
return this;
}
/**
* 设置 结束 资源ID
* @param resourceIdEnd
* 设置 结束 菜单ID
* @param menuIdEnd
*/
public RoleAuthQuery resourceIdEnd(Long resourceIdEnd){
this.resourceIdEnd = resourceIdEnd;
public RoleAuthQuery menuIdEnd(Long menuIdEnd){
this.menuIdEnd = menuIdEnd;
return this;
}
/**
* 设置 增加 资源ID
* @param resourceIdIncrement
* 设置 增加 菜单ID
* @param menuIdIncrement
*/
public RoleAuthQuery resourceIdIncrement(Long resourceIdIncrement){
this.resourceIdIncrement = resourceIdIncrement;
public RoleAuthQuery menuIdIncrement(Long menuIdIncrement){
this.menuIdIncrement = menuIdIncrement;
return this;
}
/**
* 设置 资源ID
* @param resourceIdList
* 设置 菜单ID
* @param menuIdList
*/
public RoleAuthQuery resourceIdList(List<Long> resourceIdList){
this.resourceIdList = resourceIdList;
public RoleAuthQuery menuIdList(List<Long> menuIdList){
this.menuIdList = menuIdList;
return this;
}
......
......@@ -7,10 +7,10 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.role.model.vo.RoleVo;
/**
* 角色信息业务实体对象
* 角色信息实体对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleEntity extends RoleVo {
......@@ -21,11 +21,23 @@ public class RoleEntity extends RoleVo {
*/
private String name;
/**
* 角色编码
*/
private String roleCode;
/**
* 角色排序字段
*/
private Integer roleSort;
/**
* 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
*/
private Integer roleType;
/**
* 备注
*/
private String remark;
/**
* 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 角色状态(0.停用,1.启用)
*/
private Integer roleType;
/**
......@@ -51,6 +63,48 @@ public class RoleEntity extends RoleVo {
this.name = name;
}
/**
* 获取 角色编码
* @return String
*/
public String getRoleCode(){
return roleCode;
}
/**
* 设置 角色编码
* @param roleCode
*/
public void setRoleCode(String roleCode){
this.roleCode = roleCode;
}
/**
* 获取 角色排序字段
* @return Integer
*/
public Integer getRoleSort(){
return roleSort;
}
/**
* 设置 角色排序字段
* @param roleSort
*/
public void setRoleSort(Integer roleSort){
this.roleSort = roleSort;
}
/**
* 获取 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @return Integer
*/
public Integer getRoleType(){
return roleType;
}
/**
* 设置 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleType
*/
public void setRoleType(Integer roleType){
this.roleType = roleType;
}
/**
* 获取 备注
* @return String
*/
......@@ -65,14 +119,14 @@ public class RoleEntity extends RoleVo {
this.remark = remark;
}
/**
* 获取 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 获取 角色状态(0.停用,1.启用)
* @return Integer
*/
public Integer getRoleType(){
return roleType;
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 角色状态(0.停用,1.启用)
* @param roleType
*/
public void setRoleType(Integer roleType){
......@@ -115,6 +169,9 @@ public class RoleEntity extends RoleVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",name:").append(getName());
sb.append(",roleCode:").append(getRoleCode());
sb.append(",roleSort:").append(getRoleSort());
sb.append(",roleType:").append(getRoleType());
sb.append(",remark:").append(getRemark());
sb.append(",roleType:").append(getRoleType());
sb.append(",createUserName:").append(getCreateUserName());
......@@ -125,10 +182,16 @@ public class RoleEntity extends RoleVo {
this.name = "";
this.remark = "";
this.roleCode = "";
this.roleSort = 0;
this.roleType = 2;
this.remark = "";
this.roleType = 0;
this.createUserName = "";
}
}
\ No newline at end of file
......@@ -3,10 +3,10 @@ package com.mortals.xhx.module.role.model;
import java.util.List;
import com.mortals.xhx.module.role.model.RoleEntity;
/**
* 角色信息业务查询对象
* 角色信息查询对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleQuery extends RoleEntity {
/** 开始 序号,主键,自增长 */
......@@ -24,19 +24,46 @@ public class RoleQuery extends RoleEntity {
/** 角色名称 */
private List<String> nameList;
/** 角色编码 */
private List<String> roleCodeList;
/** 开始 角色排序字段 */
private Integer roleSortStart;
/** 结束 角色排序字段 */
private Integer roleSortEnd;
/** 增加 角色排序字段 */
private Integer roleSortIncrement;
/** 角色排序字段列表 */
private List <Integer> roleSortList;
/** 开始 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色) */
private Integer roleTypeStart;
/** 结束 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色) */
private Integer roleTypeEnd;
/** 增加 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色) */
private Integer roleTypeIncrement;
/** 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)列表 */
private List <Integer> roleTypeList;
/** 备注 */
private List<String> remarkList;
/** 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
/** 开始 角色状态(0.停用,1.启用) */
private Integer roleTypeStart;
/** 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
/** 结束 角色状态(0.停用,1.启用) */
private Integer roleTypeEnd;
/** 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2 */
/** 增加 角色状态(0.停用,1.启用) */
private Integer roleTypeIncrement;
/** 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2列表 */
/** 角色状态(0.停用,1.启用)列表 */
private List <Integer> roleTypeList;
/** 开始 创建时间 */
......@@ -147,6 +174,149 @@ public class RoleQuery extends RoleEntity {
public void setNameList(List<String> nameList){
this.nameList = nameList;
}
/**
* 获取 角色编码
* @return roleCodeList
*/
public List<String> getRoleCodeList(){
return this.roleCodeList;
}
/**
* 设置 角色编码
* @param roleCodeList
*/
public void setRoleCodeList(List<String> roleCodeList){
this.roleCodeList = roleCodeList;
}
/**
* 获取 开始 角色排序字段
* @return roleSortStart
*/
public Integer getRoleSortStart(){
return this.roleSortStart;
}
/**
* 设置 开始 角色排序字段
* @param roleSortStart
*/
public void setRoleSortStart(Integer roleSortStart){
this.roleSortStart = roleSortStart;
}
/**
* 获取 结束 角色排序字段
* @return $roleSortEnd
*/
public Integer getRoleSortEnd(){
return this.roleSortEnd;
}
/**
* 设置 结束 角色排序字段
* @param roleSortEnd
*/
public void setRoleSortEnd(Integer roleSortEnd){
this.roleSortEnd = roleSortEnd;
}
/**
* 获取 增加 角色排序字段
* @return roleSortIncrement
*/
public Integer getRoleSortIncrement(){
return this.roleSortIncrement;
}
/**
* 设置 增加 角色排序字段
* @param roleSortIncrement
*/
public void setRoleSortIncrement(Integer roleSortIncrement){
this.roleSortIncrement = roleSortIncrement;
}
/**
* 获取 角色排序字段
* @return roleSortList
*/
public List<Integer> getRoleSortList(){
return this.roleSortList;
}
/**
* 设置 角色排序字段
* @param roleSortList
*/
public void setRoleSortList(List<Integer> roleSortList){
this.roleSortList = roleSortList;
}
/**
* 获取 开始 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @return roleTypeStart
*/
public Integer getRoleTypeStart(){
return this.roleTypeStart;
}
/**
* 设置 开始 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeStart
*/
public void setRoleTypeStart(Integer roleTypeStart){
this.roleTypeStart = roleTypeStart;
}
/**
* 获取 结束 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @return $roleTypeEnd
*/
public Integer getRoleTypeEnd(){
return this.roleTypeEnd;
}
/**
* 设置 结束 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeEnd
*/
public void setRoleTypeEnd(Integer roleTypeEnd){
this.roleTypeEnd = roleTypeEnd;
}
/**
* 获取 增加 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @return roleTypeIncrement
*/
public Integer getRoleTypeIncrement(){
return this.roleTypeIncrement;
}
/**
* 设置 增加 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeIncrement
*/
public void setRoleTypeIncrement(Integer roleTypeIncrement){
this.roleTypeIncrement = roleTypeIncrement;
}
/**
* 获取 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @return roleTypeList
*/
public List<Integer> getRoleTypeList(){
return this.roleTypeList;
}
/**
* 设置 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeList
*/
public void setRoleTypeList(List<Integer> roleTypeList){
this.roleTypeList = roleTypeList;
}
/**
* 获取 备注
* @return remarkList
......@@ -163,7 +333,7 @@ public class RoleQuery extends RoleEntity {
this.remarkList = remarkList;
}
/**
* 获取 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 获取 开始 角色状态(0.停用,1.启用)
* @return roleTypeStart
*/
public Integer getRoleTypeStart(){
......@@ -171,7 +341,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 开始 角色状态(0.停用,1.启用)
* @param roleTypeStart
*/
public void setRoleTypeStart(Integer roleTypeStart){
......@@ -179,7 +349,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 获取 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 获取 结束 角色状态(0.停用,1.启用)
* @return $roleTypeEnd
*/
public Integer getRoleTypeEnd(){
......@@ -187,7 +357,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 结束 角色状态(0.停用,1.启用)
* @param roleTypeEnd
*/
public void setRoleTypeEnd(Integer roleTypeEnd){
......@@ -195,7 +365,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 获取 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 获取 增加 角色状态(0.停用,1.启用)
* @return roleTypeIncrement
*/
public Integer getRoleTypeIncrement(){
......@@ -203,7 +373,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 增加 角色状态(0.停用,1.启用)
* @param roleTypeIncrement
*/
public void setRoleTypeIncrement(Integer roleTypeIncrement){
......@@ -211,7 +381,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 获取 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 获取 角色状态(0.停用,1.启用)
* @return roleTypeList
*/
public List<Integer> getRoleTypeList(){
......@@ -219,7 +389,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 角色状态(0.停用,1.启用)
* @param roleTypeList
*/
public void setRoleTypeList(List<Integer> roleTypeList){
......@@ -402,6 +572,115 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 角色编码
* @param roleCode
*/
public RoleQuery roleCode(String roleCode){
setRoleCode(roleCode);
return this;
}
/**
* 设置 角色编码
* @param roleCodeList
*/
public RoleQuery roleCodeList(List<String> roleCodeList){
this.roleCodeList = roleCodeList;
return this;
}
/**
* 设置 角色排序字段
* @param roleSort
*/
public RoleQuery roleSort(Integer roleSort){
setRoleSort(roleSort);
return this;
}
/**
* 设置 开始 角色排序字段
* @param roleSortStart
*/
public RoleQuery roleSortStart(Integer roleSortStart){
this.roleSortStart = roleSortStart;
return this;
}
/**
* 设置 结束 角色排序字段
* @param roleSortEnd
*/
public RoleQuery roleSortEnd(Integer roleSortEnd){
this.roleSortEnd = roleSortEnd;
return this;
}
/**
* 设置 增加 角色排序字段
* @param roleSortIncrement
*/
public RoleQuery roleSortIncrement(Integer roleSortIncrement){
this.roleSortIncrement = roleSortIncrement;
return this;
}
/**
* 设置 角色排序字段
* @param roleSortList
*/
public RoleQuery roleSortList(List<Integer> roleSortList){
this.roleSortList = roleSortList;
return this;
}
/**
* 设置 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleType
*/
public RoleQuery roleType(Integer roleType){
setRoleType(roleType);
return this;
}
/**
* 设置 开始 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeStart
*/
public RoleQuery roleTypeStart(Integer roleTypeStart){
this.roleTypeStart = roleTypeStart;
return this;
}
/**
* 设置 结束 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeEnd
*/
public RoleQuery roleTypeEnd(Integer roleTypeEnd){
this.roleTypeEnd = roleTypeEnd;
return this;
}
/**
* 设置 增加 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeIncrement
*/
public RoleQuery roleTypeIncrement(Integer roleTypeIncrement){
this.roleTypeIncrement = roleTypeIncrement;
return this;
}
/**
* 设置 角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
* @param roleTypeList
*/
public RoleQuery roleTypeList(List<Integer> roleTypeList){
this.roleTypeList = roleTypeList;
return this;
}
/**
* 设置 备注
* @param remark
......@@ -421,7 +700,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 角色状态(0.停用,1.启用)
* @param roleType
*/
public RoleQuery roleType(Integer roleType){
......@@ -430,7 +709,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 开始 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 开始 角色状态(0.停用,1.启用)
* @param roleTypeStart
*/
public RoleQuery roleTypeStart(Integer roleTypeStart){
......@@ -439,7 +718,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 结束 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 结束 角色状态(0.停用,1.启用)
* @param roleTypeEnd
*/
public RoleQuery roleTypeEnd(Integer roleTypeEnd){
......@@ -448,7 +727,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 增加 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 增加 角色状态(0.停用,1.启用)
* @param roleTypeIncrement
*/
public RoleQuery roleTypeIncrement(Integer roleTypeIncrement){
......@@ -457,7 +736,7 @@ public class RoleQuery extends RoleEntity {
}
/**
* 设置 角色类型,0:系统内置角色(不可删除),1:默认系统角色,2:普通角色,默认2
* 设置 角色状态(0.停用,1.启用)
* @param roleTypeList
*/
public RoleQuery roleTypeList(List<Integer> roleTypeList){
......
......@@ -7,10 +7,10 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.role.model.vo.RoleUserVo;
/**
* 角色用户业务实体对象
* 角色用户关联实体对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleUserEntity extends RoleUserVo {
......
......@@ -3,10 +3,10 @@ package com.mortals.xhx.module.role.model;
import java.util.List;
import com.mortals.xhx.module.role.model.RoleUserEntity;
/**
* 角色用户业务查询对象
* 角色用户关联查询对象
*
* @author zxfei
* @date 2022-05-25
* @date 2022-06-02
*/
public class RoleUserQuery extends RoleUserEntity {
/** 开始 序号,主键,自增长 */
......
......@@ -27,12 +27,12 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
this.dao.delete(condition);
List<RoleAuthEntity> list = new ArrayList<>();
for (Long sourceId : query.getResourceIdList()) {
RoleAuthEntity entity = new RoleAuthEntity();
entity.setRoleId(roleId);
entity.setResourceId(sourceId);
list.add(entity);
}
// for (Long sourceId : query.getResourceIdList()) {
// RoleAuthEntity entity = new RoleAuthEntity();
// entity.setRoleId(roleId);
// entity.setResourceId(sourceId);
// list.add(entity);
// }
this.dao.insertBatch(list);
}
......
......@@ -29,7 +29,6 @@ public class RoleAuthController extends BaseCRUDJsonBodyMappingController<RoleAu
private ParamService paramService;
public RoleAuthController(){
super.setFormClass(RoleAuthForm.class);
super.setModuleDesc( "角色资源权限业务");
}
......
package com.mortals.xhx.module.role.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.role.model.RoleAuthEntity;
import com.mortals.xhx.module.role.model.RoleAuthQuery;
/**
* RoleAuth
*
* 角色资源权限业务 Form
*
* @author zxfei
* @date 2022-05-25
*/
public class RoleAuthForm extends BaseCRUDFormLong<RoleAuthEntity> {
private RoleAuthEntity entity = new RoleAuthEntity();
private RoleAuthQuery query = new RoleAuthQuery();
public RoleAuthForm(){
}
@Override
public RoleAuthEntity getEntity() {
return entity;
}
public void setRoleAuth(RoleAuthEntity entity) {
this.entity = entity;
}
@Override
public RoleAuthQuery getQuery() {
return query;
}
public void setQuery(RoleAuthQuery query) {
this.query = query;
}
}
\ No newline at end of file
......@@ -46,7 +46,6 @@ public class RoleController extends BaseCRUDJsonBodyMappingController<RoleServic
private ParamService paramService;
public RoleController() {
super.setFormClass(RoleForm.class);
super.setModuleDesc("角色信息业务");
}
......
package com.mortals.xhx.module.role.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.role.model.RoleEntity;
import com.mortals.xhx.module.role.model.RoleQuery;
/**
* Role
*
* 角色信息业务 Form
*
* @author zxfei
* @date 2022-05-25
*/
public class RoleForm extends BaseCRUDFormLong<RoleEntity> {
private RoleEntity entity = new RoleEntity();
private RoleQuery query = new RoleQuery();
public RoleForm(){
}
@Override
public RoleEntity getEntity() {
return entity;
}
public void setRole(RoleEntity entity) {
this.entity = entity;
}
@Override
public RoleQuery getQuery() {
return query;
}
public void setQuery(RoleQuery query) {
this.query = query;
}
}
\ No newline at end of file
......@@ -46,7 +46,6 @@ public class RoleUserController extends BaseCRUDJsonBodyMappingController<RoleUs
private ParamService paramService;
public RoleUserController() {
super.setFormClass(RoleUserForm.class);
super.setModuleDesc("角色用户业务");
}
......
package com.mortals.xhx.module.role.web;
import com.mortals.framework.web.BaseCRUDFormLong;
import com.mortals.xhx.module.role.model.RoleUserEntity;
import com.mortals.xhx.module.role.model.RoleUserQuery;
/**
* RoleUser
*
* 角色用户业务 Form
*
* @author zxfei
* @date 2022-05-25
*/
public class RoleUserForm extends BaseCRUDFormLong<RoleUserEntity> {
private RoleUserEntity entity = new RoleUserEntity();
private RoleUserQuery query = new RoleUserQuery();
public RoleUserForm(){
}
@Override
public RoleUserEntity getEntity() {
return entity;
}
public void setRoleUser(RoleUserEntity entity) {
this.entity = entity;
}
@Override
public RoleUserQuery getQuery() {
return query;
}
public void setQuery(RoleUserQuery query) {
this.query = query;
}
}
\ No newline at end of file
......@@ -3,19 +3,17 @@ package com.mortals.xhx.module.user.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.framework.service.IUser;
import com.mortals.xhx.module.user.model.vo.UserVo;
/**
* 用户信息业务实体对象
*
* @author zxfei
* @date 2022-06-01
*/
* 用户信息业务实体对象
*
* @author zxfei
* @date 2022-06-02
*/
public class UserEntity extends UserVo implements IUser {
private static final long serialVersionUID = 1L;
......@@ -27,12 +25,10 @@ public class UserEntity extends UserVo implements IUser {
/**
* 登录密码,使用md5双次加密
*/
@JSONField(serialize=false)
private String loginPwd;
/**
* 登录限制地址,多个IP地址用逗号分隔,可以使用IP段匹配,如:172.17.*非空:则只能该值内的IP可以登录
*/
@JSONField(serialize=false)
private String loginLimitAddress;
/**
* 用户名
......@@ -66,34 +62,21 @@ public class UserEntity extends UserVo implements IUser {
* 所属区域code,多个逗号分隔
*/
private String areaCodes;
/**
* 拥有系统模块,多个逗号分隔
*/
private String modeIds;
/**
* 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
*/
@JSONField(serialize=false)
private Integer status;
/**
* 客户ID
*/
@JSONField(serialize=false)
private Long customerId;
/**
* 创建用户名称
*/
@JSONField(serialize=false)
private String createUserName;
/**
* 最后一次登录时间
*/
@JSONField(serialize=false)
private Date lastLoginTime;
/**
* 最后一次登录地址
*/
@JSONField(serialize=false)
private String lastLoginAddress;
......@@ -241,6 +224,27 @@ public class UserEntity extends UserVo implements IUser {
public void setUserType(Integer userType){
this.userType = userType;
}
@Override
public Long getDeptId() {
return null;
}
@Override
public String getDeptName() {
return null;
}
@Override
public Long getCustomerId() {
return null;
}
@Override
public Long getSiteId() {
return null;
}
/**
* 获取 所属站点id,多个逗号分隔
* @return String
......@@ -280,20 +284,6 @@ public class UserEntity extends UserVo implements IUser {
public void setAreaCodes(String areaCodes){
this.areaCodes = areaCodes;
}
/**
* 获取 拥有系统模块,多个逗号分隔
* @return String
*/
public String getModeIds(){
return modeIds;
}
/**
* 设置 拥有系统模块,多个逗号分隔
* @param modeIds
*/
public void setModeIds(String modeIds){
this.modeIds = modeIds;
}
/**
* 获取 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
* @return Integer
......@@ -308,37 +298,6 @@ public class UserEntity extends UserVo implements IUser {
public void setStatus(Integer status){
this.status = status;
}
@Override
public Long getDeptId() {
return null;
}
@Override
public String getDeptName() {
return null;
}
/**
* 获取 客户ID
* @return Long
*/
public Long getCustomerId(){
return customerId;
}
@Override
public Long getSiteId() {
return null;
}
/**
* 设置 客户ID
* @param customerId
*/
public void setCustomerId(Long customerId){
this.customerId = customerId;
}
/**
* 获取 创建用户名称
* @return String
......@@ -382,6 +341,9 @@ public class UserEntity extends UserVo implements IUser {
this.lastLoginAddress = lastLoginAddress;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -411,9 +373,7 @@ public class UserEntity extends UserVo implements IUser {
sb.append(",userType:").append(getUserType());
sb.append(",siteIds:").append(getSiteIds());
sb.append(",areaCodes:").append(getAreaCodes());
sb.append(",modeIds:").append(getModeIds());
sb.append(",status:").append(getStatus());
sb.append(",customerId:").append(getCustomerId());
sb.append(",createUserName:").append(getCreateUserName());
sb.append(",lastLoginTime:").append(getLastLoginTime());
sb.append(",lastLoginAddress:").append(getLastLoginAddress());
......@@ -444,12 +404,8 @@ public class UserEntity extends UserVo implements IUser {
this.areaCodes = "";
this.modeIds = "";
this.status = 1;
this.customerId = null;
this.createUserName = "";
this.lastLoginTime = null;
......
......@@ -4,11 +4,11 @@ import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.user.model.UserEntity;
/**
* 用户信息业务查询对象
*
* @author zxfei
* @date 2022-06-01
*/
* 用户信息业务查询对象
*
* @author zxfei
* @date 2022-06-02
*/
public class UserQuery extends UserEntity {
/** 开始 用户ID,主键,自增长 */
private Long idStart;
......@@ -64,9 +64,6 @@ public class UserQuery extends UserEntity {
/** 所属区域code,多个逗号分隔 */
private List<String> areaCodesList;
/** 拥有系统模块,多个逗号分隔 */
private List<String> modeIdsList;
/** 开始 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职) */
private Integer statusStart;
......@@ -79,18 +76,6 @@ public class UserQuery extends UserEntity {
/** 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)列表 */
private List <Integer> statusList;
/** 开始 客户ID */
private Long customerIdStart;
/** 结束 客户ID */
private Long customerIdEnd;
/** 增加 客户ID */
private Long customerIdIncrement;
/** 客户ID列表 */
private List <Long> customerIdList;
/** 开始 创建时间 */
private String createTimeStart;
......@@ -407,21 +392,6 @@ public class UserQuery extends UserEntity {
public void setAreaCodesList(List<String> areaCodesList){
this.areaCodesList = areaCodesList;
}
/**
* 获取 拥有系统模块,多个逗号分隔
* @return modeIdsList
*/
public List<String> getModeIdsList(){
return this.modeIdsList;
}
/**
* 设置 拥有系统模块,多个逗号分隔
* @param modeIdsList
*/
public void setModeIdsList(List<String> modeIdsList){
this.modeIdsList = modeIdsList;
}
/**
* 获取 开始 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
* @return statusStart
......@@ -486,70 +456,6 @@ public class UserQuery extends UserEntity {
this.statusList = statusList;
}
/**
* 获取 开始 客户ID
* @return customerIdStart
*/
public Long getCustomerIdStart(){
return this.customerIdStart;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public void setCustomerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
}
/**
* 获取 结束 客户ID
* @return $customerIdEnd
*/
public Long getCustomerIdEnd(){
return this.customerIdEnd;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
public void setCustomerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
}
/**
* 获取 增加 客户ID
* @return customerIdIncrement
*/
public Long getCustomerIdIncrement(){
return this.customerIdIncrement;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public void setCustomerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
}
/**
* 获取 客户ID
* @return customerIdList
*/
public List<Long> getCustomerIdList(){
return this.customerIdList;
}
/**
* 设置 客户ID
* @param customerIdList
*/
public void setCustomerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
......@@ -988,25 +894,6 @@ public class UserQuery extends UserEntity {
return this;
}
/**
* 设置 拥有系统模块,多个逗号分隔
* @param modeIds
*/
public UserQuery modeIds(String modeIds){
setModeIds(modeIds);
return this;
}
/**
* 设置 拥有系统模块,多个逗号分隔
* @param modeIdsList
*/
public UserQuery modeIdsList(List<String> modeIdsList){
this.modeIdsList = modeIdsList;
return this;
}
/**
* 设置 用户状态(0.停用,1.正常,2.冻结,3.销户,4.离职)
* @param status
......@@ -1052,51 +939,6 @@ public class UserQuery extends UserEntity {
return this;
}
/**
* 设置 客户ID
* @param customerId
*/
public UserQuery customerId(Long customerId){
setCustomerId(customerId);
return this;
}
/**
* 设置 开始 客户ID
* @param customerIdStart
*/
public UserQuery customerIdStart(Long customerIdStart){
this.customerIdStart = customerIdStart;
return this;
}
/**
* 设置 结束 客户ID
* @param customerIdEnd
*/
public UserQuery customerIdEnd(Long customerIdEnd){
this.customerIdEnd = customerIdEnd;
return this;
}
/**
* 设置 增加 客户ID
* @param customerIdIncrement
*/
public UserQuery customerIdIncrement(Long customerIdIncrement){
this.customerIdIncrement = customerIdIncrement;
return this;
}
/**
* 设置 客户ID
* @param customerIdList
*/
public UserQuery customerIdList(List<Long> customerIdList){
this.customerIdList = customerIdList;
return this;
}
/**
* 设置 创建用户
......
......@@ -2,8 +2,6 @@ package com.mortals.xhx.module.user.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.framework.service.IUser;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.user.model.UserEntity;
import lombok.Data;
import java.util.ArrayList;
......@@ -42,7 +40,7 @@ public class UserVo extends BaseEntityLong {
/**
* 模块列表
*/
private List<ModelEntity> modelList;
//private List<ModelEntity> modelList;
/**
* 菜单列表
......
package com.mortals.xhx.module.user.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.framework.service.IUser;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.user.model.UserEntity;
import java.util.List;
......@@ -92,12 +92,5 @@ public interface UserService extends ICRUDService<UserEntity,Long>{
/**
* 通过登录用户获取模块
*
* @param userId
* @return
*/
List<ModelEntity> findModelList(Long userId);
}
\ No newline at end of file
package com.mortals.xhx.module.user.service.impl;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.IUser;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.menu.model.MenuEntity;
import com.mortals.xhx.module.menu.service.MenuService;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.resource.model.ResourceEntity;
import com.mortals.xhx.module.resource.service.ResourceService;
import com.mortals.xhx.module.user.model.UserQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.user.dao.UserDao;
import com.mortals.xhx.module.user.model.UserEntity;
import com.mortals.xhx.module.user.model.UserQuery;
import com.mortals.xhx.module.user.service.UserService;
import org.springframework.util.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
* UserService
......@@ -39,10 +31,6 @@ import java.util.stream.Collectors;
public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity, Long> implements UserService {
@Autowired
private MenuService menuService;
@Autowired
private ResourceService resourceService;
@Autowired
private ModelService modelService;
private void doHandlerUser(UserEntity entity) throws AppException {
if (StringUtils.isNotEmpty(entity.getLoginPwd())) {
......@@ -143,7 +131,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
public List<MenuEntity> findOutlookBarList(IUser user) {
Set<String> urls = new HashSet<String>();
if (!user.isAdmin()) {
List<ResourceEntity> resList = resourceService.findListByUserId(user.getId());
/* List<ResourceEntity> resList = resourceService.findListByUserId(user.getId());
for (ResourceEntity res : resList) {
String url = res.getUrl();
if (StringUtils.isEmpty(url)) {
......@@ -151,7 +139,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
}
url = url.replaceAll(",", ",");
urls.addAll(StringUtils.converStr2Set(url));
}
}*/
}
Set<Long> authIds = new HashSet<Long>();
Map<Long, MenuEntity> menuMap = new HashMap<Long, MenuEntity>();
......@@ -235,19 +223,5 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
return true;
}
@Override
public List<ModelEntity> findModelList(Long userId) {
UserEntity userEntity = this.get(userId);
if (!ObjectUtils.isEmpty(userEntity)) {
List<Long> modeIdList = Arrays.asList(userEntity.getModeIds().split(",")).stream().filter(f -> !ObjectUtils.isEmpty(f)).map(Long::parseLong).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(modeIdList)) {
ModelQuery modelQuery = new ModelQuery();
modelQuery.setIdList(modeIdList);
List<ModelEntity> modelEntities = modelService.find(modelQuery);
return modelEntities == null ? new ArrayList<>() : modelEntities;
}
}
return new ArrayList<>();
}
}
\ No newline at end of file
......@@ -9,17 +9,15 @@
<result property="name" column="name" />
<result property="url" column="url" />
<result property="parentId" column="parentId" />
<result property="orderId" column="orderId" />
<result property="status" column="status" />
<result property="linkType" column="linkType" />
<result property="groupId" column="groupId" />
<result property="groupName" column="groupName" />
<result property="imgPath" column="imgPath" />
<result property="buttonImgPath" column="buttonImgPath" />
<result property="imgCommPath" column="imgCommPath" />
<result property="commMenu" column="commMenu" />
<result property="visible" column="visible" />
<result property="menuType" column="menuType" />
<result property="status" column="status" />
<result property="authType" column="authType" />
<result property="orderId" column="orderId" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="createUserName" column="createUserName" />
......@@ -42,21 +40,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('parentId') or colPickMode == 1 and data.containsKey('parentId')))">
a.parentId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderId') or colPickMode == 1 and data.containsKey('orderId')))">
a.orderId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
a.status,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('linkType') or colPickMode == 1 and data.containsKey('linkType')))">
a.linkType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupId') or colPickMode == 1 and data.containsKey('groupId')))">
a.groupId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupName') or colPickMode == 1 and data.containsKey('groupName')))">
a.groupName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgPath') or colPickMode == 1 and data.containsKey('imgPath')))">
a.imgPath,
</if>
......@@ -66,15 +52,21 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('imgCommPath') or colPickMode == 1 and data.containsKey('imgCommPath')))">
a.imgCommPath,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('commMenu') or colPickMode == 1 and data.containsKey('commMenu')))">
a.commMenu,
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('visible') or colPickMode == 1 and data.containsKey('visible')))">
a.visible,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('menuType') or colPickMode == 1 and data.containsKey('menuType')))">
a.menuType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
a.status,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authType') or colPickMode == 1 and data.containsKey('authType')))">
a.authType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderId') or colPickMode == 1 and data.containsKey('orderId')))">
a.orderId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
......@@ -89,18 +81,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_menu
(name,url,parentId,orderId,status,linkType,groupId,groupName,imgPath,buttonImgPath,imgCommPath,commMenu,menuType,authType,createTime,createUserId,createUserName)
(name,url,parentId,linkType,imgPath,buttonImgPath,imgCommPath,visible,menuType,status,authType,orderId,createTime,createUserId,createUserName)
VALUES
(#{name},#{url},#{parentId},#{orderId},#{status},#{linkType},#{groupId},#{groupName},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{menuType},#{authType},#{createTime},#{createUserId},#{createUserName})
(#{name},#{url},#{parentId},#{linkType},#{imgPath},#{buttonImgPath},#{imgCommPath},#{visible},#{menuType},#{status},#{authType},#{orderId},#{createTime},#{createUserId},#{createUserName})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_menu
(name,url,parentId,orderId,status,linkType,groupId,groupName,imgPath,buttonImgPath,imgCommPath,commMenu,menuType,authType,createTime,createUserId,createUserName)
(name,url,parentId,linkType,imgPath,buttonImgPath,imgCommPath,visible,menuType,status,authType,orderId,createTime,createUserId,createUserName)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.url},#{item.parentId},#{item.orderId},#{item.status},#{item.linkType},#{item.groupId},#{item.groupName},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.menuType},#{item.authType},#{item.createTime},#{item.createUserId},#{item.createUserName})
(#{item.name},#{item.url},#{item.parentId},#{item.linkType},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.visible},#{item.menuType},#{item.status},#{item.authType},#{item.orderId},#{item.createTime},#{item.createUserId},#{item.createUserName})
</foreach>
</insert>
......@@ -122,33 +114,12 @@
<if test="(colPickMode==0 and data.containsKey('parentIdIncrement')) or (colPickMode==1 and !data.containsKey('parentIdIncrement'))">
a.parentId=ifnull(a.parentId,0) + #{data.parentIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('orderId')) or (colPickMode==1 and !data.containsKey('orderId'))">
a.orderId=#{data.orderId},
</if>
<if test="(colPickMode==0 and data.containsKey('orderIdIncrement')) or (colPickMode==1 and !data.containsKey('orderIdIncrement'))">
a.orderId=ifnull(a.orderId,0) + #{data.orderIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))">
a.status=#{data.status},
</if>
<if test="(colPickMode==0 and data.containsKey('statusIncrement')) or (colPickMode==1 and !data.containsKey('statusIncrement'))">
a.status=ifnull(a.status,0) + #{data.statusIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('linkType')) or (colPickMode==1 and !data.containsKey('linkType'))">
a.linkType=#{data.linkType},
</if>
<if test="(colPickMode==0 and data.containsKey('linkTypeIncrement')) or (colPickMode==1 and !data.containsKey('linkTypeIncrement'))">
a.linkType=ifnull(a.linkType,0) + #{data.linkTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('groupId')) or (colPickMode==1 and !data.containsKey('groupId'))">
a.groupId=#{data.groupId},
</if>
<if test="(colPickMode==0 and data.containsKey('groupIdIncrement')) or (colPickMode==1 and !data.containsKey('groupIdIncrement'))">
a.groupId=ifnull(a.groupId,0) + #{data.groupIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('groupName')) or (colPickMode==1 and !data.containsKey('groupName'))">
a.groupName=#{data.groupName},
</if>
<if test="(colPickMode==0 and data.containsKey('imgPath')) or (colPickMode==1 and !data.containsKey('imgPath'))">
a.imgPath=#{data.imgPath},
</if>
......@@ -158,11 +129,11 @@
<if test="(colPickMode==0 and data.containsKey('imgCommPath')) or (colPickMode==1 and !data.containsKey('imgCommPath'))">
a.imgCommPath=#{data.imgCommPath},
</if>
<if test="(colPickMode==0 and data.containsKey('commMenu')) or (colPickMode==1 and !data.containsKey('commMenu'))">
a.commMenu=#{data.commMenu},
<if test="(colPickMode==0 and data.containsKey('visible')) or (colPickMode==1 and !data.containsKey('visible'))">
a.visible=#{data.visible},
</if>
<if test="(colPickMode==0 and data.containsKey('commMenuIncrement')) or (colPickMode==1 and !data.containsKey('commMenuIncrement'))">
a.commMenu=ifnull(a.commMenu,0) + #{data.commMenuIncrement},
<if test="(colPickMode==0 and data.containsKey('visibleIncrement')) or (colPickMode==1 and !data.containsKey('visibleIncrement'))">
a.visible=ifnull(a.visible,0) + #{data.visibleIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('menuType')) or (colPickMode==1 and !data.containsKey('menuType'))">
a.menuType=#{data.menuType},
......@@ -170,12 +141,24 @@
<if test="(colPickMode==0 and data.containsKey('menuTypeIncrement')) or (colPickMode==1 and !data.containsKey('menuTypeIncrement'))">
a.menuType=ifnull(a.menuType,0) + #{data.menuTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))">
a.status=#{data.status},
</if>
<if test="(colPickMode==0 and data.containsKey('statusIncrement')) or (colPickMode==1 and !data.containsKey('statusIncrement'))">
a.status=ifnull(a.status,0) + #{data.statusIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('authType')) or (colPickMode==1 and !data.containsKey('authType'))">
a.authType=#{data.authType},
</if>
<if test="(colPickMode==0 and data.containsKey('authTypeIncrement')) or (colPickMode==1 and !data.containsKey('authTypeIncrement'))">
a.authType=ifnull(a.authType,0) + #{data.authTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('orderId')) or (colPickMode==1 and !data.containsKey('orderId'))">
a.orderId=#{data.orderId},
</if>
<if test="(colPickMode==0 and data.containsKey('orderIdIncrement')) or (colPickMode==1 and !data.containsKey('orderIdIncrement'))">
a.orderId=ifnull(a.orderId,0) + #{data.orderIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
......@@ -226,30 +209,6 @@
</choose>
</foreach>
</trim>
<trim prefix="orderId=(case" suffix="ELSE orderId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('orderId')) or (colPickMode==1 and !item.containsKey('orderId'))">
when a.id=#{item.id} then #{item.orderId}
</when>
<when test="(colPickMode==0 and item.containsKey('orderIdIncrement')) or (colPickMode==1 and !item.containsKey('orderIdIncrement'))">
when a.id=#{item.id} then ifnull(a.orderId,0) + #{item.orderIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="status=(case" suffix="ELSE status end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('status')) or (colPickMode==1 and !item.containsKey('status'))">
when a.id=#{item.id} then #{item.status}
</when>
<when test="(colPickMode==0 and item.containsKey('statusIncrement')) or (colPickMode==1 and !item.containsKey('statusIncrement'))">
when a.id=#{item.id} then ifnull(a.status,0) + #{item.statusIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="linkType=(case" suffix="ELSE linkType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -262,25 +221,6 @@
</choose>
</foreach>
</trim>
<trim prefix="groupId=(case" suffix="ELSE groupId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('groupId')) or (colPickMode==1 and !item.containsKey('groupId'))">
when a.id=#{item.id} then #{item.groupId}
</when>
<when test="(colPickMode==0 and item.containsKey('groupIdIncrement')) or (colPickMode==1 and !item.containsKey('groupIdIncrement'))">
when a.id=#{item.id} then ifnull(a.groupId,0) + #{item.groupIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="groupName=(case" suffix="ELSE groupName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('groupName')) or (colPickMode==1 and !item.containsKey('groupName'))">
when a.id=#{item.id} then #{item.groupName}
</if>
</foreach>
</trim>
<trim prefix="imgPath=(case" suffix="ELSE imgPath end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('imgPath')) or (colPickMode==1 and !item.containsKey('imgPath'))">
......@@ -302,14 +242,14 @@
</if>
</foreach>
</trim>
<trim prefix="commMenu=(case" suffix="ELSE commMenu end),">
<trim prefix="visible=(case" suffix="ELSE visible end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('commMenu')) or (colPickMode==1 and !item.containsKey('commMenu'))">
when a.id=#{item.id} then #{item.commMenu}
<when test="(colPickMode==0 and item.containsKey('visible')) or (colPickMode==1 and !item.containsKey('visible'))">
when a.id=#{item.id} then #{item.visible}
</when>
<when test="(colPickMode==0 and item.containsKey('commMenuIncrement')) or (colPickMode==1 and !item.containsKey('commMenuIncrement'))">
when a.id=#{item.id} then ifnull(a.commMenu,0) + #{item.commMenuIncrement}
<when test="(colPickMode==0 and item.containsKey('visibleIncrement')) or (colPickMode==1 and !item.containsKey('visibleIncrement'))">
when a.id=#{item.id} then ifnull(a.visible,0) + #{item.visibleIncrement}
</when>
</choose>
</foreach>
......@@ -326,6 +266,18 @@
</choose>
</foreach>
</trim>
<trim prefix="status=(case" suffix="ELSE status end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('status')) or (colPickMode==1 and !item.containsKey('status'))">
when a.id=#{item.id} then #{item.status}
</when>
<when test="(colPickMode==0 and item.containsKey('statusIncrement')) or (colPickMode==1 and !item.containsKey('statusIncrement'))">
when a.id=#{item.id} then ifnull(a.status,0) + #{item.statusIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="authType=(case" suffix="ELSE authType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -338,6 +290,18 @@
</choose>
</foreach>
</trim>
<trim prefix="orderId=(case" suffix="ELSE orderId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('orderId')) or (colPickMode==1 and !item.containsKey('orderId'))">
when a.id=#{item.id} then #{item.orderId}
</when>
<when test="(colPickMode==0 and item.containsKey('orderIdIncrement')) or (colPickMode==1 and !item.containsKey('orderIdIncrement'))">
when a.id=#{item.id} then ifnull(a.orderId,0) + #{item.orderIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
......@@ -537,48 +501,6 @@
${_conditionType_} a.parentId <![CDATA[ <= ]]> #{${_conditionParam_}.parentIdEnd}
</if>
<if test="conditionParamRef.containsKey('orderId')">
<if test="conditionParamRef.orderId != null ">
${_conditionType_} a.orderId = #{${_conditionParam_}.orderId}
</if>
<if test="conditionParamRef.orderId == null">
${_conditionType_} a.orderId is null
</if>
</if>
<if test="conditionParamRef.containsKey('orderIdList')">
${_conditionType_} a.orderId in
<foreach collection="conditionParamRef.orderIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderIdStart') and conditionParamRef.orderIdStart != null">
${_conditionType_} a.orderId <![CDATA[ >= ]]> #{${_conditionParam_}.orderIdStart}
</if>
<if test="conditionParamRef.containsKey('orderIdEnd') and conditionParamRef.orderIdEnd != null">
${_conditionType_} a.orderId <![CDATA[ <= ]]> #{${_conditionParam_}.orderIdEnd}
</if>
<if test="conditionParamRef.containsKey('status')">
<if test="conditionParamRef.status != null ">
${_conditionType_} a.status = #{${_conditionParam_}.status}
</if>
<if test="conditionParamRef.status == null">
${_conditionType_} a.status is null
</if>
</if>
<if test="conditionParamRef.containsKey('statusList')">
${_conditionType_} a.status in
<foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null">
${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart}
</if>
<if test="conditionParamRef.containsKey('statusEnd') and conditionParamRef.statusEnd != null">
${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd}
</if>
<if test="conditionParamRef.containsKey('linkType')">
<if test="conditionParamRef.linkType != null ">
${_conditionType_} a.linkType = #{${_conditionParam_}.linkType}
......@@ -600,42 +522,6 @@
${_conditionType_} a.linkType <![CDATA[ <= ]]> #{${_conditionParam_}.linkTypeEnd}
</if>
<if test="conditionParamRef.containsKey('groupId')">
<if test="conditionParamRef.groupId != null ">
${_conditionType_} a.groupId = #{${_conditionParam_}.groupId}
</if>
<if test="conditionParamRef.groupId == null">
${_conditionType_} a.groupId is null
</if>
</if>
<if test="conditionParamRef.containsKey('groupIdList')">
${_conditionType_} a.groupId in
<foreach collection="conditionParamRef.groupIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('groupIdStart') and conditionParamRef.groupIdStart != null">
${_conditionType_} a.groupId <![CDATA[ >= ]]> #{${_conditionParam_}.groupIdStart}
</if>
<if test="conditionParamRef.containsKey('groupIdEnd') and conditionParamRef.groupIdEnd != null">
${_conditionType_} a.groupId <![CDATA[ <= ]]> #{${_conditionParam_}.groupIdEnd}
</if>
<if test="conditionParamRef.containsKey('groupName')">
<if test="conditionParamRef.groupName != null and conditionParamRef.groupName != ''">
${_conditionType_} a.groupName like #{${_conditionParam_}.groupName}
</if>
<if test="conditionParamRef.groupName == null">
${_conditionType_} a.groupName is null
</if>
</if>
<if test="conditionParamRef.containsKey('groupNameList')">
${_conditionType_} a.groupName in
<foreach collection="conditionParamRef.groupNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('imgPath')">
<if test="conditionParamRef.imgPath != null and conditionParamRef.imgPath != ''">
......@@ -681,25 +567,25 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('commMenu')">
<if test="conditionParamRef.commMenu != null ">
${_conditionType_} a.commMenu = #{${_conditionParam_}.commMenu}
<if test="conditionParamRef.containsKey('visible')">
<if test="conditionParamRef.visible != null ">
${_conditionType_} a.visible = #{${_conditionParam_}.visible}
</if>
<if test="conditionParamRef.commMenu == null">
${_conditionType_} a.commMenu is null
<if test="conditionParamRef.visible == null">
${_conditionType_} a.visible is null
</if>
</if>
<if test="conditionParamRef.containsKey('commMenuList')">
${_conditionType_} a.commMenu in
<foreach collection="conditionParamRef.commMenuList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('visibleList')">
${_conditionType_} a.visible in
<foreach collection="conditionParamRef.visibleList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('commMenuStart') and conditionParamRef.commMenuStart != null">
${_conditionType_} a.commMenu <![CDATA[ >= ]]> #{${_conditionParam_}.commMenuStart}
<if test="conditionParamRef.containsKey('visibleStart') and conditionParamRef.visibleStart != null">
${_conditionType_} a.visible <![CDATA[ >= ]]> #{${_conditionParam_}.visibleStart}
</if>
<if test="conditionParamRef.containsKey('commMenuEnd') and conditionParamRef.commMenuEnd != null">
${_conditionType_} a.commMenu <![CDATA[ <= ]]> #{${_conditionParam_}.commMenuEnd}
<if test="conditionParamRef.containsKey('visibleEnd') and conditionParamRef.visibleEnd != null">
${_conditionType_} a.visible <![CDATA[ <= ]]> #{${_conditionParam_}.visibleEnd}
</if>
<if test="conditionParamRef.containsKey('menuType')">
......@@ -723,6 +609,27 @@
${_conditionType_} a.menuType <![CDATA[ <= ]]> #{${_conditionParam_}.menuTypeEnd}
</if>
<if test="conditionParamRef.containsKey('status')">
<if test="conditionParamRef.status != null ">
${_conditionType_} a.status = #{${_conditionParam_}.status}
</if>
<if test="conditionParamRef.status == null">
${_conditionType_} a.status is null
</if>
</if>
<if test="conditionParamRef.containsKey('statusList')">
${_conditionType_} a.status in
<foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null">
${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart}
</if>
<if test="conditionParamRef.containsKey('statusEnd') and conditionParamRef.statusEnd != null">
${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd}
</if>
<if test="conditionParamRef.containsKey('authType')">
<if test="conditionParamRef.authType != null ">
${_conditionType_} a.authType = #{${_conditionParam_}.authType}
......@@ -744,6 +651,27 @@
${_conditionType_} a.authType <![CDATA[ <= ]]> #{${_conditionParam_}.authTypeEnd}
</if>
<if test="conditionParamRef.containsKey('orderId')">
<if test="conditionParamRef.orderId != null ">
${_conditionType_} a.orderId = #{${_conditionParam_}.orderId}
</if>
<if test="conditionParamRef.orderId == null">
${_conditionType_} a.orderId is null
</if>
</if>
<if test="conditionParamRef.containsKey('orderIdList')">
${_conditionType_} a.orderId in
<foreach collection="conditionParamRef.orderIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('orderIdStart') and conditionParamRef.orderIdStart != null">
${_conditionType_} a.orderId <![CDATA[ >= ]]> #{${_conditionParam_}.orderIdStart}
</if>
<if test="conditionParamRef.containsKey('orderIdEnd') and conditionParamRef.orderIdEnd != null">
${_conditionType_} a.orderId <![CDATA[ <= ]]> #{${_conditionParam_}.orderIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -828,31 +756,11 @@
<if test='orderCol.parentId != null and "DESC".equalsIgnoreCase(orderCol.parentId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('orderId')">
a.orderId
<if test='orderCol.orderId != null and "DESC".equalsIgnoreCase(orderCol.orderId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('status')">
a.status
<if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('linkType')">
a.linkType
<if test='orderCol.linkType != null and "DESC".equalsIgnoreCase(orderCol.linkType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('groupId')">
a.groupId
<if test='orderCol.groupId != null and "DESC".equalsIgnoreCase(orderCol.groupId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('groupName')">
a.groupName
<if test='orderCol.groupName != null and "DESC".equalsIgnoreCase(orderCol.groupName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('imgPath')">
a.imgPath
<if test='orderCol.imgPath != null and "DESC".equalsIgnoreCase(orderCol.imgPath)'>DESC</if>
......@@ -868,9 +776,9 @@
<if test='orderCol.imgCommPath != null and "DESC".equalsIgnoreCase(orderCol.imgCommPath)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('commMenu')">
a.commMenu
<if test='orderCol.commMenu != null and "DESC".equalsIgnoreCase(orderCol.commMenu)'>DESC</if>
<if test="orderCol.containsKey('visible')">
a.visible
<if test='orderCol.visible != null and "DESC".equalsIgnoreCase(orderCol.visible)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('menuType')">
......@@ -878,11 +786,21 @@
<if test='orderCol.menuType != null and "DESC".equalsIgnoreCase(orderCol.menuType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('status')">
a.status
<if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('authType')">
a.authType
<if test='orderCol.authType != null and "DESC".equalsIgnoreCase(orderCol.authType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('orderId')">
a.orderId
<if test='orderCol.orderId != null and "DESC".equalsIgnoreCase(orderCol.orderId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.model.dao.ibatis.ModelDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="ModelEntity" id="ModelEntity-Map">
<id property="id" column="id" />
<result property="modelName" column="modelName" />
<result property="modelCode" column="modelCode" />
<result property="modelIcon" column="modelIcon" />
<result property="modelUrl" column="modelUrl" />
<result property="remark" column="remark" />
<result property="sort" column="sort" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateTime" column="updateTime" />
<result property="updateUserId" column="updateUserId" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modelName') or colPickMode == 1 and data.containsKey('modelName')))">
a.modelName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modelCode') or colPickMode == 1 and data.containsKey('modelCode')))">
a.modelCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modelIcon') or colPickMode == 1 and data.containsKey('modelIcon')))">
a.modelIcon,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modelUrl') or colPickMode == 1 and data.containsKey('modelUrl')))">
a.modelUrl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))">
a.sort,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ModelEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_model
(modelName,modelCode,modelIcon,modelUrl,remark,sort,createTime,createUserId,updateTime,updateUserId)
VALUES
(#{modelName},#{modelCode},#{modelIcon},#{modelUrl},#{remark},#{sort},#{createTime},#{createUserId},#{updateTime},#{updateUserId})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_model
(modelName,modelCode,modelIcon,modelUrl,remark,sort,createTime,createUserId,updateTime,updateUserId)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.modelName},#{item.modelCode},#{item.modelIcon},#{item.modelUrl},#{item.remark},#{item.sort},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_sys_model as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('modelName')) or (colPickMode==1 and !data.containsKey('modelName'))">
a.modelName=#{data.modelName},
</if>
<if test="(colPickMode==0 and data.containsKey('modelCode')) or (colPickMode==1 and !data.containsKey('modelCode'))">
a.modelCode=#{data.modelCode},
</if>
<if test="(colPickMode==0 and data.containsKey('modelIcon')) or (colPickMode==1 and !data.containsKey('modelIcon'))">
a.modelIcon=#{data.modelIcon},
</if>
<if test="(colPickMode==0 and data.containsKey('modelUrl')) or (colPickMode==1 and !data.containsKey('modelUrl'))">
a.modelUrl=#{data.modelUrl},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
<if test="(colPickMode==0 and data.containsKey('sort')) or (colPickMode==1 and !data.containsKey('sort'))">
a.sort=#{data.sort},
</if>
<if test="(colPickMode==0 and data.containsKey('sortIncrement')) or (colPickMode==1 and !data.containsKey('sortIncrement'))">
a.sort=ifnull(a.sort,0) + #{data.sortIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_sys_model as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="modelName=(case" suffix="ELSE modelName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('modelName')) or (colPickMode==1 and !item.containsKey('modelName'))">
when a.id=#{item.id} then #{item.modelName}
</if>
</foreach>
</trim>
<trim prefix="modelCode=(case" suffix="ELSE modelCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('modelCode')) or (colPickMode==1 and !item.containsKey('modelCode'))">
when a.id=#{item.id} then #{item.modelCode}
</if>
</foreach>
</trim>
<trim prefix="modelIcon=(case" suffix="ELSE modelIcon end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('modelIcon')) or (colPickMode==1 and !item.containsKey('modelIcon'))">
when a.id=#{item.id} then #{item.modelIcon}
</if>
</foreach>
</trim>
<trim prefix="modelUrl=(case" suffix="ELSE modelUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('modelUrl')) or (colPickMode==1 and !item.containsKey('modelUrl'))">
when a.id=#{item.id} then #{item.modelUrl}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.id=#{item.id} then #{item.remark}
</if>
</foreach>
</trim>
<trim prefix="sort=(case" suffix="ELSE sort end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sort')) or (colPickMode==1 and !item.containsKey('sort'))">
when a.id=#{item.id} then #{item.sort}
</when>
<when test="(colPickMode==0 and item.containsKey('sortIncrement')) or (colPickMode==1 and !item.containsKey('sortIncrement'))">
when a.id=#{item.id} then ifnull(a.sort,0) + #{item.sortIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="ModelEntity-Map">
select <include refid="_columns"/>
from mortals_sys_model as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_sys_model as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_sys_model where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_sys_model as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="ModelEntity-Map">
select <include refid="_columns"/>
from mortals_sys_model as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_sys_model as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('modelName')">
<if test="conditionParamRef.modelName != null and conditionParamRef.modelName != ''">
${_conditionType_} a.modelName like #{${_conditionParam_}.modelName}
</if>
<if test="conditionParamRef.modelName == null">
${_conditionType_} a.modelName is null
</if>
</if>
<if test="conditionParamRef.containsKey('modelNameList')">
${_conditionType_} a.modelName in
<foreach collection="conditionParamRef.modelNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('modelCode')">
<if test="conditionParamRef.modelCode != null and conditionParamRef.modelCode != ''">
${_conditionType_} a.modelCode like #{${_conditionParam_}.modelCode}
</if>
<if test="conditionParamRef.modelCode == null">
${_conditionType_} a.modelCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('modelCodeList')">
${_conditionType_} a.modelCode in
<foreach collection="conditionParamRef.modelCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('modelIcon')">
<if test="conditionParamRef.modelIcon != null and conditionParamRef.modelIcon != ''">
${_conditionType_} a.modelIcon like #{${_conditionParam_}.modelIcon}
</if>
<if test="conditionParamRef.modelIcon == null">
${_conditionType_} a.modelIcon is null
</if>
</if>
<if test="conditionParamRef.containsKey('modelIconList')">
${_conditionType_} a.modelIcon in
<foreach collection="conditionParamRef.modelIconList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('modelUrl')">
<if test="conditionParamRef.modelUrl != null and conditionParamRef.modelUrl != ''">
${_conditionType_} a.modelUrl like #{${_conditionParam_}.modelUrl}
</if>
<if test="conditionParamRef.modelUrl == null">
${_conditionType_} a.modelUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('modelUrlList')">
${_conditionType_} a.modelUrl in
<foreach collection="conditionParamRef.modelUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
</if>
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList')">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sort')">
<if test="conditionParamRef.sort != null ">
${_conditionType_} a.sort = #{${_conditionParam_}.sort}
</if>
<if test="conditionParamRef.sort == null">
${_conditionType_} a.sort is null
</if>
</if>
<if test="conditionParamRef.containsKey('sortList')">
${_conditionType_} a.sort in
<foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null">
${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart}
</if>
<if test="conditionParamRef.containsKey('sortEnd') and conditionParamRef.sortEnd != null">
${_conditionType_} a.sort <![CDATA[ <= ]]> #{${_conditionParam_}.sortEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList')">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('modelName')">
a.modelName
<if test='orderCol.modelName != null and "DESC".equalsIgnoreCase(orderCol.modelName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('modelCode')">
a.modelCode
<if test='orderCol.modelCode != null and "DESC".equalsIgnoreCase(orderCol.modelCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('modelIcon')">
a.modelIcon
<if test='orderCol.modelIcon != null and "DESC".equalsIgnoreCase(orderCol.modelIcon)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('modelUrl')">
a.modelUrl
<if test='orderCol.modelUrl != null and "DESC".equalsIgnoreCase(orderCol.modelUrl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')">
a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sort')">
a.sort
<if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -19,6 +19,5 @@
select <include refid="_columns"/>
from mortals_xhx_resource as a
where a.userType=#{userType}
</select>
</mapper>
\ No newline at end of file
......@@ -7,7 +7,7 @@
<resultMap type="RoleAuthEntity" id="RoleAuthEntity-Map">
<id property="id" column="id" />
<result property="roleId" column="roleId" />
<result property="resourceId" column="resourceId" />
<result property="menuId" column="menuId" />
</resultMap>
......@@ -21,26 +21,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleId') or colPickMode == 1 and data.containsKey('roleId')))">
a.roleId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('resourceId') or colPickMode == 1 and data.containsKey('resourceId')))">
a.resourceId,
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('menuId') or colPickMode == 1 and data.containsKey('menuId')))">
a.menuId,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="RoleAuthEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_role_auth
(roleId,resourceId)
(roleId,menuId)
VALUES
(#{roleId},#{resourceId})
(#{roleId},#{menuId})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_role_auth
(roleId,resourceId)
(roleId,menuId)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.roleId},#{item.resourceId})
(#{item.roleId},#{item.menuId})
</foreach>
</insert>
......@@ -56,11 +56,11 @@
<if test="(colPickMode==0 and data.containsKey('roleIdIncrement')) or (colPickMode==1 and !data.containsKey('roleIdIncrement'))">
a.roleId=ifnull(a.roleId,0) + #{data.roleIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('resourceId')) or (colPickMode==1 and !data.containsKey('resourceId'))">
a.resourceId=#{data.resourceId},
<if test="(colPickMode==0 and data.containsKey('menuId')) or (colPickMode==1 and !data.containsKey('menuId'))">
a.menuId=#{data.menuId},
</if>
<if test="(colPickMode==0 and data.containsKey('resourceIdIncrement')) or (colPickMode==1 and !data.containsKey('resourceIdIncrement'))">
a.resourceId=ifnull(a.resourceId,0) + #{data.resourceIdIncrement},
<if test="(colPickMode==0 and data.containsKey('menuIdIncrement')) or (colPickMode==1 and !data.containsKey('menuIdIncrement'))">
a.menuId=ifnull(a.menuId,0) + #{data.menuIdIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
......@@ -86,14 +86,14 @@
</choose>
</foreach>
</trim>
<trim prefix="resourceId=(case" suffix="ELSE resourceId end),">
<trim prefix="menuId=(case" suffix="ELSE menuId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('resourceId')) or (colPickMode==1 and !item.containsKey('resourceId'))">
when a.id=#{item.id} then #{item.resourceId}
<when test="(colPickMode==0 and item.containsKey('menuId')) or (colPickMode==1 and !item.containsKey('menuId'))">
when a.id=#{item.id} then #{item.menuId}
</when>
<when test="(colPickMode==0 and item.containsKey('resourceIdIncrement')) or (colPickMode==1 and !item.containsKey('resourceIdIncrement'))">
when a.id=#{item.id} then ifnull(a.resourceId,0) + #{item.resourceIdIncrement}
<when test="(colPickMode==0 and item.containsKey('menuIdIncrement')) or (colPickMode==1 and !item.containsKey('menuIdIncrement'))">
when a.id=#{item.id} then ifnull(a.menuId,0) + #{item.menuIdIncrement}
</when>
</choose>
</foreach>
......@@ -241,25 +241,25 @@
${_conditionType_} a.roleId <![CDATA[ <= ]]> #{${_conditionParam_}.roleIdEnd}
</if>
<if test="conditionParamRef.containsKey('resourceId')">
<if test="conditionParamRef.resourceId != null ">
${_conditionType_} a.resourceId = #{${_conditionParam_}.resourceId}
<if test="conditionParamRef.containsKey('menuId')">
<if test="conditionParamRef.menuId != null ">
${_conditionType_} a.menuId = #{${_conditionParam_}.menuId}
</if>
<if test="conditionParamRef.resourceId == null">
${_conditionType_} a.resourceId is null
<if test="conditionParamRef.menuId == null">
${_conditionType_} a.menuId is null
</if>
</if>
<if test="conditionParamRef.containsKey('resourceIdList')">
${_conditionType_} a.resourceId in
<foreach collection="conditionParamRef.resourceIdList" open="(" close=")" index="index" item="item" separator=",">
<if test="conditionParamRef.containsKey('menuIdList')">
${_conditionType_} a.menuId in
<foreach collection="conditionParamRef.menuIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('resourceIdStart') and conditionParamRef.resourceIdStart != null">
${_conditionType_} a.resourceId <![CDATA[ >= ]]> #{${_conditionParam_}.resourceIdStart}
<if test="conditionParamRef.containsKey('menuIdStart') and conditionParamRef.menuIdStart != null">
${_conditionType_} a.menuId <![CDATA[ >= ]]> #{${_conditionParam_}.menuIdStart}
</if>
<if test="conditionParamRef.containsKey('resourceIdEnd') and conditionParamRef.resourceIdEnd != null">
${_conditionType_} a.resourceId <![CDATA[ <= ]]> #{${_conditionParam_}.resourceIdEnd}
<if test="conditionParamRef.containsKey('menuIdEnd') and conditionParamRef.menuIdEnd != null">
${_conditionType_} a.menuId <![CDATA[ <= ]]> #{${_conditionParam_}.menuIdEnd}
</if>
</sql>
......@@ -285,9 +285,9 @@
<if test='orderCol.roleId != null and "DESC".equalsIgnoreCase(orderCol.roleId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('resourceId')">
a.resourceId
<if test='orderCol.resourceId != null and "DESC".equalsIgnoreCase(orderCol.resourceId)'>DESC</if>
<if test="orderCol.containsKey('menuId')">
a.menuId
<if test='orderCol.menuId != null and "DESC".equalsIgnoreCase(orderCol.menuId)'>DESC</if>
,
</if>
</trim>
......
......@@ -7,6 +7,9 @@
<resultMap type="RoleEntity" id="RoleEntity-Map">
<id property="id" column="id" />
<result property="name" column="name" />
<result property="roleCode" column="roleCode" />
<result property="roleSort" column="roleSort" />
<result property="roleType" column="roleType" />
<result property="remark" column="remark" />
<result property="roleType" column="roleType" />
<result property="createTime" column="createTime" />
......@@ -25,6 +28,15 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('name') or colPickMode == 1 and data.containsKey('name')))">
a.name,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleCode') or colPickMode == 1 and data.containsKey('roleCode')))">
a.roleCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleSort') or colPickMode == 1 and data.containsKey('roleSort')))">
a.roleSort,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('roleType') or colPickMode == 1 and data.containsKey('roleType')))">
a.roleType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
......@@ -45,18 +57,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="RoleEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_role
(name,remark,roleType,createTime,createUserId,createUserName)
(name,roleCode,roleSort,roleType,remark,roleType,createTime,createUserId,createUserName)
VALUES
(#{name},#{remark},#{roleType},#{createTime},#{createUserId},#{createUserName})
(#{name},#{roleCode},#{roleSort},#{roleType},#{remark},#{roleType},#{createTime},#{createUserId},#{createUserName})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_role
(name,remark,roleType,createTime,createUserId,createUserName)
(name,roleCode,roleSort,roleType,remark,roleType,createTime,createUserId,createUserName)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.remark},#{item.roleType},#{item.createTime},#{item.createUserId},#{item.createUserName})
(#{item.name},#{item.roleCode},#{item.roleSort},#{item.roleType},#{item.remark},#{item.roleType},#{item.createTime},#{item.createUserId},#{item.createUserName})
</foreach>
</insert>
......@@ -69,6 +81,21 @@
<if test="(colPickMode==0 and data.containsKey('name')) or (colPickMode==1 and !data.containsKey('name'))">
a.name=#{data.name},
</if>
<if test="(colPickMode==0 and data.containsKey('roleCode')) or (colPickMode==1 and !data.containsKey('roleCode'))">
a.roleCode=#{data.roleCode},
</if>
<if test="(colPickMode==0 and data.containsKey('roleSort')) or (colPickMode==1 and !data.containsKey('roleSort'))">
a.roleSort=#{data.roleSort},
</if>
<if test="(colPickMode==0 and data.containsKey('roleSortIncrement')) or (colPickMode==1 and !data.containsKey('roleSortIncrement'))">
a.roleSort=ifnull(a.roleSort,0) + #{data.roleSortIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('roleType')) or (colPickMode==1 and !data.containsKey('roleType'))">
a.roleType=#{data.roleType},
</if>
<if test="(colPickMode==0 and data.containsKey('roleTypeIncrement')) or (colPickMode==1 and !data.containsKey('roleTypeIncrement'))">
a.roleType=ifnull(a.roleType,0) + #{data.roleTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
......@@ -109,6 +136,37 @@
</if>
</foreach>
</trim>
<trim prefix="roleCode=(case" suffix="ELSE roleCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('roleCode')) or (colPickMode==1 and !item.containsKey('roleCode'))">
when a.id=#{item.id} then #{item.roleCode}
</if>
</foreach>
</trim>
<trim prefix="roleSort=(case" suffix="ELSE roleSort end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('roleSort')) or (colPickMode==1 and !item.containsKey('roleSort'))">
when a.id=#{item.id} then #{item.roleSort}
</when>
<when test="(colPickMode==0 and item.containsKey('roleSortIncrement')) or (colPickMode==1 and !item.containsKey('roleSortIncrement'))">
when a.id=#{item.id} then ifnull(a.roleSort,0) + #{item.roleSortIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="roleType=(case" suffix="ELSE roleType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('roleType')) or (colPickMode==1 and !item.containsKey('roleType'))">
when a.id=#{item.id} then #{item.roleType}
</when>
<when test="(colPickMode==0 and item.containsKey('roleTypeIncrement')) or (colPickMode==1 and !item.containsKey('roleTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.roleType,0) + #{item.roleTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
......@@ -292,6 +350,63 @@
</foreach>
</if>
<if test="conditionParamRef.containsKey('roleCode')">
<if test="conditionParamRef.roleCode != null and conditionParamRef.roleCode != ''">
${_conditionType_} a.roleCode like #{${_conditionParam_}.roleCode}
</if>
<if test="conditionParamRef.roleCode == null">
${_conditionType_} a.roleCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('roleCodeList')">
${_conditionType_} a.roleCode in
<foreach collection="conditionParamRef.roleCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('roleSort')">
<if test="conditionParamRef.roleSort != null ">
${_conditionType_} a.roleSort = #{${_conditionParam_}.roleSort}
</if>
<if test="conditionParamRef.roleSort == null">
${_conditionType_} a.roleSort is null
</if>
</if>
<if test="conditionParamRef.containsKey('roleSortList')">
${_conditionType_} a.roleSort in
<foreach collection="conditionParamRef.roleSortList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('roleSortStart') and conditionParamRef.roleSortStart != null">
${_conditionType_} a.roleSort <![CDATA[ >= ]]> #{${_conditionParam_}.roleSortStart}
</if>
<if test="conditionParamRef.containsKey('roleSortEnd') and conditionParamRef.roleSortEnd != null">
${_conditionType_} a.roleSort <![CDATA[ <= ]]> #{${_conditionParam_}.roleSortEnd}
</if>
<if test="conditionParamRef.containsKey('roleType')">
<if test="conditionParamRef.roleType != null ">
${_conditionType_} a.roleType = #{${_conditionParam_}.roleType}
</if>
<if test="conditionParamRef.roleType == null">
${_conditionType_} a.roleType is null
</if>
</if>
<if test="conditionParamRef.containsKey('roleTypeList')">
${_conditionType_} a.roleType in
<foreach collection="conditionParamRef.roleTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('roleTypeStart') and conditionParamRef.roleTypeStart != null">
${_conditionType_} a.roleType <![CDATA[ >= ]]> #{${_conditionParam_}.roleTypeStart}
</if>
<if test="conditionParamRef.containsKey('roleTypeEnd') and conditionParamRef.roleTypeEnd != null">
${_conditionType_} a.roleType <![CDATA[ <= ]]> #{${_conditionParam_}.roleTypeEnd}
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
......@@ -401,6 +516,21 @@
<if test='orderCol.name != null and "DESC".equalsIgnoreCase(orderCol.name)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('roleCode')">
a.roleCode
<if test='orderCol.roleCode != null and "DESC".equalsIgnoreCase(orderCol.roleCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('roleSort')">
a.roleSort
<if test='orderCol.roleSort != null and "DESC".equalsIgnoreCase(orderCol.roleSort)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('roleType')">
a.roleType
<if test='orderCol.roleType != null and "DESC".equalsIgnoreCase(orderCol.roleType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')">
a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.user.dao.ibatis.UserDaoImpl">
<!-- 字段和属性映射 -->
......@@ -17,9 +17,7 @@
<result property="userType" column="userType" />
<result property="siteIds" column="siteIds" />
<result property="areaCodes" column="areaCodes" />
<result property="modeIds" column="modeIds" />
<result property="status" column="status" />
<result property="customerId" column="customerId" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="createUserName" column="createUserName" />
......@@ -68,15 +66,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaCodes') or colPickMode == 1 and data.containsKey('areaCodes')))">
a.areaCodes,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('modeIds') or colPickMode == 1 and data.containsKey('modeIds')))">
a.modeIds,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
a.status,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('customerId') or colPickMode == 1 and data.containsKey('customerId')))">
a.customerId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
......@@ -97,18 +89,18 @@
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,modeIds,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress)
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress)
VALUES
(#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteIds},#{areaCodes},#{modeIds},#{status},#{customerId},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress})
(#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteIds},#{areaCodes},#{status},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_user
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,modeIds,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress)
(loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteIds},#{item.areaCodes},#{item.modeIds},#{item.status},#{item.customerId},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress})
(#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteIds},#{item.areaCodes},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress})
</foreach>
</insert>
......@@ -154,21 +146,12 @@
<if test="(colPickMode==0 and data.containsKey('areaCodes')) or (colPickMode==1 and !data.containsKey('areaCodes'))">
a.areaCodes=#{data.areaCodes},
</if>
<if test="(colPickMode==0 and data.containsKey('modeIds')) or (colPickMode==1 and !data.containsKey('modeIds'))">
a.modeIds=#{data.modeIds},
</if>
<if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))">
a.status=#{data.status},
</if>
<if test="(colPickMode==0 and data.containsKey('statusIncrement')) or (colPickMode==1 and !data.containsKey('statusIncrement'))">
a.status=ifnull(a.status,0) + #{data.statusIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('customerId')) or (colPickMode==1 and !data.containsKey('customerId'))">
a.customerId=#{data.customerId},
</if>
<if test="(colPickMode==0 and data.containsKey('customerIdIncrement')) or (colPickMode==1 and !data.containsKey('customerIdIncrement'))">
a.customerId=ifnull(a.customerId,0) + #{data.customerIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
......@@ -281,13 +264,6 @@
</if>
</foreach>
</trim>
<trim prefix="modeIds=(case" suffix="ELSE modeIds end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('modeIds')) or (colPickMode==1 and !item.containsKey('modeIds'))">
when a.id=#{item.id} then #{item.modeIds}
</if>
</foreach>
</trim>
<trim prefix="status=(case" suffix="ELSE status end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
......@@ -300,18 +276,6 @@
</choose>
</foreach>
</trim>
<trim prefix="customerId=(case" suffix="ELSE customerId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('customerId')) or (colPickMode==1 and !item.containsKey('customerId'))">
when a.id=#{item.id} then #{item.customerId}
</when>
<when test="(colPickMode==0 and item.containsKey('customerIdIncrement')) or (colPickMode==1 and !item.containsKey('customerIdIncrement'))">
when a.id=#{item.id} then ifnull(a.customerId,0) + #{item.customerIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
......@@ -645,21 +609,6 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('modeIds')">
<if test="conditionParamRef.modeIds != null and conditionParamRef.modeIds != ''">
${_conditionType_} a.modeIds like #{${_conditionParam_}.modeIds}
</if>
<if test="conditionParamRef.modeIds == null">
${_conditionType_} a.modeIds is null
</if>
</if>
<if test="conditionParamRef.containsKey('modeIdsList')">
${_conditionType_} a.modeIds in
<foreach collection="conditionParamRef.modeIdsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('status')">
<if test="conditionParamRef.status != null ">
${_conditionType_} a.status = #{${_conditionParam_}.status}
......@@ -681,27 +630,6 @@
${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd}
</if>
<if test="conditionParamRef.containsKey('customerId')">
<if test="conditionParamRef.customerId != null ">
${_conditionType_} a.customerId = #{${_conditionParam_}.customerId}
</if>
<if test="conditionParamRef.customerId == null">
${_conditionType_} a.customerId is null
</if>
</if>
<if test="conditionParamRef.containsKey('customerIdList')">
${_conditionType_} a.customerId in
<foreach collection="conditionParamRef.customerIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('customerIdStart') and conditionParamRef.customerIdStart != null">
${_conditionType_} a.customerId <![CDATA[ >= ]]> #{${_conditionParam_}.customerIdStart}
</if>
<if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null">
${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
......@@ -856,21 +784,11 @@
<if test='orderCol.areaCodes != null and "DESC".equalsIgnoreCase(orderCol.areaCodes)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('modeIds')">
a.modeIds
<if test='orderCol.modeIds != null and "DESC".equalsIgnoreCase(orderCol.modeIds)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('status')">
a.status
<if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('customerId')">
a.customerId
<if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
......
......@@ -16,21 +16,19 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"name":"gtpo3x",
"url":"bzap53",
"parentId":841,
"orderId":493,
"status":1,
"name":"bbq6ku",
"url":"jadu3f",
"parentId":629,
"linkType":0,
"groupId":1,
"groupName":"kozt1p",
"imgPath":"768q4p",
"buttonImgPath":"8n3owa",
"imgCommPath":"1uozri",
"commMenu":0,
"imgPath":"7mqw6a",
"buttonImgPath":"vcr5tv",
"imgCommPath":"qnglei",
"visible":1,
"menuType":0,
"status":1,
"authType":3,
"createUserName":"ncx9is"
"orderId":0,
"createUserName":"ahjsmm"
}
> {%
......
......@@ -16,15 +16,15 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"platformMark":"famkaa",
"userId":915,
"userName":"yprv3n",
"loginName":"pcui4v",
"requestUrl":"b25eh5",
"content":"a45ur4",
"ip":"jjzv5q",
"logDate":"1654012800000",
"operType":502
"platformMark":"jzqhs2",
"userId":756,
"userName":"crx3lv",
"loginName":"txmg92",
"requestUrl":"5k25jt",
"content":"qaunzf",
"ip":"cvcvc2",
"logDate":"1654099200000",
"operType":456,
}
> {%
......
......@@ -16,16 +16,16 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"name":"8rql7o",
"firstOrganize":"pjyp42",
"secondOrganize":"gf5pjy",
"paramKey":"kj2rte",
"paramValue":"43x9fh",
"name":"t15c8e",
"firstOrganize":"02h3t9",
"secondOrganize":"a148i6",
"paramKey":"51qyz8",
"paramValue":"m56yj4",
"validStatus":1,
"modStatus":4,
"displayType":0,
"remark":"icbvr4",
"createUserName":"z877o6"
"remark":"ulg0sy",
"createUserName":"foljbt"
}
> {%
......
###资源信息业务列表
POST {{baseUrl}}/resource/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###资源信息业务更新与保存
POST {{baseUrl}}/resource/save
Authorization: {{authToken}}
Content-Type: application/json
{
"name":"bbhhiu",
"url":"78p8sn",
"authType":3,
"sourceType":0,
"createUserName":"pmsggn",
"userType":792
}
> {%
client.global.set("Resource_id", JSON.parse(response.body).data.id);
%}
###资源信息业务查看
GET {{baseUrl}}/resource/info?id={{Resource_id}}
Authorization: {{authToken}}
Accept: application/json
###资源信息业务编辑
GET {{baseUrl}}/resource/edit?id={{Resource_id}}
Authorization: {{authToken}}
Accept: application/json
###资源信息业务删除
GET {{baseUrl}}/resource/delete?id={{Resource_id}}
Authorization: {{authToken}}
Accept: application/json
###角色资源权限业务列表
###角色菜单权限关联列表
POST {{baseUrl}}/role/auth/list
Authorization: {{authToken}}
Content-Type: application/json
......@@ -10,32 +10,32 @@ Content-Type: application/json
}
###角色资源权限业务更新与保存
###角色菜单权限关联更新与保存
POST {{baseUrl}}/role/auth/save
Authorization: {{authToken}}
Content-Type: application/json
{
"roleId":919,
"resourceId":633
"roleId":831,
"menuId":418
}
> {%
client.global.set("RoleAuth_id", JSON.parse(response.body).data.id);
%}
###角色资源权限业务查看
###角色菜单权限关联查看
GET {{baseUrl}}/role/auth/info?id={{RoleAuth_id}}
Authorization: {{authToken}}
Accept: application/json
###角色资源权限业务编辑
###角色菜单权限关联编辑
GET {{baseUrl}}/role/auth/edit?id={{RoleAuth_id}}
Authorization: {{authToken}}
Accept: application/json
###角色资源权限业务删除
###角色菜单权限关联删除
GET {{baseUrl}}/role/auth/delete?id={{RoleAuth_id}}
Authorization: {{authToken}}
Accept: application/json
......
###角色信息业务列表
###角色信息列表
POST {{baseUrl}}/role/list
Authorization: {{authToken}}
Content-Type: application/json
......@@ -10,34 +10,37 @@ Content-Type: application/json
}
###角色信息业务更新与保存
###角色信息更新与保存
POST {{baseUrl}}/role/save
Authorization: {{authToken}}
Content-Type: application/json
{
"name":"5ndoco",
"remark":"qkazii",
"name":"e9e4uu",
"roleCode":"tzulbs",
"roleSort":0,
"roleType":2,
"createUserName":"5i3n9e"
"remark":"4345a1",
"roleType":0,
"createUserName":"78k9cx"
}
> {%
client.global.set("Role_id", JSON.parse(response.body).data.id);
%}
###角色信息业务查看
###角色信息查看
GET {{baseUrl}}/role/info?id={{Role_id}}
Authorization: {{authToken}}
Accept: application/json
###角色信息业务编辑
###角色信息编辑
GET {{baseUrl}}/role/edit?id={{Role_id}}
Authorization: {{authToken}}
Accept: application/json
###角色信息业务删除
###角色信息删除
GET {{baseUrl}}/role/delete?id={{Role_id}}
Authorization: {{authToken}}
Accept: application/json
......
###角色用户业务列表
###角色用户关联列表
POST {{baseUrl}}/role/user/list
Authorization: {{authToken}}
Content-Type: application/json
......@@ -10,32 +10,32 @@ Content-Type: application/json
}
###角色用户业务更新与保存
###角色用户关联更新与保存
POST {{baseUrl}}/role/user/save
Authorization: {{authToken}}
Content-Type: application/json
{
"roleId":383,
"userId":148
"roleId":527,
"userId":367
}
> {%
client.global.set("RoleUser_id", JSON.parse(response.body).data.id);
%}
###角色用户业务查看
###角色用户关联查看
GET {{baseUrl}}/role/user/info?id={{RoleUser_id}}
Authorization: {{authToken}}
Accept: application/json
###角色用户业务编辑
###角色用户关联编辑
GET {{baseUrl}}/role/user/edit?id={{RoleUser_id}}
Authorization: {{authToken}}
Accept: application/json
###角色用户业务删除
###角色用户关联删除
GET {{baseUrl}}/role/user/delete?id={{RoleUser_id}}
Authorization: {{authToken}}
Accept: application/json
......
......@@ -23,6 +23,13 @@ Content-Type: application/json
{}
###登出
POST {{baseUrl}}/login/logout
Authorization: {{authToken}}
Content-Type: application/json
{}
......
......@@ -16,15 +16,15 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"systemServiceName":"o99s5u",
"systemServiceCode":"nhelz5",
"systemServiceUrl":"to7p8j",
"apiName":"a9jpo2",
"systemServiceName":"swnnfo",
"systemServiceCode":"r3v8fl",
"systemServiceUrl":"6iab2t",
"apiName":"e6hy5l",
"apiUrl":"0",
"apiVersion":"soe6c6",
"apiVersion":"wudu7x",
"apiStatus":1,
"lapseTime":"1654012800000",
"apiRemark":"6rriap"
"lapseTime":"1654099200000",
"apiRemark":"pzeuey"
}
> {%
......
......@@ -16,15 +16,15 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"systemServiceName":"pd2nfe",
"systemServiceCode":"eluken",
"systemServiceUrl":"qtc1t4",
"packageName":"ebrlei",
"packagePath":"cn24qd",
"packageVersion":"bja5qr",
"apiStatus":784,
"lapseTime":"1654012800000",
"packageRemark":"jp04vd"
"systemServiceName":"wtv8s8",
"systemServiceCode":"rqjnav",
"systemServiceUrl":"4a8ko5",
"packageName":"vvwytr",
"packagePath":"2rv0od",
"packageVersion":"o2apw2",
"apiStatus":321,
"lapseTime":"1654099200000",
"packageRemark":"2u658v"
}
> {%
......
###分索引信息业务列表
POST {{baseUrl}}/table/index/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###分索引信息业务更新与保存
POST {{baseUrl}}/table/index/save
Authorization: {{authToken}}
Content-Type: application/json
{
"tableName":"clftc5",
"tableMark":"recb1y",
}
> {%
client.global.set("TableIndex_id", JSON.parse(response.body).data.id);
%}
###分索引信息业务查看
GET {{baseUrl}}/table/index/info?id={{TableIndex_id}}
Authorization: {{authToken}}
Accept: application/json
###分索引信息业务编辑
GET {{baseUrl}}/table/index/edit?id={{TableIndex_id}}
Authorization: {{authToken}}
Accept: application/json
###分索引信息业务删除
GET {{baseUrl}}/table/index/delete?id={{TableIndex_id}}
Authorization: {{authToken}}
Accept: application/json
......@@ -16,20 +16,20 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"name":"dkuwwq",
"taskKey":"n1cdz1",
"name":"o78n61",
"taskKey":"rllam4",
"status":0,
"excuteService":"fcwbaz",
"excuteParam":"lhbsxc",
"excuteHost":"jq9not",
"excuteService":"b0xe10",
"excuteParam":"fwjs34",
"excuteHost":"l98wfm",
"excuteStrategy":1,
"excuteDate":0,
"excuteTime":"00:00",
"remark":"w7enx5",
"lastExcuteHost":"qejiuf",
"lastExcuteTime":"1654012800000",
"remark":"uq2lw6",
"lastExcuteHost":"sol59x",
"lastExcuteTime":"1654099200000",
"interimExcuteStatus":0,
"createUserName":"wead9t"
"createUserName":"0g4s2t"
}
> {%
......
......@@ -16,9 +16,9 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"fileName":"op4s3p",
"filePath":"3laab2",
"fileType":635,
"fileName":"egvgb0",
"filePath":"agstja",
"fileType":744,
}
> {%
......
......@@ -16,21 +16,21 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"loginName":"4yywad",
"loginPwd":"1g4iy0",
"loginLimitAddress":"20w7ix",
"realName":"am6aml",
"mobile":"gcznhn",
"phone":"wvq3ct",
"email":"lxbz24",
"qq":"a037x3",
"userType":442,
"siteIds":"o48orv",
"loginName":"jnxv54",
"loginPwd":"s1yseh",
"loginLimitAddress":"4ocvs3",
"realName":"3kr50i",
"mobile":"29odxn",
"phone":"orixyo",
"email":"6tuwgq",
"qq":"4j5ioa",
"userType":690,
"siteIds":"nzhmdx",
"areaCodes":"e76dqy",
"status":1,
"customerId":121,
"createUserName":"6kavzr",
"lastLoginTime":"1654012800000",
"lastLoginAddress":"hed4ia"
"createUserName":"g8gdc6",
"lastLoginTime":"1654099200000",
"lastLoginAddress":"dfc2gz"
}
> {%
......
###验证码信息业务列表
POST {{baseUrl}}/valid/code/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###验证码信息业务更新与保存
POST {{baseUrl}}/valid/code/save
Authorization: {{authToken}}
Content-Type: application/json
{
"code":"8ejstz",
"url":"rd1w9i",
"mobile":"o14fm7",
"email":"jx8ynm",
"type":0,
"sessionId":"skrkmf",
"ip":"4jsqg0",
"lapseTime":"1654012800000"
}
> {%
client.global.set("ValidCode_id", JSON.parse(response.body).data.id);
%}
###验证码信息业务查看
GET {{baseUrl}}/valid/code/info?id={{ValidCode_id}}
Authorization: {{authToken}}
Accept: application/json
###验证码信息业务编辑
GET {{baseUrl}}/valid/code/edit?id={{ValidCode_id}}
Authorization: {{authToken}}
Accept: application/json
###验证码信息业务删除
GET {{baseUrl}}/valid/code/delete?id={{ValidCode_id}}
Authorization: {{authToken}}
Accept: application/json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment