Compare commits

...

89 Commits

Author SHA1 Message Date
thinkgem
6b29c8c937 5.10.0 2024-12-31 21:04:15 +08:00
thinkgem
cf32922387 update import icon 2024-12-31 21:04:15 +08:00
thinkgem
5e87d44a3c 2025 2024-12-30 14:56:56 +08:00
thinkgem
0ef1eca662 update 2024-12-29 16:43:20 +08:00
thinkgem
203e21beed update bin 2024-12-26 11:42:58 +08:00
thinkgem
34b1ba00fd 上传文件必填时,防止表单验证提示输入历史 2024-12-25 16:20:46 +08:00
thinkgem
8e64c2c51b update README.md 2024-12-25 15:50:06 +08:00
thinkgem
62392702a6 update jdbc url 2024-12-25 10:30:26 +08:00
thinkgem
580f5eea55 remove beetl includeJSP 2024-12-23 17:15:54 +08:00
thinkgem
3623824a01 update README.md 2024-12-13 12:59:21 +08:00
thinkgem
b1409e88a1 update README.md 2024-12-12 18:16:41 +08:00
thinkgem
2b25eaa591 增加参考配置,可查看哪些用户的数据,ctrlPermi 更改为 0 后显示 2024-12-11 10:32:19 +08:00
thinkgem
38c8ea825a 细节优化,控制业务范围重命名为业务范围 2024-12-11 10:27:48 +08:00
thinkgem
56be7dd689 移除重复参数 2024-12-11 10:23:03 +08:00
thinkgem
8623b1a497 新增BigDecimalType 2024-12-05 11:12:14 +08:00
thinkgem
1c8a5adcd3 update 2024-12-05 11:12:07 +08:00
thinkgem
8d1bbde93b update version 2024-12-04 14:30:02 +08:00
thinkgem
a9054c7567 使用对象存储时,文件管理的在线预览文件中的下载地址修正 2024-12-04 14:17:22 +08:00
thinkgem
bca5facc4e update 2024-11-26 20:10:15 +08:00
thinkgem
a8d1080cfd update README.md 2024-11-24 20:36:53 +08:00
thinkgem
44ca71d681 5.9.2 2024-11-23 09:56:20 +08:00
thinkgem
6ecd94b954 update 2024-11-21 09:49:23 +08:00
thinkgem
cba1010a45 更新注册提示信息 2024-11-13 17:17:07 +08:00
thinkgem
9f1ebcd8e5 切换系统时,清除当前岗位和角色状态 2024-11-12 10:54:58 +08:00
thinkgem
998c3204a9 设备信息字段 device_info 长度调整为 4000 2024-11-11 17:12:05 +08:00
thinkgem
ac314d9070 登录后重定向地址验证,如果是非法地址,则指定默认的登录成功地址 2024-11-07 17:53:12 +08:00
thinkgem
7826863bb5 update README.md 2024-11-07 16:13:02 +08:00
thinkgem
4c96681055 新建 mini 迷你服务工具,最小化启动项目 2024-11-07 16:07:44 +08:00
thinkgem
7ca01a354a update version 2024-11-07 15:28:00 +08:00
thinkgem
71771421d5 Vue登录界面useCorpModel更改为loginCodeCorpUnique 2024-11-07 15:15:39 +08:00
thinkgem
5f664bd84b 新增 窗口右上角的头像下拉菜单,切换当前用户所属岗位,并联动切换当前菜单权限 2024-11-07 10:26:04 +08:00
thinkgem
5ea41881de 提升登录性能;支持普通用户升级为超管用户。 2024-11-07 10:22:36 +08:00
thinkgem
6e2843869d 优化 MenuDao.xml 接口 findByUserCode 替换为 findByRoleCodes 升级时注意 2024-11-07 10:19:30 +08:00
thinkgem
6a0ebd6c2d 新增 当前用户 user.getRoleList() 支持返回 岗位关联角色数据 2024-11-07 10:19:04 +08:00
thinkgem
48bd4778e6 新增 岗位关联角色(用户->岗位->角色)权限控制,可通过 user.postRolePermi=true 参数开启 2024-11-07 10:17:51 +08:00
thinkgem
d7ada6e4e6 增加岗位切换接口;优化登录菜单权限查询,直接通过当前用户角色查询,减少联表,提升查询效率。 2024-11-07 10:15:20 +08:00
thinkgem
f8a008d88b 优化 增加岗位保存时清理关联的用户缓存 2024-11-07 10:14:37 +08:00
thinkgem
7bfb458981 优化 超级管理员作为普通员工时的角色数据查询,允许修改超级管理员员工信息,不允许停用禁用删除超管 2024-11-07 10:12:46 +08:00
thinkgem
a2ffa1e47a 增加手机端单表代码生成模板 2024-11-05 11:25:53 +08:00
thinkgem
80b397e9e4 quartz 2.4.0.rc3 2024-11-04 18:14:03 +08:00
thinkgem
b008b0c956 修正代码生成时,子表文件生成目录不对问题,vue日期类型不匹配问题 2024-11-04 17:52:19 +08:00
thinkgem
d79339b891 jackson 2.18.1 2024-11-04 17:36:24 +08:00
thinkgem
81acccfe66 优化 mvc 接受字段类型不一致信息显示,方便调试 2024-11-01 19:59:56 +08:00
thinkgem
fe6004d81d 调整代码生成模板目录 2024-11-01 10:44:10 +08:00
thinkgem
e404d2652d 优化表单内表格的行高和边距 2024-10-28 21:27:42 +08:00
thinkgem
827d461437 update 2024-10-25 19:07:25 +08:00
thinkgem
a2da4f095b 5.9.1 2024-10-21 22:34:17 +08:00
thinkgem
302eb47b83 update app name 2024-10-21 14:12:03 +08:00
thinkgem
4fa6225017 logback 1.2.13 2024-10-14 21:16:38 +08:00
thinkgem
68058f948f spring 5.3.39 2024-10-10 20:48:58 +08:00
thinkgem
fc59e3a7aa 编辑表格中被隐藏的旧数据行控件忽略前端校验 2024-10-10 09:03:20 +08:00
thinkgem
d1cd3ad5ad update 2024-10-08 16:34:03 +08:00
thinkgem
213834810c 代码生成模板新增vue子表独立组件的生成 2024-10-08 14:13:37 +08:00
thinkgem
6d381b31da 代码生成支持带减号的工程模块名生成工程和微服务工程 2024-10-08 14:07:22 +08:00
thinkgem
5e55b5f4b3 驼峰命名法工具增加减号替换 2024-10-08 14:04:51 +08:00
thinkgem
e3dc77b75a 增加启动完成提示信息日志 2024-10-08 14:03:15 +08:00
thinkgem
58b22924dd 生成前端路径更改为 Vue 前端路径,仅用于分离端的代码生成路径。 2024-09-27 15:09:40 +08:00
thinkgem
f7cdda05d1 代码生成模板新增classNameSimple参数,不带模块名的类名。子表List字段名不带模块名。 2024-09-27 15:08:29 +08:00
thinkgem
cb52f25931 启动日志中显示 tomcat 版本号 2024-09-24 14:02:29 +08:00
thinkgem
5b9a7c1d2c 新增监控开关参数 服务器监控 state.server 缓存监控 state.cache 数据监控 state.druid 2024-09-23 13:32:53 +08:00
thinkgem
c295b87f35 文件预览列表增加文件名返回参数 2024-09-23 12:02:28 +08:00
thinkgem
d6eecc1c56 update upbw html 2024-09-22 19:28:28 +08:00
thinkgem
9d2a250d72 5.9.0 2024-09-18 09:45:20 +08:00
thinkgem
f0cc98e45b 增加 gen.simpleRequestMapping 默认参数 true 可简洁 url 地址 2024-09-18 09:08:41 +08:00
thinkgem
a8fbf4d2b1 fix 代码生成业务列表选择框i18n路径 2024-09-18 09:07:55 +08:00
thinkgem
2013201f06 数据源管理:新增连接等待时间、连接失败中断默认参数;新增集群支持,单机修改后自动同步到集群其它节点 2024-09-16 22:22:40 +08:00
thinkgem
425c74fab4 update README.md 2024-09-14 13:06:00 +08:00
thinkgem
b9fc0a9f86 update 2024-09-14 12:55:17 +08:00
thinkgem
ca256c1364 update 2024-09-14 12:54:35 +08:00
thinkgem
c484e19448 小屏幕下的菜单按钮布局优化 2024-09-13 10:47:33 +08:00
thinkgem
9275260019 默认显示列表搜索框 2024-09-13 10:46:31 +08:00
thinkgem
9a671d8dfd 默认显示列表搜索框 2024-09-13 10:46:24 +08:00
thinkgem
7b537b4c83 默认显示列表搜索框 2024-09-13 10:46:02 +08:00
thinkgem
223d05b8c1 默认显示列表搜索框 2024-09-13 10:45:55 +08:00
thinkgem
4ca8398f99 new version 2024-09-12 10:13:25 +08:00
thinkgem
cfc8681174 子表增加表单验证提示、代码格式化 2024-09-11 10:15:31 +08:00
thinkgem
9c5bfd9c59 update README.md 2024-08-29 16:23:08 +08:00
thinkgem
3f87f2a024 优化导入 2024-08-29 13:12:17 +08:00
thinkgem
c3a25b98ec update 2024-08-29 10:31:06 +08:00
thinkgem
5c09e3de51 新增支持 Vue 地址路由参数,使用 {param1} 自动替换为 :param1,用法详见 params.vue 2024-08-28 15:09:15 +08:00
thinkgem
91e08cf4df 新增导出Excel数据按钮loading状态 2024-08-27 14:40:41 +08:00
thinkgem
14a38abb6d update 2024-08-26 21:42:57 +08:00
thinkgem
99c778c92d update README.md 2024-08-22 17:40:54 +08:00
thinkgem
e51dd7c73c 优化流程表单模板,支持从表单进入显示审批意见框 2024-08-16 18:44:05 +08:00
thinkgem
67891ce361 update 2024-08-16 16:01:44 +08:00
thinkgem
25a192cd6a update 2024-08-15 19:59:47 +08:00
thinkgem
444463ed5e Merge branch 'refs/heads/v5.temp' into v5.8 2024-08-12 20:06:00 +08:00
卓源软件
97ebfe40be update README.md.
Signed-off-by: 卓源软件 <thinkgem@163.com>
2024-07-17 00:14:18 +00:00
thinkgem
72b030bcc1 Merge poi version 2024-07-07 12:20:42 +08:00
193 changed files with 2802 additions and 709 deletions

View File

