mirror of https://github.com/elunez/eladmin
更新代码生成器,更新sql脚本
parent
5c27bce52a
commit
c01435a059
|
@ -44,7 +44,7 @@ public class GenUtil {
|
||||||
templateNames.add("Repository");
|
templateNames.add("Repository");
|
||||||
templateNames.add("Service");
|
templateNames.add("Service");
|
||||||
templateNames.add("ServiceImpl");
|
templateNames.add("ServiceImpl");
|
||||||
templateNames.add("QueryService");
|
templateNames.add("QueryCriteria");
|
||||||
templateNames.add("Controller");
|
templateNames.add("Controller");
|
||||||
return templateNames;
|
return templateNames;
|
||||||
}
|
}
|
||||||
|
@ -200,12 +200,12 @@ public class GenUtil {
|
||||||
return packagePath + "service" + File.separator + "dto" + File.separator + className + "DTO.java";
|
return packagePath + "service" + File.separator + "dto" + File.separator + className + "DTO.java";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Mapper".equals(templateName)) {
|
if ("QueryCriteria".equals(templateName)) {
|
||||||
return packagePath + "service" + File.separator + "mapper" + File.separator + className + "Mapper.java";
|
return packagePath + "service" + File.separator + "dto" + File.separator + className + "QueryCriteria.java";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("QueryService".equals(templateName)) {
|
if ("Mapper".equals(templateName)) {
|
||||||
return packagePath + "service" + File.separator + "query" + File.separator + className + "QueryService.java";
|
return packagePath + "service" + File.separator + "mapper" + File.separator + className + "Mapper.java";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("Repository".equals(templateName)) {
|
if ("Repository".equals(templateName)) {
|
||||||
|
|
|
@ -3,8 +3,7 @@ package ${package}.rest;
|
||||||
import me.zhengjie.aop.log.Log;
|
import me.zhengjie.aop.log.Log;
|
||||||
import ${package}.domain.${className};
|
import ${package}.domain.${className};
|
||||||
import ${package}.service.${className}Service;
|
import ${package}.service.${className}Service;
|
||||||
import ${package}.service.dto.${className}DTO;
|
import ${package}.service.dto.${className}QueryCriteria;
|
||||||
import ${package}.service.query.${className}QueryService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
|
@ -13,6 +12,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${date}
|
* @date ${date}
|
||||||
|
@ -24,14 +24,11 @@ public class ${className}Controller {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ${className}Service ${changeClassName}Service;
|
private ${className}Service ${changeClassName}Service;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ${className}QueryService ${changeClassName}QueryService;
|
|
||||||
|
|
||||||
@Log("查询${className}")
|
@Log("查询${className}")
|
||||||
@GetMapping(value = "/${changeClassName}")
|
@GetMapping(value = "/${changeClassName}")
|
||||||
@PreAuthorize("hasAnyRole('ADMIN','${upperCaseClassName}_ALL','${upperCaseClassName}_SELECT')")
|
@PreAuthorize("hasAnyRole('ADMIN','${upperCaseClassName}_ALL','${upperCaseClassName}_SELECT')")
|
||||||
public ResponseEntity get${className}s(${className}DTO resources, Pageable pageable){
|
public ResponseEntity get${className}s(${className}QueryCriteria criteria, Pageable pageable){
|
||||||
return new ResponseEntity(${changeClassName}QueryService.queryAll(resources,pageable),HttpStatus.OK);
|
return new ResponseEntity(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("新增${className}")
|
@Log("新增${className}")
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package ${package}.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
<#if hasTimestamp>
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
</#if>
|
||||||
|
<#if hasBigDecimal>
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
</#if>
|
||||||
|
<#if queryColumns??>
|
||||||
|
import me.zhengjie.annotation.Query;
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ${author}
|
||||||
|
* @date ${date}
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ${className}QueryCriteria{
|
||||||
|
<#if queryColumns??>
|
||||||
|
<#list queryColumns as column>
|
||||||
|
|
||||||
|
<#if column.columnQuery = '1'>
|
||||||
|
// 模糊
|
||||||
|
@Query(type = Query.Type.INNER_LIKE)
|
||||||
|
</#if>
|
||||||
|
<#if column.columnQuery = '2'>
|
||||||
|
// 精确
|
||||||
|
@Query
|
||||||
|
</#if>
|
||||||
|
private ${column.columnType} ${column.changeColumnName};
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
}
|
|
@ -1,92 +0,0 @@
|
||||||
package ${package}.service.query;
|
|
||||||
|
|
||||||
import me.zhengjie.utils.PageUtil;
|
|
||||||
import ${package}.domain.${className};
|
|
||||||
import ${package}.service.dto.${className}DTO;
|
|
||||||
import ${package}.repository.${className}Repository;
|
|
||||||
import ${package}.service.mapper.${className}Mapper;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.util.ObjectUtils;
|
|
||||||
import javax.persistence.criteria.CriteriaBuilder;
|
|
||||||
import javax.persistence.criteria.CriteriaQuery;
|
|
||||||
import javax.persistence.criteria.Predicate;
|
|
||||||
import javax.persistence.criteria.Root;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author jie
|
|
||||||
* @date 2018-12-03
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@CacheConfig(cacheNames = "${changeClassName}")
|
|
||||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
|
||||||
public class ${className}QueryService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ${className}Repository ${changeClassName}Repository;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ${className}Mapper ${changeClassName}Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页
|
|
||||||
*/
|
|
||||||
@Cacheable(keyGenerator = "keyGenerator")
|
|
||||||
public Object queryAll(${className}DTO ${changeClassName}, Pageable pageable){
|
|
||||||
Page<${className}> page = ${changeClassName}Repository.findAll(new Spec(${changeClassName}),pageable);
|
|
||||||
return PageUtil.toPage(page.map(${changeClassName}Mapper::toDto));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 不分页
|
|
||||||
*/
|
|
||||||
@Cacheable(keyGenerator = "keyGenerator")
|
|
||||||
public Object queryAll(${className}DTO ${changeClassName}){
|
|
||||||
return ${changeClassName}Mapper.toDto(${changeClassName}Repository.findAll(new Spec(${changeClassName})));
|
|
||||||
}
|
|
||||||
|
|
||||||
class Spec implements Specification<${className}> {
|
|
||||||
|
|
||||||
private ${className}DTO ${changeClassName};
|
|
||||||
|
|
||||||
public Spec(${className}DTO ${changeClassName}){
|
|
||||||
this.${changeClassName} = ${changeClassName};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Predicate toPredicate(Root<${className}> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder cb) {
|
|
||||||
|
|
||||||
List<Predicate> list = new ArrayList<Predicate>();
|
|
||||||
|
|
||||||
<#if queryColumns??>
|
|
||||||
<#list queryColumns as column>
|
|
||||||
if(!ObjectUtils.isEmpty(${changeClassName}.get${column.capitalColumnName}())){
|
|
||||||
<#if column.columnQuery = '1'>
|
|
||||||
/**
|
|
||||||
* 模糊
|
|
||||||
*/
|
|
||||||
list.add(cb.like(root.get("${column.changeColumnName}").as(${column.columnType}.class),"%"+${changeClassName}.get${column.capitalColumnName}()+"%"));
|
|
||||||
</#if>
|
|
||||||
<#if column.columnQuery = '2'>
|
|
||||||
/**
|
|
||||||
* 精确
|
|
||||||
*/
|
|
||||||
list.add(cb.equal(root.get("${column.changeColumnName}").as(${column.columnType}.class),${changeClassName}.get${column.capitalColumnName}()));
|
|
||||||
</#if>
|
|
||||||
}
|
|
||||||
</#list>
|
|
||||||
</#if>
|
|
||||||
Predicate[] p = new Predicate[list.size()];
|
|
||||||
return cb.and(list.toArray(p));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,9 +2,11 @@ package ${package}.service;
|
||||||
|
|
||||||
import ${package}.domain.${className};
|
import ${package}.domain.${className};
|
||||||
import ${package}.service.dto.${className}DTO;
|
import ${package}.service.dto.${className}DTO;
|
||||||
|
import ${package}.service.dto.${className}QueryCriteria;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
|
@ -13,6 +15,23 @@ import org.springframework.cache.annotation.Cacheable;
|
||||||
@CacheConfig(cacheNames = "${changeClassName}")
|
@CacheConfig(cacheNames = "${changeClassName}")
|
||||||
public interface ${className}Service {
|
public interface ${className}Service {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* queryAll 分页
|
||||||
|
* @param criteria
|
||||||
|
* @param pageable
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Cacheable(keyGenerator = "keyGenerator")
|
||||||
|
Object queryAll(${className}QueryCriteria criteria, Pageable pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* queryAll 不分页
|
||||||
|
* @param criteria
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Cacheable(keyGenerator = "keyGenerator")
|
||||||
|
public Object queryAll(${className}QueryCriteria criteria);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* findById
|
* findById
|
||||||
* @param ${pkChangeColName}
|
* @param ${pkChangeColName}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import me.zhengjie.utils.ValidationUtil;
|
||||||
import ${package}.repository.${className}Repository;
|
import ${package}.repository.${className}Repository;
|
||||||
import ${package}.service.${className}Service;
|
import ${package}.service.${className}Service;
|
||||||
import ${package}.service.dto.${className}DTO;
|
import ${package}.service.dto.${className}DTO;
|
||||||
|
import ${package}.service.dto.${className}QueryCriteria;
|
||||||
import ${package}.service.mapper.${className}Mapper;
|
import ${package}.service.mapper.${className}Mapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -27,6 +28,10 @@ import cn.hutool.core.util.IdUtil;
|
||||||
<#if !auto && pkColumnType = 'String'>
|
<#if !auto && pkColumnType = 'String'>
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
</#if>
|
</#if>
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import me.zhengjie.utils.PageUtil;
|
||||||
|
import me.zhengjie.utils.QueryHelp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
|
@ -42,6 +47,17 @@ public class ${className}ServiceImpl implements ${className}Service {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ${className}Mapper ${changeClassName}Mapper;
|
private ${className}Mapper ${changeClassName}Mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object queryAll(${className}QueryCriteria criteria, Pageable pageable){
|
||||||
|
Page<${className}> page = ${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||||
|
return PageUtil.toPage(page.map(${changeClassName}Mapper::toDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object queryAll(${className}QueryCriteria criteria){
|
||||||
|
return ${changeClassName}Mapper.toDto(${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ${className}DTO findById(${pkColumnType} ${pkChangeColName}) {
|
public ${className}DTO findById(${pkColumnType} ${pkChangeColName}) {
|
||||||
Optional<${className}> ${changeClassName} = ${changeClassName}Repository.findById(${pkChangeColName});
|
Optional<${className}> ${changeClassName} = ${changeClassName}Repository.findById(${pkChangeColName});
|
||||||
|
|
|
@ -10,7 +10,7 @@ Target Server Type : MYSQL
|
||||||
Target Server Version : 50562
|
Target Server Version : 50562
|
||||||
File Encoding : 65001
|
File Encoding : 65001
|
||||||
|
|
||||||
Date: 2019-05-26 16:31:04
|
Date: 2019-06-05 11:13:41
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=0;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
@ -134,6 +134,11 @@ CREATE TABLE `gen_config` (
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of gen_config
|
||||||
|
-- ----------------------------
|
||||||
|
INSERT INTO `gen_config` VALUES ('1', 'jie', '\0', 'eladmin-system', 'me.zhengjie.modules.test', 'E:\\workspace\\me\\front\\eladmin-qt\\src\\views\\test', 'E:\\workspace\\me\\front\\eladmin-qt\\src\\api', null);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for job
|
-- Table structure for job
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -176,7 +181,11 @@ CREATE TABLE `log` (
|
||||||
`time` bigint(20) DEFAULT NULL,
|
`time` bigint(20) DEFAULT NULL,
|
||||||
`username` varchar(255) DEFAULT NULL,
|
`username` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=9465 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=10334 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of log
|
||||||
|
-- ----------------------------
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for menu
|
-- Table structure for menu
|
||||||
|
@ -193,7 +202,7 @@ CREATE TABLE `menu` (
|
||||||
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
|
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
|
||||||
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
|
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of menu
|
-- Records of menu
|
||||||
|
@ -209,7 +218,6 @@ INSERT INTO `menu` VALUES ('8', '2018-12-18 15:19:01', '\0', '系统缓存', 'mo
|
||||||
INSERT INTO `menu` VALUES ('9', '2018-12-18 15:19:34', '\0', 'SQL监控', 'monitor/sql/index', '6', '14', 'sqlMonitor', 'druid');
|
INSERT INTO `menu` VALUES ('9', '2018-12-18 15:19:34', '\0', 'SQL监控', 'monitor/sql/index', '6', '14', 'sqlMonitor', 'druid');
|
||||||
INSERT INTO `menu` VALUES ('10', '2018-12-19 13:38:16', '\0', '组件管理', null, '0', '50', 'zujian', 'components');
|
INSERT INTO `menu` VALUES ('10', '2018-12-19 13:38:16', '\0', '组件管理', null, '0', '50', 'zujian', 'components');
|
||||||
INSERT INTO `menu` VALUES ('11', '2018-12-19 13:38:49', '\0', '图标库', 'components/IconSelect', '10', '51', 'icon', 'icon');
|
INSERT INTO `menu` VALUES ('11', '2018-12-19 13:38:49', '\0', '图标库', 'components/IconSelect', '10', '51', 'icon', 'icon');
|
||||||
INSERT INTO `menu` VALUES ('12', '2018-12-24 20:37:35', '\0', '实时控制台', 'monitor/log/msg', '6', '16', 'codeConsole', 'msg');
|
|
||||||
INSERT INTO `menu` VALUES ('14', '2018-12-27 10:13:09', '\0', '邮件工具', 'tools/email/index', '36', '24', 'email', 'email');
|
INSERT INTO `menu` VALUES ('14', '2018-12-27 10:13:09', '\0', '邮件工具', 'tools/email/index', '36', '24', 'email', 'email');
|
||||||
INSERT INTO `menu` VALUES ('15', '2018-12-27 11:58:25', '\0', '富文本', 'components/Editor', '10', '52', 'fwb', 'tinymce');
|
INSERT INTO `menu` VALUES ('15', '2018-12-27 11:58:25', '\0', '富文本', 'components/Editor', '10', '52', 'fwb', 'tinymce');
|
||||||
INSERT INTO `menu` VALUES ('16', '2018-12-28 09:36:53', '\0', '图床管理', 'tools/picture/index', '36', '25', 'image', 'pictures');
|
INSERT INTO `menu` VALUES ('16', '2018-12-28 09:36:53', '\0', '图床管理', 'tools/picture/index', '36', '25', 'image', 'pictures');
|
||||||
|
@ -265,9 +273,7 @@ INSERT INTO `permission` VALUES ('15', '权限创建', '2018-12-09 20:14:10', 'P
|
||||||
INSERT INTO `permission` VALUES ('16', '权限编辑', '2018-12-09 20:15:44', 'PERMISSION_EDIT', '13');
|
INSERT INTO `permission` VALUES ('16', '权限编辑', '2018-12-09 20:15:44', 'PERMISSION_EDIT', '13');
|
||||||
INSERT INTO `permission` VALUES ('17', '权限删除', '2018-12-09 20:15:59', 'PERMISSION_DELETE', '13');
|
INSERT INTO `permission` VALUES ('17', '权限删除', '2018-12-09 20:15:59', 'PERMISSION_DELETE', '13');
|
||||||
INSERT INTO `permission` VALUES ('18', '缓存管理', '2018-12-17 13:53:25', 'REDIS_ALL', '0');
|
INSERT INTO `permission` VALUES ('18', '缓存管理', '2018-12-17 13:53:25', 'REDIS_ALL', '0');
|
||||||
INSERT INTO `permission` VALUES ('19', '新增缓存', '2018-12-17 13:53:44', 'REDIS_CREATE', '18');
|
|
||||||
INSERT INTO `permission` VALUES ('20', '缓存查询', '2018-12-17 13:54:07', 'REDIS_SELECT', '18');
|
INSERT INTO `permission` VALUES ('20', '缓存查询', '2018-12-17 13:54:07', 'REDIS_SELECT', '18');
|
||||||
INSERT INTO `permission` VALUES ('21', '缓存编辑', '2018-12-17 13:54:26', 'REDIS_EDIT', '18');
|
|
||||||
INSERT INTO `permission` VALUES ('22', '缓存删除', '2018-12-17 13:55:04', 'REDIS_DELETE', '18');
|
INSERT INTO `permission` VALUES ('22', '缓存删除', '2018-12-17 13:55:04', 'REDIS_DELETE', '18');
|
||||||
INSERT INTO `permission` VALUES ('23', '图床管理', '2018-12-27 20:31:49', 'PICTURE_ALL', '0');
|
INSERT INTO `permission` VALUES ('23', '图床管理', '2018-12-27 20:31:49', 'PICTURE_ALL', '0');
|
||||||
INSERT INTO `permission` VALUES ('24', '查询图片', '2018-12-27 20:32:04', 'PICTURE_SELECT', '23');
|
INSERT INTO `permission` VALUES ('24', '查询图片', '2018-12-27 20:32:04', 'PICTURE_SELECT', '23');
|
||||||
|
@ -314,11 +320,7 @@ CREATE TABLE `picture` (
|
||||||
`username` varchar(255) DEFAULT NULL COMMENT '用户名称',
|
`username` varchar(255) DEFAULT NULL COMMENT '用户名称',
|
||||||
`width` varchar(255) DEFAULT NULL COMMENT '图片宽度',
|
`width` varchar(255) DEFAULT NULL COMMENT '图片宽度',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Records of picture
|
|
||||||
-- ----------------------------
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for qiniu_config
|
-- Table structure for qiniu_config
|
||||||
|
@ -348,11 +350,7 @@ CREATE TABLE `qiniu_content` (
|
||||||
`update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间',
|
`update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间',
|
||||||
`url` varchar(255) DEFAULT NULL COMMENT '文件url',
|
`url` varchar(255) DEFAULT NULL COMMENT '文件url',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Records of qiniu_content
|
|
||||||
-- ----------------------------
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for quartz_job
|
-- Table structure for quartz_job
|
||||||
|
@ -394,7 +392,7 @@ CREATE TABLE `quartz_log` (
|
||||||
`params` varchar(255) DEFAULT NULL,
|
`params` varchar(255) DEFAULT NULL,
|
||||||
`time` bigint(20) DEFAULT NULL,
|
`time` bigint(20) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of quartz_log
|
-- Records of quartz_log
|
||||||
|
@ -419,7 +417,7 @@ CREATE TABLE `role` (
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `role` VALUES ('1', '2018-11-23 11:04:37', '超级管理员', '系统所有权', '全部', '1');
|
INSERT INTO `role` VALUES ('1', '2018-11-23 11:04:37', '超级管理员', '系统所有权', '全部', '1');
|
||||||
INSERT INTO `role` VALUES ('2', '2018-11-23 13:09:06', '普通用户', '用于测试菜单与权限', '自定义', '3');
|
INSERT INTO `role` VALUES ('2', '2018-11-23 13:09:06', '普通用户', '用于测试菜单与权限', '自定义', '3');
|
||||||
INSERT INTO `role` VALUES ('4', '2019-05-13 14:16:15', '普通管理员', '普通管理员级别为2,使用该角色新增用户时只能赋予比普通管理员级别低的角色', '全部', '2');
|
INSERT INTO `role` VALUES ('4', '2019-05-13 14:16:15', '普通管理员', '普通管理员级别为2,使用该角色新增用户时只能赋予比普通管理员级别低的角色', '自定义', '2');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for roles_depts
|
-- Table structure for roles_depts
|
||||||
|
@ -438,6 +436,8 @@ CREATE TABLE `roles_depts` (
|
||||||
-- Records of roles_depts
|
-- Records of roles_depts
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `roles_depts` VALUES ('2', '5');
|
INSERT INTO `roles_depts` VALUES ('2', '5');
|
||||||
|
INSERT INTO `roles_depts` VALUES ('4', '6');
|
||||||
|
INSERT INTO `roles_depts` VALUES ('4', '7');
|
||||||
INSERT INTO `roles_depts` VALUES ('2', '8');
|
INSERT INTO `roles_depts` VALUES ('2', '8');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -467,7 +467,6 @@ INSERT INTO `roles_menus` VALUES ('8', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('9', '1');
|
INSERT INTO `roles_menus` VALUES ('9', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('10', '1');
|
INSERT INTO `roles_menus` VALUES ('10', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('11', '1');
|
INSERT INTO `roles_menus` VALUES ('11', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('12', '1');
|
|
||||||
INSERT INTO `roles_menus` VALUES ('14', '1');
|
INSERT INTO `roles_menus` VALUES ('14', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('15', '1');
|
INSERT INTO `roles_menus` VALUES ('15', '1');
|
||||||
INSERT INTO `roles_menus` VALUES ('16', '1');
|
INSERT INTO `roles_menus` VALUES ('16', '1');
|
||||||
|
@ -499,7 +498,6 @@ INSERT INTO `roles_menus` VALUES ('8', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('9', '2');
|
INSERT INTO `roles_menus` VALUES ('9', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('10', '2');
|
INSERT INTO `roles_menus` VALUES ('10', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('11', '2');
|
INSERT INTO `roles_menus` VALUES ('11', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('12', '2');
|
|
||||||
INSERT INTO `roles_menus` VALUES ('14', '2');
|
INSERT INTO `roles_menus` VALUES ('14', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('15', '2');
|
INSERT INTO `roles_menus` VALUES ('15', '2');
|
||||||
INSERT INTO `roles_menus` VALUES ('16', '2');
|
INSERT INTO `roles_menus` VALUES ('16', '2');
|
||||||
|
@ -540,12 +538,10 @@ CREATE TABLE `roles_permissions` (
|
||||||
-- Records of roles_permissions
|
-- Records of roles_permissions
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `roles_permissions` VALUES ('1', '1');
|
INSERT INTO `roles_permissions` VALUES ('1', '1');
|
||||||
INSERT INTO `roles_permissions` VALUES ('4', '2');
|
|
||||||
INSERT INTO `roles_permissions` VALUES ('2', '3');
|
INSERT INTO `roles_permissions` VALUES ('2', '3');
|
||||||
INSERT INTO `roles_permissions` VALUES ('4', '3');
|
INSERT INTO `roles_permissions` VALUES ('4', '3');
|
||||||
INSERT INTO `roles_permissions` VALUES ('4', '4');
|
INSERT INTO `roles_permissions` VALUES ('4', '4');
|
||||||
INSERT INTO `roles_permissions` VALUES ('4', '5');
|
INSERT INTO `roles_permissions` VALUES ('4', '5');
|
||||||
INSERT INTO `roles_permissions` VALUES ('4', '6');
|
|
||||||
INSERT INTO `roles_permissions` VALUES ('2', '8');
|
INSERT INTO `roles_permissions` VALUES ('2', '8');
|
||||||
INSERT INTO `roles_permissions` VALUES ('2', '14');
|
INSERT INTO `roles_permissions` VALUES ('2', '14');
|
||||||
INSERT INTO `roles_permissions` VALUES ('2', '20');
|
INSERT INTO `roles_permissions` VALUES ('2', '20');
|
||||||
|
@ -643,8 +639,4 @@ CREATE TABLE `visits` (
|
||||||
`week_day` varchar(255) DEFAULT NULL,
|
`week_day` varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `UK_11aksgq87euk9bcyeesfs4vtp` (`date`)
|
UNIQUE KEY `UK_11aksgq87euk9bcyeesfs4vtp` (`date`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Records of visits
|
|
||||||
-- ----------------------------
|
|
||||||
|
|
Loading…
Reference in New Issue