Compare commits
89 Commits
v5.8.1
...
v5.10.0.sp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b29c8c937 | ||
|
|
cf32922387 | ||
|
|
5e87d44a3c | ||
|
|
0ef1eca662 | ||
|
|
203e21beed | ||
|
|
34b1ba00fd | ||
|
|
8e64c2c51b | ||
|
|
62392702a6 | ||
|
|
580f5eea55 | ||
|
|
3623824a01 | ||
|
|
b1409e88a1 | ||
|
|
2b25eaa591 | ||
|
|
38c8ea825a | ||
|
|
56be7dd689 | ||
|
|
8623b1a497 | ||
|
|
1c8a5adcd3 | ||
|
|
8d1bbde93b | ||
|
|
a9054c7567 | ||
|
|
bca5facc4e | ||
|
|
a8d1080cfd | ||
|
|
44ca71d681 | ||
|
|
6ecd94b954 | ||
|
|
cba1010a45 | ||
|
|
9f1ebcd8e5 | ||
|
|
998c3204a9 | ||
|
|
ac314d9070 | ||
|
|
7826863bb5 | ||
|
|
4c96681055 | ||
|
|
7ca01a354a | ||
|
|
71771421d5 | ||
|
|
5f664bd84b | ||
|
|
5ea41881de | ||
|
|
6e2843869d | ||
|
|
6a0ebd6c2d | ||
|
|
48bd4778e6 | ||
|
|
d7ada6e4e6 | ||
|
|
f8a008d88b | ||
|
|
7bfb458981 | ||
|
|
a2ffa1e47a | ||
|
|
80b397e9e4 | ||
|
|
b008b0c956 | ||
|
|
d79339b891 | ||
|
|
81acccfe66 | ||
|
|
fe6004d81d | ||
|
|
e404d2652d | ||
|
|
827d461437 | ||
|
|
a2da4f095b | ||
|
|
302eb47b83 | ||
|
|
4fa6225017 | ||
|
|
68058f948f | ||
|
|
fc59e3a7aa | ||
|
|
d1cd3ad5ad | ||
|
|
213834810c | ||
|
|
6d381b31da | ||
|
|
5e55b5f4b3 | ||
|
|
e3dc77b75a | ||
|
|
58b22924dd | ||
|
|
f7cdda05d1 | ||
|
|
cb52f25931 | ||
|
|
5b9a7c1d2c | ||
|
|
c295b87f35 | ||
|
|
d6eecc1c56 | ||
|
|
9d2a250d72 | ||
|
|
f0cc98e45b | ||
|
|
a8fbf4d2b1 | ||
|
|
2013201f06 | ||
|
|
425c74fab4 | ||
|
|
b9fc0a9f86 | ||
|
|
ca256c1364 | ||
|
|
c484e19448 | ||
|
|
9275260019 | ||
|
|
9a671d8dfd | ||
|
|
7b537b4c83 | ||
|
|
223d05b8c1 | ||
|
|
4ca8398f99 | ||
|
|
cfc8681174 | ||
|
|
9c5bfd9c59 | ||
|
|
3f87f2a024 | ||
|
|
c3a25b98ec | ||
|
|
5c09e3de51 | ||
|
|
91e08cf4df | ||
|
|
14a38abb6d | ||
|
|
99c778c92d | ||
|
|
e51dd7c73c | ||
|
|
67891ce361 | ||
|
|
25a192cd6a | ||
|
|
444463ed5e | ||
|
|
97ebfe40be | ||
|
|
72b030bcc1 |
56
README.md
56
README.md
@@ -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>
|
||||
|
||||
## 今后如何升级?
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得请求参数值
|
||||
*/
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -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;}
|
||||
|
||||
BIN
common/src/main/resources/static/upbw/img/edge.png
Normal file
BIN
common/src/main/resources/static/upbw/img/edge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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 '回复人员',
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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 '回复人员',
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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>';
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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.
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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("访问拒绝"));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Binary file not shown.
@@ -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=""
|
||||
)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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缓存
|
||||
|
||||
@@ -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("请先获取验证码。"));
|
||||
}
|
||||
|
||||
// 验证码是否超时
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换主题风格
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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("非法操作,不能够操作此用户!"));
|
||||
}
|
||||
|
||||
@@ -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, "非法操作,不能够操作此用户!");
|
||||
}
|
||||
|
||||
@@ -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("非法操作,不能够操作此用户!"));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 =========#
|
||||
|
||||
@@ -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" /> -->
|
||||
|
||||
@@ -388,7 +388,6 @@
|
||||
本部门数据=Current organization data
|
||||
本公司数据=Current company data
|
||||
本部门和本公司数据=Current organization and company data
|
||||
控制业务范围=Business scope
|
||||
|
||||
新增角色=New role
|
||||
编辑角色=Edit role
|
||||
|
||||
@@ -312,7 +312,6 @@
|
||||
本部门数据=本省庁データ
|
||||
本公司数据=当社のデータ
|
||||
本部门和本公司数据=本省庁と自社のデータ
|
||||
控制业务范围=業務の範囲を制御する
|
||||
|
||||
新增角色=新規役
|
||||
编辑角色=編集役
|
||||
|
||||
@@ -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()}
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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}} | 时间:{{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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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[
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<content><![CDATA[
|
||||
# 温馨提示:不建议直接修改此文件,为了平台升级方便,建议将需要修改的参数值,复制到application.yml里进行覆盖该参数值。
|
||||
|
||||
#${moduleCode}:
|
||||
#${@StringUtils.camelCase(moduleCode)}:
|
||||
# enabled: true
|
||||
|
||||
]]>
|
||||
|
||||
@@ -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[
|
||||
|
||||
|
||||
@@ -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[
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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[
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}]]>
|
||||
|
||||
@@ -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[
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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> ');
|
||||
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> ');
|
||||
}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> ');
|
||||
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> ');
|
||||
}
|
||||
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
Reference in New Issue
Block a user