forked from liweijie/education
导入导出 模版下载 bug修复
This commit is contained in:
+102
@@ -0,0 +1,102 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.common.exception.ServiceException;
|
||||
import com.roomroot.common.utils.file.FileUtils;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* 导入模版下载。模版文件位于 classpath:file/
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/download")
|
||||
public class DownloadController {
|
||||
|
||||
private static final String TEMPLATE_DIR = "file/";
|
||||
|
||||
/**
|
||||
* 人才培养方案课程数据文件模板
|
||||
*/
|
||||
@GetMapping("/training-program")
|
||||
public void downloadTrainingProgram(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "人才培养方案课程数据文件模板.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 学员队模板
|
||||
*/
|
||||
@GetMapping("/student-team")
|
||||
public void downloadStudentTeam(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "学员队模板.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入教学日志模板
|
||||
*/
|
||||
@GetMapping("/teaching-log")
|
||||
public void downloadTeachingLog(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "导入教学日志模板.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 教学场地管理模板
|
||||
*/
|
||||
@GetMapping("/classroom")
|
||||
public void downloadClassroom(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "教学场地管理模板.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 教材管理模板
|
||||
*/
|
||||
@GetMapping("/teaching-material")
|
||||
public void downloadTeachingMaterial(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "教材管理.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 教研室模板
|
||||
*/
|
||||
@GetMapping("/jys")
|
||||
public void downloadJys(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "教研室模板.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 联教连训管理模板
|
||||
*/
|
||||
@GetMapping("/joint-training")
|
||||
public void downloadJointTraining(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "联教连训管理.xls");
|
||||
}
|
||||
|
||||
/**
|
||||
* 课程课目数据文件模板
|
||||
*/
|
||||
@GetMapping("/course-subject")
|
||||
public void downloadCourseSubject(HttpServletResponse response) throws IOException {
|
||||
downloadTemplate(response, "课程课目数据文件模板.xls");
|
||||
}
|
||||
|
||||
private void downloadTemplate(HttpServletResponse response, String fileName) throws IOException {
|
||||
ClassPathResource resource = new ClassPathResource(TEMPLATE_DIR + fileName);
|
||||
if (!resource.exists()) {
|
||||
throw new ServiceException("模板文件不存在:" + fileName);
|
||||
}
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
FileUtils.setAttachmentResponseHeader(response, fileName);
|
||||
try (InputStream is = resource.getInputStream(); OutputStream os = response.getOutputStream()) {
|
||||
IOUtils.copy(is, os);
|
||||
os.flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -2,6 +2,7 @@ package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.dto.ks.HourStatisticsQuery;
|
||||
import com.roomroot.jwgl.entity.KSFBZ;
|
||||
import com.roomroot.jwgl.entity.KSBZXM;
|
||||
import com.roomroot.jwgl.entity.KSXSFA;
|
||||
import com.roomroot.jwgl.service.KJService;
|
||||
import com.roomroot.jwgl.service.KSService;
|
||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
@@ -259,4 +261,79 @@ public class KSController {
|
||||
ksService.exportFeeStatistics(cond, response);
|
||||
}
|
||||
|
||||
// ======================== 联教联训管理(课时补助项目) ========================
|
||||
|
||||
/**
|
||||
* 新增联教联训(课时补助项目)。
|
||||
* <p>对应表:课时补助项目。编号为空时由服务端生成 UUID。</p>
|
||||
*/
|
||||
@PostMapping("/yjlx/add")
|
||||
public Result<Void> addSubsidyProject(@RequestBody KSBZXM entity) {
|
||||
logService.addSubsidyProject(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除联教联训(课时补助项目)。
|
||||
*
|
||||
* @param bh 编号
|
||||
*/
|
||||
@PostMapping("/yjlx/delete")
|
||||
public Result<Void> deleteSubsidyProject(@RequestParam("bh") String bh) {
|
||||
logService.deleteSubsidyProject(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新联教联训(课时补助项目)。
|
||||
*/
|
||||
@PostMapping("/yjlx/update")
|
||||
public Result<Void> updateSubsidyProject(@RequestBody KSBZXM entity) {
|
||||
logService.updateSubsidyProject(entity);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询联教联训详情。
|
||||
*/
|
||||
@GetMapping("/yjlx/get")
|
||||
public Result<KSBZXM> getSubsidyProject(@RequestParam("bh") String bh) {
|
||||
return Result.success(logService.getSubsidyProjectById(bh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询联教联训列表(支持按名称模糊筛选)。
|
||||
*/
|
||||
@GetMapping("/yjlx/list")
|
||||
public Result<PageResult<KSBZXM>> listSubsidyProject(
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "20") Integer pageSize,
|
||||
@RequestParam(required = false) String mc) {
|
||||
KSBZXM cond = new KSBZXM();
|
||||
cond.setMc(mc);
|
||||
return Result.success(logService.pageSubsidyProject(new PageQuery(pageNum, pageSize), cond));
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 Excel(.xls/.xlsx) 导入联教联训数据。
|
||||
* <p>模板列:序号, 补助项目名称, 性质, 依据, 开始日期, 结束日期, 项目说明,
|
||||
* 项目备注, 教研室名称, 补助教员姓名, 补助课时量, 课时量备注</p>
|
||||
*
|
||||
* @param file 上传的联教连训管理.xls 文件
|
||||
* @return 导入条数
|
||||
*/
|
||||
@PostMapping("/yjlx/import")
|
||||
public Result<Integer> importSubsidyProject(@RequestParam("file") MultipartFile file) throws Exception {
|
||||
int count = logService.importSubsidyProject(file);
|
||||
return Result.success("导入成功,共" + count + "条", count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出联教联训数据到 Excel(.xlsx)。
|
||||
*/
|
||||
@GetMapping("/yjlx/export")
|
||||
public void exportSubsidyProject(HttpServletResponse response) throws Exception {
|
||||
logService.exportSubsidyProject(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* 保障类别
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "保障类别", schema = "JW")
|
||||
@TableName(value = "保障类别")
|
||||
public class BZLB {
|
||||
|
||||
/**
|
||||
|
||||
@@ -77,7 +77,7 @@ public class BZTGMX extends BaseEntity {
|
||||
private String zylb;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public class DBVersion extends BaseEntity {
|
||||
private String jSXSBJ;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonZD;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class FWBDRWB extends BaseEntity {
|
||||
private LocalDateTime jssj;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public class FWBDWPRYB extends BaseEntity {
|
||||
private String wcqk;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public class FWBDXQB extends BaseEntity {
|
||||
private LocalDateTime jssj;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -216,9 +216,9 @@ public class JCXX extends BaseEntity {
|
||||
private String xqk;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("json字典")
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,7 +113,7 @@ public class JSB extends BaseEntity {
|
||||
private String jc;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "教学任务", schema = "JW")
|
||||
@TableName(value = "教学任务")
|
||||
public class JXRW extends BaseEntity {
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,7 @@ public class JYB {
|
||||
@TableField(value = "序号标识", updateStrategy = FieldStrategy.NEVER)
|
||||
private Integer xhbs;
|
||||
|
||||
/** json字典 */
|
||||
/** JSONZD */
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "教研室任务书", schema = "JW")
|
||||
@TableName(value = "教研室任务书")
|
||||
public class JYSRWS extends BaseEntity {
|
||||
|
||||
/**
|
||||
|
||||
@@ -151,8 +151,8 @@ public class KB {
|
||||
@TableField("课程建设方式")
|
||||
private String kcjsfs;
|
||||
|
||||
/** json字典 */
|
||||
@TableField("json字典")
|
||||
/** JSONZD */
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
/** 政治类课程 */
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 课程表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "课程表", schema = "JW")
|
||||
@TableName(value = "课程表")
|
||||
public class KCB {
|
||||
|
||||
/**
|
||||
|
||||
@@ -249,7 +249,7 @@ public class KCBMBB extends BaseEntity {
|
||||
private Integer kCBYZZKTS;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonZD;
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public class LBSBXXB extends BaseEntity {
|
||||
private String zbdzj;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public class LBZYGLPT extends BaseEntity {
|
||||
private Boolean zYPTDLWCLB;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonZD;
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ public class LLB extends BaseEntity {
|
||||
private LocalDateTime xgrq;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public class MHKSQB extends BaseEntity {
|
||||
private LocalDateTime jwshsj;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ public class PXRW extends BaseEntity {
|
||||
private Integer jhbcs;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 实施_课程
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "实施_课程", schema = "JW")
|
||||
@TableName(value = "实施_课程")
|
||||
public class SSKC {
|
||||
|
||||
/**
|
||||
@@ -189,9 +189,9 @@ public class SSKC {
|
||||
private String fzqzbzbh;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("json字典")
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,7 +154,7 @@ public class SSKCB {
|
||||
private String ycxx;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
@@ -64,7 +64,7 @@ public class WSSXB extends BaseEntity {
|
||||
private String bZ;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonZD;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class XKZYXX {
|
||||
@TableField("自定义分类")
|
||||
private String zdyfl;
|
||||
|
||||
/** json字典 */
|
||||
/** JSONZD */
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class XQ extends BaseEntity {
|
||||
private String sdjldw;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class XQJYXXB extends BaseEntity {
|
||||
private String ddjylb;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class XYCPCPXMB extends BaseEntity {
|
||||
private String pSKJYTGNR;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonZD;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "学员队年度学期基本信息表", schema = "JW")
|
||||
@TableName(value = "学员队年度学期基本信息表")
|
||||
public class XYDNDXQJBXXB extends BaseEntity {
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,7 @@ public class XYDNDXQJBXXB extends BaseEntity {
|
||||
private Integer kfjypk;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "学员队任务表", schema = "JW")
|
||||
@TableName(value = "学员队任务表")
|
||||
public class XYDRWB extends BaseEntity {
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "学员队输出课程表", schema = "JW")
|
||||
@TableName(value = "学员队输出课程表")
|
||||
public class XYDSCKCB extends BaseEntity {
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 学员教学请假表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "学员教学请假表", schema = "JW")
|
||||
@TableName(value = "学员教学请假表")
|
||||
public class XYJXQJB {
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,7 +89,7 @@ public class XYKCBKCP extends BaseEntity {
|
||||
private String ktcptjjson;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 学员请假审批表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "学员请假审批表", schema = "JW")
|
||||
@TableName(value = "学员请假审批表")
|
||||
public class XYQJSPB {
|
||||
|
||||
/**
|
||||
|
||||
@@ -122,7 +122,7 @@ public class XYXX {
|
||||
private Integer txzt;
|
||||
|
||||
/** 留级状态 */
|
||||
@TableField("留级状态 0 1留级")
|
||||
@TableField("留级状态")
|
||||
private Integer ljzt;
|
||||
|
||||
/** 分班状态 */
|
||||
@@ -153,8 +153,8 @@ public class XYXX {
|
||||
@TableField("允许查看成绩")
|
||||
private String yxckcj;
|
||||
|
||||
/** json字典 */
|
||||
@TableField("json字典")
|
||||
/** JSONZD */
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
/** 当前班次编号 */
|
||||
|
||||
@@ -194,7 +194,7 @@ public class XYXXB extends BaseEntity {
|
||||
private Integer yxckcj;
|
||||
|
||||
/**
|
||||
* json字典
|
||||
* JSONZD
|
||||
*/
|
||||
private String jsonzd;
|
||||
|
||||
|
||||
@@ -117,8 +117,8 @@ public class ZYB {
|
||||
@TableField("系统模式")
|
||||
private String xtms;
|
||||
|
||||
/** json字典 NVARCHAR(4000) */
|
||||
@TableField("json字典")
|
||||
/** JSONZD NVARCHAR(4000) */
|
||||
@TableField("JSONZD")
|
||||
private String jsonzd;
|
||||
|
||||
/** 主干专业 */
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
* 专业教学计划表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "专业教学计划表", schema = "JW")
|
||||
@TableName(value = "专业教学计划表")
|
||||
public class ZYJXJHB {
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
<result column="三实课标记" property="sSKBJ" />
|
||||
<result column="增加学时标记" property="zJXSBJ" />
|
||||
<result column="减少学时标记" property="jSXSBJ" />
|
||||
<result column="json字典" property="jsonZD" />
|
||||
<result column="JSONZD" property="jsonZD" />
|
||||
<result column="学员正课请假模板文件编号" property="xYZKQJMBWJBH" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
ID, VersionDate, VersionValue, UniversityName, 学员队全名称含年级, 学期名称样式, 节次类别, 外部文件存储根路径, 本站文件访问路径, 登录失败弹窗, 允许密码尝试次数, 用户锁定分钟数, 允许教研室管理教材, 使用虚拟教学场地设置班次专用教室, 使用虚拟教员设置课程责任教员, 允许多主讲分组教学, 跟查课录入锁定天数, UniversityCode, UniversityValidCode, 显示78节, 显示晚上, 显示夜间, 教学要点名称, 教材导出包含图片, 建立班次学期信息时自动生成教学计划, 成绩报表显示结论成绩, 缺省系统名称, Excel课表按开课日期排序, Excel课表显示实施教员数, 系统模式, 课程表标题样式, 课程表副标题样式, 大屏显示教学内容, 大屏显示前景标题颜色, 大屏显示前景内容颜色, 大屏显示背景颜色, 实践课标记, 三实课标记, 增加学时标记, 减少学时标记, json字典, 学员正课请假模板文件编号
|
||||
ID, VersionDate, VersionValue, UniversityName, 学员队全名称含年级, 学期名称样式, 节次类别, 外部文件存储根路径, 本站文件访问路径, 登录失败弹窗, 允许密码尝试次数, 用户锁定分钟数, 允许教研室管理教材, 使用虚拟教学场地设置班次专用教室, 使用虚拟教员设置课程责任教员, 允许多主讲分组教学, 跟查课录入锁定天数, UniversityCode, UniversityValidCode, 显示78节, 显示晚上, 显示夜间, 教学要点名称, 教材导出包含图片, 建立班次学期信息时自动生成教学计划, 成绩报表显示结论成绩, 缺省系统名称, Excel课表按开课日期排序, Excel课表显示实施教员数, 系统模式, 课程表标题样式, 课程表副标题样式, 大屏显示教学内容, 大屏显示前景标题颜色, 大屏显示前景内容颜色, 大屏显示背景颜色, 实践课标记, 三实课标记, 增加学时标记, 减少学时标记, JSONZD, 学员正课请假模板文件编号
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<result column="节次优选级" property="jcyxj" />
|
||||
<result column="课程支持方式" property="kczcfs" />
|
||||
<result column="课程建设方式" property="kcjsfs" />
|
||||
<result column="json字典" property="jsonzd" />
|
||||
<result column="JSONZD" property="jsonzd" />
|
||||
<result column="政治类课程" property="zzlkc" />
|
||||
<result column="考核方式" property="khfs" />
|
||||
<result column="形成性成绩分值" property="xcxcjfz" />
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
<result column="课程周次范围列位置" property="kCZCFWLWZ" />
|
||||
<result column="课程表起始列位置" property="kCBQSLWZ" />
|
||||
<result column="课程表一周正课天数" property="kCBYZZKTS" />
|
||||
<result column="json字典" property="jsonZD" />
|
||||
<result column="JSONZD" property="jsonZD" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 模版名称, 标题位置, 专业信息位置, 课表时间行号, 显示夜间, 末尾列位置, 课程行位置, 课程序号列位置, 课程名称列位置, 课程简称列位置, 课程学时列位置, 课程类型列位置, 课程责任教研室列位置, 课程责任教员列位置, 课程授课教员列位置, 课程人数列位置, 课程场地列位置, 全局备注位置, 更新时间, 上传者, 备注, 模版, 模版存在, 模版可用, 备注纵向样式, 无课站位字符, 队别位置, 课程合班信息位置, 标题格式, 副标题格式, 专用教室位置, 附加备注1位置, 附加备注2位置, 课表样式, 课表包含选修, 纵向显示78节, 纵向显示晚上, 纵向显示天数, 课程全部场地列位置, 课程表样式, 课程主讲教员列位置, 课程辅导教员列位置, 课程周次范围列位置, 课程表起始列位置, 课程表一周正课天数, json字典
|
||||
编号, 模版名称, 标题位置, 专业信息位置, 课表时间行号, 显示夜间, 末尾列位置, 课程行位置, 课程序号列位置, 课程名称列位置, 课程简称列位置, 课程学时列位置, 课程类型列位置, 课程责任教研室列位置, 课程责任教员列位置, 课程授课教员列位置, 课程人数列位置, 课程场地列位置, 全局备注位置, 更新时间, 上传者, 备注, 模版, 模版存在, 模版可用, 备注纵向样式, 无课站位字符, 队别位置, 课程合班信息位置, 标题格式, 副标题格式, 专用教室位置, 附加备注1位置, 附加备注2位置, 课表样式, 课表包含选修, 纵向显示78节, 纵向显示晚上, 纵向显示天数, 课程全部场地列位置, 课程表样式, 课程主讲教员列位置, 课程辅导教员列位置, 课程周次范围列位置, 课程表起始列位置, 课程表一周正课天数, JSONZD
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
<result column="平台参数5" property="pTCS5" />
|
||||
<result column="平台参数6" property="pTCS6" />
|
||||
<result column="资源平台独立完成录播" property="zYPTDLWCLB" />
|
||||
<result column="json字典" property="jsonZD" />
|
||||
<result column="JSONZD" property="jsonZD" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 平台标识, 平台品牌, 平台类型, 平台版本, 平台状态, 平台UserName, 平台Password, 平台IP, 平台端口, 平台参数1, 平台参数2, 平台参数3, 平台参数4, 平台参数5, 平台参数6, 资源平台独立完成录播, json字典
|
||||
编号, 平台标识, 平台品牌, 平台类型, 平台版本, 平台状态, 平台UserName, 平台Password, 平台IP, 平台端口, 平台参数1, 平台参数2, 平台参数3, 平台参数4, 平台参数5, 平台参数6, 资源平台独立完成录播, JSONZD
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -179,7 +179,7 @@
|
||||
"大屏显示教学内容", "大屏显示前景标题颜色",
|
||||
"大屏显示前景内容颜色", "大屏显示背景颜色",
|
||||
"实践课标记", "三实课标记", "增加学时标记",
|
||||
"减少学时标记", "json字典", "学员正课请假模板文件编号"
|
||||
"减少学时标记", "JSONZD", "学员正课请假模板文件编号"
|
||||
)
|
||||
SELECT
|
||||
currentVersion."ID" + 1,
|
||||
@@ -222,7 +222,7 @@
|
||||
currentVersion."三实课标记",
|
||||
currentVersion."增加学时标记",
|
||||
currentVersion."减少学时标记",
|
||||
currentVersion."json字典",
|
||||
currentVersion."JSONZD",
|
||||
currentVersion."学员正课请假模板文件编号"
|
||||
FROM "DBVersion" currentVersion
|
||||
WHERE currentVersion."ID" = #{dto.expectedVersionId}
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@
|
||||
<result column="版权图片文件编号" property="bqtpwjbh" />
|
||||
<result column="自编教材编审状态" property="zbjcbxzt" />
|
||||
<result column="评选情况" property="xqk" />
|
||||
<result column="json字典" property="jsonzd" />
|
||||
<result column="JSONZD" property="jsonzd" />
|
||||
<result column="自编立项日期" property="zblxrq" />
|
||||
<result column="教材使用情况" property="jcsyqk" />
|
||||
<result column="教材密级" property="jcmj" />
|
||||
@@ -59,7 +59,7 @@
|
||||
教材编写类型, 教材重点类型, 备注, 停用, 停用日期, 计量单位, 出版日期,
|
||||
创建时间, 修改时间, 教材来源, 教材层次, 责任教员及联系方式, 文件编号,
|
||||
封面图片文件编号, 出版方式, 教材代码, 编写单位, 教学管理机构编号,
|
||||
教研室代号, 版权图片文件编号, 自编教材编审状态, 评选情况, json字典,
|
||||
教研室代号, 版权图片文件编号, 自编教材编审状态, 评选情况, JSONZD,
|
||||
自编立项日期, 教材使用情况, 教材密级, 颁发审定单位, 需彩印,
|
||||
封面PSD文件编号, 封面PDF文件编号, 内容PDF文件编号, 内容WORD文件编号,
|
||||
锁定数量, 借出数量, 库存数量, 库存位置, 默认领用类型, ID, DEL_FLAG
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
<result column="关键字" property="gJZ" />
|
||||
<result column="摘要" property="zY" />
|
||||
<result column="备注" property="bZ" />
|
||||
<result column="json字典" property="jsonZD" />
|
||||
<result column="JSONZD" property="jsonZD" />
|
||||
<result column="日志" property="rZ" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 统一编号, 名称, 事项类别, 创建时间, 修改时间, 关键字, 摘要, 备注, json字典, 日志
|
||||
编号, 统一编号, 名称, 事项类别, 创建时间, 修改时间, 关键字, 摘要, 备注, JSONZD, 日志
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<result column="调课不审批_场地" property="tkbspCd" />
|
||||
<result column="序号" property="xh" />
|
||||
<result column="锁定计量单位" property="sdjldw" />
|
||||
<result column="json字典" property="jsonzd" />
|
||||
<result column="JSONZD" property="jsonzd" />
|
||||
<result column="课时统计时间" property="kstjsj" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
年度, 当前学期, 开学日期, 结束日期, 调课不审批, 课时系数方案编号, 禁止调课, 终结成绩定及格, 教务领导审核调课, 调课不审批_教员, 调课不审批_时间, 调课不审批_保障, 锁定周数, 调课不审批_场地, 序号, 锁定计量单位, json字典, 课时统计时间
|
||||
年度, 当前学期, 开学日期, 结束日期, 调课不审批, 课时系数方案编号, 禁止调课, 终结成绩定及格, 教务领导审核调课, 调课不审批_教员, 调课不审批_时间, 调课不审批_保障, 锁定周数, 调课不审批_场地, 序号, 锁定计量单位, JSONZD, 课时统计时间
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<result column="停用时间" property="tYSJ" />
|
||||
<result column="评课程通告内容" property="pKCTGNR" />
|
||||
<result column="评授课教员通告内容" property="pSKJYTGNR" />
|
||||
<result column="json字典" property="jsonZD" />
|
||||
<result column="JSONZD" property="jsonZD" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
编号, 名称, 课程板块测评_分值权重标准编号, 课程板块测评_测评结果样式编号, 学员评教员_分值权重标准编号, 学员评教员_测评结果样式编号, 创建时间, 停用状态, 备注, 停用时间, 评课程通告内容, 评授课教员通告内容, json字典
|
||||
编号, 名称, 课程板块测评_分值权重标准编号, 课程板块测评_测评结果样式编号, 学员评教员_分值权重标准编号, 学员评教员_测评结果样式编号, 创建时间, 停用状态, 备注, 停用时间, 评课程通告内容, 评授课教员通告内容, JSONZD
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<result column="拼音" property="py"/>
|
||||
<result column="成绩报告单编号" property="cjbgdbh"/>
|
||||
<result column="允许查看成绩" property="yxckcj"/>
|
||||
<result column="json字典" property="jsonzd"/>
|
||||
<result column="JSONZD" property="jsonzd"/>
|
||||
<result column="当前班次编号" property="dqbzbh"/>
|
||||
<result column="论文答辩文档编号" property="lwdbwdbh"/>
|
||||
<result column="标签" property="bq"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
入伍年月日, 性别, 出生日期, 名族, 籍贯, 原部职别, 邮政编码, 文化程度, 学位,
|
||||
学员类别, 军衔文职, 所属军区, 骨干任职, 本科毕业院校, 国防生, 考生号, 备注,
|
||||
身份证号, 退学状态, 留级状态, 分班状态, 论文编号, 论文题目, 论文摘要, 拼音,
|
||||
成绩报告单编号, 允许查看成绩, json字典, 当前班次编号, 论文答辩文档编号, 标签,
|
||||
成绩报告单编号, 允许查看成绩, JSONZD, 当前班次编号, 论文答辩文档编号, 标签,
|
||||
联系电话, 通信地址, 单位联络人信息, 奖励处分情况, 已注册, 军人证件类型, 曾用名,
|
||||
入伍地, 出生地, 生源地
|
||||
</sql>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<result column="简称" property="jc" />
|
||||
<result column="节次类别" property="jclb" />
|
||||
<result column="系统模式" property="xtms" />
|
||||
<result column="json字典" property="jsonzd" />
|
||||
<result column="JSONZD" property="jsonzd" />
|
||||
<result column="主干专业" property="zgzy" />
|
||||
<result column="规范名称" property="gfmc" />
|
||||
<result column="教学大纲编号" property="jxdgbh" />
|
||||
@@ -41,7 +41,7 @@
|
||||
专业代号, 专业名称, 专业方向, 学年制, 学期数, 专业备注, 专业规范, 专业代码, 专业版本,
|
||||
停用, 启用时间, 停用时间, 教学管理机构编号, 培训层次, 培训类型, 学科专业信息标识号,
|
||||
培训类型2, 学员类别, 自定义分类, 专业标识号, 序号标识, 简称, 节次类别, 系统模式,
|
||||
json字典, 主干专业, 规范名称, 教学大纲编号, 人培编号, 培养目标
|
||||
JSONZD, 主干专业, 规范名称, 教学大纲编号, 人培编号, 培养目标
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询专业表列表(支持条件筛选) -->
|
||||
|
||||
@@ -104,8 +104,11 @@ public interface LogService {
|
||||
|
||||
void addSubsidyProject(KSBZXM entity);
|
||||
void updateSubsidyProject(KSBZXM entity);
|
||||
void deleteSubsidyProject(String bh);
|
||||
KSBZXM getSubsidyProjectById(String bh);
|
||||
PageResult<KSBZXM> pageSubsidyProject(PageQuery query, KSBZXM cond);
|
||||
int importSubsidyProject(org.springframework.web.multipart.MultipartFile file) throws Exception;
|
||||
void exportSubsidyProject(jakarta.servlet.http.HttpServletResponse response) throws Exception;
|
||||
|
||||
// ==================== 教学日志课时补助审批表(汇总) ====================
|
||||
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ public class DisciplineServiceImpl implements DisciplineService {
|
||||
assertMaxLength(entity.getJc(), 50, "简称");
|
||||
assertMaxLength(entity.getJclb(), 50, "节次类别");
|
||||
assertMaxLength(entity.getXtms(), 50, "系统模式");
|
||||
assertMaxLength(entity.getJsonzd(), 4000, "json字典");
|
||||
assertMaxLength(entity.getJsonzd(), 4000, "JSONZD");
|
||||
assertMaxLength(entity.getGfmc(), 250, "规范名称");
|
||||
assertMaxLength(entity.getPymb(), 500, "培养目标");
|
||||
}
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ public class KBServiceImpl implements KBService {
|
||||
assertMaxLength(entity.getBb(), 50, "版本");
|
||||
assertMaxLength(entity.getKczcfs(), 50, "课程支持方式");
|
||||
assertMaxLength(entity.getKcjsfs(), 50, "课程建设方式");
|
||||
assertMaxLength(entity.getJsonzd(), 4000, "json字典");
|
||||
assertMaxLength(entity.getJsonzd(), 4000, "JSONZD");
|
||||
assertMaxLength(entity.getKhfs(), 50, "考核方式");
|
||||
assertMaxLength(entity.getMj(), 50, "密级");
|
||||
assertMaxLength(entity.getPxqk(), 50, "评选情况");
|
||||
|
||||
+76
@@ -545,12 +545,15 @@ public class LogServiceImpl implements LogService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void addSubsidyProject(KSBZXM entity) {
|
||||
entity.setCjsj(LocalDateTime.now());
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
ksbzxmMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateSubsidyProject(KSBZXM entity) {
|
||||
entity.setXgsj(LocalDateTime.now());
|
||||
ksbzxmMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@@ -568,6 +571,79 @@ public class LogServiceImpl implements LogService {
|
||||
return new PageResult<>(result.getRecords(), result.getTotal(), query.getPageNum(), query.getPageSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteSubsidyProject(String bh) {
|
||||
ksbzxmMapper.deleteById(bh);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int importSubsidyProject(org.springframework.web.multipart.MultipartFile file) throws Exception {
|
||||
if (file == null || file.isEmpty()) {
|
||||
throw new RuntimeException("导入文件不能为空");
|
||||
}
|
||||
List<KSBZXM> list = com.roomroot.jwgl.utils.ExcelParseUtil.parseKSBZXMExcel(
|
||||
file.getInputStream(), file.getOriginalFilename());
|
||||
if (list.isEmpty()) {
|
||||
throw new RuntimeException("Excel中无有效数据");
|
||||
}
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
for (KSBZXM entity : list) {
|
||||
if (entity.getBh() == null || entity.getBh().isEmpty()) {
|
||||
entity.setBh(com.roomroot.jwgl.utils.UuidUtil.getUUID());
|
||||
}
|
||||
if (entity.getXmlx() == null || entity.getXmlx().isEmpty()) {
|
||||
entity.setXmlx("联教联训");
|
||||
}
|
||||
entity.setCjsj(now);
|
||||
entity.setXgsj(now);
|
||||
ksbzxmMapper.insert(entity);
|
||||
}
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportSubsidyProject(jakarta.servlet.http.HttpServletResponse response) throws Exception {
|
||||
List<KSBZXM> list = ksbzxmMapper.selectList(
|
||||
new LambdaQueryWrapper<KSBZXM>().orderByDesc(KSBZXM::getCjsj));
|
||||
String[] headers = {"编号", "名称", "性质", "依据", "开始日期", "结束日期", "天数",
|
||||
"基本课时量", "课时类型", "说明", "备注", "项目类型"};
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + java.net.URLEncoder.encode(
|
||||
"联教联训管理.xlsx", java.nio.charset.StandardCharsets.UTF_8));
|
||||
try (org.apache.poi.xssf.usermodel.XSSFWorkbook workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook()) {
|
||||
org.apache.poi.ss.usermodel.Sheet sheet = workbook.createSheet("联教联训");
|
||||
org.apache.poi.ss.usermodel.Row headerRow = sheet.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
headerRow.createCell(i).setCellValue(headers[i]);
|
||||
}
|
||||
int rowIdx = 1;
|
||||
for (KSBZXM e : list) {
|
||||
org.apache.poi.ss.usermodel.Row row = sheet.createRow(rowIdx++);
|
||||
row.createCell(0).setCellValue(e.getBh() == null ? "" : e.getBh());
|
||||
row.createCell(1).setCellValue(e.getMc() == null ? "" : e.getMc());
|
||||
row.createCell(2).setCellValue(e.getXz() == null ? "" : e.getXz());
|
||||
row.createCell(3).setCellValue(e.getYj() == null ? "" : e.getYj());
|
||||
row.createCell(4).setCellValue(e.getKsrq() == null ? "" : e.getKsrq().toString());
|
||||
row.createCell(5).setCellValue(e.getJsrq() == null ? "" : e.getJsrq().toString());
|
||||
row.createCell(6).setCellValue(e.getTs() == null ? "" : String.valueOf(e.getTs()));
|
||||
row.createCell(7).setCellValue(e.getJbksl() == null ? "" : String.valueOf(e.getJbksl()));
|
||||
row.createCell(8).setCellValue(e.getKslx() == null ? "" : e.getKslx());
|
||||
row.createCell(9).setCellValue(e.getSm() == null ? "" : e.getSm());
|
||||
row.createCell(10).setCellValue(e.getBz() == null ? "" : e.getBz());
|
||||
row.createCell(11).setCellValue(e.getXmlx() == null ? "" : e.getXmlx());
|
||||
}
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
sheet.autoSizeColumn(i);
|
||||
}
|
||||
workbook.write(response.getOutputStream());
|
||||
response.getOutputStream().flush();
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 教学日志课时补助审批表(汇总) ====================
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.roomroot.jwgl.dto.courserunning.SingleCourseImportDTO;
|
||||
import com.roomroot.jwgl.dto.departmentpersonnel.DepartmentPersonnelCreateDTO;
|
||||
import com.roomroot.jwgl.entity.JXSSJH;
|
||||
import com.roomroot.jwgl.entity.JYSB;
|
||||
import com.roomroot.jwgl.entity.KSBZXM;
|
||||
import com.roomroot.jwgl.entity.XYDB;
|
||||
import com.roomroot.jwgl.entity.XYXX;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
@@ -19,6 +20,7 @@ import java.io.InputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -322,6 +324,68 @@ public class ExcelParseUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析联教联训(课时补助项目)导入 Excel 文件(支持 .xls / .xlsx)。
|
||||
* <p>模板表头顺序:</p>
|
||||
* 序号, 补助项目名称, 性质, 依据, 开始日期, 结束日期, 项目说明, 项目备注,
|
||||
* 教研室名称, 补助教员姓名, 补助课时量, 课时量备注
|
||||
* <p>只映射课时补助项目表存在的字段;序号/教研室名称/补助教员姓名/课时量备注无对应列,忽略。</p>
|
||||
*
|
||||
* @return 课时补助项目实体列表(创建/修改时间由业务层填充)
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
public static List<KSBZXM> parseKSBZXMExcel(InputStream inputStream, String fileName) throws Exception {
|
||||
List<KSBZXM> result = new ArrayList<>();
|
||||
Workbook workbook = createWorkbook(inputStream, fileName);
|
||||
try {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
int lastRowNum = sheet.getLastRowNum();
|
||||
for (int rowNum = 1; rowNum <= lastRowNum; rowNum++) {
|
||||
Row row = sheet.getRow(rowNum);
|
||||
if (row == null) {
|
||||
continue;
|
||||
}
|
||||
KSBZXM entity = new KSBZXM();
|
||||
// 补助项目名称
|
||||
entity.setMc(getCellStringValue(row.getCell(1)));
|
||||
// 性质
|
||||
entity.setXz(getCellStringValue(row.getCell(2)));
|
||||
// 依据
|
||||
entity.setYj(getCellStringValue(row.getCell(3)));
|
||||
// 开始日期
|
||||
entity.setKsrq(parseDateTimeCell(row.getCell(4)));
|
||||
// 结束日期
|
||||
entity.setJsrq(parseDateTimeCell(row.getCell(5)));
|
||||
// 项目说明
|
||||
entity.setSm(getCellStringValue(row.getCell(6)));
|
||||
// 项目备注
|
||||
entity.setBz(getCellStringValue(row.getCell(7)));
|
||||
// 补助课时量 -> 基本课时量
|
||||
String ksl = getCellStringValue(row.getCell(10));
|
||||
if (ksl != null && !ksl.isEmpty()) {
|
||||
try {
|
||||
entity.setJbksl(Float.parseFloat(ksl));
|
||||
} catch (NumberFormatException ignored) {
|
||||
entity.setJbksl(0f);
|
||||
}
|
||||
}
|
||||
// 天数:由开始与结束日期计算(含首尾,不足整天按自然日计)
|
||||
if (entity.getKsrq() != null && entity.getJsrq() != null) {
|
||||
long days = ChronoUnit.DAYS.between(
|
||||
entity.getKsrq().toLocalDate(), entity.getJsrq().toLocalDate()) + 1;
|
||||
entity.setTs((float) Math.max(days, 1));
|
||||
}
|
||||
// 至少要有名称才视为有效行
|
||||
if (entity.getMc() != null && !entity.getMc().isEmpty()) {
|
||||
result.add(entity);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
workbook.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static Workbook createWorkbook(InputStream inputStream, String fileName) throws Exception {
|
||||
String name = fileName == null ? "" : fileName.toLowerCase();
|
||||
if (!name.endsWith(".xlsx") && !name.endsWith(".xls")) {
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
|
||||
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
|
||||
DROP TABLE IF EXISTS QRTZ_LOCKS;
|
||||
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
|
||||
DROP TABLE IF EXISTS QRTZ_CALENDARS;
|
||||
|
||||
-- ----------------------------
|
||||
-- 1、存储每一个已配置的 jobDetail 的详细信息
|
||||
-- ----------------------------
|
||||
create table QRTZ_JOB_DETAILS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
job_name varchar(200) not null comment '任务名称',
|
||||
job_group varchar(200) not null comment '任务组名',
|
||||
description varchar(250) null comment '相关介绍',
|
||||
job_class_name varchar(250) not null comment '执行任务类名称',
|
||||
is_durable varchar(1) not null comment '是否持久化',
|
||||
is_nonconcurrent varchar(1) not null comment '是否并发',
|
||||
is_update_data varchar(1) not null comment '是否更新数据',
|
||||
requests_recovery varchar(1) not null comment '是否接受恢复执行',
|
||||
job_data blob null comment '存放持久化job对象',
|
||||
primary key (sched_name, job_name, job_group)
|
||||
) engine=innodb comment = '任务详细信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 2、 存储已配置的 Trigger 的信息
|
||||
-- ----------------------------
|
||||
create table QRTZ_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_name varchar(200) not null comment '触发器的名字',
|
||||
trigger_group varchar(200) not null comment '触发器所属组的名字',
|
||||
job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键',
|
||||
job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键',
|
||||
description varchar(250) null comment '相关介绍',
|
||||
next_fire_time bigint(13) null comment '上一次触发时间(毫秒)',
|
||||
prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)',
|
||||
priority integer null comment '优先级',
|
||||
trigger_state varchar(16) not null comment '触发器状态',
|
||||
trigger_type varchar(8) not null comment '触发器的类型',
|
||||
start_time bigint(13) not null comment '开始时间',
|
||||
end_time bigint(13) null comment '结束时间',
|
||||
calendar_name varchar(200) null comment '日程表名称',
|
||||
misfire_instr smallint(2) null comment '补偿执行的策略',
|
||||
job_data blob null comment '存放持久化job对象',
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
|
||||
) engine=innodb comment = '触发器详细信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数
|
||||
-- ----------------------------
|
||||
create table QRTZ_SIMPLE_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
repeat_count bigint(7) not null comment '重复的次数统计',
|
||||
repeat_interval bigint(12) not null comment '重复的间隔时间',
|
||||
times_triggered bigint(10) not null comment '已经触发的次数',
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
) engine=innodb comment = '简单触发器的信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息
|
||||
-- ----------------------------
|
||||
create table QRTZ_CRON_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
cron_expression varchar(200) not null comment 'cron表达式',
|
||||
time_zone_id varchar(80) comment '时区',
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
) engine=innodb comment = 'Cron类型的触发器表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候)
|
||||
-- ----------------------------
|
||||
create table QRTZ_BLOB_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
blob_data blob null comment '存放持久化Trigger对象',
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
) engine=innodb comment = 'Blob类型的触发器表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围
|
||||
-- ----------------------------
|
||||
create table QRTZ_CALENDARS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
calendar_name varchar(200) not null comment '日历名称',
|
||||
calendar blob not null comment '存放持久化calendar对象',
|
||||
primary key (sched_name, calendar_name)
|
||||
) engine=innodb comment = '日历信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 7、 存储已暂停的 Trigger 组的信息
|
||||
-- ----------------------------
|
||||
create table QRTZ_PAUSED_TRIGGER_GRPS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
primary key (sched_name, trigger_group)
|
||||
) engine=innodb comment = '暂停的触发器表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息
|
||||
-- ----------------------------
|
||||
create table QRTZ_FIRED_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
entry_id varchar(95) not null comment '调度器实例id',
|
||||
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
instance_name varchar(200) not null comment '调度器实例名',
|
||||
fired_time bigint(13) not null comment '触发的时间',
|
||||
sched_time bigint(13) not null comment '定时器制定的时间',
|
||||
priority integer not null comment '优先级',
|
||||
state varchar(16) not null comment '状态',
|
||||
job_name varchar(200) null comment '任务名称',
|
||||
job_group varchar(200) null comment '任务组名',
|
||||
is_nonconcurrent varchar(1) null comment '是否并发',
|
||||
requests_recovery varchar(1) null comment '是否接受恢复执行',
|
||||
primary key (sched_name, entry_id)
|
||||
) engine=innodb comment = '已触发的触发器表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例
|
||||
-- ----------------------------
|
||||
create table QRTZ_SCHEDULER_STATE (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
instance_name varchar(200) not null comment '实例名称',
|
||||
last_checkin_time bigint(13) not null comment '上次检查时间',
|
||||
checkin_interval bigint(13) not null comment '检查间隔时间',
|
||||
primary key (sched_name, instance_name)
|
||||
) engine=innodb comment = '调度器状态表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
|
||||
-- ----------------------------
|
||||
create table QRTZ_LOCKS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
lock_name varchar(40) not null comment '悲观锁名称',
|
||||
primary key (sched_name, lock_name)
|
||||
) engine=innodb comment = '存储的悲观锁信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 11、 Quartz集群实现同步机制的行锁表
|
||||
-- ----------------------------
|
||||
create table QRTZ_SIMPROP_TRIGGERS (
|
||||
sched_name varchar(120) not null comment '调度名称',
|
||||
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
|
||||
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
|
||||
str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数',
|
||||
str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数',
|
||||
str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数',
|
||||
int_prop_1 int null comment 'int类型的trigger的第一个参数',
|
||||
int_prop_2 int null comment 'int类型的trigger的第二个参数',
|
||||
long_prop_1 bigint null comment 'long类型的trigger的第一个参数',
|
||||
long_prop_2 bigint null comment 'long类型的trigger的第二个参数',
|
||||
dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数',
|
||||
dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数',
|
||||
bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数',
|
||||
bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数',
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
) engine=innodb comment = '同步机制的行锁表';
|
||||
|
||||
commit;
|
||||
@@ -1,723 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- 1、部门表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_dept;
|
||||
create table sys_dept (
|
||||
dept_id bigint(20) not null auto_increment comment '部门id',
|
||||
parent_id bigint(20) default 0 comment '父部门id',
|
||||
ancestors varchar(50) default '' comment '祖级列表',
|
||||
dept_name varchar(30) default '' comment '部门名称',
|
||||
order_num int(4) default 0 comment '显示顺序',
|
||||
leader varchar(20) default null comment '负责人',
|
||||
phone varchar(11) default null comment '联系电话',
|
||||
email varchar(50) default null comment '邮箱',
|
||||
status char(1) default '0' comment '部门状态(0正常 1停用)',
|
||||
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
primary key (dept_id)
|
||||
) engine=innodb auto_increment=200 comment = '部门表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-部门表数据
|
||||
-- ----------------------------
|
||||
insert into sys_dept values(100, 0, '0', '风影随行科技', 0, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '风影随行', '15888888888', 'fysx@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 2、用户信息表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_user;
|
||||
create table sys_user (
|
||||
user_id bigint(20) not null auto_increment comment '用户ID',
|
||||
dept_id bigint(20) default null comment '部门ID',
|
||||
user_name varchar(30) not null comment '用户账号',
|
||||
nick_name varchar(30) not null comment '用户昵称',
|
||||
user_type varchar(2) default '00' comment '用户类型(00系统用户)',
|
||||
email varchar(50) default '' comment '用户邮箱',
|
||||
phonenumber varchar(11) default '' comment '手机号码',
|
||||
sex char(1) default '0' comment '用户性别(0男 1女 2未知)',
|
||||
avatar varchar(100) default '' comment '头像地址',
|
||||
password varchar(100) default '' comment '密码',
|
||||
status char(1) default '0' comment '账号状态(0正常 1停用)',
|
||||
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||
login_ip varchar(128) default '' comment '最后登录IP',
|
||||
login_date datetime comment '最后登录时间',
|
||||
pwd_update_date datetime comment '密码最后更新时间',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (user_id)
|
||||
) engine=innodb auto_increment=100 comment = '用户信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_user values(1, 103, 'admin', '风影随行', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
|
||||
insert into sys_user values(2, 105, 'ry', '风影随行', '00', 'fysx@qq.com ', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 3、岗位信息表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_post;
|
||||
create table sys_post
|
||||
(
|
||||
post_id bigint(20) not null auto_increment comment '岗位ID',
|
||||
post_code varchar(64) not null comment '岗位编码',
|
||||
post_name varchar(50) not null comment '岗位名称',
|
||||
post_sort int(4) not null comment '显示顺序',
|
||||
status char(1) not null comment '状态(0正常 1停用)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (post_id)
|
||||
) engine=innodb comment = '岗位信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-岗位信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', sysdate(), '', null, '');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 4、角色信息表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_role;
|
||||
create table sys_role (
|
||||
role_id bigint(20) not null auto_increment comment '角色ID',
|
||||
role_name varchar(30) not null comment '角色名称',
|
||||
role_key varchar(100) not null comment '角色权限字符串',
|
||||
role_sort int(4) not null comment '显示顺序',
|
||||
data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
|
||||
menu_check_strictly tinyint(1) default 1 comment '菜单树选择项是否关联显示',
|
||||
dept_check_strictly tinyint(1) default 1 comment '部门树选择项是否关联显示',
|
||||
status char(1) not null comment '角色状态(0正常 1停用)',
|
||||
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (role_id)
|
||||
) engine=innodb auto_increment=100 comment = '角色信息表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员');
|
||||
insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 'admin', sysdate(), '', null, '普通角色');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 5、菜单权限表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_menu;
|
||||
create table sys_menu (
|
||||
menu_id bigint(20) not null auto_increment comment '菜单ID',
|
||||
menu_name varchar(50) not null comment '菜单名称',
|
||||
parent_id bigint(20) default 0 comment '父菜单ID',
|
||||
order_num int(4) default 0 comment '显示顺序',
|
||||
path varchar(200) default '' comment '路由地址',
|
||||
component varchar(255) default null comment '组件路径',
|
||||
query varchar(255) default null comment '路由参数',
|
||||
route_name varchar(50) default '' comment '路由名称',
|
||||
is_frame int(1) default 1 comment '是否为外链(0是 1否)',
|
||||
is_cache int(1) default 0 comment '是否缓存(0缓存 1不缓存)',
|
||||
menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)',
|
||||
visible char(1) default 0 comment '菜单状态(0显示 1隐藏)',
|
||||
status char(1) default 0 comment '菜单状态(0正常 1停用)',
|
||||
perms varchar(100) default null comment '权限标识',
|
||||
icon varchar(100) default '#' comment '菜单图标',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default '' comment '备注',
|
||||
primary key (menu_id)
|
||||
) engine=innodb auto_increment=2000 comment = '菜单权限表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-菜单信息表数据
|
||||
-- ----------------------------
|
||||
-- 一级菜单
|
||||
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
|
||||
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
|
||||
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
|
||||
insert into sys_menu values('4', '风影随行官网', '0', '4', 'http://ruoyi.vip', null, '', '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '风影随行官网地址');
|
||||
-- 二级菜单
|
||||
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
|
||||
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
|
||||
insert into sys_menu values('102', '菜单管理', '1', '3', 'menu', 'system/menu/index', '', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '菜单管理菜单');
|
||||
insert into sys_menu values('103', '部门管理', '1', '4', 'dept', 'system/dept/index', '', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '部门管理菜单');
|
||||
insert into sys_menu values('104', '岗位管理', '1', '5', 'post', 'system/post/index', '', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '岗位管理菜单');
|
||||
insert into sys_menu values('105', '字典管理', '1', '6', 'dict', 'system/dict/index', '', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '字典管理菜单');
|
||||
insert into sys_menu values('106', '参数设置', '1', '7', 'config', 'system/config/index', '', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '参数设置菜单');
|
||||
insert into sys_menu values('107', '通知公告', '1', '8', 'notice', 'system/notice/index', '', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '通知公告菜单');
|
||||
insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '日志管理菜单');
|
||||
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '在线用户菜单');
|
||||
insert into sys_menu values('110', '定时任务', '2', '2', 'job', 'monitor/job/index', '', '', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '定时任务菜单');
|
||||
insert into sys_menu values('111', '数据监控', '2', '3', 'druid', 'monitor/druid/index', '', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', sysdate(), '', null, '数据监控菜单');
|
||||
insert into sys_menu values('112', '服务监控', '2', '4', 'server', 'monitor/server/index', '', '', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '服务监控菜单');
|
||||
insert into sys_menu values('113', '缓存监控', '2', '5', 'cache', 'monitor/cache/index', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', sysdate(), '', null, '缓存监控菜单');
|
||||
insert into sys_menu values('114', '缓存列表', '2', '6', 'cacheList', 'monitor/cache/list', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', sysdate(), '', null, '缓存列表菜单');
|
||||
insert into sys_menu values('115', '表单构建', '3', '1', 'build', 'tool/build/index', '', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表单构建菜单');
|
||||
insert into sys_menu values('116', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代码生成菜单');
|
||||
insert into sys_menu values('117', '系统接口', '3', '3', 'swagger', 'tool/swagger/index', '', '', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '系统接口菜单');
|
||||
-- 三级菜单
|
||||
insert into sys_menu values('500', '操作日志', '108', '1', 'operlog', 'monitor/operlog/index', '', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', sysdate(), '', null, '操作日志菜单');
|
||||
insert into sys_menu values('501', '登录日志', '108', '2', 'logininfor', 'monitor/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '登录日志菜单');
|
||||
-- 用户管理按钮
|
||||
insert into sys_menu values('1000', '用户查询', '100', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1001', '用户新增', '100', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1002', '用户修改', '100', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1003', '用户删除', '100', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1004', '用户导出', '100', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1005', '用户导入', '100', '6', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1006', '重置密码', '100', '7', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 角色管理按钮
|
||||
insert into sys_menu values('1007', '角色查询', '101', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1008', '角色新增', '101', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1009', '角色修改', '101', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1010', '角色删除', '101', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1011', '角色导出', '101', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 菜单管理按钮
|
||||
insert into sys_menu values('1012', '菜单查询', '102', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1013', '菜单新增', '102', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1014', '菜单修改', '102', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1015', '菜单删除', '102', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 部门管理按钮
|
||||
insert into sys_menu values('1016', '部门查询', '103', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1017', '部门新增', '103', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1018', '部门修改', '103', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1019', '部门删除', '103', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 岗位管理按钮
|
||||
insert into sys_menu values('1020', '岗位查询', '104', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1021', '岗位新增', '104', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1022', '岗位修改', '104', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1023', '岗位删除', '104', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1024', '岗位导出', '104', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 字典管理按钮
|
||||
insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 参数设置按钮
|
||||
insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 通知公告按钮
|
||||
insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 操作日志按钮
|
||||
insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1041', '日志导出', '500', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 登录日志按钮
|
||||
insert into sys_menu values('1042', '登录查询', '501', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1043', '登录删除', '501', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1044', '日志导出', '501', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1045', '账户解锁', '501', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 在线用户按钮
|
||||
insert into sys_menu values('1046', '在线查询', '109', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1047', '批量强退', '109', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1048', '单条强退', '109', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 定时任务按钮
|
||||
insert into sys_menu values('1049', '任务查询', '110', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1050', '任务新增', '110', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1051', '任务修改', '110', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1052', '任务删除', '110', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1053', '状态修改', '110', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1054', '任务导出', '110', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, '');
|
||||
-- 代码生成按钮
|
||||
insert into sys_menu values('1055', '生成查询', '116', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1056', '生成修改', '116', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1057', '生成删除', '116', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1058', '导入代码', '116', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1059', '预览代码', '116', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_menu values('1060', '生成代码', '116', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 6、用户和角色关联表 用户N-1角色
|
||||
-- ----------------------------
|
||||
drop table if exists sys_user_role;
|
||||
create table sys_user_role (
|
||||
user_id bigint(20) not null comment '用户ID',
|
||||
role_id bigint(20) not null comment '角色ID',
|
||||
primary key(user_id, role_id)
|
||||
) engine=innodb comment = '用户和角色关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户和角色关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_user_role values ('1', '1');
|
||||
insert into sys_user_role values ('2', '2');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 7、角色和菜单关联表 角色1-N菜单
|
||||
-- ----------------------------
|
||||
drop table if exists sys_role_menu;
|
||||
create table sys_role_menu (
|
||||
role_id bigint(20) not null comment '角色ID',
|
||||
menu_id bigint(20) not null comment '菜单ID',
|
||||
primary key(role_id, menu_id)
|
||||
) engine=innodb comment = '角色和菜单关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色和菜单关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role_menu values ('2', '1');
|
||||
insert into sys_role_menu values ('2', '2');
|
||||
insert into sys_role_menu values ('2', '3');
|
||||
insert into sys_role_menu values ('2', '4');
|
||||
insert into sys_role_menu values ('2', '100');
|
||||
insert into sys_role_menu values ('2', '101');
|
||||
insert into sys_role_menu values ('2', '102');
|
||||
insert into sys_role_menu values ('2', '103');
|
||||
insert into sys_role_menu values ('2', '104');
|
||||
insert into sys_role_menu values ('2', '105');
|
||||
insert into sys_role_menu values ('2', '106');
|
||||
insert into sys_role_menu values ('2', '107');
|
||||
insert into sys_role_menu values ('2', '108');
|
||||
insert into sys_role_menu values ('2', '109');
|
||||
insert into sys_role_menu values ('2', '110');
|
||||
insert into sys_role_menu values ('2', '111');
|
||||
insert into sys_role_menu values ('2', '112');
|
||||
insert into sys_role_menu values ('2', '113');
|
||||
insert into sys_role_menu values ('2', '114');
|
||||
insert into sys_role_menu values ('2', '115');
|
||||
insert into sys_role_menu values ('2', '116');
|
||||
insert into sys_role_menu values ('2', '117');
|
||||
insert into sys_role_menu values ('2', '500');
|
||||
insert into sys_role_menu values ('2', '501');
|
||||
insert into sys_role_menu values ('2', '1000');
|
||||
insert into sys_role_menu values ('2', '1001');
|
||||
insert into sys_role_menu values ('2', '1002');
|
||||
insert into sys_role_menu values ('2', '1003');
|
||||
insert into sys_role_menu values ('2', '1004');
|
||||
insert into sys_role_menu values ('2', '1005');
|
||||
insert into sys_role_menu values ('2', '1006');
|
||||
insert into sys_role_menu values ('2', '1007');
|
||||
insert into sys_role_menu values ('2', '1008');
|
||||
insert into sys_role_menu values ('2', '1009');
|
||||
insert into sys_role_menu values ('2', '1010');
|
||||
insert into sys_role_menu values ('2', '1011');
|
||||
insert into sys_role_menu values ('2', '1012');
|
||||
insert into sys_role_menu values ('2', '1013');
|
||||
insert into sys_role_menu values ('2', '1014');
|
||||
insert into sys_role_menu values ('2', '1015');
|
||||
insert into sys_role_menu values ('2', '1016');
|
||||
insert into sys_role_menu values ('2', '1017');
|
||||
insert into sys_role_menu values ('2', '1018');
|
||||
insert into sys_role_menu values ('2', '1019');
|
||||
insert into sys_role_menu values ('2', '1020');
|
||||
insert into sys_role_menu values ('2', '1021');
|
||||
insert into sys_role_menu values ('2', '1022');
|
||||
insert into sys_role_menu values ('2', '1023');
|
||||
insert into sys_role_menu values ('2', '1024');
|
||||
insert into sys_role_menu values ('2', '1025');
|
||||
insert into sys_role_menu values ('2', '1026');
|
||||
insert into sys_role_menu values ('2', '1027');
|
||||
insert into sys_role_menu values ('2', '1028');
|
||||
insert into sys_role_menu values ('2', '1029');
|
||||
insert into sys_role_menu values ('2', '1030');
|
||||
insert into sys_role_menu values ('2', '1031');
|
||||
insert into sys_role_menu values ('2', '1032');
|
||||
insert into sys_role_menu values ('2', '1033');
|
||||
insert into sys_role_menu values ('2', '1034');
|
||||
insert into sys_role_menu values ('2', '1035');
|
||||
insert into sys_role_menu values ('2', '1036');
|
||||
insert into sys_role_menu values ('2', '1037');
|
||||
insert into sys_role_menu values ('2', '1038');
|
||||
insert into sys_role_menu values ('2', '1039');
|
||||
insert into sys_role_menu values ('2', '1040');
|
||||
insert into sys_role_menu values ('2', '1041');
|
||||
insert into sys_role_menu values ('2', '1042');
|
||||
insert into sys_role_menu values ('2', '1043');
|
||||
insert into sys_role_menu values ('2', '1044');
|
||||
insert into sys_role_menu values ('2', '1045');
|
||||
insert into sys_role_menu values ('2', '1046');
|
||||
insert into sys_role_menu values ('2', '1047');
|
||||
insert into sys_role_menu values ('2', '1048');
|
||||
insert into sys_role_menu values ('2', '1049');
|
||||
insert into sys_role_menu values ('2', '1050');
|
||||
insert into sys_role_menu values ('2', '1051');
|
||||
insert into sys_role_menu values ('2', '1052');
|
||||
insert into sys_role_menu values ('2', '1053');
|
||||
insert into sys_role_menu values ('2', '1054');
|
||||
insert into sys_role_menu values ('2', '1055');
|
||||
insert into sys_role_menu values ('2', '1056');
|
||||
insert into sys_role_menu values ('2', '1057');
|
||||
insert into sys_role_menu values ('2', '1058');
|
||||
insert into sys_role_menu values ('2', '1059');
|
||||
insert into sys_role_menu values ('2', '1060');
|
||||
|
||||
-- ----------------------------
|
||||
-- 8、角色和部门关联表 角色1-N部门
|
||||
-- ----------------------------
|
||||
drop table if exists sys_role_dept;
|
||||
create table sys_role_dept (
|
||||
role_id bigint(20) not null comment '角色ID',
|
||||
dept_id bigint(20) not null comment '部门ID',
|
||||
primary key(role_id, dept_id)
|
||||
) engine=innodb comment = '角色和部门关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-角色和部门关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_role_dept values ('2', '100');
|
||||
insert into sys_role_dept values ('2', '101');
|
||||
insert into sys_role_dept values ('2', '105');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 9、用户与岗位关联表 用户1-N岗位
|
||||
-- ----------------------------
|
||||
drop table if exists sys_user_post;
|
||||
create table sys_user_post
|
||||
(
|
||||
user_id bigint(20) not null comment '用户ID',
|
||||
post_id bigint(20) not null comment '岗位ID',
|
||||
primary key (user_id, post_id)
|
||||
) engine=innodb comment = '用户与岗位关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-用户与岗位关联表数据
|
||||
-- ----------------------------
|
||||
insert into sys_user_post values ('1', '1');
|
||||
insert into sys_user_post values ('2', '2');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 10、操作日志记录
|
||||
-- ----------------------------
|
||||
drop table if exists sys_oper_log;
|
||||
create table sys_oper_log (
|
||||
oper_id bigint(20) not null auto_increment comment '日志主键',
|
||||
title varchar(50) default '' comment '模块标题',
|
||||
business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)',
|
||||
method varchar(200) default '' comment '方法名称',
|
||||
request_method varchar(10) default '' comment '请求方式',
|
||||
operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)',
|
||||
oper_name varchar(50) default '' comment '操作人员',
|
||||
dept_name varchar(50) default '' comment '部门名称',
|
||||
oper_url varchar(255) default '' comment '请求URL',
|
||||
oper_ip varchar(128) default '' comment '主机地址',
|
||||
oper_location varchar(255) default '' comment '操作地点',
|
||||
oper_param varchar(2000) default '' comment '请求参数',
|
||||
json_result varchar(2000) default '' comment '返回参数',
|
||||
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
||||
error_msg varchar(2000) default '' comment '错误消息',
|
||||
oper_time datetime comment '操作时间',
|
||||
cost_time bigint(20) default 0 comment '消耗时间',
|
||||
primary key (oper_id),
|
||||
key idx_sys_oper_log_bt (business_type),
|
||||
key idx_sys_oper_log_s (status),
|
||||
key idx_sys_oper_log_ot (oper_time)
|
||||
) engine=innodb auto_increment=100 comment = '操作日志记录';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 11、字典类型表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_dict_type;
|
||||
create table sys_dict_type
|
||||
(
|
||||
dict_id bigint(20) not null auto_increment comment '字典主键',
|
||||
dict_name varchar(100) default '' comment '字典名称',
|
||||
dict_type varchar(100) default '' comment '字典类型',
|
||||
status char(1) default '0' comment '状态(0正常 1停用)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (dict_id),
|
||||
unique (dict_type)
|
||||
) engine=innodb auto_increment=100 comment = '字典类型表';
|
||||
|
||||
insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表');
|
||||
insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表');
|
||||
insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '系统开关列表');
|
||||
insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate(), '', null, '任务状态列表');
|
||||
insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate(), '', null, '任务分组列表');
|
||||
insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '系统是否列表');
|
||||
insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '通知类型列表');
|
||||
insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '通知状态列表');
|
||||
insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '操作类型列表');
|
||||
insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate(), '', null, '登录状态列表');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 12、字典数据表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_dict_data;
|
||||
create table sys_dict_data
|
||||
(
|
||||
dict_code bigint(20) not null auto_increment comment '字典编码',
|
||||
dict_sort int(4) default 0 comment '字典排序',
|
||||
dict_label varchar(100) default '' comment '字典标签',
|
||||
dict_value varchar(100) default '' comment '字典键值',
|
||||
dict_type varchar(100) default '' comment '字典类型',
|
||||
css_class varchar(100) default null comment '样式属性(其他样式扩展)',
|
||||
list_class varchar(100) default null comment '表格回显样式',
|
||||
is_default char(1) default 'N' comment '是否默认(Y是 N否)',
|
||||
status char(1) default '0' comment '状态(0正常 1停用)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (dict_code)
|
||||
) engine=innodb auto_increment=100 comment = '字典数据表';
|
||||
|
||||
insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男');
|
||||
insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女');
|
||||
insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别未知');
|
||||
insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单');
|
||||
insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '隐藏菜单');
|
||||
insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
|
||||
insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
|
||||
insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
|
||||
insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
|
||||
insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '默认分组');
|
||||
insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '系统分组');
|
||||
insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是');
|
||||
insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '系统默认否');
|
||||
insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知');
|
||||
insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '公告');
|
||||
insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
|
||||
insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '关闭状态');
|
||||
insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '其他操作');
|
||||
insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '新增操作');
|
||||
insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '修改操作');
|
||||
insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '删除操作');
|
||||
insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作');
|
||||
insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作');
|
||||
insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作');
|
||||
insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '强退操作');
|
||||
insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作');
|
||||
insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '清空操作');
|
||||
insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态');
|
||||
insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 13、参数配置表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_config;
|
||||
create table sys_config (
|
||||
config_id int(5) not null auto_increment comment '参数主键',
|
||||
config_name varchar(100) default '' comment '参数名称',
|
||||
config_key varchar(100) default '' comment '参数键名',
|
||||
config_value varchar(500) default '' comment '参数键值',
|
||||
config_type char(1) default 'N' comment '系统内置(Y是 N否)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (config_id)
|
||||
) engine=innodb auto_increment=100 comment = '参数配置表';
|
||||
|
||||
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
|
||||
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
|
||||
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
|
||||
insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(true开启,false关闭)');
|
||||
insert into sys_config values(5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
|
||||
insert into sys_config values(6, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', sysdate(), '', null, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)');
|
||||
insert into sys_config values(7, '用户管理-初始密码修改策略', 'sys.account.initPasswordModify', '1', 'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
|
||||
insert into sys_config values(8, '用户管理-账号密码更新周期', 'sys.account.passwordValidateDays', '0', 'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
|
||||
insert into sys_config values(9, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', sysdate(), '', null, '默认任意字符范围,0任意(密码可以输入任意字符),1数字(密码只能为0-9数字),2英文字母(密码只能为a-z和A-Z字母),3字母和数字(密码必须包含字母,数字),4字母数字和特殊字符(目前支持的特殊字符包括:~!@#$%^&*()-=_+)');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 14、系统访问记录
|
||||
-- ----------------------------
|
||||
drop table if exists sys_logininfor;
|
||||
create table sys_logininfor (
|
||||
info_id bigint(20) not null auto_increment comment '访问ID',
|
||||
user_name varchar(50) default '' comment '用户账号',
|
||||
ipaddr varchar(128) default '' comment '登录IP地址',
|
||||
login_location varchar(255) default '' comment '登录地点',
|
||||
browser varchar(50) default '' comment '浏览器类型',
|
||||
os varchar(50) default '' comment '操作系统',
|
||||
status char(1) default '0' comment '登录状态(0成功 1失败)',
|
||||
msg varchar(255) default '' comment '提示消息',
|
||||
login_time datetime comment '访问时间',
|
||||
primary key (info_id),
|
||||
key idx_sys_logininfor_s (status),
|
||||
key idx_sys_logininfor_lt (login_time)
|
||||
) engine=innodb auto_increment=100 comment = '系统访问记录';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 15、定时任务调度表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_job;
|
||||
create table sys_job (
|
||||
job_id bigint(20) not null auto_increment comment '任务ID',
|
||||
job_name varchar(64) default '' comment '任务名称',
|
||||
job_group varchar(64) default 'DEFAULT' comment '任务组名',
|
||||
invoke_target varchar(500) not null comment '调用目标字符串',
|
||||
cron_expression varchar(255) default '' comment 'cron执行表达式',
|
||||
misfire_policy varchar(20) default '3' comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)',
|
||||
concurrent char(1) default '1' comment '是否并发执行(0允许 1禁止)',
|
||||
status char(1) default '0' comment '状态(0正常 1暂停)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default '' comment '备注信息',
|
||||
primary key (job_id, job_name, job_group)
|
||||
) engine=innodb auto_increment=100 comment = '定时任务调度表';
|
||||
|
||||
insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
|
||||
insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 16、定时任务调度日志表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_job_log;
|
||||
create table sys_job_log (
|
||||
job_log_id bigint(20) not null auto_increment comment '任务日志ID',
|
||||
job_name varchar(64) not null comment '任务名称',
|
||||
job_group varchar(64) not null comment '任务组名',
|
||||
invoke_target varchar(500) not null comment '调用目标字符串',
|
||||
job_message varchar(500) comment '日志信息',
|
||||
status char(1) default '0' comment '执行状态(0正常 1失败)',
|
||||
exception_info varchar(2000) default '' comment '异常信息',
|
||||
start_time datetime comment '执行开始时间',
|
||||
end_time datetime comment '执行结束时间',
|
||||
create_time datetime comment '创建时间',
|
||||
primary key (job_log_id)
|
||||
) engine=innodb comment = '定时任务调度日志表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 17、通知公告表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_notice;
|
||||
create table sys_notice (
|
||||
notice_id int(4) not null auto_increment comment '公告ID',
|
||||
notice_title varchar(50) not null comment '公告标题',
|
||||
notice_type char(1) not null comment '公告类型(1通知 2公告)',
|
||||
notice_content longblob default null comment '公告内容',
|
||||
status char(1) default '0' comment '公告状态(0正常 1关闭)',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(255) default null comment '备注',
|
||||
primary key (notice_id)
|
||||
) engine=innodb auto_increment=10 comment = '通知公告表';
|
||||
|
||||
-- ----------------------------
|
||||
-- 初始化-公告信息表数据
|
||||
-- ----------------------------
|
||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 风影随行新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
|
||||
insert into sys_notice values('2', '维护通知:2018-07-01 风影随行系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员');
|
||||
insert into sys_notice values('3', '风影随行开源框架介绍', '1', '<p><span style=\"color: rgb(230, 0, 0);\">项目介绍</span></p><p><font color=\"#333333\">RuoYi开源项目是为企业用户定制的后台脚手架框架,为企业打造的一站式解决方案,降低企业开发成本,提升开发效率。主要包括用户管理、角色管理、部门管理、菜单管理、参数管理、字典管理、</font><span style=\"color: rgb(51, 51, 51);\">岗位管理</span><span style=\"color: rgb(51, 51, 51);\">、定时任务</span><span style=\"color: rgb(51, 51, 51);\">、</span><span style=\"color: rgb(51, 51, 51);\">服务监控、登录日志、操作日志、代码生成等功能。其中,还支持多数据源、数据权限、国际化、Redis缓存、Docker部署、滑动验证码、第三方认证登录、分布式事务、</span><font color=\"#333333\">分布式文件存储</font><span style=\"color: rgb(51, 51, 51);\">、分库分表处理等技术特点。</span></p><p><img src=\"https://foruda.gitee.com/images/1773931848342439032/a4d22313_1815095.png\" style=\"width: 64px;\"><br></p><p><span style=\"color: rgb(230, 0, 0);\">官网及演示</span></p><p><span style=\"color: rgb(51, 51, 51);\">风影随行官网地址: </span><a href=\"http://ruoyi.vip\" target=\"_blank\">http://ruoyi.vip</a><a href=\"http://ruoyi.vip\" target=\"_blank\"></a></p><p><span style=\"color: rgb(51, 51, 51);\">风影随行文档地址: </span><a href=\"http://doc.ruoyi.vip\" target=\"_blank\">http://doc.ruoyi.vip</a><br></p><p><span style=\"color: rgb(51, 51, 51);\">演示地址【不分离版】: </span><a href=\"http://demo.ruoyi.vip\" target=\"_blank\">http://demo.ruoyi.vip</a></p><p><span style=\"color: rgb(51, 51, 51);\">演示地址【分离版本】: </span><a href=\"http://vue.ruoyi.vip\" target=\"_blank\">http://vue.ruoyi.vip</a></p><p><span style=\"color: rgb(51, 51, 51);\">演示地址【微服务版】: </span><a href=\"http://cloud.ruoyi.vip\" target=\"_blank\">http://cloud.ruoyi.vip</a></p><p><span style=\"color: rgb(51, 51, 51);\">演示地址【移动端版】: </span><a href=\"http://h5.ruoyi.vip\" target=\"_blank\">http://h5.ruoyi.vip</a></p><p><br style=\"color: rgb(48, 49, 51); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px;\"></p>', '0', 'admin', sysdate(), '', null, '管理员');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 18、公告已读记录表
|
||||
-- ----------------------------
|
||||
drop table if exists sys_notice_read;
|
||||
create table sys_notice_read (
|
||||
read_id bigint(20) not null auto_increment comment '已读主键',
|
||||
notice_id int(4) not null comment '公告id',
|
||||
user_id bigint(20) not null comment '用户id',
|
||||
read_time datetime not null comment '阅读时间',
|
||||
primary key (read_id),
|
||||
unique key uk_user_notice (user_id, notice_id) comment '同一用户同一公告只记录一次'
|
||||
) engine=innodb auto_increment=1 comment='公告已读记录表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 19、代码生成业务表
|
||||
-- ----------------------------
|
||||
drop table if exists gen_table;
|
||||
create table gen_table (
|
||||
table_id bigint(20) not null auto_increment comment '编号',
|
||||
table_name varchar(200) default '' comment '表名称',
|
||||
table_comment varchar(500) default '' comment '表描述',
|
||||
sub_table_name varchar(64) default null comment '关联子表的表名',
|
||||
sub_table_fk_name varchar(64) default null comment '子表关联的外键名',
|
||||
class_name varchar(100) default '' comment '实体类名称',
|
||||
tpl_category varchar(200) default 'crud' comment '使用的模板(crud单表操作 tree树表操作)',
|
||||
tpl_web_type varchar(30) default '' comment '前端模板类型(element-ui模版 element-plus模版)',
|
||||
package_name varchar(100) comment '生成包路径',
|
||||
module_name varchar(30) comment '生成模块名',
|
||||
business_name varchar(30) comment '生成业务名',
|
||||
function_name varchar(50) comment '生成功能名',
|
||||
function_author varchar(50) comment '生成功能作者',
|
||||
form_col_num int(1) default 1 comment '表单布局(单列 双列 三列)',
|
||||
gen_type char(1) default '0' comment '生成代码方式(0zip压缩包 1自定义路径)',
|
||||
gen_path varchar(200) default '/' comment '生成路径(不填默认项目路径)',
|
||||
options varchar(1000) comment '其它生成选项',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
remark varchar(500) default null comment '备注',
|
||||
primary key (table_id)
|
||||
) engine=innodb auto_increment=1 comment = '代码生成业务表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 20、代码生成业务表字段
|
||||
-- ----------------------------
|
||||
drop table if exists gen_table_column;
|
||||
create table gen_table_column (
|
||||
column_id bigint(20) not null auto_increment comment '编号',
|
||||
table_id bigint(20) comment '归属表编号',
|
||||
column_name varchar(200) comment '列名称',
|
||||
column_comment varchar(500) comment '列描述',
|
||||
column_type varchar(100) comment '列类型',
|
||||
java_type varchar(500) comment 'JAVA类型',
|
||||
java_field varchar(200) comment 'JAVA字段名',
|
||||
is_pk char(1) comment '是否主键(1是)',
|
||||
is_increment char(1) comment '是否自增(1是)',
|
||||
is_required char(1) comment '是否必填(1是)',
|
||||
is_insert char(1) comment '是否为插入字段(1是)',
|
||||
is_edit char(1) comment '是否编辑字段(1是)',
|
||||
is_list char(1) comment '是否列表字段(1是)',
|
||||
is_query char(1) comment '是否查询字段(1是)',
|
||||
query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)',
|
||||
html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
|
||||
dict_type varchar(200) default '' comment '字典类型',
|
||||
sort int comment '排序',
|
||||
create_by varchar(64) default '' comment '创建者',
|
||||
create_time datetime comment '创建时间',
|
||||
update_by varchar(64) default '' comment '更新者',
|
||||
update_time datetime comment '更新时间',
|
||||
primary key (column_id)
|
||||
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
||||
Reference in New Issue
Block a user