@@ -4,10 +4,13 @@
</p>
<h3 align="center" style="margin:30px 0 30px;font-weight:bold;font-size:30px;">快速开发平台 - Spring Boot</h3>
<p align="center">
<a href="https://jeesite.com/docs/upgrade/" target="__blank"><img alt="JeeSite-V5.8" src="https://img.shields.io/badge/JeeSite-V5.8-success.svg"></a>
<a href="https://spring.io/projects/spring-boot#learn" target="__blank"><img alt="SpringBoot-2.7/3.2" src="https://img.shields.io/badge/SpringBoot-2.7/3.2-blue.svg"></a>
<a href="https://gitee.com/thinkgem/jeesite5/stargazers" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite5/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/thinkgem/jeesite5/members" target="__blank"><img alt="fork" src="https://gitee.com/thinkgem/jeesite5/badge/fork.svg?theme=dark"></a>
<a href="https://spring.io/projects/spring-boot" target="__blank"><img alt="SpringBoot-2.7/3.3" src="https://img.shields.io/badge/SpringBoot-V2.7/3.4-blue.svg"></a>
<a href="https://v3.cn.vuejs.org/" target="__blank"><img alt="TypeScript-Vue3" src="https://img.shields.io/badge/TypeScript-Vue3-green.svg"></a>
<a href="https://jeesite.com/docs/upgrade/" target="__blank"><img alt="JeeSite-5.9" src="https://img.shields.io/badge/JeeSite-V5.9-success.svg"></a>
<a href="https://gitee.com/thinkgem/jeesite5" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite5/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/thinkgem/jeesite-vue" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite-vue/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/thinkgem/jeesite" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite/badge/star.svg?theme=gvp"></a>
<a href="https://gitcode.com/thinkgem/jeesite" target="__blank"><img alt="star" src="https://gitcode.com/thinkgem/jeesite/star/badge.svg"></a>
</p>
------
@@ -24,17 +27,32 @@
* 使用文档:<https://jeesite.com/docs>
* 问题反馈:<http://jeesite.net> [【新手必读】](https://gitee.com/thinkgem/jeesite5/issues/I18ARR)
* 需求收集:<https://gitee.com/thinkgem/jeesite5/issues/new>
* QQ 群:`127515876``209330483``223507718``709534275``730390092``1373527``183903863(外包)`
* 联系我们:<http://s.jeesite.com>
* 关注微信公众号,了解最新动态:
<p style="padding-left:40px">
<img alt="JeeSite微信公众号" src="https://images.gitee.com/uploads/images/2020/0727/091951_a3ab258c_6732.jpeg" width="220" height="220">
<p style="padding-left:40px">  
<img alt="JeeSite微信公众号" src="https://jeesite.com/assets/images/mp.png" width="200">
</p>
* 源码仓库地址1<https://gitee.com/thinkgem/jeesite5>
* 源码仓库地址2<https://github.com/thinkgem/jeesite5>
* 分离版前端源码仓库地址1<https://gitee.com/thinkgem/jeesite-vue>
* 分离版前端源码仓库地址2<https://github.com/thinkgem/jeesite-vue>
* QQ 群:`127515876``209330483``223507718``709534275``730390092``1373527``183903863(外包)`
* 微信群:如果无法进入,可添加客服微信 jeesitex 邀请您进群
<p style="padding-left:40px">  
<img alt="JeeSite微信群" src="https://jeesite.com/assets/images/wxg_cur.png" width="200"/>
</p>
* 源码仓库地址:
[Gitee](https://gitee.com/thinkgem/jeesite5)、
[GitCode](https://gitcode.com/thinkgem/jeesite5)、
[GitHub](https://github.com/thinkgem/jeesite5)
* 分离版源码仓库地址:
[Gitee](https://gitee.com/thinkgem/jeesite-vue)、
[GitCode](https://gitcode.com/thinkgem/jeesite-vue)、
[GitHub](https://github.com/thinkgem/jeesite-vue)
* 源码合集仓库地址:
[GVP](https://gitee.com/thinkgem/jeesite/tree/v5.springboot3)、
[G-Star](https://gitcode.com/thinkgem/jeesite/overview?ref=v5.springboot3)、
[GitHub](https://github.com/thinkgem/jeesite/tree/v5.springboot3)
## 平台介绍
@@ -83,7 +101,7 @@
* 前端组件jQuery 3.7、jqGrid 4.7、layer 3.5、zTree 3.5、jQuery Validation
* 分离前端版Node.js、TypeScript、Vue3、Vite、Ant Design Vue、Vue Vben Admin
* 工作流引擎Flowable 6.6、符合 BPMN 规范、在线流程设计器、中国式流程、退回、撤回、自由流
* Bootstrap 版 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌、火狐、国产浏览器 等
* Bootstrap 版 支持 IE10 及以上版本及其他所有现代浏览器,如:谷歌、火狐、国产浏览器 等
* Vue3 版 支持现代浏览器,如:谷歌 Chrome 86+、火狐、国产浏览器 等
* 技术选型(详细):<http://jeesite.com/docs/technology/>
* JeeSite Vue 版本:<https://gitee.com/thinkgem/jeesite-vue>
@@ -121,7 +139,7 @@
### 本地运行
1. 环境准备:`JDK 1.8 or 11、17``Maven 3.6+`、使用 `MySQL 5.7 or 8.0` 数据库、[其它数据库](https://jeesite.com/docs/technology/#_8、已支持数据库)
2. 下载源码:<https://gitee.com/thinkgem/jeesite5/repository/archive/v5.7.zip> 并解压
2. 下载源码:<https://gitee.com/thinkgem/jeesite5/repository/archive/v5.9.zip> 并解压
3. 打开文件:`/web/src/main/resources/config/application.yml` 配置JDBC连接
4. 执行脚本:`/web/bin/init-data.bat` 初始化数据库
5. 执行脚本:`/web/bin/run-tomcat.bat` 启动服务即可
@@ -132,11 +150,11 @@
### 快速运行
1. 环境准备:`JDK 1.8 or 11、17``Maven 3.6+`、无需准备数据库(使用内嵌 H2 DB、Vue资源包
2. 下载源码:<https://gitee.com/thinkgem/jeesite5/repository/archive/v5.7.zip> 并解压
2. 下载源码:<https://gitee.com/thinkgem/jeesite5/repository/archive/v5.9.zip> 并解压
3. 执行脚本:`/web-fast/bin/run-tomcat.bat` 启动服务即可(自动初始化库)
4. 全栈版本地址:<http://127.0.0.1:8980/a/login>
5. Vue分离版本地址:<http://127.0.0.1:8980/vue/login>
6. 默认超级管理员账号system 密码 admin
4. Vue分离版本地址:<http://127.0.0.1:8980/vue/login>
5. 全栈版本地址:<http://127.0.0.1:8980/a/login>
6. 初始登录账号:超级管理员system 密码admin
7. 部署常见问题:<https://jeesite.com/docs/faq/>
### 容器运行
@@ -225,10 +243,10 @@ docker run --name jeesite-web -p 8980:8980 -d --restart unless-stopped \
7. 本项目已申请软件著作权,请尊重开源,感谢阅读。
8. 无用户数限制,无在线人数限制,放心使用。
## 技术服务与支持
## 技术支持与服务
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以获得更多回馈,我们会把公益事业做的更好,开放更多资源,回报社区和社会。请给我们一些动力吧,在此非常感谢已支持我们的朋友!
* **联系我们**:请访问技术支持服务页面:<https://jeesite.com/docs/support/>
* **联系我们**:请访问技术支持服务页面:<http://s.jeesite.com>
## 今后如何升级?

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.8.1-SNAPSHOT</version>
<version>5.10.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

View File

@@ -28,6 +28,8 @@ public class ExceptionUtils {
ex = (Throwable) request.getAttribute("exception");
} else if (request.getAttribute(RequestDispatcher.ERROR_EXCEPTION) != null) {
ex = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
} else if (request.getAttribute("org.springframework.web.servlet.DispatcherServlet.EXCEPTION") != null) {
ex = (Throwable) request.getAttribute("org.springframework.web.servlet.DispatcherServlet.EXCEPTION");
}
return ex;
}

View File

@@ -26,6 +26,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
public static final String COLON = ":";
public static final String TILDE = "~";
public static final String UNDERLINE = "_";
public static final String MINUS = "-";
/**
* 分隔字符串(逗号分隔)
@@ -284,7 +285,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
boolean upperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == UNDERLINE.charAt(0)) {
if (c == UNDERLINE.charAt(0) || c == MINUS.charAt(0)) {
upperCase = i != 1; // 不允许第二个字符是大写
} else if (upperCase) {
sb.append(Character.toUpperCase(c));

View File

@@ -77,7 +77,6 @@ public class ReflectUtils {
//Method method = getAccessibleMethodByName(object, methodName, 0);
//if (method == null) { return; }
//Class<?> returnType = method.getReturnType();
System.out.println(object.getClass());
MethodAccess ma = MethodAccess.get(object.getClass());
Class<?> returnType = ma.getReturnTypes()[ma.getIndex(methodName)];
childObj = returnType.getDeclaredConstructor().newInstance();

View File

@@ -0,0 +1,44 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.common.utils.excel.fieldtype;
import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal;
/**
* BigDecimal类型转换
* @author ThinkGem
* @version 2020-3-5
* @example fieldType = BigDecimalType.class
*/
public class BigDecimalType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
return new BigDecimal(val);
}
/**
* 获取对象值(导出)
*/
@Override
public String setValue(Object val) {
return val == null ? StringUtils.EMPTY : val.toString();
}
/**
* 获取对象值格式(导出)
*/
@Override
public String getDataFormat() {
return "0.00";
}
}

View File

@@ -14,6 +14,7 @@ import com.jeesite.common.mapper.JsonMapper;
import com.jeesite.common.mapper.XmlMapper;
import org.apache.commons.lang3.Validate;
import org.springframework.http.MediaType;
import org.springframework.util.AntPathMatcher;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -57,6 +58,11 @@ public class ServletUtils {
// 是否打印错误信息参数到视图页面(生产环境关闭)
private static final Boolean PRINT_ERROR_INFO = PROPS.getPropertyToBoolean("error.page.printErrorInfo", "true");
// 允许重定向的地址不设置为全部允许设置this只允许本项目内部跳转多个用逗号隔开例如this,http://*.jeesite.com
private static final String[] ALLOW_REDIRECTS = PROPS.getPropertyToArray("shiro.allowRedirects", "");
private static final Boolean SCHEME_HTTPS = PROPS.getPropertyToBoolean("server.schemeHttps", "false");
private static final AntPathMatcher PATH_MATCHER = new AntPathMatcher();
/**
* 获取当前请求对象
* web.xml: <listener><listener-class>
@@ -384,10 +390,15 @@ public class ServletUtils {
}
/**
* 获取请求的域名(含端口)
* 获取当前请求的域名(含端口)
* @author ThinkGem
*/
public static String getRequestDomain(String url) {
public static String getThisDomain(HttpServletRequest request) {
String url = request.getRequestURL().toString();
String scheme = StringUtils.substringBefore(url, "://");
if (SCHEME_HTTPS && StringUtils.equals(scheme, "http")) {
scheme = "https";
}
String domain = StringUtils.substringAfter(url, "://");
if (StringUtils.contains(domain, "/")) {
domain = StringUtils.substringBefore(domain, "/");
@@ -395,6 +406,28 @@ public class ServletUtils {
return scheme + "://" + domain;
}
/**
* 验证地址是否允许重定向
* @author ThinkGem
*/
public static boolean isAllowRedirects(HttpServletRequest request, String url) {
if (ALLOW_REDIRECTS == null || ALLOW_REDIRECTS.length == 0) {
return true;
}
boolean allow = false;
for (String pattern : ALLOW_REDIRECTS) {
String p = StringUtils.trim(pattern);
if ("this".equals(p)) {
p = getThisDomain(request);
}
if (PATH_MATCHER.match(p + "/**", url)){
allow = true;
break;
}
}
return allow;
}
/**
* 获得请求参数值
*/

View File

@@ -235,3 +235,6 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:46px!important;}
.ui-jqgrid .ui-jqgrid-htable th div {padding:15px 0 15px 2px;}
.ui-jqgrid tr.jqgrow td {height: 49px;}
.table-form .ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:36px!important;}
.table-form .ui-jqgrid .ui-jqgrid-htable th div {padding:9px 0 8px 2px;}
.table-form .ui-jqgrid tr.jqgrow td {height: 39px;}

View File

@@ -235,3 +235,6 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:46px!important;}
.ui-jqgrid .ui-jqgrid-htable th div {padding:15px 0 15px 2px;}
.ui-jqgrid tr.jqgrow td {height: 49px;}
.table-form .ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:36px!important;}
.table-form .ui-jqgrid .ui-jqgrid-htable th div {padding:9px 0 8px 2px;}
.table-form .ui-jqgrid tr.jqgrow td {height: 39px;}

View File

@@ -296,6 +296,9 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:46px!important;}
.ui-jqgrid .ui-jqgrid-htable th div {padding:15px 0 15px 2px;}
.ui-jqgrid tr.jqgrow td {height: 49px;}
.table-form .ui-jqgrid .ui-jqgrid-frozen .ui-jqgrid-htable th div {height:36px!important;}
.table-form .ui-jqgrid .ui-jqgrid-htable th div {padding:9px 0 8px 2px;}
.table-form .ui-jqgrid tr.jqgrow td {height: 39px;}
.ui-jqgrid tr.jqgroup td, .ui-jqgrid tr.footrow td, .ui-jqgrid tr.jqfoot td {background:#323232;}
.ui-jqgrid .actions .moreItems {background:#1a1a1a;border-color:#3c3c3c;box-shadow:none;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -20,11 +20,11 @@ span{display:block;font-size:12px;line-height:12px;}
<p>您正在使用 Internet Explorer 的过期版本IE6、IE7、IE8 内核的浏览器)。这意味着在升级浏览器前,您将无法继续访问。</p>
<hr>
<h2>为什么会出现这个页面?</h2>
<p>如果您不知道升级浏览器是什么意思请请教一些熟练电脑操作的朋友。如果您使用的不是IE6/7/8而是360、QQ、搜狗等双核浏览器出现这个页面可能是您切换到了兼容模式<strong style="color:#f00;">切换到极速模式</strong>下,如果还不行请升级至最新版浏览器。</p>
<p>如果您不知道升级浏览器是什么意思请请教一些熟练电脑操作的朋友。如果您使用的不是Internet Explorer而是360、QQ、搜狗等双核浏览器出现这个页面可能是您切换到了兼容模式<strong style="color:#f00;">切换到极速模式</strong>下,如果还不行请升级至最新版浏览器。</p>
<hr>
<h2>请注意微软Microsoft Windows XP 及 IE6、IE7、IE8、IE9、IE10 的支持已经结束</h2>
<p>自 2014 年 4 月 8 日起微软Microsoft不再为 Windows XP 和 Internet Explorer 8 及以下版本提供相应支持和更新。如果您继续使用这些,您将可能受到病毒、间谍软件和其他恶意软件的攻击,无法确保个人信息的安全。请参阅 <a href="http://windows.microsoft.com/zh-cn/windows/end-support-help">Microsoft 关于 Windows XP 支持已经结束的说明</a></p>
<p>尽管 Internet Explorer 11 将于 2022 年 6 月 15 日也停止了支持。但您也可以继续使用 <a href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie"> Internet Explorer 11 浏览器</a></p>
<h2>请注意微软Microsoft对 Windows XP、Vista、7、8、8.1 及 Internet Explorer 的支持已经结束</h2>
<p>微软Microsoft不再为已经结束的版本提供相应支持和更新。如果您继续使用这些,您将可能受到病毒、间谍软件和其他恶意软件的攻击,无法确保个人信息的安全。请参阅 <a href="http://windows.microsoft.com/zh-cn/windows/end-support-help">Windows XP 支持已经结束的说明</a></p>
<p>于 2022 年 6 月 15 日,微软对 Internet Explorer 11 的支持也已结束。请参阅 <a href="http://windows.microsoft.com/zh-cn/internet-explorer/download-ie"> Internet Explorer 浏览器下载</a></p>
<hr>
<h2>您可以选择更先进的浏览器</h2>
<p>推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问 <b id="url"></b>即可。</p>
@@ -32,7 +32,7 @@ span{display:block;font-size:12px;line-height:12px;}
<li><img src="img/chrome360.jpg"><a href="http://chrome.360.cn/"> 360极速浏览器<span>360 Chrome</span></a></li>
<li><img src="img/chrome.jpg"><a href="http://www.google.cn/intl/zh-CN/chrome/browser/desktop/index.html"> 谷歌浏览器<span>Google Chrome</span></a></li>
<li><img src="img/firefox.jpg"><a href="http://www.firefox.com.cn/download/"> 火狐浏览器<span>Mozilla Firefox</span></a></li>
<li><img src="img/ie.jpg"><a href="https://www.microsoft.com/zh-cn/edge"> Edge 浏览器<span>Microsoft Edge</span></a></li>
<li><img src="img/edge.png"><a href="https://www.microsoft.com/zh-cn/edge"> Edge 浏览器<span>Microsoft Edge</span></a></li>
</ul><div class="clean"></div></div>
<hr><br/>
<script>

View File

@@ -329,7 +329,7 @@
</word>
<word>
<id>a63e3fda50530388ba263296184d8a6919a75791</id>
<length>1000</length>
<length>4000</length>
<decimal>null</decimal>
<array>false</array>
<array_dimension>null</array_dimension>

View File

@@ -16,7 +16,7 @@ CREATE TABLE js_app_comment
update_date timestamp NOT NULL,
remarks vargraphic(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content vargraphic(500),
reply_user_code varchar(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE js_app_comment
update_date datetime NOT NULL,
remarks varchar(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content varchar(500),
reply_user_code varchar(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE [js_app_comment]
[update_date] datetime NOT NULL,
[remarks] nvarchar(500),
[create_by_name] varchar(200),
[device_info] varchar(1000),
[device_info] varchar(4000),
[reply_date] date,
[reply_content] nvarchar(500),
[reply_user_code] varchar(64),

View File

@@ -17,7 +17,7 @@ CREATE TABLE js_app_comment
update_date datetime NOT NULL COMMENT '更新时间',
remarks varchar(500) COMMENT '备注信息',
create_by_name varchar(200) COMMENT '提问人员姓名',
device_info varchar(1000) COMMENT '设备信息',
device_info varchar(4000) COMMENT '设备信息',
reply_date date COMMENT '回复时间',
reply_content varchar(500) COMMENT '回复意见',
reply_user_code varchar(64) COMMENT '回复人员',

View File

@@ -16,7 +16,7 @@ CREATE TABLE js_app_comment
update_date timestamp NOT NULL,
remarks nvarchar2(500),
create_by_name varchar2(200),
device_info varchar2(1000),
device_info varchar2(4000),
reply_date date,
reply_content nvarchar2(500),
reply_user_code varchar2(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE js_app_comment
update_date timestamp NOT NULL,
remarks varchar(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content varchar(500),
reply_user_code varchar(64),

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.8.1-SNAPSHOT</version>
<version>5.10.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

View File

@@ -4,18 +4,16 @@
*/
package com.jeesite.modules.app.entity;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
/**
* APP意见反馈Entity
* @author ThinkGem
@@ -84,7 +82,7 @@ public class AppComment extends DataEntity<AppComment> {
this.contact = contact;
}
@Size(min=0, max=1000, message="设备信息长度不能超过 1000 个字符")
@Size(min=0, max=4000, message="设备信息长度不能超过 4000 个字符")
public String getDeviceInfo() {
return deviceInfo;
}

View File

@@ -16,7 +16,7 @@ CREATE TABLE ${_prefix}app_comment
update_date timestamp NOT NULL,
remarks vargraphic(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content vargraphic(500),
reply_user_code varchar(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE ${_prefix}app_comment
update_date datetime NOT NULL,
remarks varchar(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content varchar(500),
reply_user_code varchar(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE [${_prefix}app_comment]
[update_date] datetime NOT NULL,
[remarks] nvarchar(500),
[create_by_name] varchar(200),
[device_info] varchar(1000),
[device_info] varchar(4000),
[reply_date] date,
[reply_content] nvarchar(500),
[reply_user_code] varchar(64),

View File

@@ -17,7 +17,7 @@ CREATE TABLE ${_prefix}app_comment
update_date datetime NOT NULL COMMENT '更新时间',
remarks varchar(500) COMMENT '备注信息',
create_by_name varchar(200) COMMENT '提问人员姓名',
device_info varchar(1000) COMMENT '设备信息',
device_info varchar(4000) COMMENT '设备信息',
reply_date date COMMENT '回复时间',
reply_content varchar(500) COMMENT '回复意见',
reply_user_code varchar(64) COMMENT '回复人员',

View File

@@ -16,7 +16,7 @@ CREATE TABLE ${_prefix}app_comment
update_date timestamp NOT NULL,
remarks nvarchar2(500),
create_by_name varchar2(200),
device_info varchar2(1000),
device_info varchar2(4000),
reply_date date,
reply_content nvarchar2(500),
reply_user_code varchar2(64),

View File

@@ -16,7 +16,7 @@ CREATE TABLE ${_prefix}app_comment
update_date timestamp NOT NULL,
remarks varchar(500),
create_by_name varchar(200),
device_info varchar(1000),
device_info varchar(4000),
reply_date date,
reply_content varchar(500),
reply_user_code varchar(64),

View File

@@ -19,4 +19,8 @@
5.7.0
5.7.1
5.8.0
5.8.1
5.8.1
5.9.0
5.9.1
5.9.2
5.10.0

View File

@@ -14,7 +14,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${appComment}" action="${ctx}/app/appComment/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${appComment}" action="${ctx}/app/appComment/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('问题分类')}</label>

View File

@@ -14,7 +14,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${appUpgrade}" action="${ctx}/app/appUpgrade/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${appUpgrade}" action="${ctx}/app/appUpgrade/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('应用代号')}</label>
@@ -37,7 +37,7 @@
<div class="form-group">
<label class="control-label">${text('发布时间')}</label>
<div class="control-inline">
<#form:input path="upDate" readonly="true" maxlength="20" class="form-control laydate width-datetime"
<#form:input path="upDate" readonly="true" maxlength="20" class="form-control laydate width-date"
dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
</div>
</div>

View File

@@ -1,51 +0,0 @@
# 技术交流
* 交流 QQ 群(千人大群):`127515876``209330483``223507718``709534275``730390092``1373527``183903863(外包)`
* 码云Gitee<https://gitee.com/thinkgem/jeesite5>
* GitHub<https://github.com/thinkgem/jeesite5>
* 作者博客:<https://my.oschina.net/thinkgem>
* **帮助文档:**<http://docs.jeesite.com>
* 官方网站:<http://jeesite.com>
* 问题反馈:<http://jeesite.net> [【新手必读】](https://gitee.com/thinkgem/jeesite5/issues/I18ARR)
* 关注微信公众号,了解最新动态:
![JeeSite微信公众号](https://images.gitee.com/uploads/images/2020/0727/091951_a3ab258c_6732.jpeg "JeeSite微信公众号")
## 介绍
JeeSite CMS 内容管理,是一个轻量级的 Web 建站神器,可以快速进行企业网站、门户网站、个人博客、知识库等建设。
* 基础功能:站点管理、栏目管理、栏目权限、模板管理、内容发布
* 高级功能:多租户、多站点、页面静态化访问、全文检索
规划内容:站内统计、标签管理、留言管理、相关文章选取、文章多栏目
## 快速体验
### 在线演示
1. 前端演示:<http://demo.jeesite.com/js/f/index-main.html>
2. 后端演示:<http://demo.jeesite.com/js/a/index#/js/a/cms/index#内容发布>
3. 账号system
4. 密码admin
### 本地运行
1. 环境准备:`JDK 1.8 or 11、17``Maven 3.6+``MySQL 5.7 or 8.0`
2. 下载源码:<https://gitee.com/thinkgem/jeesite5/tree/master/modules/cms>
3. 打开文件:/web`/src/main/resources/config/application.yml` 配置JDBC连接
4. 打开文件:/web`/pom.xml` 打开 `jeesite-module-cms` 模块(去掉的注释标记)
5. 执行脚本:/web`/bin/init-data.bat` 初始化数据库
5. 执行脚本:/web`/bin/run-tomcat.bat` 启动服务即可
6. 浏览器访问:<http://127.0.0.1:8980/js/> 账号 system 密码 admin
7. 部署常见问题:<https://jeesite.com/docs/faq/>
### 开发环境
1. 部署运行文档:<https://jeesite.com/docs/install-deploy/>
2. 部署常见问题:<https://jeesite.com/docs/faq/>
## 在线文档
* <http://docs.jeesite.com>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.8.1-SNAPSHOT</version>
<version>5.10.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

View File

@@ -27,4 +27,8 @@
5.7.0
5.7.1
5.8.0
5.8.1
5.8.1
5.9.0
5.9.1
5.9.2
5.10.0

View File

@@ -14,7 +14,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${article}" action="${ctx}/cms/article/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${article}" action="${ctx}/cms/article/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('栏目编码')}</label>
@@ -54,7 +54,7 @@
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
searchForm: $('#searchForm'),
columnModel: [
{header:'${text("标题")}', name:'title', index:'a.category_code', width:350, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/article/form?id='+row.id+'" class="btnList" data-title="${text("编辑文章")}">'+(val||row.id)+'</a>';

View File

@@ -29,7 +29,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${category}" action="${ctx}/cms/category/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${category}" action="${ctx}/cms/category/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<#form:hidden path="site.siteCode" maxlength="64" class="form-control width-120" />
<div class="form-group">
@@ -69,7 +69,7 @@
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
searchForm: $('#searchForm'),
columnModel: [
{header:'${text("名称")}', name:'categoryName', index:'a.category_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.categoryCode+' ) '+'<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" data-title="${text("编辑栏目表")}">'+(val||row.id)+'</a>';

View File

@@ -13,7 +13,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${comment}" action="${ctx}/cms/comment/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${comment}" action="${ctx}/cms/comment/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('栏目编码')}</label>
@@ -107,7 +107,7 @@
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
searchForm: $('#searchForm'),
columnModel: [
{header:'${text('栏目编码')}', name:'categoryCode', index:'a.category_code', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" data-title="${text('编辑文章评论表')}">'+(val||row.id)+'</a>';

View File

@@ -13,7 +13,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${report}" action="${ctx}/cms/report/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${report}" action="${ctx}/cms/report/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('举报来源')}</label>
@@ -59,7 +59,7 @@
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
searchForm: $('#searchForm'),
columnModel: [
{header:'${text('举报来源')}', name:'reportSource', index:'a.report_source', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/report/form?id='+row.id+'" class="btnList" data-title="${text('编辑内容举报表')}">'+(val||row.id)+'</a>';

View File

@@ -13,7 +13,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${site}" action="${ctx}/cms/site/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${site}" action="${ctx}/cms/site/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('站点名称')}</label>

View File

@@ -13,7 +13,7 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${visitLog}" action="${ctx}/cms/visitLog/listData" method="post" class="form-inline hide"
<#form:form id="searchForm" model="${visitLog}" action="${ctx}/cms/visitLog/listData" method="post" class="form-inline "
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('请求的URL地址')}</label>
@@ -66,7 +66,7 @@
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
searchForm: $('#searchForm'),
columnModel: [
{header:'${text('请求的URL地址')}', name:'requestUrl', index:'a.request_url', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/visitLog/form?id='+row.id+'" class="btnList" data-title="${text('编辑访问日志表')}">'+(val||row.id)+'</a>';

Binary file not shown.

Binary file not shown.

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.8.1-SNAPSHOT</version>
<version>5.10.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

View File

@@ -17,13 +17,8 @@ import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
import com.jeesite.common.utils.SpringUtils;
import com.jeesite.common.web.CookieUtils;
import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.entity.Log;
import com.jeesite.modules.sys.entity.Role;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.utils.CorpUtils;
import com.jeesite.modules.sys.utils.LogUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import com.jeesite.modules.sys.utils.ValidCodeUtils;
import com.jeesite.modules.sys.entity.*;
import com.jeesite.modules.sys.utils.*;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.IncorrectCredentialsException;
@@ -424,9 +419,12 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
Global.setLang((String)paramMap.get("lang"), request, response);
}
data.put("demoMode", Global.isDemoMode());
data.put("useCorpModel", Global.isUseCorpModel()
&& Global.getConfigToBoolean("user.loginCodeCorpUnique", "false"));
data.put("useCorpModel", Global.isUseCorpModel());
data.put("loginCodeCorpUnique", Global.getConfigToBoolean("user.loginCodeCorpUnique", "false"));
data.put("title", Global.getProperty("productName"));
data.put("company", Global.getProperty("companyName"));
data.put("version", Global.getProperty("productVersion"));
data.put("year", Global.getProperty("copyrightYear"));
}
/**
@@ -449,7 +447,11 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
data.put("msgEnabled", Global.getPropertyToBoolean("msg.enabled", "false"));
data.put("sysCode", session.getAttribute("sysCode"));
data.put("roleCode", session.getAttribute("roleCode"));
data.put("postCode", session.getAttribute("postCode"));
data.put("title", Global.getProperty("productName"));
data.put("company", Global.getProperty("companyName"));
data.put("version", Global.getProperty("productVersion"));
data.put("year", Global.getProperty("copyrightYear"));
data.put("lang", Global.getLang());
List<Map<String, Object>> roleList = ListUtils.newArrayList();
String desktopUrl = null;
@@ -465,6 +467,21 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
}
}
data.put("roleList", roleList);
List<Map<String, Object>> postList = ListUtils.newArrayList();
if (Global.getConfigToBoolean("user.postRolePermi", "false")
&& User.USER_TYPE_EMPLOYEE.equals(user.getUserType())) {
Employee employee = user.getRefObj();
for (EmployeePost ep : EmpUtils.getEmployeePostList(employee.getEmpCode())){
Post post = ep.getPost();
if (post != null) {
Map<String, Object> postMap = MapUtils.newHashMap();
postMap.put("postCode", post.getPostCode());
postMap.put("postName", post.getPostName());
postList.add(postMap);
}
}
}
data.put("postList", postList);
data.put("desktopUrl", desktopUrl != null ? desktopUrl : Global.getConfig("sys.index.desktopUrl"));
return data;
}

View File

@@ -25,7 +25,7 @@ import java.io.IOException;
* @version 2017年11月30日
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(name="state.enabled", havingValue="true", matchIfMissing=true)
@ConditionalOnProperty(name={"state.enabled","state.druid"}, havingValue="true", matchIfMissing=true)
public class DruidStatConfig {
/**
@@ -43,7 +43,7 @@ public class DruidStatConfig {
bean.addUrlPatterns("/*");
return bean;
}
/**
* 注册DruidServlet
*/

View File

@@ -32,11 +32,11 @@ public class IpAddrFilterConfig {
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
bean.setName("ipAddrFilter");
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 10);
bean.setFilter((setvletRequest, setvletResponse, chain) -> {
if (isAccessAllowed(setvletRequest, setvletResponse)) {
chain.doFilter(setvletRequest, setvletResponse);
bean.setFilter((servletRequest, servletResponse, chain) -> {
if (isAccessAllowed(servletRequest, servletResponse)) {
chain.doFilter(servletRequest, servletResponse);
} else {
HttpServletResponse response = (HttpServletResponse) setvletResponse;
HttpServletResponse response = (HttpServletResponse) servletResponse;
response.setStatus(403);
ServletUtils.renderString(response, Global.getText("访问拒绝"));
}

View File

@@ -35,7 +35,7 @@ public class FileUploadController extends BaseController {
@Autowired
private FileUploadService fileUploadService;
/**
* 上传文件参数
*/
@@ -53,7 +53,7 @@ public class FileUploadController extends BaseController {
model.put("imageMaxHeight", Global.getConfigToInteger("file.imageMaxHeight", "768"));
return model;
}
/**
* 上传文件
*/
@@ -62,14 +62,14 @@ public class FileUploadController extends BaseController {
public Map<String, Object> uploadFile(FileUploadParams params) {
return fileUploadService.uploadFile(new FileUpload(), params);
}
/**
* 下载文件
*/
@RequestMapping(value = "/download/{fileUploadId}")
public String downloadFile(@PathVariable("fileUploadId") String fileUploadId, String preview, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
FileUpload fileUpload = fileUploadService.getFile(new FileUpload(fileUploadId));
return fileUploadService.downloadFile(fileUpload, preview, request, response);
return fileUploadService.downloadFile(fileUpload, preview, "file", request, response);
}
/**

View File

@@ -33,7 +33,7 @@ import java.io.IOException;
public class UserfilesController extends BaseController {
@RequestMapping(value="/userfiles/**")
public String fileStreamDown(HttpServletRequest request, HttpServletResponse response)
public String fileStreamDown(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// 获取相对文件地址
@@ -49,7 +49,8 @@ public class UserfilesController extends BaseController {
String uid = request.getParameter("uid");
if (StringUtils.isNotBlank(url) && StringUtils.isNotBlank(uid)){
fileUrl = url; //EncodeUtils.decodeUrl(url); 不用解码,否则腾讯云存储的时候预览不能显示
fileUri = Global.getCtxPath() + Global.getAdminPath() + "/file/download/" + uid;
String type = StringUtils.defaultIfBlank(request.getParameter("type"), "file");
fileUri = Global.getCtxPath() + Global.getAdminPath() + "/" + type + "/download/" + uid;
filePath = fileName;
} else if (StringUtils.isNotBlank(fileName)){
fileUri += "?fileName=" + EncodeUtils.encodeUrl(fileName);
@@ -58,7 +59,9 @@ public class UserfilesController extends BaseController {
request.setAttribute("fileUrl", fileUrl); // 文件访问地址
request.setAttribute("fileUri", fileUri); // 文件下载地址fileDown
request.setAttribute("filePath", filePath); // 文件相对路径或文件名
request.setAttribute("fileUrls", request.getParameter("urls")); // 前后照片列表
request.setAttribute("fileUrls", request.getParameter("urls")); // 文件地址列表
request.setAttribute("fileNames", request.getParameter("names")); // 文件名称列表
request.setAttribute("imageFlag", request.getParameter("image")); // 是否图片控件
request.setAttribute(RequestDispatcher.FORWARD_REQUEST_URI, previewUrl);
request.getRequestDispatcher(previewUrl).forward(request, response);
return null;

View File

@@ -24,6 +24,7 @@ import com.jeesite.common.mybatis.annotation.Table;
columns={
@Column(name="role_code", attrName="roleCode", label="角色编码", isPK=true),
@Column(name="role_name", attrName="roleName", label="角色名称"),
@Column(name="status", attrName="status", label="角色状态"),
})
}, orderBy=""
)

View File

@@ -6,6 +6,7 @@ package com.jeesite.modules.sys.service.support;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.sys.dao.EmployeeDao;
import com.jeesite.modules.sys.dao.EmployeeOfficeDao;
@@ -107,6 +108,12 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
public List<EmployeePost> findEmployeePostList(Employee employee){
EmployeePost employeePost = new EmployeePost();
employeePost.setEmpCode(employee.getEmpCode());
if (employee.getDataMap() != null) {
String a = (String)employee.getDataMap().get("loadJoinTableAlias");
if (StringUtils.isNotBlank(a)) {
employeePost.sqlMap().loadJoinTableAlias(a);
}
}
return employeePostDao.findList(employeePost);
}

View File

@@ -9,13 +9,14 @@ import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.service.CrudService;
import com.jeesite.common.utils.PageUtils;
import com.jeesite.modules.sys.dao.PostDao;
import com.jeesite.modules.sys.dao.PostRoleDao;
import com.jeesite.modules.sys.entity.Post;
import com.jeesite.modules.sys.entity.PostRole;
import com.jeesite.modules.sys.entity.Role;
import com.jeesite.modules.sys.entity.*;
import com.jeesite.modules.sys.service.EmpUserService;
import com.jeesite.modules.sys.service.PostService;
import com.jeesite.modules.sys.utils.CorpUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
@@ -31,6 +32,8 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
@Autowired
private PostRoleDao postRoleDao;
@Autowired
private EmpUserService empUserService;
/**
* 查询岗位
@@ -101,12 +104,13 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
postRoleDao.insertBatch(list, null);
}
}
clearCache(post);
}
/**
* 岗位编码生成规则
*/
public void genId(Role entity, String viewCode){
public void genId(Post entity, String viewCode){
if (StringUtils.isNotBlank(viewCode)){
// 如果是租户模式,并且当前租户不是默认租户的时候,增加租户前缀防止编码重复
if (Global.isUseCorpModel() && !CorpUtils.DEFAULT_CORP_CODE.equals(CorpUtils.getCurrentCorpCode())){
@@ -134,6 +138,21 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
public void delete(Post post) {
post.sqlMap().markIdDelete();
super.delete(post);
clearCache(post);
}
/**
* 根据岗位清理缓存
*/
protected void clearCache(Post post){
// 清除该岗位下所有的用户缓存
EmpUser where = new EmpUser();
where.setCodes(new String[]{ post.getPostCode() });
PageUtils.findList(where, null, e -> {
List<EmpUser> userList = empUserService.findUserListByPostCodes((EmpUser)e);
userList.forEach(UserUtils::clearCache);
return !userList.isEmpty();
});
}
}

View File

@@ -5,6 +5,7 @@
package com.jeesite.modules.sys.utils;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.collect.SetUtils;
import com.jeesite.common.lang.ObjectUtils;
import com.jeesite.common.lang.StringUtils;
@@ -325,6 +326,19 @@ public class EmpUtils {
});
return list.toArray(new String[list.size()]);
}
/**
* 根据员工编号,获取员工岗位(返回岗位编码和名称)
* @param empCode
* @return
*/
public static List<EmployeePost> getEmployeePostList(String empCode){
Employee employee = new Employee();
employee.setEmpCode(empCode);
employee.setDataMap(MapUtils.newHashMap());
employee.getDataMap().put("loadJoinTableAlias", "p");
return Static.employeeService.findEmployeePostList(employee);
}
/**
* 清除指定用户缓存不包括改用的SESSION缓存

View File

@@ -493,7 +493,7 @@ public class AccountController extends BaseController{
// 一同验证保存的用户名和验证码是否正确(如果只校验验证码,不验证用户名,则会有获取验证码后修改用户名的漏洞)
if (!(loginCode != null && loginCode.equals(user.getLoginCode()))){
return renderResult(Global.FALSE, text("非法操作"));
return renderResult(Global.FALSE, text("请先获取验证码"));
}
// 验证码是否超时

View File

@@ -6,6 +6,7 @@ package com.jeesite.modules.sys.web;
import com.fasterxml.jackson.annotation.JsonView;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.shiro.filter.FormFilter;
@@ -15,8 +16,10 @@ import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.CookieUtils;
import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.entity.Menu;
import com.jeesite.modules.sys.entity.PostRole;
import com.jeesite.modules.sys.entity.Role;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.service.PostService;
import com.jeesite.modules.sys.utils.PwdUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.annotations.Api;
@@ -26,6 +29,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.util.WebUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@@ -48,7 +52,10 @@ import java.util.Map;
@RequestMapping(value = "${adminPath}")
@ConditionalOnProperty(name="user.enabled", havingValue="true", matchIfMissing=true)
public class LoginController extends BaseController{
@Autowired
private PostService postService;
/**
* 登录页面
*/
@@ -187,11 +194,8 @@ public class LoginController extends BaseController{
return null;
}
// 获取当前会话对象,并返回一些数据
// 如果是登录操作,则初始化一些登录参数
Session session = UserUtils.getSession();
model.addAllAttributes(FormFilter.getLoginSuccessData(request, response, user, session));
// 是否是登录操作
boolean isLogin = Global.TRUE.equals(session.getAttribute(BaseAuthorizingRealm.IS_LOGIN_OPER));
if (isLogin){
// 获取后接着清除,防止下次获取仍然认为是登录状态
@@ -224,20 +228,18 @@ public class LoginController extends BaseController{
}
}
// 获取当前会话对象,并返回一些数据
if (!StringUtils.equals(request.getParameter("__be"), Global.YES)) {
model.addAllAttributes(FormFilter.getLoginSuccessData(request, response, user, session));
}
// 获取登录成功后跳转的页面
String successUrl = request.getParameter("__url");
if (StringUtils.isBlank(successUrl)){
successUrl = (String)request.getAttribute("__url");
}
if (StringUtils.contains(successUrl, "://")){
String ctxPath = Global.getCtxPath();
String domain = ServletUtils.getRequestDomain(successUrl);
successUrl = StringUtils.substring(successUrl, domain.length());
if (StringUtils.startsWith(successUrl, ctxPath)) {
successUrl = StringUtils.substringAfter(successUrl, ctxPath);
}
}
if (StringUtils.isBlank(successUrl)){
// 登录后重定向地址验证,如果是非法地址,则指定默认的登录成功地址
if (!ServletUtils.isAllowRedirects(request, successUrl) || StringUtils.isBlank(successUrl)){
successUrl = Global.getProperty("shiro.successUrl");
}
@@ -361,7 +363,7 @@ public class LoginController extends BaseController{
}
/**
* 切换系统菜单(仅超级管理员有权限
* 切换系统菜单(菜单归属子系统
*/
@RequiresPermissions("user")
@RequestMapping(value = "switch/{sysCode}")
@@ -372,6 +374,9 @@ public class LoginController extends BaseController{
}else{
session.removeAttribute("sysCode");
}
// 切换系统时,清除当前岗位和角色状态
session.removeAttribute("postCode");
session.removeAttribute("roleCode");
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
if (ServletUtils.isAjaxRequest(request)) {
return renderResult(Global.TRUE, text("子系统切换成功"));
@@ -380,7 +385,7 @@ public class LoginController extends BaseController{
}
/**
* 切换角色菜单(仅超级管理员有权限
* 切换角色菜单(用户->角色
*/
@RequiresPermissions("user")
@RequestMapping(value = {"switchRole","switchRole/{roleCode}"})
@@ -397,6 +402,39 @@ public class LoginController extends BaseController{
}
return REDIRECT + adminPath + "/index";
}
/**
* 切换岗位菜单(用户->岗位->角色v4.9.2
*/
@RequiresPermissions("user")
@RequestMapping(value = {"switchPost","switchPost/{postCode}"})
public String switchPost(@PathVariable(required=false) String postCode, HttpServletRequest request) {
Session session = UserUtils.getSession();
if (StringUtils.isNotBlank(postCode)){
PostRole where = new PostRole();
where.setPostCode(postCode);
where.sqlMap().loadJoinTableAlias("r");
List<String> roleCodes = ListUtils.newArrayList();
postService.findPostRoleList(where).forEach(e -> {
if (e.getRole() != null && PostRole.STATUS_NORMAL.equals(e.getRole().getStatus())) {
roleCodes.add(e.getRoleCode());
}
});
if (roleCodes.isEmpty()){
roleCodes.add("__none__");
}
session.setAttribute("postCode", postCode);
session.setAttribute("roleCode", StringUtils.joinComma(roleCodes)); // 5.4.0+ 支持多个,逗号隔开
}else{
session.removeAttribute("postCode");
session.removeAttribute("roleCode");
}
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
if (ServletUtils.isAjaxRequest(request)) {
return renderResult(Global.TRUE, text("岗位切换成功"));
}
return REDIRECT + adminPath + "/index";
}
/**
* 切换主题风格

View File

@@ -79,7 +79,7 @@ public class PostController extends BaseController {
List<String> roleCodes = ListUtils.newArrayList();
List<String> roleNames = ListUtils.newArrayList();
postService.findPostRoleList(where).forEach(e -> {
if (e.getRole() != null) {
if (e.getRole() != null && PostRole.STATUS_NORMAL.equals(e.getRole().getStatus())) {
roleCodes.add(e.getRoleCode());
roleNames.add(e.getRole().getRoleName());
}

View File

@@ -110,9 +110,6 @@ public class CorpAdminController extends BaseController {
if (!user.currentUser().isSuperAdmin()){
return renderResult(Global.FALSE, text("越权操作,只有超级管理员才能修改此数据!"));
}
if (User.isSuperAdmin(user.getUserCode())) {
return renderResult(Global.FALSE, text("非法操作,不能够操作此用户!"));
}
if (!EmpUser.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
return renderResult(Global.FALSE, text("非法操作,不能够操作此用户!"));
}

View File

@@ -157,9 +157,6 @@ public class EmpUserController extends BaseController {
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated EmpUser empUser, String op, HttpServletRequest request) {
if (User.isSuperAdmin(empUser.getUserCode())) {
return renderResult(Global.FALSE, "非法操作,不能够操作此用户!");
}
if (!EmpUser.USER_TYPE_EMPLOYEE.equals(empUser.getUserType())){
return renderResult(Global.FALSE, "非法操作,不能够操作此用户!");
}
@@ -370,9 +367,6 @@ public class EmpUserController extends BaseController {
@RequestMapping(value = "saveAuthDataScope")
@ResponseBody
public String saveAuthDataScope(EmpUser empUser, HttpServletRequest request) {
if (User.isSuperAdmin(empUser.getUserCode())) {
return renderResult(Global.FALSE, "非法操作,不能够操作此用户!");
}
if (!EmpUser.USER_TYPE_EMPLOYEE.equals(empUser.getUserType())){
return renderResult(Global.FALSE, "非法操作,不能够操作此用户!");
}

View File

@@ -91,9 +91,6 @@ public class SecAdminController extends BaseController {
@PostMapping(value = "save")
@ResponseBody
public String save(@Validated User user) {
if (User.isSuperAdmin(user.getUserCode())) {
return renderResult(Global.FALSE, text("非法操作,不能够操作此用户!"));
}
if (!User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
return renderResult(Global.FALSE, text("非法操作,不能够操作此用户!"));
}

View File

@@ -140,7 +140,7 @@ FTC.java.util.concurrent.atomic.AtomicInteger = com.jeesite.common.beetl.ext.for
## 标签类
TAG.include= org.beetl.ext.tag.IncludeTag
TAG.includeFileTemplate= org.beetl.ext.tag.IncludeTag
TAG.incdlueJSP= org.beetl.ext.jsp.IncludeJSPTag
#TAG.includeJSP= org.beetl.ext.jsp.IncludeJSPTag
TAG.layout= org.beetl.ext.tag.LayoutTag
TAG.delete= org.beetl.ext.tag.DeleteTag
#TAG.htmltag= org.beetl.ext.tag.HTMLTagSupportWrapper

View File

@@ -152,6 +152,9 @@ user:
# 二级管理员的控制权限类型1拥有的权限 2管理的权限管理功能包括用户管理、组织机构、公司管理等v4.1.5+
adminCtrlPermi: 2
# 是否启用岗位角色,开启后将 用户->岗位->关联角色,纳入菜单和权限管理
postRolePermi: false
# 多租户模式SAAS模式专业版
useCorpModel: false
@@ -176,10 +179,10 @@ user:
dataScopes: >
[{
moduleCode: "core",
ctrlPermi: "0",
ctrlName: "机构权限",
ctrlName_en: "Office",
ctrlType: "Office",
ctrlPermi: "0",
ctrlDataUrl: "/sys/office/treeData",
chkboxType: {"Y":"ps","N":"ps"},
expandLevel: -1,
@@ -194,6 +197,16 @@ user:
chkboxType: {"Y":"ps","N":"ps"},
expandLevel: -1,
remarks: ""
},{
moduleCode: "core",
ctrlName: "用户权限",
ctrlName_en: "User",
ctrlType: "User",
ctrlPermi: "3",
ctrlDataUrl: "/sys/office/treeData?isLoadUser=true",
chkboxType: {"Y":"s","N":"s"},
expandLevel: -1,
remarks: ""
},{
moduleCode: "core",
ctrlName: "角色权限",
@@ -343,6 +356,12 @@ gen:
# 系统监控
state:
enabled: true
# 服务器监控
server: true
# 缓存监控
cache: true
# 数据监控
druid: true
#======================================#
#========= Framework settings =========#

View File

@@ -4,6 +4,7 @@
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<logger name="org.springframework.boot.web.embedded" level="INFO" />
<logger name="org.apache.catalina.core.StandardEngine" level="INFO" />
<logger name="net.oschina.j2cache.caffeine.CaffeineProvider" level="ERROR" />
<logger name="ShardingSphere-SQL" level="DEBUG" />
<!-- <logger name="org.apache.ibatis" level="DEBUG" /> -->

View File

@@ -388,7 +388,6 @@
本部门数据=Current organization data
本公司数据=Current company data
本部门和本公司数据=Current organization and company data
控制业务范围=Business scope
新增角色=New role
编辑角色=Edit role

View File

@@ -312,7 +312,6 @@
本部门数据=本省庁データ
本公司数据=当社のデータ
本部门和本公司数据=本省庁と自社のデータ
控制业务范围=業務の範囲を制御する
新增角色=新規役
编辑角色=編集役

View File

@@ -10,8 +10,8 @@
JOIN ${_prefix}sys_employee_post b ON b.post_code = a.post_code
</if>
<if test="userCode != null and userCode != ''">
JOIN ${_prefix}sys_employee_post b2 on b2.post_code = a.post_code
JOIN ${_prefix}sys_user u on u.ref_code = b2.emp_code AND u.user_type = 'employee'
JOIN ${_prefix}sys_employee_post b2 ON b2.post_code = a.post_code
JOIN ${_prefix}sys_user u ON u.ref_code = b2.emp_code AND u.user_type = 'employee'
</if>
<where>
${sqlMap.where.toSql()}

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
No deletion without permission, or be held responsible to law. -->
<template>
<name>http.api.js</name>
<filePath>${frontDir}/common</filePath>
<fileName>http.api.${className}.js</fileName>
<content><![CDATA[
const install = (Vue, vm) => {
vm.$u.api = {
// 请将以下 ${functionName} 代码,复制到 http.api.js 文件中
// ${functionName} 开始
${className}: {
form: (params = {}) => vm.$u.post(config.adminPath+'/${urlPrefix}/form', params),
list: (params = {}) => vm.$u.post(config.adminPath+'/${urlPrefix}/listData', params),
save: (params = {}) => vm.$u.postJson(config.adminPath+'/${urlPrefix}/save', params),
<% if(toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
disable: (params = {}) => vm.$u.post(config.adminPath+'/${urlPrefix}/disable', params),
enable: (params = {}) => vm.$u.post(config.adminPath+'/${urlPrefix}/enable', params),
<% } %>
delete: (params = {}) => vm.$u.post(config.adminPath+'/${urlPrefix}/delete', params),
},
// ${functionName} 结束
};
}
export default {
install
}
]]>
</content>
</template>

View File

@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
No deletion without permission, or be held responsible to law. -->
<template>
<name>form.vue</name>
<filePath>${frontDir}/pages/${urlPrefix}</filePath>
<fileName>form.vue</fileName>
<content><![CDATA[
<template>
<view class="wrap">
<u-form class="form" :model="model" :rules="rules" ref="uForm" label-position="left">
<%
var userselectExists = false;
var officeselectExists = false;
var companyselectExists = false;
var areaselectExists = false;
for(c in table.columnList){
if(c.isQuery == "1" && !c.isTreeEntityColumn){
if(c.showType == 'userselect'){
userselectExists = true;
}else if(c.showType == 'officeselect'){
officeselectExists = true;
}else if(c.showType == 'companyselect'){
companyselectExists = true;
}else if(c.showType == 'areaselect'){
areaselectExists = true;
}
}
}
%>
<%
for (c in table.columnList){
if (c.isEdit == '1' && c.showType != 'hidden'){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<% if(c.showType == 'input'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<u-input placeholder="请输入${c.columnLabel}" v-model="model.${c.attrName}" type="text" maxlength="${c.dataLength}"></u-input>
</u-form-item>
<% }else if(c.showType == 'textarea'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180" label-position="top">
<u-input type="textarea" placeholder="请输入${c.columnLabel}" v-model="model.testTextarea" height="100" maxlength="${c.dataLength}" />
</u-form-item>
<% }else if(c.showType == 'select' || c.showType == 'select_multiple'){
var isMultiple = (c.showType == 'select_multiple'); %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-select v-model="model.${c.attrName}" dict-type="${c.optionMap['dictType']}"<% if(isMultiple){ %> multiple="true"<% } %> placeholder="请选择${c.columnLabel}"></js-select>
</u-form-item>
<% }else if(c.showType == 'radio'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-radio v-model="model.${c.attrName}" dict-type="${c.optionMap['dictType']}"></js-radio>
</u-form-item>
<% }else if(c.showType == 'checkbox'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-checkbox v-model="model.${c.attrName}" dict-type="${c.optionMap['dictType']}"></js-checkbox>
</u-form-item>
<% }else if(c.showType == 'date' || c.showType == 'datetime'){
var isTime = (c.showType == 'datetime'); %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<u-input placeholder="请输入${c.columnLabel}" v-model="model.${c.attrName}" format="yyyy-MM-dd${isTime?' HH:mm':''}" type="text" maxlength="${c.dataLength}"></u-input>
</u-form-item>
<% }else if(c.showType == 'userselect'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-select v-model="model.${c.attrName}" :items="${c.attrName}List" placeholder="请选择${c.columnLabel}" :tree="true"<% if (isNotBlank(c.attrName2)){ %>
:label-value="model.${c.attrName2}" @label-input="model.${c.attrName2} = $event"<% } %>></js-select>
</u-form-item>
<% }else if(c.showType == 'officeselect'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-select v-model="model.${c.attrName}" :items="${c.attrName}List" placeholder="请选择${c.columnLabel}" :tree="true"<% if (isNotBlank(c.attrName2)){ %>
:label-value="model.${c.attrName2}" @label-input="model.${c.attrName2} = $event"<% } %>></js-select>
</u-form-item>
<% }else if(c.showType == 'companyselect'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-select v-model="model.${c.attrName}" :items="${c.attrName}List" placeholder="请选择${c.columnLabel}" :tree="true"<% if (isNotBlank(c.attrName2)){ %>
:label-value="model.${c.attrName2}" @label-input="model.${c.attrName2} = $event"<% } %>></js-select>
</u-form-item>
<% }else if(c.showType == 'areaselect'){ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<js-select v-model="model.${c.attrName}" :items="${c.attrName}List" placeholder="请选择${c.columnLabel}" :tree="true"<% if (isNotBlank(c.attrName2)){ %>
:label-value="model.${c.attrName2}" @label-input="model.${c.attrName2} = $event"<% } %>></js-select>
</u-form-item>
<% }else{ %>
<u-form-item label="${c.columnLabel}" prop="${c.attrName}" label-width="180">
<u-input placeholder="请输入${c.columnLabel}" v-model="model.${c.attrName}" type="text" maxlength="${c.dataLength}"></u-input>
</u-form-item>
<% } %>
<%
}
}
%>
<% if(toBoolean(table.optionMap['isImageUpload'])){ %>
<u-form-item label="上传图片" prop="images" label-position="top">
<js-uploadfile v-model="model.dataMap" :biz-key="model.id" biz-type="${className}_image"></js-uploadfile>
</u-form-item>
</u-form>
<% } %>
<view class="form-footer">
<u-button class="btn" type="primary" @click="submit">提交</u-button>
<!-- <u-button class="btn" type="default" @click="cancel">关闭</u-button> -->
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
model: {
id: '',
<%
for (c in table.columnList){
if (c.isEdit == '1' && c.showType != 'hidden'){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<% if(c.showType == 'userselect'){ %>
${c.simpleAttrName}: {
userCode: '',
userName: ''
},
<% }else if(c.showType == 'officeselect'){ %>
${c.simpleAttrName}: {
officeCode: '',
officeName: ''
},
<% }else if(c.showType == 'companyselect'){ %>
${c.simpleAttrName}: {
companyCode: '',
companyName: ''
},
<% }else if(c.showType == 'areaselect'){ %>
${c.simpleAttrName}: {
areaCode: '',
areaName: ''
},
<% }else{ %>
${c.attrName}: '',
<% } %>
<%
}
}
%>
},
rules: {
<%
for (c in table.columnList){
if (c.isEdit == '1' && c.showType != 'hidden'){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<% if(c.isRequired == '1'){ %>
'${c.attrName}': [
{
required: true,
message: '请输入${c.columnLabel}',
trigger: ['change','blur'],
}
],
<% } %>
<%
}
}
%>
},
<%
for (c in table.columnList){
if (c.isEdit == '1' && c.showType != 'hidden'){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<% if(c.showType == 'userselect'){ %>
${c.simpleAttrName}List: [],
<% }else if(c.showType == 'officeselect'){ %>
${c.simpleAttrName}List: [],
<% }else if(c.showType == 'companyselect'){ %>
${c.simpleAttrName}List: [],
<% }else if(c.showType == 'areaselect'){ %>
${c.simpleAttrName}List: [],
<% } %>
<%
}
}
%>
};
},
onLoad(params){
this.$u.api.${className}.form(params).then(res => {
Object.assign(this.model, res.${className});
this.$refs.uForm.setRules(this.rules);
<%
for (c in table.columnList){
if (c.isEdit == '1' && c.showType != 'hidden'){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<% if(c.showType == 'userselect'){ %>
this.$u.api.office.treeData({isLoadUser: true}).then(res => {
this.${c.simpleAttrName}List = res;
});
<% }else if(c.showType == 'officeselect'){ %>
this.$u.api.office.treeData().then(res => {
this.${c.simpleAttrName}List = res;
});
<% }else if(c.showType == 'companyselect'){ %>
this.$u.api.company.treeData().then(res => {
this.${c.simpleAttrName}List = res;
});
<% }else if(c.showType == 'areaselect'){ %>
this.$u.api.area.treeData().then(res => {
this.${c.simpleAttrName}List = res;
});
<% } %>
<%
}
}
%>
});
},
methods: {
submit() {
this.$refs.uForm.validate(valid => {
if (valid) {
// console.log('${className}-save: ' + JSON.stringify(this.model));
this.$u.api.${className}.save(this.model).then(res => {
uni.showModal({
title: '提示',
content: res.message,
showCancel: false,
success: function () {
if (res.result == 'true') {
uni.setStorageSync('refreshList', true);
uni.navigateBack();
}
}
});
});
} else {
this.$u.toast('您填写的信息有误,请根据提示修正。');
}
});
},
cancel() {
uni.navigateBack();
}
}
};
</script>
<style lang="scss">
</style>
<% %>
]]>
</content>
</template>

View File

@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
No deletion without permission, or be held responsible to law. -->
<template>
<name>list.vue</name>
<filePath>${frontDir}/pages/${urlPrefix}</filePath>
<fileName>list.vue</fileName>
<content><![CDATA[
<template>
<view class="wrap">
<view class="search">
<u-search v-model="keywords" @custom="search" @search="search"></u-search>
</view>
<scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore">
<u-cell-group class="list" :border="false">
<u-swipe-action :options="options" v-for="(item, index) in list" :key="item.id" :index="index" @click="optionsClick">
<%
var idParam = '', idParam2 = '';
for(pk in table.pkList){
idParam = idParam + (pk.attrName + '=\'+item.' + pk.attrName);
idParam2 = idParam2 + ('item.' + pk.attrName);
if (pkLP.index != table.pkList.~size) {
idParam = idParam + '&';
idParam2 = idParam2 + ' || ';
}
}
for(c in table.columnList){
if(c.isList == "1"){
// 如果是树结构的字段,则自动忽略
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
&& c.attrName != table.treeViewCodeAttrName
&& c.attrName != table.treeViewNameAttrName){
continue;
}
%>
<u-cell-item :arrow="true" @click="navTo('form?${idParam})">
<text slot="title">{{item.${c.attrName} || ${idParam2}}}</text>
<text slot="label">创建者:{{item.createBy}} &nbsp;|&nbsp; 时间:{{item.createDate}}</text>
</u-cell-item>
<%
break;
}
}
%>
</u-swipe-action>
</u-cell-group>
<view class="loadmore" @click="loadMore">
<u-loadmore :status="loadStatus"></u-loadmore>
</view>
</scroll-view>
<view class="btn-plus" @click="navTo('form')">
<u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon>
</view>
</view>
</template>
<script>
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
export default {
data() {
return {
keywords: '',
query: {
pageNo: 1,
pageSize: 20
},
list: [],
count: 0,
loadStatus: 'loadmore',
options: [
{text: '上传', style: { background: '#414ee0'}},
{text: '删除', style: { background: '#dd524d'}}
]
};
},
onLoad() {
this.loadList();
},
onShow() {
if (uni.getStorageSync('refreshList') === true){
uni.removeStorageSync('refreshList');
this.search('');
}
},
methods: {
loadMore() {
this.loadStatus = "loading";
setTimeout(() => {
this.query.pageNo += 1;
this.loadList();
}, 100);
},
loadList() {
this.$u.api.${className}.list(this.query).then(res => {
if (!res.list || res.list.length == 0){
this.loadStatus = "nomore";
return;
}
this.list = this.list.concat(res.list);
this.count = res.count;
this.query.pageNo = res.pageNo;
this.query.pageSize = res.pageSize;
this.loadStatus = "loadmore";
});
},
optionsClick(rowIndex, btnIndex) {
let self = this, row = self.list[rowIndex];
if(btnIndex == 0) {
this.navTo('formUpload?id='+row.id);
} else if(btnIndex == 1) {
uni.showModal({
title: '提示',
content: '确认要删除该数据吗?',
showCancel: true,
success: function (res2) {
if (res2.confirm) {
self.$u.api.${className}.delete({id: row.id}).then(res => {
self.$u.toast(res.message);
if (res.result == 'true'){
self.list.splice(rowIndex, 1);
}
});
}
}
});
}
},
search(value) {
this.list = [];
this.query.pageNo = 0;
this.query.testInput = value;
this.loadList();
},
navTo(url) {
uni.navigateTo({
url: url
});
}
}
};
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.btn-plus {
position: absolute;
bottom: 50rpx;
right: 50rpx;
z-index: 1;
opacity: 0.6;
}
.btn-plus:hover {
opacity: 1;
}
</style>
<% %>
]]>
</content>
</template>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved.
No deletion without permission, or be held responsible to law. -->
<template>
<name>pages.json</name>
<filePath>${frontDir}</filePath>
<fileName>pages.${className}.json</fileName>
<content><![CDATA[
{
"pages": [
/* 请将以下 ${functionName} 代码,复制到 pages.json 文件中 */
/* ${functionName} 开始 */
{
"path": "pages/${className}/form",
"style": {
"navigationBarTitleText": "新增编辑"
}
},
{
"path": "pages/${className}/list",
"style": {
"navigationBarTitleText": "${functionName}"
}
},
/* ${functionName} 结束 */
],
}
]]>
</content>
</template>

View File

@@ -16,32 +16,41 @@
</category>
<category value="crud_vue" label="单表/主子表 (增删改查) vue">
<template>category-ref:crud_java</template>
<template>crud/vueApi.xml</template>
<template>crud/vueList.xml</template>
<template>crud/vueForm.xml</template>
<template>crud/vueIndex.xml</template>
<template>crud/vueImport.xml</template>
<template>vue/vueApi.xml</template>
<template>vue/vueList.xml</template>
<template>vue/vueForm.xml</template>
<template>vue/vueIndex.xml</template>
<template>vue/vueImport.xml</template>
<childTable>
<template>category-ref:dao</template>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_only_vue" label="单表/主子表 (增删改查) 仅vue">
<template>crud/vueApi.xml</template>
<template>crud/vueList.xml</template>
<template>crud/vueForm.xml</template>
<template>crud/vueIndex.xml</template>
<template>crud/vueImport.xml</template>
<template>vue/vueApi.xml</template>
<template>vue/vueList.xml</template>
<template>vue/vueForm.xml</template>
<template>vue/vueIndex.xml</template>
<template>vue/vueImport.xml</template>
<childTable>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_only_vue_modal" label="单表/主子表 (增删改查,弹窗表单) 仅vue ">
<template>category-ref:crud_only_vue</template>
<childTable>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_only_vue_modal_route" label="单表/主子表 (增删改查,路由表单) 仅vue ">
<template>crud/vueApi.xml</template>
<template>crud/vueList.xml</template>
<!--<template>crud/vueForm.xml</template>-->
<template>crud/vueFormRoute.xml</template>
<template>crud/vueIndex.xml</template>
<template>crud/vueImport.xml</template>
<template>vue/vueApi.xml</template>
<template>vue/vueList.xml</template>
<template>vue/vueFormRoute.xml</template>
<template>vue/vueIndex.xml</template>
<template>vue/vueImport.xml</template>
<childTable>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_select" label="单表/主子表 (增删改查,含 listselect 选择页面) beetl">
<template>category-ref:crud</template>
@@ -52,9 +61,10 @@
</category>
<category value="crud_select_vue" label="单表/主子表 (增删改查,含 listselect 选择页面) vue">
<template>category-ref:crud_vue</template>
<template>crud/vueSelect.xml</template>
<template>vue/vueSelect.xml</template>
<childTable>
<template>category-ref:dao</template>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_java" label="单表/主子表 (增删改查,只生成 java/mapper 仅后端 ">
@@ -76,13 +86,14 @@
</category>
<category value="crud_cloud_vue" label="单表/主子表 (增删改查 Cloud生成 api/client Vue">
<template>category-ref:crud_cloud_java</template>
<template>crud/vueApi.xml</template>
<template>crud/vueList.xml</template>
<template>crud/vueIndex.xml</template>
<template>crud/vueForm.xml</template>
<template>crud/vueImport.xml</template>
<template>vue/vueApi.xml</template>
<template>vue/vueList.xml</template>
<template>vue/vueIndex.xml</template>
<template>vue/vueForm.xml</template>
<template>vue/vueImport.xml</template>
<childTable>
<template>category-ref:dao_cloud</template>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_cloud_select" label="单表/主子表 (增删改查 Cloud含 listselect 选择页面) beetl">
@@ -94,9 +105,10 @@
</category>
<category value="crud_cloud_select_vue" label="单表/主子表 (增删改查 Cloud含 listselect 选择页面) vue">
<template>category-ref:crud_cloud_vue</template>
<template>crud/vueSelect.xml</template>
<template>vue/vueSelect.xml</template>
<childTable>
<template>category-ref:dao_cloud</template>
<template>vue/vueFormChildList.xml</template>
</childTable>
</category>
<category value="crud_cloud_java" label="单表/主子表 (增删改查 Cloud只生成 java/mapper 仅后端">
@@ -158,6 +170,12 @@
<template>query/dao.xml</template>
</childTable>
</category>
<category value="crud_only_app" label="手机端列表和表单单表App">
<template>app/appApi.xml</template>
<template>app/appList.xml</template>
<template>app/appForm.xml</template>
<template>app/appPages.xml</template>
</category>
</tplCategory>
<!-- 属性类型 -->
<attrType>

View File

@@ -146,7 +146,7 @@ public class ${ClassName}Controller extends BaseController {
* 查询子表数据
*/
@RequiresPermissions("${permissionPrefix}:view")
@RequestMapping(value = "${@StringUtils.uncap(child.className)}ListData")
@RequestMapping(value = "${@StringUtils.uncap(child.classNameSimple)}ListData")
@ResponseBody
public Page<${@StringUtils.cap(child.className)}> subListData(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}, HttpServletRequest request, HttpServletResponse response) {
${@StringUtils.uncap(child.className)}.setPage(new Page<>(request, response));

View File

@@ -213,7 +213,7 @@ public class ${ClassName} extends ${toBoolean(table.optionMap['isBpmForm'])?(tab
// 生成子表列表字段
for(child in table.childList){
%>
private List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List = ListUtils.newArrayList(); // 子表列表
private List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.classNameSimple)}List = ListUtils.newArrayList(); // 子表列表
<%
}
@@ -366,12 +366,12 @@ public class ${ClassName} extends ${toBoolean(table.optionMap['isBpmForm'])?(tab
%>
@Valid
public List<${@StringUtils.cap(child.className)}> get${@StringUtils.cap(child.className)}List() {
return ${@StringUtils.uncap(child.className)}List;
public List<${@StringUtils.cap(child.className)}> get${@StringUtils.cap(child.classNameSimple)}List() {
return ${@StringUtils.uncap(child.classNameSimple)}List;
}
public void set${@StringUtils.cap(child.className)}List(List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List) {
this.${@StringUtils.uncap(child.className)}List = ${@StringUtils.uncap(child.className)}List;
public void set${@StringUtils.cap(child.classNameSimple)}List(List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.classNameSimple)}List) {
this.${@StringUtils.uncap(child.classNameSimple)}List = ${@StringUtils.uncap(child.classNameSimple)}List;
}
<% } %>

View File

@@ -70,7 +70,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
<% for (child in table.childList){ %>
${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} = new ${@StringUtils.cap(child.className)}(entity);
${@StringUtils.uncap(child.className)}.setStatus(${@StringUtils.cap(child.className)}.STATUS_NORMAL);
entity.set${@StringUtils.cap(child.className)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
entity.set${@StringUtils.cap(child.classNameSimple)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
<% } %>
}
return entity;
@@ -168,7 +168,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
<% } %>
<% for (child in table.childList) { %>
// 保存 ${ClassName}子表
for (${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} : ${className}.get${@StringUtils.cap(child.className)}List()){
for (${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} : ${className}.get${@StringUtils.cap(child.classNameSimple)}List()){
if (!${@StringUtils.cap(child.className)}.STATUS_DELETE.equals(${@StringUtils.uncap(child.className)}.getStatus())){
<%
for(c in child.columnList){

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewForm</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Form.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewForm.html'){} %>]]>
<% include('/templates/modules/gen/view/viewForm.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewIndex</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Index.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewIndex.html'){} %>]]>
<% include('/templates/modules/gen/view/viewIndex.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewList</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}List.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewList.html'){} %>]]>
<% include('/templates/modules/gen/view/viewList.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewSelect</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Select.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewSelect.html'){} %>]]>
<% include('/templates/modules/gen/view/viewSelect.html'){} %>]]>
</content>
</template>

View File

@@ -148,7 +148,7 @@ public class ${ClassName}Controller extends BaseController {
* 查询子表数据
*/
@RequiresPermissions("${permissionPrefix}:view")
@RequestMapping(value = "${@StringUtils.uncap(child.className)}ListData")
@RequestMapping(value = "${@StringUtils.uncap(child.classNameSimple)}ListData")
@ResponseBody
public Page<${@StringUtils.cap(child.className)}> subListData(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}, HttpServletRequest request, HttpServletResponse response) {
${@StringUtils.uncap(child.className)}.setPage(new Page<>(request, response));

View File

@@ -213,7 +213,7 @@ public class ${ClassName} extends ${toBoolean(table.optionMap['isBpmForm'])?(tab
// 生成子表列表字段
for(child in table.childList){
%>
private List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List = ListUtils.newArrayList(); // 子表列表
private List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.classNameSimple)}List = ListUtils.newArrayList(); // 子表列表
<%
}
@@ -366,12 +366,12 @@ public class ${ClassName} extends ${toBoolean(table.optionMap['isBpmForm'])?(tab
%>
@Valid
public List<${@StringUtils.cap(child.className)}> get${@StringUtils.cap(child.className)}List() {
return ${@StringUtils.uncap(child.className)}List;
public List<${@StringUtils.cap(child.className)}> get${@StringUtils.cap(child.classNameSimple)}List() {
return ${@StringUtils.uncap(child.classNameSimple)}List;
}
public void set${@StringUtils.cap(child.className)}List(List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List) {
this.${@StringUtils.uncap(child.className)}List = ${@StringUtils.uncap(child.className)}List;
public void set${@StringUtils.cap(child.classNameSimple)}List(List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.classNameSimple)}List) {
this.${@StringUtils.uncap(child.classNameSimple)}List = ${@StringUtils.uncap(child.classNameSimple)}List;
}
<% } %>

View File

@@ -76,7 +76,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
<% for (child in table.childList){ %>
${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} = new ${@StringUtils.cap(child.className)}(entity);
${@StringUtils.uncap(child.className)}.setStatus(${@StringUtils.cap(child.className)}.STATUS_NORMAL);
entity.set${@StringUtils.cap(child.className)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
entity.set${@StringUtils.cap(child.classNameSimple)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
<% } %>
}
return entity;
@@ -175,7 +175,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Serv
<% } %>
<% for (child in table.childList) { %>
// 保存 ${ClassName}子表
for (${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} : ${className}.get${@StringUtils.cap(child.className)}List()){
for (${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} : ${className}.get${@StringUtils.cap(child.classNameSimple)}List()){
if (!${@StringUtils.cap(child.className)}.STATUS_DELETE.equals(${@StringUtils.uncap(child.className)}.getStatus())){
<%
for(c in child.columnList){

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewForm</name>
<filePath>${frontDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Form.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewForm.html'){} %>]]>
<% include('/templates/modules/gen/view/viewForm.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewIndex</name>
<filePath>${frontDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Index.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewIndex.html'){} %>]]>
<% include('/templates/modules/gen/view/viewIndex.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewList</name>
<filePath>${frontDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}List.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewList.html'){} %>]]>
<% include('/templates/modules/gen/view/viewList.html'){} %>]]>
</content>
</template>

View File

@@ -3,9 +3,9 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewSelect</name>
<filePath>${frontDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/${moduleName}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Select.html</fileName>
<content><![CDATA[
<% include('/templates/modules/gen/include/viewSelect.html'){} %>]]>
<% include('/templates/modules/gen/view/viewSelect.html'){} %>]]>
</content>
</template>

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>package</name>
<filePath>${baseDir}/${moduleCode}/src/main/java/com/jeesite/modules/${moduleCode}</filePath>
<filePath>${baseDir}/${moduleCode}/src/main/java/com/jeesite/modules/${@StringUtils.replace(moduleCode, '-', '/')}</filePath>
<fileName></fileName>
<content><![CDATA[

View File

@@ -8,7 +8,7 @@
<content><![CDATA[
# 温馨提示不建议直接修改此文件为了平台升级方便建议将需要修改的参数值复制到application.yml里进行覆盖该参数值。
#${moduleCode}:
#${@StringUtils.camelCase(moduleCode)}:
# enabled: true
]]>

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>static</name>
<filePath>${baseDir}/${moduleCode}/src/main/resources/static/modules/${moduleCode}</filePath>
<filePath>${baseDir}/${moduleCode}/src/main/resources/static/modules/${@StringUtils.replace(moduleCode, '-', '/')}</filePath>
<fileName></fileName>
<content><![CDATA[

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>package</name>
<filePath>${baseDir}/${moduleCode}/${moduleCode}-client/src/main/java/com/jeesite/modules/${moduleCode}</filePath>
<filePath>${baseDir}/${moduleCode}/${moduleCode}-client/src/main/java/com/jeesite/modules/${@StringUtils.replace(moduleCode, '-', '/')}</filePath>
<fileName></fileName>
<content><![CDATA[

View File

@@ -21,15 +21,15 @@
<artifactId>jeesite-cloud-module-${moduleCode}-web</artifactId>
<packaging>war</packaging>
<name>JeeSite Cloud Module ${moduleName} Web</name>
<name>JeeSite Cloud Module ${@StringUtils.capCamelCase(moduleCode)} Web</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<finalName>web</finalName><!-- war包的名称 -->
<start-class>com.jeesite.modules.${@StringUtils.cap(module.moduleCode)}Application</start-class>
<start-class>com.jeesite.modules.${@StringUtils.capCamelCase(moduleCode)}Application</start-class>
<!-- docker setting -->
<docker.run.port>8989:8989</docker.run.port>

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>package</name>
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/java/com/jeesite/modules/${moduleCode}</filePath>
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/java/com/jeesite/modules/${@StringUtils.replace(moduleCode, '-', '/')}</filePath>
<fileName></fileName>
<content><![CDATA[

View File

@@ -4,7 +4,7 @@
<template>
<name>start-class</name>
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/java/com/jeesite/modules</filePath>
<fileName>${@StringUtils.cap(module.moduleCode)}Application.java</fileName>
<fileName>${@StringUtils.capCamelCase(moduleCode)}Application.java</fileName>
<content><![CDATA[
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
@@ -12,6 +12,8 @@
*/
package com.jeesite.modules;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -27,16 +29,22 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages={"com.jeesite.modules"})
public class ${@StringUtils.cap(module.moduleCode)}Application extends SpringBootServletInitializer {
public class ${@StringUtils.capCamelCase(moduleCode)}Application extends SpringBootServletInitializer {
private static final Logger logger = LoggerFactory.getLogger(${@StringUtils.capCamelCase(moduleCode)}Application.class);
public static void main(String[] args) {
SpringApplication.run(${@StringUtils.cap(module.moduleCode)}Application.class, args);
SpringApplication.run(${@StringUtils.capCamelCase(moduleCode)}Application.class, args);
logger.info(
"\r\n\r\n==============================================================\r\n"
+ "\r\n " + ${@StringUtils.capCamelCase(moduleCode)}Application.class.getName() + " 启动完成。"
+ "\r\n\r\n==============================================================\r\n");
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理而不是SpringBoot
return builder.sources(${@StringUtils.cap(module.moduleCode)}Application.class);
return builder.sources(${@StringUtils.capCamelCase(moduleCode)}Application.class);
}
}]]>

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>static</name>
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/resources/static/modules/${moduleCode}</filePath>
<filePath>${baseDir}/${moduleCode}/${moduleCode}/src/main/resources/static/modules/${@StringUtils.replace(moduleCode, '-', '/')}</filePath>
<fileName></fileName>
<content><![CDATA[

View File

@@ -132,7 +132,7 @@ public class ${ClassName}Controller extends BaseController {
* 查询子表数据
*/
@RequiresPermissions("${permissionPrefix}:view")
@RequestMapping(value = "${@StringUtils.uncap(child.className)}ListData")
@RequestMapping(value = "${@StringUtils.uncap(child.classNameSimple)}ListData")
@ResponseBody
public Page<${@StringUtils.cap(child.className)}> subListData(${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)}, HttpServletRequest request, HttpServletResponse response) {
${@StringUtils.uncap(child.className)}.setPage(new Page<>(request, response));

View File

@@ -49,7 +49,7 @@ public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Query'}Ser
<% for (child in table.childList){ %>
${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} = new ${@StringUtils.cap(child.className)}(entity);
${@StringUtils.uncap(child.className)}.setStatus(${@StringUtils.cap(child.className)}.STATUS_NORMAL);
entity.set${@StringUtils.cap(child.className)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
entity.set${@StringUtils.cap(child.classNameSimple)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
<% } %>
}
return entity;

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewForm</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}Form.html</fileName>
<content><![CDATA[
<%
@@ -44,8 +44,8 @@
</div>
</div>
<% } %>
<% include('/templates/modules/gen/include/formControl.html'){} %>
<% include('/templates/modules/gen/include/formChildTable.html'){} %>
<% include('/templates/modules/gen/view/formControl.html'){} %>
<% include('/templates/modules/gen/view/formChildTable.html'){} %>
</div>
<div class="box-footer">
<div class="row">
@@ -58,6 +58,6 @@
</div>
</div>
\<% } %>
<% include('/templates/modules/gen/include/formChildTableScript.html'){} %>]]>
<% include('/templates/modules/gen/view/formChildTableScript.html'){} %>]]>
</content>
</template>

View File

@@ -3,7 +3,7 @@
No deletion without permission, or be held responsible to law. -->
<template>
<name>viewList</name>
<filePath>${frontDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<filePath>${baseDir}/src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
<fileName>${className}List.html</fileName>
<content><![CDATA[
\<% layout('/layouts/default.html', {title: '${functionNameSimple}查询', libs: ['dataGrid']}){ %>
@@ -24,7 +24,7 @@
</div>
</div>
<div class="box-body">
<% include('/templates/modules/gen/include/searchForm.html'){} %>
<% include('/templates/modules/gen/view/searchForm.html'){} %>
<table id="dataGrid"></table>
<% if(!table.isTreeEntity){ %>
<div id="dataGridPage"></div>
@@ -33,6 +33,6 @@
</div>
</div>
\<% } %>
<% include('/templates/modules/gen/include/dataGridScript.html'){} %>]]>
<% include('/templates/modules/gen/view/dataGridScript.html'){} %>]]>
</content>
</template>

View File

@@ -4,10 +4,10 @@
%>
<div class="form-unit">\${text('${child.comments}')}</div>
<div class="form-unit-wrap table-form">
<table id="${@StringUtils.uncap(child.className)}DataGrid"></table>
<table id="${@StringUtils.uncap(child.classNameSimple)}DataGrid"></table>
<% if(table.tplCategory != 'query'){ %>
\<% if (hasPermi('${permissionPrefix}:edit')){ %>
<a href="#" id="${@StringUtils.uncap(child.className)}DataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> \${text('增行')}</a>
<a href="#" id="${@StringUtils.uncap(child.classNameSimple)}DataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> \${text('增行')}</a>
\<% } %>
<% } %>
</div>

View File

@@ -6,9 +6,9 @@ var treeselectExists = false;
for(child in table.childList){
%>
\//# // 初始化${child.comments}DataGrid对象
$('#${@StringUtils.uncap(child.className)}DataGrid').dataGrid({
$('#${@StringUtils.uncap(child.classNameSimple)}DataGrid').dataGrid({
data: \"#{toJson(${className}.${@StringUtils.uncap(child.className)}List)}",
data: \"#{toJson(${className}.${@StringUtils.uncap(child.classNameSimple)}List)}",
datatype: 'local', // 设置本地数据
autoGridHeight: function(){return 'auto'}, // 设置自动高度
@@ -164,9 +164,9 @@ if (table.tplCategory != 'query'){
{header:'\${text("操作")}', name:'actions', width:80, align:'center', formatter: function(val, obj, row, act){
var actions = [];
if (val == 'new'){
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.classNameSimple)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
}else{
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.classNameSimple)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
}
return actions.join('');
}, editoptions: {defaultValue: 'new'}}
@@ -178,12 +178,12 @@ if (table.tplCategory != 'query'){
\//# // 编辑表格参数
editGrid: true, // 是否是编辑表格
editGridInitRowNum: 1, // 编辑表格的初始化新增行数
editGridAddRowBtn: $('#${@StringUtils.uncap(child.className)}DataGridAddRowBtn'), // 子表增行按钮
editGridAddRowBtn: $('#${@StringUtils.uncap(child.classNameSimple)}DataGridAddRowBtn'), // 子表增行按钮
editGridAddRowBtnToHeader: true, // 子表增行按钮是否显示到表头上
editGridAddRowInitData: {<% for(pk in child.pkList){ %>${pk.attrName}<% break; }%>: '', status: Global.STATUS_NORMAL}, // 新增行的时候初始化的数据
\//# // 编辑表格的提交数据参数
editGridInputFormListName: '${@StringUtils.uncap(child.className)}List', // 提交的数据列表名
editGridInputFormListName: '${@StringUtils.uncap(child.classNameSimple)}List', // 提交的数据列表名
editGridInputFormListAttrs: 'status,<% for(c in child.columnList){if(c.attrName!="status"){%>${c.attrName},<% }} %>', // 提交数据列表的属性字段
\//# // 加载成功后执行事件

Some files were not shown because too many files have changed in this diff Show More