Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21579f705a | ||
|
|
6655214eb2 | ||
|
|
3aef4ad672 | ||
|
|
630b28f452 | ||
|
|
00ff5288f1 | ||
|
|
2cd649e009 | ||
|
|
701c178d83 | ||
|
|
f4d8d6772a | ||
|
|
958d019cd5 | ||
|
|
2272f36588 | ||
|
|
4bbb63a4b6 | ||
|
|
3719e62fb6 | ||
|
|
57e172802d |
@@ -1,14 +1,23 @@
|
||||
### 该问题是怎么引起的?
|
||||
### 是什么问题、该问题是怎么引起的?
|
||||
|
||||
1.
|
||||
|
||||
### 重现步骤、期望结果、截图、代码
|
||||
|
||||
### 重现步骤
|
||||
|
||||
|
||||
|
||||
### 报错信息
|
||||
|
||||
1.
|
||||
```
|
||||
这里贴你的代码块
|
||||
```
|
||||
|
||||
### 实际结果、报错信息、截图
|
||||
|
||||
```
|
||||
1.
|
||||
```
|
||||
这里贴错误信息
|
||||
```
|
||||
|
||||
### 环境版本:
|
||||
|
||||
- JDK版本:1.8、11、17
|
||||
- 浏览器版本:Chrome xx、Firefox xx、IE xx
|
||||
- 平台版本:JeeSite 4.x.x、5.x.x(pom.xml里查看)
|
||||
|
||||
@@ -58,12 +58,7 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
* 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌浏览器、火狐浏览器、国产浏览器 等
|
||||
* 工作流引擎:Flowable 6.6、符合 BPMN 规范、在线流程设计器、中国式流程、退回、撤回、自由流
|
||||
* 技术选型(详细):<http://jeesite.com/docs/technology/>
|
||||
|
||||
疑问:为什么不使用 Bootstrap、AdminLTE 最新版?
|
||||
1. 前端发展迅速,向下兼容性是前端最大的弊端,会造成升级 JeeSite 变的困难,无法做到平滑升级。
|
||||
2. 其实 JeeSite 一直为前端组件做相应升级,满足各种需求场景,可以达到相应的效果,并向下兼容。
|
||||
3. 为了兼容 IE 浏览器,2020 年浏览器国内市场份额分析,还是有一定的 IE 占有率。
|
||||
4. JeeSite 也提供了更先进的**分离端版本**:<http://jeesite.com/docs/jeesite-vue/>
|
||||
* JeeSite Vue:<http://jeesite.com/docs/jeesite-vue/>
|
||||
|
||||
## 更多介绍
|
||||
|
||||
@@ -92,7 +87,7 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
### 本地运行
|
||||
|
||||
1. 环境准备:`JDK 1.8 or 11、17`、`Maven 3.6+`、`MySQL 5.7 or 8.0`([支持更多数据库](https://jeesite.com/docs/technology/#8已支持数据库))
|
||||
1. 环境准备:`JDK 1.8 or 11、17`、`Maven 3.6+`、`MySQL 5.7 or 8.0`([支持更多数据库](https://jeesite.com/docs/technology/#_8、已支持数据库))
|
||||
2. 执行命令:`git clone https://gitee.com/thinkgem/jeesite4.git` 下载源码(master分支)
|
||||
3. 打开文件:`/web/src/main/resources/config/application.yml` 配置JDBC连接
|
||||
4. 执行脚本:`/web/bin/init-data.bat` 初始化数据库
|
||||
|
||||
@@ -31,8 +31,9 @@ import com.jeesite.common.lang.StringUtils;
|
||||
* 2.自制的base62 编码
|
||||
* 3.Commons-Lang的xml/html escape
|
||||
* 4.JDK提供的URLEncoder
|
||||
* @author calvin
|
||||
* @version 2013-01-15
|
||||
* 5、XSS、SQL、orderBy 过滤器
|
||||
* @author calvin、ThinkGem
|
||||
* @version 2022-2-17
|
||||
*/
|
||||
public class EncodeUtils {
|
||||
|
||||
@@ -270,7 +271,7 @@ public class EncodeUtils {
|
||||
}
|
||||
if (logger.isInfoEnabled() && !value.equals(oriValue)){
|
||||
logger.info("xssFilter: {} <=<=<= {} source: {}", value, text,
|
||||
request != null ? request.getRequestURL() : StringUtils.EMPTY);
|
||||
request != null ? request.getRequestURL() : "common");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@@ -279,16 +280,18 @@ public class EncodeUtils {
|
||||
|
||||
// 预编译SQL过滤正则表达式
|
||||
private static Pattern sqlPattern = Pattern.compile(
|
||||
"(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|((extractvalue|updatexml)([\\s]*?)\\()|"
|
||||
+ "(\\b(select|update|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute|case when|sleep|union|load_file)\\b)",
|
||||
"(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|((extractvalue|updatexml|if|mid|database|rand|user)([\\s]*?)\\()|"
|
||||
+ "(\\b(select|update|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|"
|
||||
+ "drop|execute|case when|sleep|union|load_file)\\b)",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
private static Pattern orderByPattern = Pattern.compile("[a-z0-9_\\.\\, ]*", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
/**
|
||||
* SQL过滤,防止注入,传入参数输入有select相关代码,替换空。
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static String sqlFilter(String text){
|
||||
return sqlFilter(text, null);
|
||||
return sqlFilter(text, "common");
|
||||
}
|
||||
/**
|
||||
* SQL过滤,防止注入,传入参数输入有select相关代码,替换空。
|
||||
@@ -297,9 +300,16 @@ public class EncodeUtils {
|
||||
public static String sqlFilter(String text, String source){
|
||||
if (text != null){
|
||||
String value = text;
|
||||
Matcher matcher = sqlPattern.matcher(value);
|
||||
if (matcher.find()) {
|
||||
value = matcher.replaceAll(StringUtils.EMPTY);
|
||||
if ("orderBy".equals(source)) {
|
||||
Matcher matcher = orderByPattern.matcher(value);
|
||||
if (!matcher.matches()) {
|
||||
value = StringUtils.EMPTY;
|
||||
}
|
||||
} else {
|
||||
Matcher matcher = sqlPattern.matcher(value);
|
||||
if (matcher.find()) {
|
||||
value = matcher.replaceAll(StringUtils.EMPTY);
|
||||
}
|
||||
}
|
||||
if (logger.isWarnEnabled() && !value.equals(text)){
|
||||
logger.info("sqlFilter: {} <=<=<= {} source: {}", value, text, source);
|
||||
@@ -310,38 +320,38 @@ public class EncodeUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
int i = 0;
|
||||
// xssFilter((++i)+"你好,<script>alert(document.cookie)</script>我还在。");
|
||||
// xssFilter((++i)+"你好,<strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,\"><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<iframe src=\"abcdef\"></iframe><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<iframe src=\"abcdef\"/><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<iframe src=\"abcdef\"><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script type=\"text/javascript\">alert(document.cookie)</script>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script\n type=\"text/javascript\">\nalert(document.cookie)\n</script>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script src='' onerror='alert(document.cookie)'></script>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script type=text/javascript>alert()我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script>alert(document.cookie)</script>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<script>window.location='url'我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,</script></iframe>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,eval(abc)我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,xpression(abc)我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<img src='abc.jpg' onerror='location='';alert(document.cookie);'></img>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<img src='abc.jpg' onerror='alert(document.cookie);'/>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<img src='abc.jpg' onerror='alert(document.cookie);'>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<a onload='alert(\"abc\")'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<a href=\"/abc\">hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<a href='/abc'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<a href='vbscript:alert(\"abc\");'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,<a href='javascript:alert(\"abc\");'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,?abc=def&hello=123&world={\"a\":1}我还在。");
|
||||
// xssFilter("<!--HTML-->"+(++i)+"你好,?abc=def&hello=123&world={'a':1}我还在。");
|
||||
sqlFilter((++i)+"你好,select * from xxx where abc=def and 1=1我还在。");
|
||||
sqlFilter((++i)+"你好,insert into xxx values(1,2,3,4,5)我还在。");
|
||||
sqlFilter((++i)+"你好,delete from xxx我还在。");
|
||||
sqlFilter((++i)+"你好,a.audit_result asc,case when 1 like case when length(database())=6 then 1 else exp(11111111111111111) end then 1 else 1/0 end");
|
||||
sqlFilter((++i)+"你好,if(1=2,1,SLEEP(10))");
|
||||
}
|
||||
// public static void main(String[] args) {
|
||||
// xssFilter("1 你好 <script>alert(document.cookie)</script>我还在。");
|
||||
// xssFilter("2 你好 <strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->3 你好 \"><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->4 你好 <iframe src=\"abcdef\"></iframe><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->5 你好 <iframe src=\"abcdef\"/><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->6 你好 <iframe src=\"abcdef\"><strong>加粗文字</strong>我还在。");
|
||||
// xssFilter("<!--HTML-->7 你好 <script type=\"text/javascript\">alert(document.cookie)</script>我还在。");
|
||||
// xssFilter("<!--HTML-->8 你好 <script\n type=\"text/javascript\">\nalert(document.cookie)\n</script>我还在。");
|
||||
// xssFilter("<!--HTML-->9 你好 <script src='' onerror='alert(document.cookie)'></script>我还在。");
|
||||
// xssFilter("<!--HTML-->10 你好 <script type=text/javascript>alert()我还在。");
|
||||
// xssFilter("<!--HTML-->11 你好 <script>alert(document.cookie)</script>我还在。");
|
||||
// xssFilter("<!--HTML-->12 你好 <script>window.location='url'我还在。");
|
||||
// xssFilter("<!--HTML-->13 你好 </script></iframe>我还在。");
|
||||
// xssFilter("<!--HTML-->14 你好 eval(abc)我还在。");
|
||||
// xssFilter("<!--HTML-->15 你好 xpression(abc)我还在。");
|
||||
// xssFilter("<!--HTML-->16 你好 <img src='abc.jpg' onerror='location='';alert(document.cookie);'></img>我还在。");
|
||||
// xssFilter("<!--HTML-->17 你好 <img src='abc.jpg' onerror='alert(document.cookie);'/>我还在。");
|
||||
// xssFilter("<!--HTML-->18 你好 <img src='abc.jpg' onerror='alert(document.cookie);'>我还在。");
|
||||
// xssFilter("<!--HTML-->19 你好 <a onload='alert(\"abc\")'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->20 你好 <a href=\"/abc\">hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->21 你好 <a href='/abc'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->22 你好 <a href='vbscript:alert(\"abc\");'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->23 你好 <a href='javascript:alert(\"abc\");'>hello</a>我还在。");
|
||||
// xssFilter("<!--HTML-->24 你好 ?abc=def&hello=123&world={\"a\":1}我还在。");
|
||||
// xssFilter("<!--HTML-->25 你好 ?abc=def&hello=123&world={'a':1}我还在。");
|
||||
// sqlFilter("1 你好 select * from xxx where abc=def and 1=1我还在。");
|
||||
// sqlFilter("2 你好 insert into xxx values(1,2,3,4,5)我还在。");
|
||||
// sqlFilter("3 你好 delete from xxx我还在。");
|
||||
// sqlFilter("4 a.audit_result asc,case when 1 like case when length(database())=6 then 1 else exp(111) end then 1 else 1/0 end", "orderBy");
|
||||
// sqlFilter("5 if(1=2,1,SLEEP(10)), if(mid(database(),{},1)=\\\"{}\\\",a.id,a.login_name)", "orderBy");
|
||||
// sqlFilter("6 a.audit_result asc, b.audit_result2 desc, b.AuditResult3 desc", "orderBy");
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -161,11 +161,16 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
* @return
|
||||
*/
|
||||
public static byte[] serialize(Object object) {
|
||||
if (isJavaSerialize) {
|
||||
return ObjectUtils.serializeJava(object);
|
||||
}else {
|
||||
return ObjectUtils.serializeFst(object);
|
||||
try {
|
||||
if (isJavaSerialize) {
|
||||
return ObjectUtils.serializeJava(object);
|
||||
}else {
|
||||
return ObjectUtils.serializeFst(object);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("serialize", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,11 +179,16 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
* @return
|
||||
*/
|
||||
public static Object unserialize(byte[] bytes) {
|
||||
if (isJavaSerialize) {
|
||||
return ObjectUtils.unserializeJava(bytes);
|
||||
}else {
|
||||
return ObjectUtils.unserializeFst(bytes);
|
||||
try {
|
||||
if (isJavaSerialize) {
|
||||
return ObjectUtils.unserializeJava(bytes);
|
||||
}else {
|
||||
return ObjectUtils.unserializeFst(bytes);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("unserialize", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,7 +210,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
e.printStackTrace();
|
||||
}
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000){
|
||||
if (totalTime > 30000){
|
||||
logger.warn(object.getClass() + " serialize time: " + TimeUtils.formatDateAgo(totalTime));
|
||||
}
|
||||
return bytes;
|
||||
@@ -226,7 +236,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
}
|
||||
}
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000 && object != null){
|
||||
if (totalTime > 30000 && object != null){
|
||||
logger.warn(object.getClass() + " unserialize time: " + TimeUtils.formatDateAgo(totalTime));
|
||||
}
|
||||
return object;
|
||||
@@ -251,7 +261,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
long beginTime = System.currentTimeMillis();
|
||||
byte[] bytes = fstConfiguration.get().asByteArray(object);
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000){
|
||||
if (totalTime > 30000){
|
||||
logger.warn(object.getClass() + " fst serialize time: " + TimeUtils.formatDateAgo(totalTime));
|
||||
}
|
||||
return bytes;
|
||||
@@ -269,7 +279,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
long beginTime = System.currentTimeMillis();
|
||||
Object object = fstConfiguration.get().asObject(bytes);
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000 && object != null){
|
||||
if (totalTime > 30000 && object != null){
|
||||
logger.warn(object.getClass() + " fst unserialize time: " + TimeUtils.formatDateAgo(totalTime));
|
||||
}
|
||||
return object;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class PinyinUtils {
|
||||
if (arr[i] > 128) {
|
||||
try {
|
||||
String[] temp = PinyinHelper.toHanyuPinyinStringArray(arr[i], Static.defaultFormat);
|
||||
if (temp != null) {
|
||||
if (temp != null && temp.length > 0) {
|
||||
pybf.append(temp[0].charAt(0));
|
||||
}else{
|
||||
pybf.append(String.valueOf(arr[i]));
|
||||
@@ -155,6 +155,7 @@ public class PinyinUtils {
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String str = "你好,123,🅻🅾🆅🅴、世界abc,~!#$_Sdf,女;hello!-";
|
||||
// String str = "你好,123,世界abc,~!#$_Sdf,女;hello!-";
|
||||
// System.out.println(getFirstSpell(str));
|
||||
// System.out.println(getFirstSpell(str, false));
|
||||
|
||||
@@ -145,7 +145,8 @@
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #2A579A;
|
||||
|
||||
@@ -144,7 +144,8 @@
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #2A579A;
|
||||
|
||||
@@ -150,7 +150,8 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1890ff;
|
||||
@@ -163,9 +164,20 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
|
||||
.sidebar-menu {padding:0 8px 0 7px;}
|
||||
.sidebar-menu li>a>.pull-right-container {left:0;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
|
||||
.sidebar-menu .treeview-item.active>a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
|
||||
|
||||
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
||||
.content-wrapper, .right-side, body {background-color:#f0f2f5;}
|
||||
|
||||
/* 页签-经典风格 */
|
||||
.tabpanel_mover li {height:26px;padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;border-radius:3px;background:#fff;}
|
||||
.tabpanel_mover li.active {background-color:#3aa0ff;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform:scale(1.2);-webkit-transform:scale(1.2);
|
||||
-o-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
@@ -177,33 +189,8 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1890ff;}
|
||||
.form-unit {border-bottom: 1px solid #eee;}
|
||||
.form-unit {border-bottom:1px solid #eee;}
|
||||
|
||||
.tabpanel_mover li {height:26px;padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;border-radius:3px;background:#fff;}
|
||||
.tabpanel_mover li.active {background-color:#3aa0ff;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
/* .tabpanel_mover li {background:#fff;border-right:1px solid #eee;padding:8px 16px 8px 5px;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:3px solid #3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;} 替换上面 tab 样式,改变 tab 风格。*/
|
||||
|
||||
/* .main-content {padding:10px;}
|
||||
.ui-layout-container {padding:10px;}
|
||||
.ui-layout-resizer {background:transparent;}
|
||||
.ui-layout-pane {box-shadow:0 0 5px #e0e0e0;}
|
||||
.ui-layout-pane>.main-content {padding:0;}
|
||||
.ui-layout-content>.wrapper>.main-content {padding:0;}
|
||||
.box-main,.nav-main{border-radius:3px;box-shadow:0 0 5px #e0e0e0;} 解开注释,可给内容页面,添加内边距样式 */
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1890ff;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#3aa0ff;}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* http://jeesite.com
|
||||
*/
|
||||
a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sortable {
|
||||
color:#1890ff;
|
||||
}
|
||||
.main-header .navbar {
|
||||
background: #1890ff;
|
||||
background: -webkit-gradient(linear, left bottom, right top, color-stop(0, #2684f5), color-stop(1, #1890ff));
|
||||
background: -ms-linear-gradient(left, #2684f5, #1890ff);
|
||||
background: -moz-linear-gradient(left top, #2684f5 0%, #1890ff 100%);
|
||||
background: -o-linear-gradient(#1890ff, #2684f5);
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #1890ff;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1890ff;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu {padding:0 8px 0 7px;}
|
||||
.sidebar-menu li>a>.pull-right-container {left:0;}
|
||||
.sidebar-menu .treeview-item.active>a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
|
||||
|
||||
/* 页签添加内边距 */
|
||||
.content-wrapper, .tabpanel_content, .tabpanel_content .html_content, body {background-color:#f0f2f5;}
|
||||
.box-main, .nav-main, .ui-layout-pane, iframe {border-radius:5px;}
|
||||
.tabpanel_content .html_content {padding:14px 14px 13px 15px;}
|
||||
.tabpanel_tab_content {border-bottom:0;}
|
||||
.ui-layout-resizer {background:none;}
|
||||
.content {padding:0!important}
|
||||
|
||||
/* 页签-无界风格 */
|
||||
.tabpanel_mover li {height:26px;padding:2px 16px 2px 3px;margin:11px 0 0px 9px;border:0;border-radius:4px;background:#fff;}
|
||||
.tabpanel_mover li .title {padding-left:0;text-align:center;}
|
||||
.tabpanel_mover li.active {background-color:#3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:4px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform:scale(1.2);-webkit-transform:scale(1.2);
|
||||
-o-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:transparent;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:12px;}
|
||||
.tabpanel_tab_content .tabpanel_mover {margin:0 5px;}
|
||||
|
||||
/* 页签-下划线风格
|
||||
.tabpanel_mover li {background:#fff;border:0;padding:5px 16px 5px 3px;}
|
||||
.tabpanel_mover li .title {padding-left:0;text-align:center;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:2px solid #3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.6;right:3px;top:10px;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {height:32px;line-height:32px;border:0;background-color:#fff;overflow:visible;}
|
||||
.tabpanel_tab_content .tabpanel_move_content {min-height:32px;}
|
||||
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:4px;} */
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff!important;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1890ff;}
|
||||
.form-unit {border-bottom:1px solid #eee;}
|
||||
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1890ff;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#3aa0ff;}
|
||||
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field,
|
||||
.select2-container--default.select2-container--focus .select2-selection--single,
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#40a9ff!important;box-shadow:0 0 0 2px rgba(24,144,255,.2);}
|
||||
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#fafafa;}
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
|
||||
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
||||
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
||||
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#ecf9ff;}
|
||||
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
||||
.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;}
|
||||
@@ -150,7 +150,8 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1e5edb;
|
||||
@@ -163,9 +164,20 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
|
||||
.sidebar-menu {padding:0 8px 0 7px;}
|
||||
.sidebar-menu li>a>.pull-right-container {left:0;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#2a50ec;background-color:#edf2fc;border-right:0;border-radius:6px;}
|
||||
.sidebar-menu .treeview-item.active>a {color:#2a50ec;background-color:#edf2fc;border-right:0;border-radius:6px;}
|
||||
|
||||
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
||||
.content-wrapper, .right-side, body {background-color:#f0f2f5;}
|
||||
|
||||
/* 页签-经典风格 */
|
||||
.tabpanel_mover li {height:26px;padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;border-radius:3px;background:#fff;}
|
||||
.tabpanel_mover li.active {background-color:#1e5edb;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform:scale(1.2);-webkit-transform:scale(1.2);
|
||||
-o-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
@@ -177,33 +189,8 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1e5edb!important;border-color:#1e5edb!important;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1e5edb;}
|
||||
.form-unit {border-bottom: 1px solid #eee;}
|
||||
.form-unit {border-bottom:1px solid #eee;}
|
||||
|
||||
.tabpanel_mover li {height:26px;padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;border-radius:3px;background:#fff;}
|
||||
.tabpanel_mover li.active {background-color:#1e5edb;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
/* .tabpanel_mover li {background:#fff;border-right:1px solid #eee;padding:8px 16px 8px 5px;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:3px solid #1e5edb;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;} 替换上面 tab 样式,改变 tab 风格。*/
|
||||
|
||||
/* .main-content {padding:10px;}
|
||||
.ui-layout-container {padding:10px;}
|
||||
.ui-layout-resizer {background:transparent;}
|
||||
.ui-layout-pane {box-shadow:0 0 5px #e0e0e0;}
|
||||
.ui-layout-pane>.main-content {padding:0;}
|
||||
.ui-layout-content>.wrapper>.main-content {padding:0;}
|
||||
.box-main,.nav-main{border-radius:3px;box-shadow:0 0 5px #e0e0e0;} 解开注释,可给内容页面,添加内边距样式 */
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1e5edb;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#1e5edb;}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* http://jeesite.com
|
||||
*/
|
||||
a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sortable {
|
||||
color:#1e5edb;
|
||||
}
|
||||
.main-header .navbar {
|
||||
background: #1951be;
|
||||
background: -webkit-gradient(linear, left bottom, right top, color-stop(0, #1951be), color-stop(1, #2780ec));
|
||||
background: -ms-linear-gradient(left, #1951be, #2780ec);
|
||||
background: -moz-linear-gradient(left top, #1951be 0%, #2780ec 100%);
|
||||
background: -o-linear-gradient(#2780ec, #1951be);
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
background-color: #1951be;
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #1951be;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #1e5edb;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1e5edb;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu {padding:0 8px 0 7px;}
|
||||
.sidebar-menu li>a>.pull-right-container {left:0;}
|
||||
.sidebar-menu .treeview-item.active>a {color:#2a50ec;background-color:#edf2fc;border-right:0;border-radius:6px;}
|
||||
|
||||
/* 页签添加内边距 */
|
||||
.content-wrapper, .tabpanel_content, .tabpanel_content .html_content, body {background-color:#f0f2f5;}
|
||||
.box-main, .nav-main, .ui-layout-pane, iframe {border-radius:5px;}
|
||||
.tabpanel_content .html_content {padding:14px 14px 13px 15px;}
|
||||
.tabpanel_tab_content {border-bottom:0;}
|
||||
.ui-layout-resizer {background:none;}
|
||||
.content {padding:0!important}
|
||||
|
||||
/* 页签-无界风格 */
|
||||
.tabpanel_mover li {height:26px;padding:2px 16px 2px 3px;margin:11px 0 0px 9px;border:0;border-radius:4px;background:#fff;}
|
||||
.tabpanel_mover li .title {padding-left:0;text-align:center;}
|
||||
.tabpanel_mover li.active {background-color:#316ee6;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:4px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform:scale(1.2);-webkit-transform:scale(1.2);
|
||||
-o-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:transparent;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:12px;}
|
||||
.tabpanel_tab_content .tabpanel_mover {margin:0 5px;}
|
||||
|
||||
/* 页签-下划线风格
|
||||
.tabpanel_mover li {background:#fff;border:0;padding:5px 16px 5px 3px;}
|
||||
.tabpanel_mover li .title {padding-left:0;text-align:center;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:2px solid #1e5edb;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.6;right:3px;top:10px;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {height:32px;line-height:32px;border:0;background-color:#fff;overflow:visible;}
|
||||
.tabpanel_tab_content .tabpanel_move_content {min-height:32px;}
|
||||
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:4px;} */
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1e5edb!important;border-color:#1e5edb!important;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1e5edb;}
|
||||
.form-unit {border-bottom:1px solid #eee;}
|
||||
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1e5edb;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#1e5edb;}
|
||||
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field,
|
||||
.select2-container--default.select2-container--focus .select2-selection--single,
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#557bfa!important;box-shadow:0 0 0 2px rgba(24,80,236,.2);}
|
||||
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#fafafa;}
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
|
||||
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
||||
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
||||
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#f0f5ff;}
|
||||
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
||||
.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;}
|
||||
@@ -2,12 +2,12 @@
|
||||
zTree Style 3.4 author: Hunter.z、ThinkGem
|
||||
-------------------------------------*/
|
||||
|
||||
.ztree * {padding:0;margin:0;font-size:13px;}
|
||||
.ztree {margin:0;padding:5px;color:#333}
|
||||
.ztree li{padding:0;margin:0;list-style:none;line-height:21px;text-align:left;white-space:nowrap;outline:0}
|
||||
.ztree * {padding:0;margin:0;}
|
||||
.ztree {margin:0;padding:0 5px;color:#333}
|
||||
.ztree li{padding:3px 0;margin:0;list-style:none;line-height:21px;text-align:left;white-space:nowrap;outline:0}
|
||||
.ztree li ul{ margin:0;padding:0 0 0 18px}
|
||||
|
||||
.ztree li a {padding-right:3px;margin:0;cursor:pointer;height:23px;color:#333;background-color: transparent;text-decoration:none;display: inline-block;vertical-align: middle;}
|
||||
.ztree li a {padding-right:3px;margin:0;cursor:pointer;height:23px;color:#333;background-color:transparent;text-decoration:none;display:inline-block;vertical-align:middle;}
|
||||
.ztree li a:hover {text-decoration:underline}
|
||||
.ztree li a.curSelectedNode {padding-top:0px;background-color:#e5e5e5;color:black;height:23px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
.ztree li a.curSelectedNode_Edit {padding-top:0px;background-color:#e5e5e5;color:black;height:23px;border:1px #666 solid;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
@@ -17,77 +17,82 @@ zTree Style 3.4 author: Hunter.z、ThinkGem
|
||||
.ztree li a.tmpTargetNode_next {}
|
||||
.ztree li a input.rename {height:14px;width:80px;padding:0;margin:0;
|
||||
font-size:12px;border:1px #7EC4CC solid;*border:0px}
|
||||
.ztree li span {line-height:23px;margin-right:2px}
|
||||
.ztree li span.button {line-height:0;margin:0;width:21px;height:21px;display: inline-block;vertical-align:middle;
|
||||
border:0 none;cursor: pointer;outline:none;}
|
||||
.ztree li span {line-height:23px;margin-right:4px}
|
||||
.ztree li span.button {line-height:0;margin:0;width:21px;height:21px;display:inline-block;vertical-align:middle;
|
||||
border:0 none;cursor:pointer;outline:none;}
|
||||
.ztree li span.button.ico_loading{margin-right:2px;background:url(./img/loading.gif) no-repeat scroll 0 0 transparent;vertical-align:top;*vertical-align:middle}
|
||||
|
||||
ul.tmpTargetzTree {background-color:#FFE6B0;opacity:0.8;filter:alpha(opacity=80)}
|
||||
|
||||
span.tmpzTreeMove_arrow {width:16px;height:21px;display: inline-block;padding:0;margin:2px 0 0 1px;border:0 none;position:absolute;
|
||||
background-color:transparent;background-repeat:no-repeat;background-attachment: scroll;}
|
||||
span.tmpzTreeMove_arrow {width:16px;height:21px;display:inline-block;padding:0;margin:2px 0 0 1px;border:0 none;position:absolute;
|
||||
background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;}
|
||||
|
||||
ul.ztree.zTreeDragUL {margin:0;padding:0;position:absolute;width:auto;height:auto;overflow:hidden;background-color:#cfcfcf;border:1px #00B83F dotted;opacity:0.8;filter:alpha(opacity=80)}
|
||||
.zTreeMask {z-index:10000;background-color:#cfcfcf;opacity:0.0;filter:alpha(opacity=0);position:absolute}
|
||||
|
||||
/* 树搜索相关 */
|
||||
.treeSearchInput {padding:13px 0 0 20px;}
|
||||
.treeSearchInput label {padding:5px 0 3px 0;font-size:13px;font-weight:normal;vertical-align:middle;}
|
||||
.treeSearchInput {padding:12px 0 0 20px;}
|
||||
.treeSearchInput label {padding:4px 0 3px 0;font-weight:normal;vertical-align:middle;}
|
||||
.treeSearchInput input {width:140px;vertical-align:middle;line-height:24px;height:26px;border:1px solid #aaa;padding:0 4px;border-radius:4px;}
|
||||
.treeSearchInput button {border:1px solid #aaa;vertical-align:middle;height:26px;height:26px\9;font-size:13px;background:#efefef;padding:0 8px;}
|
||||
.treeShowHideButton {position:absolute;right:8px;top:-3px;font-size:12px;color:#333;z-index:3;}
|
||||
.treeSearchInput button {border:1px solid #aaa;vertical-align:middle;height:26px;height:26px\9;background:#efefef;padding:0 8px;}
|
||||
.treeShowHideButton {position:absolute;right:8px;top:-3px;color:#333;z-index:3;}
|
||||
.treeShowHideButton label {cursor:pointer;}
|
||||
.treeExpandCollapse {float:right;margin:6px 5px;padding:5px;font-size:12px;color:#333;position:relative;z-index:2;background:#fff;}
|
||||
.treeExpandCollapse {float:right;margin:6px 5px;padding:5px;color:#333;position:relative;z-index:2;background:#fff;}
|
||||
.treeExpandCollapse a {text-decoration:none;color:#333}
|
||||
.treeselect.ztree {padding:10px 20px;}
|
||||
|
||||
/* 字体图标风格 */
|
||||
.ztree * {box-sizing:content-box;}
|
||||
.ztree li li {padding-left:9px;}
|
||||
.ztree li ul.line {content:"";border-left:1px dotted #aaa;top:0px;left:0px;margin-top:-2px;padding-top:2px;}
|
||||
/* .ztree li ul.line {content:"";border-left:1px dotted #aaa;top:0px;left:0px;margin-top:0;padding-top:2px;} */
|
||||
.ztree li ul {position:relative;background:none;margin-left:9px;padding-left:0;}
|
||||
.ztree li ul.line {background:none;}
|
||||
.ztree li .noline_open + a + ul:before {border-left:none;}
|
||||
.ztree li .noline_open + a + ul li:before {border-top:none;}
|
||||
.ztree li a {height:26px;padding-left:3px;}
|
||||
.ztree li span {height:26px;margin-left:4px;}
|
||||
.ztree li a {height:26px;line-height:25px;padding-left:3px;}
|
||||
.ztree li span {height:26px;margin-left:6px;}
|
||||
.ztree li span.node_name {margin-right:6px;}
|
||||
.ztree li span.button.switch,
|
||||
.ztree li span.button.chk,
|
||||
.ztree li a span.button,
|
||||
.ztree li span.button[class$="Page"] {position:relative;width:18px;height:22px;background:none;background-position:center center !important;padding:2px 0;
|
||||
.ztree li span.button[class$="Page"] {position:relative;width:18px;height:18px;background:none;background-position:center center !important;padding:0;
|
||||
display:inline-block;font:normal normal normal 15px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
|
||||
.ztree li span.button[class$="Page"] {width:15px;}
|
||||
.ztree li a span.button[style="width:0px;height:0px;"]:before,
|
||||
.ztree li a span.button[style^="background"]:before {content:"";}
|
||||
.ztree li span.button.roots_docu, .ztree li span.button.center_docu, .ztree li span.button.bottom_docu {position:relative;height:24px;padding:0;}
|
||||
.ztree li span.button.roots_docu:before {content:"";display:block;width:18px;height:11px;border-left:1px dotted #aaa;position:absolute;top:10px;left:9px;}
|
||||
.ztree li span.button.roots_docu:after {content:"";display:block;width:9px;height:0;border-top:1px dotted #aaa;position:absolute;top:10px;left:9px;}
|
||||
.ztree li span.button.center_docu:before {content:"";display:block;width:0;height:25px;border-left:1px dotted #aaa;position:absolute;top:-3px;left:9px;}
|
||||
.ztree li span.button.center_docu:after {content:"";display:block;width:9px;height:0;border-top:1px dotted #aaa;position:absolute;top:10px;left:9px;}
|
||||
.ztree li span.button.bottom_docu:before {content:"";display:block;width:0;height:12px;border-left:1px dotted #aaa;position:absolute;top:-3px;left:9px;}
|
||||
.ztree li span.button.bottom_docu:after {content:"";display:block;width:9px;height:0;border-top:1px dotted #aaa;position:absolute;top:10px;left:9px;}
|
||||
.ztree li span.button:before {display:block;line-height:20px;text-align:left;padding-left:4px;color:#666;}
|
||||
/* .ztree li span.button.roots_docu:before {content:"";display:block;width:18px;height:11px;border-left:1px dotted #aaa;position:absolute;top:12px;left:11px;} */
|
||||
/* .ztree li span.button.roots_docu:after {content:"";display:block;width:7px;height:0;border-top:1px dotted #aaa;position:absolute;top:12px;left:11px;} */
|
||||
/* .ztree li span.button.center_docu:before {content:"";display:block;width:0;height:31px;border-left:1px dotted #aaa;position:absolute;top:-5px;left:11px;} */
|
||||
/* .ztree li span.button.center_docu:after {content:"";display:block;width:7px;height:0;border-top:1px dotted #aaa;position:absolute;top:12px;left:12px;} */
|
||||
/* .ztree li span.button.bottom_docu:before {content:"";display:block;width:0;height:16px;border-left:1px dotted #aaa;position:absolute;top:-5px;left:11px;} */
|
||||
/* .ztree li span.button.bottom_docu:after {content:"";display:block;width:7px;height:0;border-top:1px dotted #aaa;position:absolute;top:12px;left:11px;} */
|
||||
.ztree li span.button:before {display:block;text-align:left;padding-left:2px;color:#666;line-height:16px;}
|
||||
.ztree li span.button.root_open:before,
|
||||
.ztree li span.button.roots_open:before,
|
||||
.ztree li span.button.center_open:before,
|
||||
.ztree li span.button.bottom_open:before,
|
||||
.ztree li span.button.noline_open:before {content:"\f147";}
|
||||
.ztree li span.button.noline_open:before,
|
||||
.ztree li span.button.root_close:before,
|
||||
.ztree li span.button.roots_close:before,
|
||||
.ztree li span.button.center_close:before,
|
||||
.ztree li span.button.bottom_close:before,
|
||||
.ztree li span.button.noline_close:before {content:"\f196";}
|
||||
.ztree li span.button.noline_close:before {content:"\f0da";position:absolute;top:1px;left:3px;transition:transform 0.3s;transform:scale(0.83333333) rotate(0deg);}
|
||||
.ztree li span.button.root_open:before,
|
||||
.ztree li span.button.roots_open:before,
|
||||
.ztree li span.button.center_open:before,
|
||||
.ztree li span.button.bottom_open:before,
|
||||
.ztree li span.button.noline_open:before {transform:scale(0.83333333) rotate(90deg);}
|
||||
.ztree li span.button.chk.checkbox_true_full:before,
|
||||
.ztree li span.button.chk.checkbox_true_disable:before,
|
||||
.ztree li span.button.chk.checkbox_true_full_focus:before {content:"\f046";}
|
||||
.ztree li span.button.chk.checkbox_true_full_focus:before {content:"\f046";line-height:19px;}
|
||||
.ztree li span.button.chk.checkbox_false_full:before,
|
||||
.ztree li span.button.chk.checkbox_false_disable:before,
|
||||
.ztree li span.button.chk.checkbox_false_full_focus:before {content:"\f096";}
|
||||
.ztree li span.button.chk.checkbox_false_full_focus:before {content:"\f096";line-height:19px;}
|
||||
.ztree li span.button.chk.checkbox_true_part:before,
|
||||
.ztree li span.button.chk.checkbox_true_part_focus:before {content:"\f14a";}
|
||||
.ztree li span.button.chk.checkbox_true_part_focus:before {content:"\f14a";line-height:19px;}
|
||||
.ztree li span.button.chk.checkbox_false_part:before,
|
||||
.ztree li span.button.chk.checkbox_false_part_focus:before {content:"\f096";}
|
||||
.ztree li span.button.chk.checkbox_false_part_focus:before {content:"\f096";line-height:19px;}
|
||||
.ztree li span.button.chk.radio_true_full:before,
|
||||
.ztree li span.button.chk.radio_true_disable:before,
|
||||
.ztree li span.button.chk.radio_true_full_focus:before {content:"\f05d";}
|
||||
|
||||
@@ -817,7 +817,7 @@ layer.getFrameIndex = function(name){
|
||||
};
|
||||
|
||||
//iframe层自适应宽高(diffVal差值范围内,进行自适应高度)
|
||||
layer.iframeAuto = function(index, diffVal){
|
||||
layer.iframeAuto = function(index, diffVal, $this){
|
||||
if(!index){
|
||||
return;
|
||||
}
|
||||
@@ -835,8 +835,8 @@ layer.iframeAuto = function(index, diffVal){
|
||||
if (layerTop > 0){
|
||||
var $iframe = layero.find('iframe');
|
||||
if (Math.abs($iframe.height() - heg) < (diffVal || 9000)){
|
||||
layero.css({height: layerHeight, top: layerTop});
|
||||
$iframe.css({height: heg});
|
||||
layero.animate({height: layerHeight, top: layerTop}, 20);
|
||||
$iframe.animate({height: heg}, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -82,6 +82,11 @@ public class LoginController extends BaseController{
|
||||
return ServletUtils.renderObject(response, model);
|
||||
}
|
||||
|
||||
// API 模式不返回视图页面
|
||||
if (Global.isApiMode()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 返回指定用户类型的登录页视图
|
||||
String userType = (String)model.asMap().get(ServletUtils.EXT_PARAMS_PREFIX + "userType");
|
||||
if (StringUtils.isBlank(userType)){
|
||||
@@ -118,6 +123,11 @@ public class LoginController extends BaseController{
|
||||
return ServletUtils.renderObject(response, model);
|
||||
}
|
||||
|
||||
// API 模式不返回视图页面
|
||||
if (Global.isApiMode()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 返回指定用户类型的登录页视图
|
||||
String userType = (String)model.asMap().get(ServletUtils.EXT_PARAMS_PREFIX + "userType");
|
||||
if (StringUtils.isBlank(userType)){
|
||||
@@ -266,6 +276,11 @@ public class LoginController extends BaseController{
|
||||
//session.setAttribute("roleCode", roleCode);
|
||||
//UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
|
||||
// API 模式不返回视图页面
|
||||
if (Global.isApiMode()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 返回指定用户类型的首页视图
|
||||
String userType = user.getUserType();
|
||||
if (User.USER_TYPE_NONE.equals(userType)){
|
||||
|
||||
@@ -118,8 +118,10 @@
|
||||
绿灰=Green Grey
|
||||
红灰=Red Grey
|
||||
黄灰=Yellow Grey
|
||||
亮蓝(新)=Bright Blue
|
||||
浅蓝(新)=Light Blue
|
||||
亮蓝-经典=Bright Blue
|
||||
浅蓝-经典=Light Blue
|
||||
亮蓝-无界=Bright Blue2
|
||||
浅蓝-无界=Light Blue2
|
||||
表单弹窗模式=Form popup mode
|
||||
取消页签模式=Cancel tab mode
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<% layout('/layouts/default.html', {title:'切换主题'}){ %>
|
||||
<link rel="stylesheet" href="${ctxStatic}/icheck/1.0/square/blue.css?${_version}">
|
||||
<style>
|
||||
.list-unstyled{margin:10px;}
|
||||
.list-unstyled{margin:10px;}
|
||||
.full-opacity-hover{opacity:1;filter:none;border:1px solid #fff}
|
||||
.full-opacity-hover:hover{border:1px solid #f00;}
|
||||
.full-opacity-hover:hover{border:1px solid #f00;}
|
||||
</style>
|
||||
<ul class="list-unstyled clearfix">
|
||||
<li style="float:left;width:16.66666%;padding:5px;">
|
||||
@@ -139,7 +138,7 @@
|
||||
<span style="display:block;width:20%;float:left;height:30px;background:#f9fafc"></span>
|
||||
<span style="display:block;width:80%;float:left;height:30px;background:#f4f5f7"></span>
|
||||
</a>
|
||||
<p class="text-center no-margin">${text('亮蓝(新)')}</p>
|
||||
<p class="text-center no-margin">${text('亮蓝-经典')}</p>
|
||||
</li>
|
||||
<li style="float:left;width:16.66666%;padding:5px;">
|
||||
<a href="javascript:" data-skin="skin-blue-light2" style="display:block;box-shadow:0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
|
||||
@@ -148,11 +147,29 @@
|
||||
<span style="display:block;width:20%;float:left;height:30px;background:#f9fafc"></span>
|
||||
<span style="display:block;width:80%;float:left;height:30px;background:#f4f5f7"></span>
|
||||
</a>
|
||||
<p class="text-center no-margin">${text('浅蓝(新)')}</p>
|
||||
<p class="text-center no-margin">${text('浅蓝-经典')}</p>
|
||||
</li>
|
||||
<li style="float:left;padding:18px 0 0 45px;">
|
||||
<#form:checkbox name="formLayerModel" label="${text('表单弹窗模式')}" class="form-control" data-style="square-blue" style="margin-right:20px"/>
|
||||
<#form:checkbox name="tabPageModel" label="${text('取消页签模式')}" class="form-control" data-style="square-blue"/>
|
||||
<li style="float:left;width:16.66666%;padding:5px;">
|
||||
<a href="javascript:" data-skin="skin-blue3" style="display:block;box-shadow:0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
|
||||
<span style="display:block;width:20%;float:left;height:13px;background:#1648ab"></span>
|
||||
<span style="display:block;width:80%;float:left;height:13px;background:#1951be"></span>
|
||||
<span style="display:block;width:20%;float:left;height:30px;background:#f9fafc"></span>
|
||||
<span style="display:block;width:80%;float:left;height:30px;background:#f4f5f7"></span>
|
||||
</a>
|
||||
<p class="text-center no-margin">${text('亮蓝-无界')}</p>
|
||||
</li>
|
||||
<li style="float:left;width:16.66666%;padding:5px;">
|
||||
<a href="javascript:" data-skin="skin-blue-light3" style="display:block;box-shadow:0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
|
||||
<span style="display:block;width:20%;float:left;height:13px;background:#1681e5"></span>
|
||||
<span style="display:block;width:80%;float:left;height:13px;background:#1890ff"></span>
|
||||
<span style="display:block;width:20%;float:left;height:30px;background:#f9fafc"></span>
|
||||
<span style="display:block;width:80%;float:left;height:30px;background:#f4f5f7"></span>
|
||||
</a>
|
||||
<p class="text-center no-margin">${text('浅蓝-无界')}</p>
|
||||
</li>
|
||||
<li style="float:left;width:32%;padding-top:8px;text-align:center;">
|
||||
<#form:checkbox name="formLayerModel" label="${text('表单弹窗模式')}" class="form-control"/>
|
||||
<#form:checkbox name="tabPageModel" label="${text('取消页签模式')}" class="form-control"/>
|
||||
</li>
|
||||
</ul>
|
||||
<% } %>
|
||||
|
||||
@@ -712,7 +712,7 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="main-footer m0">
|
||||
<footer class="main-footer m0" style="padding-right:50px">
|
||||
<div class="pull-right hidden-xs">当前版本: ${@Global.getConfig('productVersion')}</div>
|
||||
© ${@DateUtils.getYear()} ${@Global.getConfig('productName')} - Powered By
|
||||
<a href="http://jeesite.com" target="_blank">JeeSite</a>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<module>../modules/core</module>
|
||||
<module>../modules/cms</module>
|
||||
<module>../web</module>
|
||||
<module>../web-api</module>
|
||||
</modules>
|
||||
|
||||
<developers>
|
||||
|
||||
19
web-api/bin/docker-build.bat
Normal file
19
web-api/bin/docker-build.bat
Normal file
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD>뵽Docker<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package docker:stop docker:remove docker:build docker:run -Dmaven.test.skip=true -U
|
||||
|
||||
cd bin
|
||||
pause
|
||||
16
web-api/bin/docker-build.sh
Normal file
16
web-api/bin/docker-build.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# *
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 使用 Spring Boot Docker 编译 Web 工程。"
|
||||
echo ""
|
||||
|
||||
cd ..
|
||||
mvn clean package docker:stop docker:remove docker:build docker:run -Dmaven.test.skip=true -U
|
||||
|
||||
cd bin
|
||||
25
web-api/bin/docker/Dockerfile
Normal file
25
web-api/bin/docker/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM frolvlad/alpine-java:jdk8-slim
|
||||
MAINTAINER ThinkGem@163.com
|
||||
ENV TZ "Asia/Shanghai"
|
||||
ENV LANG C.UTF-8
|
||||
VOLUME /tmp
|
||||
VOLUME /data
|
||||
|
||||
WORKDIR /app
|
||||
ADD ./maven/web.war ./app.war
|
||||
|
||||
RUN jar -xvf app.war
|
||||
#RUN chmod -R 755 ./*
|
||||
|
||||
WORKDIR /app/WEB-INF
|
||||
ADD ./app.yml ./classes/config/application-prod.yml
|
||||
#ADD jeesite.lic ./
|
||||
|
||||
#ENV JAVA_OPTS "-Xms256m -Xmx1024m"
|
||||
ENV JAVA_OPTS "$JAVA_OPTS -Dspring.profiles.active=prod"
|
||||
|
||||
ENTRYPOINT java $JAVA_OPTS -cp /app $JAVA_OPTS org.springframework.boot.loader.WarLauncher
|
||||
|
||||
EXPOSE 8980
|
||||
|
||||
#docker run -p 8980:8980 com.jeesite/jeesite-web:5.0
|
||||
26
web-api/bin/docker/app.yml
Normal file
26
web-api/bin/docker/app.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
# 数据库连接
|
||||
jdbc:
|
||||
|
||||
# Mysql 数据库配置
|
||||
type: mysql
|
||||
driver: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.56.1:3306/jeesite?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
username: jeesite
|
||||
password: jeesite
|
||||
testSql: SELECT 1
|
||||
|
||||
# MyBatis 相关
|
||||
mybatis:
|
||||
|
||||
# Mapper文件刷新线程
|
||||
mapper:
|
||||
refresh:
|
||||
enabled: false
|
||||
|
||||
# 文件相关
|
||||
file:
|
||||
|
||||
# 文件上传根路径,设置路径中不允许包含“userfiles”,在指定目录中系统会自动创建userfiles目录,如果不设置默认为contextPath路径
|
||||
baseDir: /root
|
||||
|
||||
34
web-api/bin/init-data.bat
Normal file
34
web-api/bin/init-data.bat
Normal file
@@ -0,0 +1,34 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⡣
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>״ΰ<D7B4>װ JeeSite <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ Module <20><><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>Ѱ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ԡ<EFBFBD>
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><> v4.2 <20>汾<EFBFBD>Ժٷ<F3A3ACB9><D9B7><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>DZȽϰ<C8BD>ȫ<EFBFBD>ģ<EFBFBD><C4A3>ٷ<EFBFBD><D9B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵĽű<C4BD><C5B1><EFBFBD>
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> v4.2 <20>İ汾<C4B0><E6B1BE><EFBFBD><EFBFBD><DEB7>ų<EFBFBD><C5B3><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ȫ<EFBFBD>ڼ䣬<DABC><E4A3AC><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD><EFBFBD>ȱ<EFBFBD><C8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
|
||||
call mvn clean compile -Dmaven.test.skip=true -U
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>濪ʼ<E6BFAA><CABC>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⡣
|
||||
echo.
|
||||
pause
|
||||
|
||||
set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m"
|
||||
call mvn test -Dmaven.test.skip=false -Dtest=com.jeesite.test.InitData
|
||||
|
||||
cd bin
|
||||
pause
|
||||
31
web-api/bin/init-data.sh
Normal file
31
web-api/bin/init-data.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# *
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 初始化数据库。"
|
||||
echo ""
|
||||
echo "[信息] 本操作主要用于首次安装 JeeSite 或后安装 Module 的数据表初始化,若模块已安装会自动忽略。"
|
||||
echo ""
|
||||
echo "[信息] 在 v4.2 版本以后,官方初始化数据库是比较安全的,官方代码中不会包含任何删除数据表及数据的脚本。"
|
||||
echo ""
|
||||
echo "[信息] 如果你是升级到 v4.2 的版本,无法排除你是否升级完整,为安全期间,还是建议先备份数据库后再操作。"
|
||||
echo ""
|
||||
read -s -n1 -p "请按任意键继续 ... "
|
||||
|
||||
cd ..
|
||||
|
||||
mvn clean compile -Dmaven.test.skip=true -U
|
||||
echo ""
|
||||
echo "[信息] 依赖下载完成,下面开始初始化数据库。"
|
||||
echo ""
|
||||
read -s -n1 -p "请按任意键继续 ... "
|
||||
|
||||
MAVEN_OPTS="$MAVEN_OPTS -Xms512m -Xmx1024m"
|
||||
mvn test -Dmaven.test.skip=false -Dtest=com.jeesite.test.InitData
|
||||
|
||||
cd bin
|
||||
19
web-api/bin/package.bat
Normal file
19
web-api/bin/package.bat
Normal file
@@ -0,0 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war/jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
|
||||
|
||||
cd bin
|
||||
pause
|
||||
16
web-api/bin/package.sh
Normal file
16
web-api/bin/package.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# *
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 打包Web工程,生成war/jar包文件。"
|
||||
echo ""
|
||||
|
||||
cd ..
|
||||
mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
|
||||
|
||||
cd bin
|
||||
20
web-api/bin/run-tomcat.bat
Normal file
20
web-api/bin/run-tomcat.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9> Spring Boot Tomcat <20><><EFBFBD><EFBFBD> Web <20><><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
title %cd%
|
||||
set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m"
|
||||
call mvn clean spring-boot:run -Dmaven.test.skip=true
|
||||
|
||||
pause
|
||||
15
web-api/bin/run-tomcat.sh
Normal file
15
web-api/bin/run-tomcat.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# *
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 使用 Spring Boot Tomcat 运行 Web 工程。"
|
||||
echo ""
|
||||
|
||||
cd ..
|
||||
MAVEN_OPTS="$MAVEN_OPTS -Xms512m -Xmx1024m"
|
||||
mvn clean spring-boot:run -Dmaven.test.skip=true
|
||||
30
web-api/bin/run-web.bat
Normal file
30
web-api/bin/run-web.bat
Normal file
@@ -0,0 +1,30 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
rem <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD>ʼ<EFBFBD><CABC>
|
||||
cd ..
|
||||
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
|
||||
cd target
|
||||
rem <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> web.jar Ϊ<><CEAA><EFBFBD><EFBFBD> jar <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mkdir web
|
||||
copy web.war web
|
||||
cd web
|
||||
jar -xvf web.war
|
||||
cd WEB-INF
|
||||
call startup.bat
|
||||
|
||||
pause
|
||||
26
web-api/bin/run-web.sh
Normal file
26
web-api/bin/run-web.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# *
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 打包Web工程,并运行Web工程。"
|
||||
echo ""
|
||||
|
||||
# 打包Web工程(开始)
|
||||
cd ..
|
||||
mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
|
||||
cd target
|
||||
# 打包Web工程(结束)
|
||||
|
||||
|
||||
# 根据情况修改 web.jar 为您的 jar 包名称
|
||||
mkdir web
|
||||
cp web.war ./web
|
||||
cd web
|
||||
jar -xvf web.war
|
||||
cd WEB-INF
|
||||
exec ./startup.sh
|
||||
75
web-api/db/h2/test.sql
Normal file
75
web-api/db/h2/test.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date datetime,
|
||||
test_datetime datetime,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_sort int,
|
||||
test_data_id varchar(64),
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date datetime,
|
||||
test_datetime datetime,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
tree_name varchar(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
);
|
||||
|
||||
|
||||
|
||||
75
web-api/db/mssql/test.sql
Normal file
75
web-api/db/mssql/test.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE [test_data]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[test_input] varchar(200),
|
||||
[test_textarea] nvarchar(200),
|
||||
[test_select] varchar(10),
|
||||
[test_select_multiple] varchar(200),
|
||||
[test_radio] varchar(10),
|
||||
[test_checkbox] varchar(200),
|
||||
[test_date] datetime,
|
||||
[test_datetime] datetime,
|
||||
[test_user_code] varchar(64),
|
||||
[test_office_code] varchar(64),
|
||||
[test_area_code] varchar(64),
|
||||
[test_area_name] nvarchar(100),
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE [test_data_child]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[test_sort] int,
|
||||
[test_data_id] varchar(64),
|
||||
[test_input] varchar(200),
|
||||
[test_textarea] nvarchar(200),
|
||||
[test_select] varchar(10),
|
||||
[test_select_multiple] varchar(200),
|
||||
[test_radio] varchar(10),
|
||||
[test_checkbox] varchar(200),
|
||||
[test_date] datetime,
|
||||
[test_datetime] datetime,
|
||||
[test_user_code] varchar(64),
|
||||
[test_office_code] varchar(64),
|
||||
[test_area_code] varchar(64),
|
||||
[test_area_name] nvarchar(100),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE [test_tree]
|
||||
(
|
||||
[tree_code] varchar(64) NOT NULL,
|
||||
[parent_code] varchar(64) NOT NULL,
|
||||
[parent_codes] varchar(1000) NOT NULL,
|
||||
[tree_sort] decimal(10) NOT NULL,
|
||||
[tree_sorts] varchar(1000) NOT NULL,
|
||||
[tree_leaf] char(1) NOT NULL,
|
||||
[tree_level] decimal(4) NOT NULL,
|
||||
[tree_names] varchar(1000) NOT NULL,
|
||||
[tree_name] nvarchar(200) NOT NULL,
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
PRIMARY KEY ([tree_code])
|
||||
);
|
||||
|
||||
|
||||
|
||||
13
web-api/db/mysql/create_user.sql
Normal file
13
web-api/db/mysql/create_user.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
-- 打开 my.ini 给 [mysqld] 增加如下配置:
|
||||
-- sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||
|
||||
set global read_only=0;
|
||||
|
||||
create user 'jeesite'@'%' identified by 'jeesite';
|
||||
|
||||
create database jeesite DEFAULT CHARSET 'utf8' COLLATE 'utf8_general_ci';
|
||||
|
||||
grant all privileges on jeesite.* to 'jeesite'@'%' identified by 'jeesite';
|
||||
|
||||
flush privileges;
|
||||
76
web-api/db/mysql/test.sql
Normal file
76
web-api/db/mysql/test.sql
Normal file
@@ -0,0 +1,76 @@
|
||||
SET SESSION FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
test_input varchar(200) COMMENT '单行文本',
|
||||
test_textarea varchar(200) COMMENT '多行文本',
|
||||
test_select varchar(10) COMMENT '下拉框',
|
||||
test_select_multiple varchar(200) COMMENT '下拉多选',
|
||||
test_radio varchar(10) COMMENT '单选框',
|
||||
test_checkbox varchar(200) COMMENT '复选框',
|
||||
test_date datetime COMMENT '日期选择',
|
||||
test_datetime datetime COMMENT '日期时间',
|
||||
test_user_code varchar(64) COMMENT '用户选择',
|
||||
test_office_code varchar(64) COMMENT '机构选择',
|
||||
test_area_code varchar(64) COMMENT '区域选择',
|
||||
test_area_name varchar(100) COMMENT '区域名称',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '测试数据';
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
test_sort int COMMENT '排序号',
|
||||
test_data_id varchar(64) COMMENT '父表主键',
|
||||
test_input varchar(200) COMMENT '单行文本',
|
||||
test_textarea varchar(200) COMMENT '多行文本',
|
||||
test_select varchar(10) COMMENT '下拉框',
|
||||
test_select_multiple varchar(200) COMMENT '下拉多选',
|
||||
test_radio varchar(10) COMMENT '单选框',
|
||||
test_checkbox varchar(200) COMMENT '复选框',
|
||||
test_date datetime COMMENT '日期选择',
|
||||
test_datetime datetime COMMENT '日期时间',
|
||||
test_user_code varchar(64) COMMENT '用户选择',
|
||||
test_office_code varchar(64) COMMENT '机构选择',
|
||||
test_area_code varchar(64) COMMENT '区域选择',
|
||||
test_area_name varchar(100) COMMENT '区域名称',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '测试数据子表';
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL COMMENT '节点编码',
|
||||
parent_code varchar(64) NOT NULL COMMENT '父级编号',
|
||||
parent_codes varchar(1000) NOT NULL COMMENT '所有父级编号',
|
||||
tree_sort decimal(10) NOT NULL COMMENT '排序号(升序)',
|
||||
tree_sorts varchar(1000) NOT NULL COMMENT '所有排序号',
|
||||
tree_leaf char(1) NOT NULL COMMENT '是否最末级',
|
||||
tree_level decimal(4) NOT NULL COMMENT '层次级别',
|
||||
tree_names varchar(1000) NOT NULL COMMENT '全节点名',
|
||||
tree_name varchar(200) NOT NULL COMMENT '节点名称',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
PRIMARY KEY (tree_code)
|
||||
) COMMENT = '测试树表';
|
||||
|
||||
|
||||
|
||||
15
web-api/db/oracle/create_user.sql
Normal file
15
web-api/db/oracle/create_user.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
create user jeesite
|
||||
identified by jeesite
|
||||
quota unlimited on users;
|
||||
|
||||
grant connect,resource,create session,select any table,
|
||||
create any view,create any table,create any index,
|
||||
drop any table,drop any view,drop any index
|
||||
to jeesite;
|
||||
|
||||
-- 提示 oracle.jdbc.xa.OracleXAResource.recover 错误需要授权:
|
||||
grant select on sys.dba_pending_transactions to jeesite;
|
||||
grant select on sys.pending_trans$ to jeesite;
|
||||
grant select on sys.dba_2pc_pending to jeesite;
|
||||
grant execute on sys.dbms_system to jeesite;
|
||||
132
web-api/db/oracle/test.sql
Normal file
132
web-api/db/oracle/test.sql
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_input varchar2(200),
|
||||
test_textarea nvarchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_area_code varchar2(64),
|
||||
test_area_name nvarchar2(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_sort number(10,0),
|
||||
test_data_id varchar2(64),
|
||||
test_input varchar2(200),
|
||||
test_textarea nvarchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_area_code varchar2(64),
|
||||
test_area_name nvarchar2(100),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar2(64) NOT NULL,
|
||||
parent_code varchar2(64) NOT NULL,
|
||||
parent_codes varchar2(1000) NOT NULL,
|
||||
tree_sort number(10) NOT NULL,
|
||||
tree_sorts varchar2(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level number(4) NOT NULL,
|
||||
tree_names varchar2(1000) NOT NULL,
|
||||
tree_name nvarchar2(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE test_data IS '测试数据';
|
||||
COMMENT ON COLUMN test_data.id IS '编号';
|
||||
COMMENT ON COLUMN test_data.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
|
||||
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_data.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_data.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_data.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_data.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_data.remarks IS '备注信息';
|
||||
COMMENT ON TABLE test_data_child IS '测试数据子表';
|
||||
COMMENT ON COLUMN test_data_child.id IS '编号';
|
||||
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
|
||||
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
|
||||
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
|
||||
COMMENT ON TABLE test_tree IS '测试树表';
|
||||
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
|
||||
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
|
||||
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
|
||||
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
|
||||
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
|
||||
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
|
||||
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
|
||||
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
|
||||
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
|
||||
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_tree.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_tree.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_tree.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
132
web-api/db/postgresql/test.sql
Normal file
132
web-api/db/postgresql/test.sql
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_sort int,
|
||||
test_data_id varchar(64),
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
tree_name varchar(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE test_data IS '测试数据';
|
||||
COMMENT ON COLUMN test_data.id IS '编号';
|
||||
COMMENT ON COLUMN test_data.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
|
||||
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_data.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_data.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_data.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_data.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_data.remarks IS '备注信息';
|
||||
COMMENT ON TABLE test_data_child IS '测试数据子表';
|
||||
COMMENT ON COLUMN test_data_child.id IS '编号';
|
||||
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
|
||||
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
|
||||
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
|
||||
COMMENT ON TABLE test_tree IS '测试树表';
|
||||
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
|
||||
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
|
||||
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
|
||||
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
|
||||
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
|
||||
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
|
||||
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
|
||||
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
|
||||
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
|
||||
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_tree.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_tree.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_tree.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
3541
web-api/db/test.erm
Normal file
3541
web-api/db/test.erm
Normal file
File diff suppressed because it is too large
Load Diff
171
web-api/pom.xml
Normal file
171
web-api/pom.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.0.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>jeesite-web-api</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<description>专为分离端提供接口服务,关闭内置登录页和主框架页视图</description>
|
||||
|
||||
<name>JeeSite Web Api</name>
|
||||
<url>http://jeesite.com</url>
|
||||
<inceptionYear>2013-Now</inceptionYear>
|
||||
|
||||
<properties>
|
||||
|
||||
<finalName>web</finalName><!-- war or jar 包的名称 -->
|
||||
<start-class>com.jeesite.modules.Application</start-class>
|
||||
|
||||
<!-- environment setting -->
|
||||
<eclipse-plugin-download-sources>false</eclipse-plugin-download-sources>
|
||||
<eclipse-plugin-download-javadocs>false</eclipse-plugin-download-javadocs>
|
||||
|
||||
<!-- docker setting -->
|
||||
<docker.run.port>8980:8980</docker.run.port>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-core</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 在线文档接口 -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-swagger</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 内容管理模块
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-cms</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- 文件管理共享(标准版)
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-filemanager</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- 文件在线预览(标准版)
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-module-filepreview</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Spring Boot Tomcat
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${finalName}</finalName>
|
||||
<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
|
||||
<plugins>
|
||||
|
||||
<!-- Spring Boot -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
</plugin> -->
|
||||
|
||||
<!-- 打包插件, war包名称不带版本号 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<configuration>
|
||||
<!-- <packagingExcludes></packagingExcludes>
|
||||
<warSourceExcludes></warSourceExcludes> -->
|
||||
<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory>
|
||||
<warName>${finalName}</warName>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Eclipse 插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<configuration>
|
||||
<downloadSources>${eclipse-plugin-download-sources}</downloadSources>
|
||||
<downloadJavadocs>${eclipse-plugin-download-javadocs}</downloadJavadocs>
|
||||
<wtpContextName>${finalName}</wtpContextName>
|
||||
<wtpversion>2.0</wtpversion>
|
||||
<jeeversion>6.0</jeeversion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>thinkgem</id>
|
||||
<name>WangZhen</name>
|
||||
<email>thinkgem at 163.com</email>
|
||||
<roles><role>Project lead</role></roles>
|
||||
<timezone>+8</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>JeeSite</name>
|
||||
<url>http://jeesite.com</url>
|
||||
</organization>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun-repos</id>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jeesite-repos</id>
|
||||
<url>http://maven.jeesite.net/repository/maven-public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>aliyun-repos</id>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>jeesite-repos</id>
|
||||
<url>http://maven.jeesite.net/repository/maven-public</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
30
web-api/src/main/java/com/jeesite/modules/Application.java
Normal file
30
web-api/src/main/java/com/jeesite/modules/Application.java
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
/**
|
||||
* Application
|
||||
* @author ThinkGem
|
||||
* @version 2018-10-13
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class Application extends SpringBootServletInitializer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理,而不是SpringBoot
|
||||
return builder.sources(Application.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
|
||||
/**
|
||||
* 测试数据DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@MyBatisDao//(dataSourceName="ds2")
|
||||
public interface TestDataChildDao extends CrudDao<TestDataChild> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
|
||||
/**
|
||||
* 测试数据DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface TestDataDao extends CrudDao<TestData> {
|
||||
|
||||
/**
|
||||
* 演示Map参数和返回值,支持分页
|
||||
*/
|
||||
public List<Map<String, Object>> findListForMap(Map<String, Object> params);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.dao;
|
||||
|
||||
import com.jeesite.common.dao.TreeDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.test.entity.TestTree;
|
||||
|
||||
/**
|
||||
* 测试树表DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface TestTreeDao extends TreeDao<TestTree> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.db;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.tests.BaseInitDataTests;
|
||||
import com.jeesite.modules.gen.entity.GenTable;
|
||||
import com.jeesite.modules.gen.entity.GenTableColumn;
|
||||
import com.jeesite.modules.gen.service.GenTableService;
|
||||
import com.jeesite.modules.gen.utils.GenUtils;
|
||||
|
||||
/**
|
||||
* 初始化核心表数据
|
||||
* @author ThinkGem
|
||||
* @version 2020-5-26
|
||||
*/
|
||||
@Component
|
||||
@ConditionalOnProperty(name="jeesite.initdata", havingValue="true", matchIfMissing=false)
|
||||
public class InitTestData extends BaseInitDataTests {
|
||||
|
||||
@Override
|
||||
public boolean initData() throws Exception {
|
||||
if (GenUtils.isTableExists("test_data")) {
|
||||
return true; // 如果表已存在,则无需初始化
|
||||
}
|
||||
runCreateScript("test.sql");
|
||||
initGenDemoData();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private GenTableService genTableService;
|
||||
/**
|
||||
* 代码生成测试数据
|
||||
*/
|
||||
public void initGenDemoData() throws Exception{
|
||||
if (!checkTable(GenTable.class)) {
|
||||
return;
|
||||
}
|
||||
if (!checkTable(GenTableColumn.class)) {
|
||||
return;
|
||||
}
|
||||
initGenTestData();
|
||||
initGenTreeData();
|
||||
}
|
||||
/**
|
||||
* 代码生成测试数据
|
||||
*/
|
||||
private void initGenTestData() throws Exception{
|
||||
GenTable genTable = new GenTable();
|
||||
genTable.setIsNewRecord(true);
|
||||
genTable.setTableName("test_data");
|
||||
genTable = genTableService.getFromDb(genTable);
|
||||
genTable.setIsNewRecord(true);
|
||||
genTable.setClassName("TestData");
|
||||
genTable.setFunctionAuthor("ThinkGem");
|
||||
genTable.setTplCategory("crud");
|
||||
genTable.setPackageName("com.jeesite.modules");
|
||||
genTable.setModuleName("test");
|
||||
genTable.setSubModuleName("");
|
||||
genTable.setFunctionName("测试数据");
|
||||
genTable.setFunctionNameSimple("数据");
|
||||
genTable.getOptionMap().put("isHaveDisableEnable", Global.YES);
|
||||
genTable.getOptionMap().put("isHaveDelete", Global.YES);
|
||||
genTable.getOptionMap().put("isFileUpload", Global.YES);
|
||||
genTable.getOptionMap().put("isImageUpload", Global.YES);
|
||||
initGenTableColumn(genTable);
|
||||
genTableService.save(genTable);
|
||||
// 子表
|
||||
GenTable genTableChild = new GenTable();
|
||||
genTableChild.setIsNewRecord(true);
|
||||
genTableChild.setTableName("test_data_child");
|
||||
genTableChild = genTableService.getFromDb(genTableChild);
|
||||
genTableChild.setIsNewRecord(true);
|
||||
genTableChild.setClassName("TestDataChild");
|
||||
genTableChild.setFunctionAuthor("ThinkGem");
|
||||
genTableChild.setTplCategory("crud");
|
||||
genTableChild.setPackageName("com.jeesite.modules");
|
||||
genTableChild.setModuleName("test");
|
||||
genTableChild.setSubModuleName("");
|
||||
genTableChild.setFunctionName("测试子表");
|
||||
genTableChild.setFunctionNameSimple("数据");
|
||||
genTableChild.setParentTableName("test_data");
|
||||
genTableChild.setParentTableFkName("test_data_id");
|
||||
initGenTableColumn(genTableChild);
|
||||
genTableService.save(genTableChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 代码生成测试数据(列初始化)
|
||||
*/
|
||||
private void initGenTableColumn(GenTable genTable){
|
||||
for(GenTableColumn column : genTable.getColumnList()){
|
||||
if ("test_input".equals(column.getColumnName())
|
||||
|| "test_textarea".equals(column.getColumnName())
|
||||
|| "test_select".equals(column.getColumnName())
|
||||
|| "test_select_multiple".equals(column.getColumnName())
|
||||
|| "test_checkbox".equals(column.getColumnName())
|
||||
|| "test_radio".equals(column.getColumnName())
|
||||
|| "test_date".equals(column.getColumnName())
|
||||
|| "test_datetime".equals(column.getColumnName())
|
||||
){
|
||||
column.setShowType(StringUtils.substringAfter(
|
||||
column.getColumnName(), "test_"));
|
||||
if ("test_input".equals(column.getColumnName())
|
||||
){
|
||||
column.setQueryType("LIKE");
|
||||
}
|
||||
else if ("test_textarea".equals(column.getColumnName())
|
||||
){
|
||||
column.setQueryType("LIKE");
|
||||
column.getOptionMap().put("isNewLine", Global.YES);
|
||||
// column.getOptionMap().put("gridRowCol", "12/2/10");
|
||||
}
|
||||
else if ("test_select".equals(column.getColumnName())
|
||||
|| "test_select_multiple".equals(column.getColumnName())
|
||||
|| "test_radio".equals(column.getColumnName())
|
||||
|| "test_checkbox".equals(column.getColumnName())
|
||||
){
|
||||
column.getOptionMap().put("dictType", "sys_menu_type");
|
||||
column.getOptionMap().put("dictName", "sys_menu_type");
|
||||
}
|
||||
else if ("test_date".equals(column.getColumnName())
|
||||
|| "test_datetime".equals(column.getColumnName())
|
||||
){
|
||||
column.setQueryType("BETWEEN");
|
||||
}
|
||||
}else if ("test_user_code".equals(column.getColumnName())){
|
||||
column.setAttrType("com.jeesite.modules.sys.entity.User");
|
||||
column.setFullAttrName("testUser");
|
||||
column.setShowType("userselect");
|
||||
}else if ("test_office_code".equals(column.getColumnName())){
|
||||
column.setAttrType("com.jeesite.modules.sys.entity.Office");
|
||||
column.setFullAttrName("testOffice");
|
||||
column.setShowType("officeselect");
|
||||
}else if ("test_area_code".equals(column.getColumnName())){
|
||||
column.setFullAttrName("testAreaCode|testAreaName");
|
||||
column.setShowType("areaselect");
|
||||
}else if ("test_area_name".equals(column.getColumnName())){
|
||||
column.setIsEdit(Global.NO);
|
||||
column.setIsQuery(Global.NO);
|
||||
}else if ("test_data_id".equals(column.getColumnName())){
|
||||
column.setFullAttrName("testData");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 代码生成树表测试数据
|
||||
*/
|
||||
private void initGenTreeData() throws Exception{
|
||||
GenTable genTable = new GenTable();
|
||||
genTable.setIsNewRecord(true);
|
||||
genTable.setTableName("test_tree");
|
||||
genTable = genTableService.getFromDb(genTable);
|
||||
genTable.setIsNewRecord(true);
|
||||
genTable.setClassName("TestTree");
|
||||
genTable.setFunctionAuthor("ThinkGem");
|
||||
genTable.setTplCategory("treeGrid");
|
||||
genTable.setPackageName("com.jeesite.modules");
|
||||
genTable.setModuleName("test");
|
||||
genTable.setSubModuleName("");
|
||||
genTable.setFunctionName("测试树表");
|
||||
genTable.setFunctionNameSimple("数据");
|
||||
genTable.getOptionMap().put("isHaveDisableEnable", Global.YES);
|
||||
genTable.getOptionMap().put("isHaveDelete", Global.YES);
|
||||
genTable.getOptionMap().put("isFileUpload", Global.YES);
|
||||
genTable.getOptionMap().put("isImageUpload", Global.YES);
|
||||
genTable.getOptionMap().put("treeViewCode", "tree_code");
|
||||
genTable.getOptionMap().put("treeViewName", "tree_name");
|
||||
initGenTableColumn(genTable);
|
||||
genTableService.save(genTable);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.entity;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import java.util.List;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 测试数据Entity
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Table(name="test_data", alias="a", columns={
|
||||
@Column(name="id", attrName="id", label="编号", isPK=true),
|
||||
@Column(name="test_input", attrName="testInput", label="单行文本", queryType=QueryType.LIKE),
|
||||
@Column(name="test_textarea", attrName="testTextarea", label="多行文本", queryType=QueryType.LIKE),
|
||||
@Column(name="test_select", attrName="testSelect", label="下拉框"),
|
||||
@Column(name="test_select_multiple", attrName="testSelectMultiple", label="下拉多选"),
|
||||
@Column(name="test_radio", attrName="testRadio", label="单选框"),
|
||||
@Column(name="test_checkbox", attrName="testCheckbox", label="复选框"),
|
||||
@Column(name="test_date", attrName="testDate", label="日期选择", isUpdateForce=true/*是否强制更新(当调用update并且该属性为空的时候,允许更新为空)*/),
|
||||
@Column(name="test_datetime", attrName="testDatetime", label="日期时间", isUpdateForce=true),
|
||||
@Column(name="test_user_code", attrName="testUser.userCode", label="用户选择"),
|
||||
@Column(name="test_office_code", attrName="testOffice.officeCode", label="机构选择"),
|
||||
@Column(name="test_area_code", attrName="testAreaCode", label="区域选择"),
|
||||
@Column(name="test_area_name", attrName="testAreaName", label="区域名称"),
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
}, joinTable={
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=User.class, attrName="testUser", alias="u10",
|
||||
on="u10.user_code = a.test_user_code", columns={
|
||||
@Column(name="user_code", label="用户编码", isPK=true),
|
||||
@Column(name="user_name", label="用户名称", isQuery=false),
|
||||
}),
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=Office.class, attrName="testOffice", alias="u11",
|
||||
on="u11.office_code = a.test_office_code", columns={
|
||||
@Column(name="office_code", label="机构编码", isPK=true),
|
||||
@Column(name="office_name", label="机构名称", isQuery=false),
|
||||
}),
|
||||
}, orderBy="a.update_date DESC"
|
||||
)
|
||||
public class TestData extends DataEntity<TestData> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String testInput; // 单行文本
|
||||
private String testTextarea; // 多行文本
|
||||
private String testSelect; // 下拉框
|
||||
private String testSelectMultiple; // 下拉多选
|
||||
private String testRadio; // 单选框
|
||||
private String testCheckbox; // 复选框
|
||||
private Date testDate; // 日期选择
|
||||
private Date testDatetime; // 日期时间
|
||||
private User testUser; // 用户选择
|
||||
private Office testOffice; // 机构选择
|
||||
private String testAreaCode; // 区域选择
|
||||
private String testAreaName; // 区域名称
|
||||
private List<TestDataChild> testDataChildList = ListUtils.newArrayList(); // 子表列表
|
||||
|
||||
public TestData() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public TestData(String id){
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="单行文本长度不能超过 200 个字符")
|
||||
public String getTestInput() {
|
||||
return testInput;
|
||||
}
|
||||
|
||||
public void setTestInput(String testInput) {
|
||||
this.testInput = testInput;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="多行文本长度不能超过 200 个字符")
|
||||
public String getTestTextarea() {
|
||||
return testTextarea;
|
||||
}
|
||||
|
||||
public void setTestTextarea(String testTextarea) {
|
||||
this.testTextarea = testTextarea;
|
||||
}
|
||||
|
||||
@Size(min=0, max=10, message="下拉框长度不能超过 10 个字符")
|
||||
public String getTestSelect() {
|
||||
return testSelect;
|
||||
}
|
||||
|
||||
public void setTestSelect(String testSelect) {
|
||||
this.testSelect = testSelect;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="下拉多选长度不能超过 200 个字符")
|
||||
public String getTestSelectMultiple() {
|
||||
return testSelectMultiple;
|
||||
}
|
||||
|
||||
public void setTestSelectMultiple(String testSelectMultiple) {
|
||||
this.testSelectMultiple = testSelectMultiple;
|
||||
}
|
||||
|
||||
@Size(min=0, max=10, message="单选框长度不能超过 10 个字符")
|
||||
public String getTestRadio() {
|
||||
return testRadio;
|
||||
}
|
||||
|
||||
public void setTestRadio(String testRadio) {
|
||||
this.testRadio = testRadio;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="复选框长度不能超过 200 个字符")
|
||||
public String getTestCheckbox() {
|
||||
return testCheckbox;
|
||||
}
|
||||
|
||||
public void setTestCheckbox(String testCheckbox) {
|
||||
this.testCheckbox = testCheckbox;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
public Date getTestDate() {
|
||||
return testDate;
|
||||
}
|
||||
|
||||
public void setTestDate(Date testDate) {
|
||||
this.testDate = testDate;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
public Date getTestDatetime() {
|
||||
return testDatetime;
|
||||
}
|
||||
|
||||
public void setTestDatetime(Date testDatetime) {
|
||||
this.testDatetime = testDatetime;
|
||||
}
|
||||
|
||||
public User getTestUser() {
|
||||
return testUser;
|
||||
}
|
||||
|
||||
public void setTestUser(User testUser) {
|
||||
this.testUser = testUser;
|
||||
}
|
||||
|
||||
public Office getTestOffice() {
|
||||
return testOffice;
|
||||
}
|
||||
|
||||
public void setTestOffice(Office testOffice) {
|
||||
this.testOffice = testOffice;
|
||||
}
|
||||
|
||||
@Size(min=0, max=64, message="区域选择长度不能超过 64 个字符")
|
||||
public String getTestAreaCode() {
|
||||
return testAreaCode;
|
||||
}
|
||||
|
||||
public void setTestAreaCode(String testAreaCode) {
|
||||
this.testAreaCode = testAreaCode;
|
||||
}
|
||||
|
||||
@Size(min=0, max=100, message="区域名称长度不能超过 100 个字符")
|
||||
public String getTestAreaName() {
|
||||
return testAreaName;
|
||||
}
|
||||
|
||||
public void setTestAreaName(String testAreaName) {
|
||||
this.testAreaName = testAreaName;
|
||||
}
|
||||
|
||||
public Date getTestDate_gte() {
|
||||
return sqlMap.getWhere().getValue("test_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setTestDate_gte(Date testDate) {
|
||||
sqlMap.getWhere().and("test_date", QueryType.GTE, testDate);
|
||||
}
|
||||
|
||||
public Date getTestDate_lte() {
|
||||
return sqlMap.getWhere().getValue("test_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setTestDate_lte(Date testDate) {
|
||||
sqlMap.getWhere().and("test_date", QueryType.LTE, testDate);
|
||||
}
|
||||
|
||||
public Date getTestDatetime_gte() {
|
||||
return sqlMap.getWhere().getValue("test_datetime", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setTestDatetime_gte(Date testDatetime) {
|
||||
sqlMap.getWhere().and("test_datetime", QueryType.GTE, testDatetime);
|
||||
}
|
||||
|
||||
public Date getTestDatetime_lte() {
|
||||
return sqlMap.getWhere().getValue("test_datetime", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setTestDatetime_lte(Date testDatetime) {
|
||||
sqlMap.getWhere().and("test_datetime", QueryType.LTE, testDatetime);
|
||||
}
|
||||
|
||||
public List<TestDataChild> getTestDataChildList() {
|
||||
return testDataChildList;
|
||||
}
|
||||
|
||||
public void setTestDataChildList(List<TestDataChild> testDataChildList) {
|
||||
this.testDataChildList = testDataChildList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.entity;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 测试数据Entity
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Table(name="test_data_child", alias="a", columns={
|
||||
@Column(name="id", attrName="id", label="编号", isPK=true),
|
||||
@Column(name="test_sort", attrName="testSort", label="排序号"),
|
||||
@Column(name="test_data_id", attrName="testData.id", label="父表主键"),
|
||||
@Column(name="test_input", attrName="testInput", label="单行文本", queryType=QueryType.LIKE),
|
||||
@Column(name="test_textarea", attrName="testTextarea", label="多行文本", queryType=QueryType.LIKE),
|
||||
@Column(name="test_select", attrName="testSelect", label="下拉框"),
|
||||
@Column(name="test_select_multiple", attrName="testSelectMultiple", label="下拉多选"),
|
||||
@Column(name="test_radio", attrName="testRadio", label="单选框"),
|
||||
@Column(name="test_checkbox", attrName="testCheckbox", label="复选框"),
|
||||
@Column(name="test_date", attrName="testDate", label="日期选择", isUpdateForce=true),
|
||||
@Column(name="test_datetime", attrName="testDatetime", label="日期时间", isUpdateForce=true),
|
||||
@Column(name="test_user_code", attrName="testUser.userCode", label="用户选择"),
|
||||
@Column(name="test_office_code", attrName="testOffice.officeCode", label="机构选择"),
|
||||
@Column(name="test_area_code", attrName="testAreaCode", label="区域选择"),
|
||||
@Column(name="test_area_name", attrName="testAreaName", label="区域名称", isQuery=false),
|
||||
}, joinTable={
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=User.class, attrName="testUser", alias="u12",
|
||||
on="u12.user_code = a.test_user_code", columns={
|
||||
@Column(name="user_code", label="用户编码", isPK=true),
|
||||
@Column(name="user_name", label="用户名称", isQuery=false),
|
||||
}),
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=Office.class, attrName="testOffice", alias="u13",
|
||||
on="u13.office_code = a.test_office_code", columns={
|
||||
@Column(name="office_code", label="机构编码", isPK=true),
|
||||
@Column(name="office_name", label="机构名称", isQuery=false),
|
||||
}),
|
||||
}, orderBy="a.id ASC"
|
||||
)
|
||||
public class TestDataChild extends DataEntity<TestDataChild> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long testSort; // 排序号
|
||||
private TestData testData; // 父表主键 父类
|
||||
private String testInput; // 单行文本
|
||||
private String testTextarea; // 多行文本
|
||||
private String testSelect; // 下拉框
|
||||
private String testSelectMultiple; // 下拉多选
|
||||
private String testRadio; // 单选框
|
||||
private String testCheckbox; // 复选框
|
||||
private Date testDate; // 日期选择
|
||||
private Date testDatetime; // 日期时间
|
||||
private User testUser; // 用户选择
|
||||
private Office testOffice; // 机构选择
|
||||
private String testAreaCode; // 区域选择
|
||||
private String testAreaName; // 区域名称
|
||||
|
||||
public TestDataChild() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
|
||||
public TestDataChild(TestData testData){
|
||||
this.testData = testData;
|
||||
}
|
||||
|
||||
public Long getTestSort() {
|
||||
return testSort;
|
||||
}
|
||||
|
||||
public void setTestSort(Long testSort) {
|
||||
this.testSort = testSort;
|
||||
}
|
||||
|
||||
@Size(min=0, max=64, message="父表主键长度不能超过 64 个字符")
|
||||
public TestData getTestData() {
|
||||
return testData;
|
||||
}
|
||||
|
||||
public void setTestData(TestData testData) {
|
||||
this.testData = testData;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="单行文本长度不能超过 200 个字符")
|
||||
public String getTestInput() {
|
||||
return testInput;
|
||||
}
|
||||
|
||||
public void setTestInput(String testInput) {
|
||||
this.testInput = testInput;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="多行文本长度不能超过 200 个字符")
|
||||
public String getTestTextarea() {
|
||||
return testTextarea;
|
||||
}
|
||||
|
||||
public void setTestTextarea(String testTextarea) {
|
||||
this.testTextarea = testTextarea;
|
||||
}
|
||||
|
||||
@Size(min=0, max=10, message="下拉框长度不能超过 10 个字符")
|
||||
public String getTestSelect() {
|
||||
return testSelect;
|
||||
}
|
||||
|
||||
public void setTestSelect(String testSelect) {
|
||||
this.testSelect = testSelect;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="下拉多选长度不能超过 200 个字符")
|
||||
public String getTestSelectMultiple() {
|
||||
return testSelectMultiple;
|
||||
}
|
||||
|
||||
public void setTestSelectMultiple(String testSelectMultiple) {
|
||||
this.testSelectMultiple = testSelectMultiple;
|
||||
}
|
||||
|
||||
@Size(min=0, max=10, message="单选框长度不能超过 10 个字符")
|
||||
public String getTestRadio() {
|
||||
return testRadio;
|
||||
}
|
||||
|
||||
public void setTestRadio(String testRadio) {
|
||||
this.testRadio = testRadio;
|
||||
}
|
||||
|
||||
@Size(min=0, max=200, message="复选框长度不能超过 200 个字符")
|
||||
public String getTestCheckbox() {
|
||||
return testCheckbox;
|
||||
}
|
||||
|
||||
public void setTestCheckbox(String testCheckbox) {
|
||||
this.testCheckbox = testCheckbox;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
public Date getTestDate() {
|
||||
return testDate;
|
||||
}
|
||||
|
||||
public void setTestDate(Date testDate) {
|
||||
this.testDate = testDate;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
public Date getTestDatetime() {
|
||||
return testDatetime;
|
||||
}
|
||||
|
||||
public void setTestDatetime(Date testDatetime) {
|
||||
this.testDatetime = testDatetime;
|
||||
}
|
||||
|
||||
public User getTestUser() {
|
||||
return testUser;
|
||||
}
|
||||
|
||||
public void setTestUser(User testUser) {
|
||||
this.testUser = testUser;
|
||||
}
|
||||
|
||||
public Office getTestOffice() {
|
||||
return testOffice;
|
||||
}
|
||||
|
||||
public void setTestOffice(Office testOffice) {
|
||||
this.testOffice = testOffice;
|
||||
}
|
||||
|
||||
@Size(min=0, max=64, message="区域选择长度不能超过 64 个字符")
|
||||
public String getTestAreaCode() {
|
||||
return testAreaCode;
|
||||
}
|
||||
|
||||
public void setTestAreaCode(String testAreaCode) {
|
||||
this.testAreaCode = testAreaCode;
|
||||
}
|
||||
|
||||
@Size(min=0, max=100, message="区域名称长度不能超过 100 个字符")
|
||||
public String getTestAreaName() {
|
||||
return testAreaName;
|
||||
}
|
||||
|
||||
public void setTestAreaName(String testAreaName) {
|
||||
this.testAreaName = testAreaName;
|
||||
}
|
||||
|
||||
public Date getTestDate_gte() {
|
||||
return sqlMap.getWhere().getValue("test_date", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setTestDate_gte(Date testDate) {
|
||||
sqlMap.getWhere().and("test_date", QueryType.GTE, testDate);
|
||||
}
|
||||
|
||||
public Date getTestDate_lte() {
|
||||
return sqlMap.getWhere().getValue("test_date", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setTestDate_lte(Date testDate) {
|
||||
sqlMap.getWhere().and("test_date", QueryType.LTE, testDate);
|
||||
}
|
||||
|
||||
public Date getTestDatetime_gte() {
|
||||
return sqlMap.getWhere().getValue("test_datetime", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void setTestDatetime_gte(Date testDatetime) {
|
||||
sqlMap.getWhere().and("test_datetime", QueryType.GTE, testDatetime);
|
||||
}
|
||||
|
||||
public Date getTestDatetime_lte() {
|
||||
return sqlMap.getWhere().getValue("test_datetime", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void setTestDatetime_lte(Date testDatetime) {
|
||||
sqlMap.getWhere().and("test_datetime", QueryType.LTE, testDatetime);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.entity;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.entity.TreeEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
|
||||
/**
|
||||
* 测试树表Entity
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Table(name="test_tree", alias="a", columns={
|
||||
@Column(name="tree_code", attrName="treeCode", label="节点编码", isPK=true),
|
||||
@Column(includeEntity=TreeEntity.class),
|
||||
@Column(name="tree_name", attrName="treeName", label="节点名称", queryType=QueryType.LIKE, isTreeName=true),
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
}, orderBy="a.tree_sorts, a.tree_code"
|
||||
)
|
||||
public class TestTree extends TreeEntity<TestTree> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String treeCode; // 节点编码
|
||||
private String treeName; // 节点名称
|
||||
|
||||
public TestTree() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public TestTree(String id){
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestTree getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParent(TestTree parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public String getTreeCode() {
|
||||
return treeCode;
|
||||
}
|
||||
|
||||
public void setTreeCode(String treeCode) {
|
||||
this.treeCode = treeCode;
|
||||
}
|
||||
|
||||
@NotBlank(message="节点名称不能为空")
|
||||
@Size(min=0, max=200, message="节点名称长度不能超过 200 个字符")
|
||||
public String getTreeName() {
|
||||
return treeName;
|
||||
}
|
||||
|
||||
public void setTreeName(String treeName) {
|
||||
this.treeName = treeName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
import com.jeesite.modules.sys.service.UserService;
|
||||
import com.jeesite.modules.test.dao.TestDataChildDao;
|
||||
import com.jeesite.modules.test.dao.TestDataDao;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
|
||||
/**
|
||||
* 测试数据Service
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
|
||||
@Autowired
|
||||
private TestDataChildDao testDataChildDao;
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param testData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TestData get(TestData testData) {
|
||||
TestData entity = super.get(testData);
|
||||
if (entity != null){
|
||||
TestDataChild testDataChild = new TestDataChild(entity);
|
||||
testDataChild.setStatus(TestDataChild.STATUS_NORMAL);
|
||||
entity.setTestDataChildList(testDataChildDao.findList(testDataChild));
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param page 分页对象
|
||||
* @param testData
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<TestData> findPage(TestData testData) {
|
||||
|
||||
// // 演示Map参数和返回值,支持分页
|
||||
// Page<Map<String, Object>> pageMap = new Page<>();
|
||||
// Map<String, Object> params = MapUtils.newHashMap();
|
||||
// params.put("testInput", "123");
|
||||
// params.put("page", pageMap);
|
||||
// pageMap.setList(dao.findListForMap(params));
|
||||
// System.out.println(pageMap.getList());
|
||||
// System.out.println(pageMap.getCount());
|
||||
|
||||
return super.findPage(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子表分页数据
|
||||
* @param page 分页对象
|
||||
* @param testData
|
||||
* @return
|
||||
*/
|
||||
public List<TestDataChild> findSubList(TestDataChild testData) {
|
||||
return testDataChildDao.findList(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void save(TestData testData) {
|
||||
super.save(testData);
|
||||
// 保存上传图片
|
||||
FileUploadUtils.saveFileUpload(testData, testData.getId(), "testData_image");
|
||||
// 保存上传附件
|
||||
FileUploadUtils.saveFileUpload(testData, testData.getId(), "testData_file");
|
||||
// 保存 TestData子表
|
||||
int index = 0;
|
||||
for (TestDataChild testDataChild : testData.getTestDataChildList()){
|
||||
if (!TestDataChild.STATUS_DELETE.equals(testDataChild.getStatus())){
|
||||
testDataChild.setTestData(testData);
|
||||
if (testDataChild.getIsNewRecord()){
|
||||
testDataChild.preInsert();
|
||||
testDataChildDao.insert(testDataChild);
|
||||
}else{
|
||||
testDataChild.preUpdate();
|
||||
testDataChildDao.update(testDataChild);
|
||||
}
|
||||
}else{
|
||||
testDataChildDao.delete(testDataChild);
|
||||
}
|
||||
// 保存上传附件
|
||||
FileUploadUtils.saveFileUpload(testDataChild, testDataChild.getId(),
|
||||
"testDataChildList["+index+"].testDataChild_file");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void updateStatus(TestData testData) {
|
||||
super.updateStatus(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param testData
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void delete(TestData testData) {
|
||||
super.delete(testData);
|
||||
TestDataChild testDataChild = new TestDataChild();
|
||||
testDataChild.setTestData(testData);
|
||||
testDataChildDao.deleteByEntity(testDataChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务调度测试:testDataService.executeTestTask(userService, 1, 2L, 3F, 4D, 'abc')
|
||||
*/
|
||||
public void executeTestTask(UserService userService, Integer i, Long l, Float f, Double d, String s){
|
||||
System.out.println(DateUtils.getTime() + " 任务执行了~~~ bean: " + userService + ", i: " + i
|
||||
+ ", l: " + l + ", f: " + f + ", d: " + d + ", s: " + s);
|
||||
}
|
||||
|
||||
/**
|
||||
* 事务测试,若 Child 报错,则回滚
|
||||
*/
|
||||
@Transactional(readOnly=false/*, propagation=Propagation.NOT_SUPPORTED*/)
|
||||
public void transTest(TestData testData) {
|
||||
testData.setTestInput("transTest");
|
||||
testData.setTestTextarea(IdGen.randomBase62(5));
|
||||
dao.insert(testData);
|
||||
TestDataChild testDataChild = new TestDataChild();
|
||||
testDataChild.setTestData(testData);
|
||||
// 设置一个超出数据库范围的值,抛出数据库异常
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i=0; i<500; i++){
|
||||
sb.append("transTest" + i);
|
||||
}
|
||||
testDataChild.setTestInput(sb.toString());
|
||||
testDataChildDao.insert(testDataChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 事务验证,返回空,则事务回滚成功
|
||||
*/
|
||||
public boolean transValid(TestData testData) {
|
||||
return dao.get(testData) == null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.service.TreeService;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
import com.jeesite.modules.test.dao.TestTreeDao;
|
||||
import com.jeesite.modules.test.entity.TestTree;
|
||||
|
||||
/**
|
||||
* 测试树表Service
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TestTreeService extends TreeService<TestTreeDao, TestTree> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param testTree
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TestTree get(TestTree testTree) {
|
||||
return super.get(testTree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param testTree
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<TestTree> findList(TestTree testTree) {
|
||||
return super.findList(testTree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void save(TestTree testTree) {
|
||||
super.save(testTree);
|
||||
// 保存上传图片
|
||||
FileUploadUtils.saveFileUpload(testTree, testTree.getId(), "testTree_image");
|
||||
// 保存上传附件
|
||||
FileUploadUtils.saveFileUpload(testTree, testTree.getId(), "testTree_file");
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void updateStatus(TestTree testTree) {
|
||||
super.updateStatus(testTree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param testTree
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void delete(TestTree testTree) {
|
||||
super.delete(testTree);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.web;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
|
||||
/**
|
||||
* 演示实例Controller
|
||||
* @author ThinkGem
|
||||
* @version 2018-03-24
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/demo")
|
||||
public class DemoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TestDataService testDataService;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public TestData get(String id, boolean isNewRecord) {
|
||||
return testDataService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* DataGrid
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "dataGrid/{viewName}")
|
||||
public String dataGrid(@PathVariable String viewName, TestData testData, Model model) {
|
||||
return "modules/demo/demoDataGrid" + StringUtils.cap(viewName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Form
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "form/{viewName}")
|
||||
public String form(@PathVariable String viewName, TestData testData, Model model) {
|
||||
return "modules/demo/demoForm" + StringUtils.cap(viewName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
|
||||
/**
|
||||
* 测试数据Controller
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/test/testData")
|
||||
public class TestDataController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TestDataService testDataService;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public TestData get(String id, boolean isNewRecord) {
|
||||
return testDataService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(TestData testData, Model model) {
|
||||
model.addAttribute("testData", testData);
|
||||
return "modules/test/testDataList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<TestData> listData(TestData testData, HttpServletRequest request, HttpServletResponse response) {
|
||||
testData.setPage(new Page<>(request, response));
|
||||
Page<TestData> page = testDataService.findPage(testData);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子表列表数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "subListData")
|
||||
@ResponseBody
|
||||
public List<TestDataChild> subListData(TestDataChild testDataChild) {
|
||||
return testDataService.findSubList(testDataChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(TestData testData, Model model) {
|
||||
model.addAttribute("testData", testData);
|
||||
return "modules/test/testDataForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated TestData testData) {
|
||||
testDataService.save(testData);
|
||||
return renderResult(Global.TRUE, text("保存数据成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:edit")
|
||||
@RequestMapping(value = "disable")
|
||||
@ResponseBody
|
||||
public String disable(TestData testData) {
|
||||
testData.setStatus(TestData.STATUS_DISABLE);
|
||||
testDataService.updateStatus(testData);
|
||||
return renderResult(Global.TRUE, text("停用数据成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:edit")
|
||||
@RequestMapping(value = "enable")
|
||||
@ResponseBody
|
||||
public String enable(TestData testData) {
|
||||
testData.setStatus(TestData.STATUS_NORMAL);
|
||||
testDataService.updateStatus(testData);
|
||||
return renderResult(Global.TRUE, text("启用数据成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(TestData testData) {
|
||||
testDataService.delete(testData);
|
||||
return renderResult(Global.TRUE, text("删除数据成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 事务测试
|
||||
*/
|
||||
@RequiresPermissions("test:testData:edit")
|
||||
@RequestMapping(value = "transTest")
|
||||
@ResponseBody
|
||||
public String transTest(TestData testData) {
|
||||
try{
|
||||
testDataService.transTest(testData);
|
||||
}catch (Exception e) {
|
||||
logger.debug("事务测试信息,报错回滚:" + e.getMessage());
|
||||
}
|
||||
boolean bl = testDataService.transValid(testData);
|
||||
return renderResult(Global.TRUE, "事务测试"+(bl?"成功,数据已":"失败,数据未")+"回滚!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.modules.test.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestTree;
|
||||
import com.jeesite.modules.test.service.TestTreeService;
|
||||
|
||||
/**
|
||||
* 测试树表Controller
|
||||
* @author ThinkGem
|
||||
* @version 2018-04-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/test/testTree")
|
||||
public class TestTreeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TestTreeService testTreeService;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public TestTree get(String treeCode, boolean isNewRecord) {
|
||||
return testTreeService.get(treeCode, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(TestTree testTree, Model model) {
|
||||
model.addAttribute("testTree", testTree);
|
||||
return "modules/test/testTreeList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<TestTree> listData(TestTree testTree) {
|
||||
if (StringUtils.isBlank(testTree.getParentCode())) {
|
||||
testTree.setParentCode(TestTree.ROOT_CODE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(testTree.getTreeName())){
|
||||
testTree.setParentCode(null);
|
||||
}
|
||||
if (StringUtils.isNotBlank(testTree.getRemarks())){
|
||||
testTree.setParentCode(null);
|
||||
}
|
||||
List<TestTree> list = testTreeService.findList(testTree);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(TestTree testTree, Model model) {
|
||||
// 创建并初始化下一个节点信息
|
||||
testTree = createNextNode(testTree);
|
||||
model.addAttribute("testTree", testTree);
|
||||
return "modules/test/testTreeForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建并初始化下一个节点信息,如:排序号、默认值
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@RequestMapping(value = "createNextNode")
|
||||
@ResponseBody
|
||||
public TestTree createNextNode(TestTree testTree) {
|
||||
if (StringUtils.isNotBlank(testTree.getParentCode())){
|
||||
testTree.setParent(testTreeService.get(testTree.getParentCode()));
|
||||
}
|
||||
if (testTree.getIsNewRecord()) {
|
||||
TestTree where = new TestTree();
|
||||
where.setParentCode(testTree.getParentCode());
|
||||
TestTree last = testTreeService.getLastByParentCode(where);
|
||||
// 获取到下级最后一个节点
|
||||
if (last != null){
|
||||
testTree.setTreeSort(last.getTreeSort() + 30);
|
||||
testTree.setTreeCode(IdGen.nextCode(last.getTreeCode()));
|
||||
}else if (testTree.getParent() != null){
|
||||
testTree.setTreeCode(testTree.getParent().getTreeCode() + "001");
|
||||
}
|
||||
}
|
||||
// 以下设置表单默认数据
|
||||
if (testTree.getTreeSort() == null){
|
||||
testTree.setTreeSort(TestTree.DEFAULT_TREE_SORT);
|
||||
}
|
||||
return testTree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated TestTree testTree) {
|
||||
testTreeService.save(testTree);
|
||||
return renderResult(Global.TRUE, text("保存数据成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@RequestMapping(value = "disable")
|
||||
@ResponseBody
|
||||
public String disable(TestTree testTree) {
|
||||
TestTree where = new TestTree();
|
||||
where.setStatus(TestTree.STATUS_NORMAL);
|
||||
where.setParentCodes("," + testTree.getId() + ",");
|
||||
long count = testTreeService.findCount(where);
|
||||
if (count > 0) {
|
||||
return renderResult(Global.FALSE, text("该数据包含未停用的子数据!"));
|
||||
}
|
||||
testTree.setStatus(TestTree.STATUS_DISABLE);
|
||||
testTreeService.updateStatus(testTree);
|
||||
return renderResult(Global.TRUE, text("停用数据成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@RequestMapping(value = "enable")
|
||||
@ResponseBody
|
||||
public String enable(TestTree testTree) {
|
||||
testTree.setStatus(TestTree.STATUS_NORMAL);
|
||||
testTreeService.updateStatus(testTree);
|
||||
return renderResult(Global.TRUE, text("启用数据成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(TestTree testTree) {
|
||||
testTreeService.delete(testTree);
|
||||
return renderResult(Global.TRUE, text("删除数据成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取树结构数据
|
||||
* @param excludeCode 排除的Code
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:view")
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String excludeCode, String isShowCode) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
List<TestTree> list = testTreeService.findList(new TestTree());
|
||||
for (int i=0; i<list.size(); i++){
|
||||
TestTree e = list.get(i);
|
||||
// 过滤非正常的数据
|
||||
if (!TestTree.STATUS_NORMAL.equals(e.getStatus())){
|
||||
continue;
|
||||
}
|
||||
// 过滤被排除的编码(包括所有子级)
|
||||
if (StringUtils.isNotBlank(excludeCode)){
|
||||
if (e.getId().equals(excludeCode)){
|
||||
continue;
|
||||
}
|
||||
if (e.getParentCodes().contains("," + excludeCode + ",")){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, Object> map = MapUtils.newHashMap();
|
||||
map.put("id", e.getId());
|
||||
map.put("pId", e.getParentCode());
|
||||
map.put("name", StringUtils.getTreeNodeName(isShowCode, e.getTreeCode(), e.getTreeName()));
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修复表结构相关数据
|
||||
*/
|
||||
@RequiresPermissions("test:testTree:edit")
|
||||
@RequestMapping(value = "fixTreeData")
|
||||
@ResponseBody
|
||||
public String fixTreeData(TestTree testTree){
|
||||
if (!UserUtils.getUser().isAdmin()){
|
||||
return renderResult(Global.FALSE, "操作失败,只有管理员才能进行修复!");
|
||||
}
|
||||
testTreeService.fixTreeData();
|
||||
return renderResult(Global.TRUE, "数据修复成功");
|
||||
}
|
||||
|
||||
}
|
||||
854
web-api/src/main/resources/config/application.yml
Normal file
854
web-api/src/main/resources/config/application.yml
Normal file
@@ -0,0 +1,854 @@
|
||||
|
||||
#======================================#
|
||||
#========== Project settings ==========#
|
||||
#======================================#
|
||||
|
||||
# 产品或项目名称、软件开发公司名称
|
||||
productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.0
|
||||
copyrightYear: 2022
|
||||
|
||||
# 是否演示模式
|
||||
demoMode: false
|
||||
|
||||
# 为分离端提供接口服务,关闭内置登录页和主框架页视图
|
||||
apiMode: true
|
||||
|
||||
#======================================#
|
||||
#========== Server settings ===========#
|
||||
#======================================#
|
||||
|
||||
server:
|
||||
|
||||
port: 8980
|
||||
servlet:
|
||||
context-path: /js
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
# 表单请求数据的最大大小
|
||||
max-http-form-post-size: 20MB
|
||||
# # 进程的最大连接数
|
||||
# max-connections: 8192
|
||||
# # 连接数满后的排队个数
|
||||
# accept-count: 100
|
||||
# # 线程数最大和最小个数
|
||||
# threads:
|
||||
# max: 200
|
||||
# min-spare: 10
|
||||
|
||||
# 当 Nginx 为 https,tomcat 为 http 时,设置该选项为 true
|
||||
schemeHttps: false
|
||||
|
||||
#======================================#
|
||||
#========== Database sttings ==========#
|
||||
#======================================#
|
||||
|
||||
# 数据库连接
|
||||
jdbc:
|
||||
|
||||
# Mysql 数据库配置
|
||||
type: mysql
|
||||
driver: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeesite_v5?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
testSql: SELECT 1
|
||||
|
||||
# # Oracle 数据库配置(若使用 12c,请修改 /modules/core/pom.xml 文件,打开 12c 依赖,去掉 11g 依赖)
|
||||
# type: oracle
|
||||
# driver: oracle.jdbc.OracleDriver
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1 FROM DUAL
|
||||
|
||||
# # Sql Server 数据库配置(2008)
|
||||
# type: mssql
|
||||
# driver: net.sourceforge.jtds.jdbc.Driver
|
||||
# url: jdbc:jtds:sqlserver://127.0.0.1:1433/jeesite
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # Sql Server 数据库配置(2012以上版本)(请修改 /modules/core/pom.xml 文件,打开 SqlServer 2012 依赖)
|
||||
# type: mssql2012
|
||||
# driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=jeesite
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # PostgreSql 数据库配置
|
||||
# type: postgresql
|
||||
# driver: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://127.0.0.1:5432/jeesite
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # H2 数据库配置(请修改 /modules/core/pom.xml 文件,打开 H2 DB 依赖)
|
||||
# type: h2
|
||||
# driver: org.h2.Driver
|
||||
# url: jdbc:h2:~/jeesite-db/jeesite
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1
|
||||
|
||||
# # 连接信息加密
|
||||
# encrypt:
|
||||
#
|
||||
# # 加密连接用户名
|
||||
# username: false
|
||||
# # 加密连接密码
|
||||
# password: true
|
||||
#
|
||||
# # 数据库连接池配置
|
||||
# pool:
|
||||
#
|
||||
# # 初始化连接数
|
||||
# init: 1
|
||||
# # 最小空闲连接数
|
||||
# minIdle: 3
|
||||
# # 最大激活连接数
|
||||
# maxActive: 20
|
||||
#
|
||||
# # 获取连接等待超时时间,单位毫秒(1分钟)(4.0.6+)
|
||||
# maxWait: 60000
|
||||
#
|
||||
# # 从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个(4.0.6+)
|
||||
# testOnBorrow: false
|
||||
# testOnReturn: false
|
||||
#
|
||||
# # 间隔多久才进行一次检测,检测需要关闭的空闲连接,单位毫秒(1分钟)(4.0.6+)
|
||||
# timeBetweenEvictionRunsMillis: 60000
|
||||
#
|
||||
# # 一个连接在池中最小空闲的时间,单位毫秒(20分钟)(4.0.6+)
|
||||
# minEvictableIdleTimeMillis: 1200000
|
||||
# # 一个连接在池中最大空闲的时间,单位毫秒(30分钟)(4.1.2+)
|
||||
# maxEvictableIdleTimeMillis: 1800000
|
||||
#
|
||||
# #连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作(4.1.8+)
|
||||
# keepAlive: false
|
||||
#
|
||||
# # 是否自动回收泄露的连接和超时时间,单位秒(35分钟)(4.0.6+)
|
||||
# removeAbandoned: false
|
||||
# removeAbandonedTimeout: 2100
|
||||
#
|
||||
# # Oracle 下会自动开启 PSCache,并指定每个连接上 PSCache 大小。若不指定,则与 maxActive 相同(4.1.5+)
|
||||
# maxPoolPreparedStatementPerConnectionSize: ~
|
||||
#
|
||||
# # 设置连接属性,可获取到表的 remark (备注)
|
||||
# remarksReporting: false
|
||||
|
||||
# # 读写分离配置(专业版)v4.3.0
|
||||
# readwriteSplitting:
|
||||
# # 读库的数据源名称列表(默认数据源)
|
||||
# readDataSourceNames: ds_read_01, ds_read_02
|
||||
# # 负载均衡算法(ROUND_ROBIN轮询、RANDOM随机、自定义类名)
|
||||
# loadBalancerAlgorithm: RANDOM
|
||||
|
||||
# # 多数据源名称列表,多个用逗号隔开,使用方法:@MyBatisDao(dataSourceName="ds2")
|
||||
# dataSourceNames: ds_read_01, ds_read_02, ds2
|
||||
# dataSourceNames: ds2
|
||||
|
||||
# # 默认数据源的从库01
|
||||
# ds_read_01:
|
||||
# type: mysql
|
||||
# driver: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jeesite_test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
# testSql: SELECT 1
|
||||
# pool:
|
||||
# init: 1
|
||||
# minIdle: 3
|
||||
# maxActive: 20
|
||||
#
|
||||
# # 默认数据源的从库02
|
||||
# ds_read_02:
|
||||
# type: mysql
|
||||
# driver: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jeesite_test2?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
# testSql: SELECT 1
|
||||
# pool:
|
||||
# init: 1
|
||||
# minIdle: 3
|
||||
# maxActive: 20
|
||||
#
|
||||
# # 多数据源配置:ds2
|
||||
# ds2:
|
||||
# type: mysql
|
||||
# driver: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jeesite2?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
# username: root
|
||||
# password: 123456
|
||||
# testSql: SELECT 1
|
||||
# # 其它数据源支持密码加密
|
||||
# encrypt:
|
||||
# username: false
|
||||
# password: true
|
||||
# # 其它数据源支持连接池设置
|
||||
# pool:
|
||||
# init: 1
|
||||
# minIdle: 3
|
||||
# maxActive: 20
|
||||
# # 其它数据源支持读写分离
|
||||
# readwriteSplitting:
|
||||
# readDataSourceNames: ~
|
||||
# loadBalancerAlgorithm: RANDOM
|
||||
|
||||
# # 数据源映射(Dao类名 = 数据源名称),优先于 @MyBatisDao(dataSourceName="ds2") 设置 v4.3.0
|
||||
# # Dao类名,不仅支持某个具体 Dao类名,还支持 Dao 里的某个方法指定数据源名称,还支持包路径指定数据源等
|
||||
# # 数据源名指定 {empty} 时支持动态,相当于 @MyBatisDao(dataSourceName=DataSourceHolder.EMPTY)
|
||||
# # 数据源支持指定变量 {corpCode}、 {userCode}、{userCache中的Key名}、{yml或sys_config中的Key名}
|
||||
# # 从上到下,先匹配先受用规则,默认数据源名为 default 扩展数据源为 dataSourceNames 列表里自定义的名字
|
||||
# mybatisDaoAndDataSourceMappings: |
|
||||
# TestDataChildDao = ds2
|
||||
# EmpUserDao.findList = ds2
|
||||
# com.jeesite.modules.sys = default
|
||||
# com.jeesite.modules.filemanager = ds2
|
||||
|
||||
# # JTA XA 事务(v4.0.4+)
|
||||
# jta:
|
||||
# enabled: false
|
||||
|
||||
# 注意:如果报 oracle.jdbc.xa.OracleXAResource.recover 错误,则需要授权如下:
|
||||
# grant select on sys.dba_pending_transactions to jeesite;
|
||||
# grant select on sys.pending_trans$ to jeesite;
|
||||
# grant select on sys.dba_2pc_pending to jeesite;
|
||||
# grant execute on sys.dbms_system to jeesite;
|
||||
|
||||
# # 事务超时时间,单位秒(30分钟)(v4.1.5+)
|
||||
# transactionTimeout: 1800
|
||||
|
||||
# # 表名前缀
|
||||
# tablePrefix: js_
|
||||
|
||||
#======================================#
|
||||
#========== Spring settings ===========#
|
||||
#======================================#
|
||||
|
||||
spring:
|
||||
|
||||
# 应用程序名称
|
||||
application:
|
||||
name: jeesite-web
|
||||
|
||||
# 环境名称(注意:不可设置为 test 它是单元测试专用的名称)
|
||||
profiles:
|
||||
active: default
|
||||
|
||||
# 打印横幅
|
||||
main:
|
||||
bannerMode: "off"
|
||||
|
||||
# # Redis 连接参数 (RedisProperties)
|
||||
# redis:
|
||||
# host: 127.0.0.1
|
||||
# port: 6379
|
||||
# ssl: false
|
||||
# database: 0
|
||||
# password: 1234
|
||||
# timeout: 20000
|
||||
# lettuce:
|
||||
# pool:
|
||||
# # 最大空闲连接数
|
||||
# maxIdle: 3
|
||||
# # 最大活动连接数
|
||||
# maxActive: 20
|
||||
#
|
||||
# # 缓存配置
|
||||
# cache:
|
||||
# # 缓存及会话共享(专业版)
|
||||
# isClusterMode: false
|
||||
# # 清理全部缓存按钮所清理的缓存列表
|
||||
# clearNames: sysCache,corpCache,userCache,cmsCache,msgPcPoolCache,roleCache,fileUploadCache,bpmFormCache
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
config: classpath:config/logback-spring.xml
|
||||
|
||||
#======================================#
|
||||
#========== System settings ===========#
|
||||
#======================================#
|
||||
|
||||
# 管理基础路径
|
||||
#adminPath: /a
|
||||
|
||||
# 前端基础路径
|
||||
#frontPath: /f
|
||||
|
||||
# 分页相关
|
||||
#page:
|
||||
#
|
||||
# # 默认每页显示的数据条数
|
||||
# pageSize: 20
|
||||
#
|
||||
# # 每页最大条数,防止分页过大导致系统缓慢或内存溢出
|
||||
# maxPageSize: 999
|
||||
|
||||
# 用户相关
|
||||
#user:
|
||||
#
|
||||
# # 指定超级管理员编号(研发团队使用的账号)
|
||||
# superAdminCode: system
|
||||
#
|
||||
# # 超级管理员获取菜单的最小权重(默认20;>=40二级管理员;>=60系统管理员;>=80超级管理员)
|
||||
# superAdminGetMenuMinWeight: 40
|
||||
#
|
||||
# # 系统管理员角色编号(客户方管理员使用的角色)
|
||||
# corpAdminRoleCode: corpAdmin
|
||||
#
|
||||
# # 二级管理员的控制权限类型(1拥有的权限 2管理的权限,管理功能包括:用户管理、组织机构、公司管理等)(v4.1.5+)
|
||||
# adminCtrlPermi: 2
|
||||
#
|
||||
# # 多租户模式(SAAS模式)(专业版)
|
||||
# useCorpModel: false
|
||||
#
|
||||
# # 登录账号是否租户内唯一,否则全局唯一
|
||||
# loginCodeCorpUnique: false
|
||||
#
|
||||
# # 是否启用验证码登录(手机、邮箱)
|
||||
# loginByValidCode: true
|
||||
#
|
||||
# # 用户类型配置信息(employee员工,member会员,btype往来单位,persion个人,expert专家,...),JSON 格式说明如下:
|
||||
# # {"用户类型":{"beanName":"Service或Dao的Bean名称","loginView":"登录页面视图","indexView":"主框架页面视图,支持 redirect: 前缀"}}
|
||||
# userTypeMap: >
|
||||
# {
|
||||
# employee: {beanName: "employeeService", loginView: "", indexView: "modules/sys/sysIndex"},
|
||||
# member: {beanName: "memberService", loginView: "", indexView: "modules/sys/sysIndexMember"},
|
||||
# btype: {beanName: "btypeInfoService", loginView: "", indexView: "modules/sys/sysIndexBtype"},
|
||||
# expert: {beanName: "expertService", loginView: "", indexView: "modules/sys/sysIndexExpert"}
|
||||
# }
|
||||
#
|
||||
# # 数据权限设置参数,可新增自定义数据权限,moduleCode: 针对模块, ctrlPermi: 权限类型, 0全部 1拥有权限 2管理权限
|
||||
# dataScopes: >
|
||||
# [{
|
||||
# moduleCode: "core",
|
||||
# ctrlPermi: "0",
|
||||
# ctrlName: "机构权限",
|
||||
# ctrlName_en: "Office",
|
||||
# ctrlType: "Office",
|
||||
# ctrlDataUrl: "/sys/office/treeData",
|
||||
# chkboxType: {"Y":"ps","N":"ps"},
|
||||
# expandLevel: -1,
|
||||
# remarks: ""
|
||||
# },{
|
||||
# moduleCode: "core",
|
||||
# ctrlName: "公司权限",
|
||||
# ctrlName_en: "Company",
|
||||
# ctrlType: "Company",
|
||||
# ctrlPermi: "0",
|
||||
# ctrlDataUrl: "/sys/company/treeData",
|
||||
# chkboxType: {"Y":"ps","N":"ps"},
|
||||
# expandLevel: -1,
|
||||
# remarks: ""
|
||||
# },{
|
||||
# moduleCode: "core",
|
||||
# ctrlName: "角色权限",
|
||||
# ctrlName_en: "Role",
|
||||
# ctrlType: "Role",
|
||||
# ctrlPermi: "2",
|
||||
# ctrlDataUrl: "/sys/role/treeData",
|
||||
# chkboxType: {"Y":"ps","N":"ps"},
|
||||
# expandLevel: -1,
|
||||
# remarks: ""
|
||||
# }]
|
||||
#
|
||||
# # 数据权限调试模式(会输出一些日志)
|
||||
# dataScopeDebug: false
|
||||
#
|
||||
# # 数据权限使用 API 方式实现(适应 Cloud 环境,基础用户表与业务数据表跨库的情况)
|
||||
# # 开启后设置 ctrlDataAttrName 加 AndChildren 后缀,ctrlDataParentCodesAttrName 清空
|
||||
# # 以方便读取树结构数据权限的表时包含子节点,举例如下:
|
||||
# # ctrlDataAttrName: "officeCodesAndChildren", ctrlDataParentCodesAttrName: ""
|
||||
# dataScopeApiMode: false
|
||||
|
||||
# 角色管理
|
||||
#role:
|
||||
# # 扩展数据权限定义:3:本部门;4:本公司;5:本部门和本公司
|
||||
# extendDataScopes: >
|
||||
# {
|
||||
# 3: {
|
||||
# Office: {
|
||||
# #控制类型的类名 : "用来获取控制表名和主键字段名,如果为 NONE,则代表是不控制该类型权限",
|
||||
# ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
# #控制数据的类名: "指定一个静态类名,方便 ctrlDataAttrName 得到权限数据,如:当前机构编码、当前公司编码、当前行业编码等",
|
||||
# ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
# #控制数据的类名下的属性名 : "可看做 ctrlDataClass 下的 get 方法,如:EmpUtils.getOfficeCodes(),支持返回字符串或字符串数组类型",
|
||||
# ctrlDataAttrName: "officeCodes",
|
||||
# #控制数据的所有上级编码 : "用于控制数据为树表的情况,为数组时,必须与 ctrlDataAttrName 返回的长度相同,不是树表设置为空",
|
||||
# ctrlDataParentCodesAttrName: "officeParentCodess"
|
||||
# },
|
||||
# Company: {
|
||||
# ctrlTypeClass: "NONE"
|
||||
# }
|
||||
# },
|
||||
# 4: {
|
||||
# Office: {
|
||||
# ctrlTypeClass: "NONE"
|
||||
# },
|
||||
# Company: {
|
||||
# ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
# ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
# ctrlDataAttrName: "company.companyCode",
|
||||
# ctrlDataParentCodesAttrName: "company.parentCodes"
|
||||
# }
|
||||
# },
|
||||
# 5: {
|
||||
# Office: {
|
||||
# ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
# ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
# ctrlDataAttrName: "officeCodes",
|
||||
# ctrlDataParentCodesAttrName: "officeParentCodess"
|
||||
# },
|
||||
# Company: {
|
||||
# ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
# ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
# ctrlDataAttrName: "company.companyCode",
|
||||
# ctrlDataParentCodesAttrName: "company.parentCodes"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# 菜单管理
|
||||
#menu:
|
||||
# # 根据模块状态去更新相连的菜单状态
|
||||
# updateStatusByModuleStatus: false
|
||||
|
||||
# 国际化管理(专业版)
|
||||
#lang:
|
||||
# enabled: false
|
||||
#
|
||||
# # 默认语言(4.1.3+)
|
||||
# defaultLocale: zh_CN
|
||||
# # 默认时区(4.1.3+)
|
||||
# defaultTimeZone: GMT+08:00
|
||||
|
||||
# 任务调度(标准版)
|
||||
#job:
|
||||
# enabled: false
|
||||
#
|
||||
# # 是否自动启动任务调度(可关闭)
|
||||
# autoStartup: true
|
||||
#
|
||||
# # 任务调度启动延迟设置(单位:秒)(建议设置项目启动完成后的时间)
|
||||
# startupDelay: 60
|
||||
#
|
||||
# # 任务调度线程池
|
||||
# threadPool:
|
||||
# threadCount: 10
|
||||
# threadPriority: 5
|
||||
#
|
||||
# # 调度设置,集群中每一个实例都必须使用相同的instanceName名称 (区分特定的调度器实例)
|
||||
# # 在微服务模式情况下,请将instanceName名称设置为当前微服务的名称
|
||||
# # 每一个instanceId必须不同,设置AUTO则自动生成
|
||||
# scheduler:
|
||||
# instanceName: JeeSiteScheduler
|
||||
# #instanceName: ${spring.application.name}
|
||||
# instanceId: AUTO
|
||||
#
|
||||
# # 任务调度集群设置
|
||||
# jobStore:
|
||||
# isClustered: true
|
||||
# dataSourceName: job
|
||||
# clusterCheckinInterval: 1000
|
||||
#
|
||||
# # 调度日志
|
||||
# log:
|
||||
# # 计划调度日志
|
||||
# scheduler:
|
||||
# enabled: true
|
||||
# # 是否只保存错误日志
|
||||
# errorLevel: true
|
||||
# # 任务执行日志
|
||||
# jobDetail:
|
||||
# enabled: true
|
||||
# # 是否只保存错误日志
|
||||
# errorLevel: true
|
||||
# # 计划触发日志
|
||||
# trigger:
|
||||
# enabled: false
|
||||
|
||||
# 代码生成
|
||||
#gen:
|
||||
# enabled: true
|
||||
#
|
||||
# # 表名字段名是否强制小写
|
||||
# forceLowerCase: true
|
||||
|
||||
# 系统监控
|
||||
#state:
|
||||
# enabled: true
|
||||
|
||||
#======================================#
|
||||
#========= Framework settings =========#
|
||||
#======================================#
|
||||
|
||||
# Shiro 相关
|
||||
shiro:
|
||||
|
||||
# #索引页路径
|
||||
# defaultPath: ${shiro.loginUrl}
|
||||
#
|
||||
# # 登录相关设置
|
||||
# loginUrl: ${adminPath}/login
|
||||
# logoutUrl: ${shiro.loginUrl}
|
||||
# successUrl: ${adminPath}/index
|
||||
#
|
||||
## # Apereo CAS 相关配置(标准版)
|
||||
## casServerUrl: http://127.0.0.1:8981/cas
|
||||
## casClientUrl: http://127.0.0.1:8980/js
|
||||
## loginUrl: ${shiro.casServerUrl}?service=${shiro.casClientUrl}${adminPath}/login-cas
|
||||
## logoutUrl: ${shiro.casServerUrl}/logout?service=${shiro.loginUrl}
|
||||
## successUrl: ${shiro.casClientUrl}${adminPath}/index
|
||||
#
|
||||
## # LDAP 相关设置(标准版)
|
||||
## ldapUrl: ldap://127.0.0.1:389
|
||||
## ldapUserDn: uid={0},ou=users,dc=mycompany,dc=com
|
||||
#
|
||||
# # 简单 SSO 登录相关配置
|
||||
# sso:
|
||||
# # 如果启用/sso/{username}/{token}单点登录,请修改此安全key并与单点登录系统key一致。
|
||||
# secretKey: ~
|
||||
# # 是否加密单点登录安全Key
|
||||
# encryptKey: true
|
||||
#
|
||||
# # 登录提交信息加密(如果不需要加密,设置为空即可)
|
||||
# loginSubmit:
|
||||
# # 加密用户名、密码、验证码,后再提交(key设置为3个,用逗号分隔)加密方式:DES(4.1.9及之前版本默认设置)
|
||||
# # v4.2.0+ 开始支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base64(4.2.0+默认设置)
|
||||
# #secretKey: thinkgem,jeesite,com
|
||||
# secretKey: Base64
|
||||
# #secretKey: ~
|
||||
|
||||
# 记住我密钥设置,你可以通过 com.jeesite.test.RememberMeKeyGen 类快速生成一个秘钥。
|
||||
# 若不设置,则每次启动系统后自动生成一个新秘钥,这样会导致每次重启后,客户端记录的用户信息将失效。
|
||||
rememberMe:
|
||||
secretKey: ~
|
||||
|
||||
# # 指定获取客户端IP的Header名称,防止IP伪造。指定为空,则使用原生方法获取IP。
|
||||
# remoteAddrHeaderName: X-Forwarded-For
|
||||
#
|
||||
# # 允许的请求方法设定,解决安全审计问题(BPM设计器用到了PUT或DELETE方法)
|
||||
# allowRequestMethods: GET, POST, OPTIONS, PUT, DELETE
|
||||
#
|
||||
# # 是否允许账号多地登录,如果设置为false,同一个设备类型的其它地点登录的相同账号被踢下线
|
||||
# isAllowMultiAddrLogin: true
|
||||
#
|
||||
# # 是否允许多账号多设备登录,如果设置为false,其它地点登录的相同账号全部登录设备将被踢下线
|
||||
# isAllowMultiDeviceLogin: true
|
||||
#
|
||||
# # 是否允许刷新主框架页,如果设置为false,刷新主页将导致重新登录。如安全性比较高的,如银行个人首页不允许刷新。
|
||||
# isAllowRefreshIndex: true
|
||||
#
|
||||
# # 是否允许嵌入到外部网站iframe中(true:不限制,false:不允许)
|
||||
# isAllowExternalSiteIframe: true
|
||||
#
|
||||
# # 设定允许获取的资源列表(v4.2.3)
|
||||
# #contentSecurityPolicy: "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; img-src 'self' 'unsafe-inline' 'unsafe-eval' data:"
|
||||
#
|
||||
# # 是否允许跨域访问 CORS,如果允许,设置允许的域名。v4.2.3 开始支持多个域名和模糊匹配,例如:http://*.jeesite.com,http://*.jeesite.net
|
||||
# #accessControlAllowOrigin: '*'
|
||||
#
|
||||
# # 允许跨域访问时 CORS,可以获取和返回的方法和请求头
|
||||
# #accessControlAllowMethods: GET, POST, OPTIONS
|
||||
# #accessControlAllowHeaders: content-type, x-requested-with, x-ajax, x-token, x-remember
|
||||
# #accessControlExposeHeaders: x-remember
|
||||
#
|
||||
# # 是否允许接收跨域的Cookie凭证数据 CORS
|
||||
# #accessControlAllowCredentials: false
|
||||
#
|
||||
# # 允许的网站来源地址,不设置为全部地址(避免一些跨站点请求伪造 CSRF、防盗链)
|
||||
# #allowReferers: http://127.0.0.1,http://localhost
|
||||
#
|
||||
# # 是否在登录后生成新的Session(默认false)
|
||||
# isGenerateNewSessionAfterLogin: false
|
||||
#
|
||||
# # 内部系统访问过滤器,可设置多个允许的内部系统IP地址串,多个用逗号隔开
|
||||
# innerFilter.allowIp: 127.0.0.1
|
||||
#
|
||||
# # URI 权限过滤器定义(自定义添加参数时,请不要移除 ${adminPath}/** = user,否则会导致权限异常)
|
||||
# filterChainDefinitions: |
|
||||
# ${adminPath}/** = user
|
||||
|
||||
# Session 相关
|
||||
#session:
|
||||
#
|
||||
# # 全局会话超时,单位:毫秒, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||
# # 注意:如果超时超过30m,你还需要同步修改当前配置文件的属性:j2cache.caffeine.region.sessionCache 超时时间,大于这个值。
|
||||
# sessionTimeout: 1800000
|
||||
#
|
||||
# # PC设备会话超时参数设置,登录请求参数加 param_deviceType=pc 时有效
|
||||
# #pcSessionTimeout: 1800000
|
||||
#
|
||||
# # 手机APP设备会话超时参数设置,登录请求参数加 param_deviceType=mobileApp 时有效
|
||||
# #mobileAppSessionTimeout: 43200000
|
||||
#
|
||||
# # 定时清理失效会话,清理用户直接关闭浏览器造成的孤立会话
|
||||
# sessionTimeoutClean: 1200000
|
||||
#
|
||||
# # 会话唯一标识SessionId在Cookie中的名称。
|
||||
# sessionIdCookieName: jeesite.session.id
|
||||
# #sessionIdCookiePath: ${server.servlet.context-path}
|
||||
#
|
||||
# # 共享的SessionId的Cookie名称,保存到跟路径下,第三方应用获取。同一域名下多个项目时需设置共享Cookie的名称。
|
||||
# #shareSessionIdCookieName: ${session.sessionIdCookieName}
|
||||
#
|
||||
# # 其它 SimpleCookie 参数(v4.2.3)
|
||||
# #sessionIdCookieSecure: false
|
||||
# #sessionIdCookieHttpOnly: true
|
||||
# #sessionIdCookieSameSite: LAX
|
||||
#
|
||||
# # 设置接收 SessionId 请求参数和请求头的名称
|
||||
# sessionIdParamName: __sid
|
||||
# sessionIdHeaderName: x-token
|
||||
#
|
||||
# # 当直接通过 __sid 参数浏览器访问页面时,可将直接将 __sid 写入 Cookie 应用于后面的访问
|
||||
# # 访问地址举例:http://host/js/a/index?__sid=123456&__cookie=true
|
||||
# writeCookieParamName: __cookie
|
||||
#
|
||||
# # 记住我的请求参数和请求头的名称(v4.2.3)
|
||||
# rememberMeHeaderName: x-remember
|
||||
#
|
||||
# 系统缓存配置
|
||||
#j2cache:
|
||||
#
|
||||
# # 一级缓存
|
||||
# caffeine:
|
||||
# region:
|
||||
# #[cacheName]: size, xxxx[s|m|h|d]
|
||||
# default: 10000, 1h
|
||||
# sessionCache: 100000, 12h
|
||||
#
|
||||
# # 二级缓存
|
||||
# redis:
|
||||
# # 存储模式 (generic|hash)
|
||||
# storage: hash
|
||||
# # 通知订阅的通道名
|
||||
# channel: j2cache
|
||||
# # 缓存命名空间名
|
||||
# namespace: jeesite
|
||||
#
|
||||
# # 通知订阅
|
||||
# broadcast:
|
||||
# # 缓存清理模式
|
||||
# # passive -> 被动清除,一级缓存过期进行通知各节点清除一二级缓存
|
||||
# # active -> 主动清除,二级缓存过期主动通知各节点清除,优点在于所有节点可以同时收到缓存清除,存储模式需要设置为 generic
|
||||
# # blend -> 两种模式一起运作,对于各个节点缓存准确以及及时性要求高的可以使用,正常用前两种模式中一个就可
|
||||
# cache_clean_mode: passive
|
||||
|
||||
# MyBatis 相关
|
||||
#mybatis:
|
||||
#
|
||||
# # @MyBatisDao、Aliases 扫描基础包,如果多个,用“,”分隔
|
||||
# scanBasePackage: com.jeesite.modules
|
||||
#
|
||||
# # TypeHandlers 扫描基础包,如果多个,用“,”分隔
|
||||
# scanTypeHandlersPackage: ~
|
||||
#
|
||||
# # 是否开启 JDBC 管理事务,默认 Spring 管理事务 v4.2.3
|
||||
# jdbcTransaction: false
|
||||
#
|
||||
# # Mapper文件刷新线程
|
||||
# mapper:
|
||||
# refresh:
|
||||
# enabled: true
|
||||
# delaySeconds: 60
|
||||
# sleepSeconds: 3
|
||||
# mappingPath: mappings
|
||||
|
||||
# Web 相关
|
||||
#web:
|
||||
#
|
||||
# # AJAX 接受参数名和请求头名(v4.3.0)
|
||||
# ajaxParamName: __ajax
|
||||
# ajaxHeaderName: x-ajax
|
||||
#
|
||||
# # MVC 视图相关
|
||||
# view:
|
||||
#
|
||||
# # 系统主题名称,主题视图优先级最高,如果主题下无这个视图文件则访问默认视图
|
||||
# # 引入页面头部:'/themes/'+themeName+'/include/header.html'
|
||||
# # 引入页面尾部:'/themes/'+themeName+'/include/footer.html'
|
||||
# themeName: default
|
||||
#
|
||||
# # 使用智能参数接收器,同时支持 JSON 和 FormData 的参数接受
|
||||
# smartMethodArgumentResolver: true
|
||||
#
|
||||
# # 使用 .json、.xml 后缀匹配返回视图数据(Spring官方已不推荐使用)
|
||||
# favorPathExtension: false
|
||||
# # 使用 __ajax=json、__ajax=xml 后缀匹配返回视图数据
|
||||
# favorParameter: true
|
||||
# # 使用 x-ajax=json、x-ajax=xml 请求头匹配返回视图数据
|
||||
# favorHeader: true
|
||||
#
|
||||
# # MVC 拦截器
|
||||
# interceptor:
|
||||
#
|
||||
# # 后台管理日志记录拦截器
|
||||
# log:
|
||||
# enabled: true
|
||||
# addPathPatterns: >
|
||||
# ${adminPath}/**
|
||||
# excludePathPatterns: >
|
||||
# ${adminPath}/index,
|
||||
# ${adminPath}/login,
|
||||
# ${adminPath}/desktop,
|
||||
# ${adminPath}/index/menuTree,
|
||||
# ${adminPath}/sys/online/count,
|
||||
# ${adminPath}/state/server/rtInfo,
|
||||
# ${adminPath}/**/treeData,
|
||||
# ${adminPath}/file/**,
|
||||
# ${adminPath}/tags/*,
|
||||
# ${adminPath}/msg/**
|
||||
#
|
||||
# # 前台自动切换到手机视图拦截器
|
||||
# mobile:
|
||||
# enabled: false
|
||||
# addPathPatterns: >
|
||||
# ${frontPath}/**
|
||||
# excludePathPatterns: ~
|
||||
#
|
||||
# # 静态文件后缀,过滤静态文件,以提高访问性能。
|
||||
# staticFile: .css,.js,.map,.png,.jpg,.gif,.jpeg,.bmp,.ico,.swf,.psd,.htc,.crx,.xpi,.exe,.ipa,.apk,.otf,.eot,.svg,.ttf,.woff,.woff2
|
||||
#
|
||||
# # 静态文件后缀,排除的url路径,指定哪些uri路径不进行静态文件过滤。
|
||||
# staticFileExcludeUri: /druid/
|
||||
#
|
||||
# # 静态资源路径前缀,可做CDN加速优化
|
||||
# staticPrefix: /static
|
||||
#
|
||||
# # 严格模式(更严格的数据安全验证)
|
||||
# strictMode: false
|
||||
#
|
||||
# # 自定义正则表达式验证(主键、登录名)
|
||||
# validator:
|
||||
# id: '[a-zA-Z0-9_\-/#\u4e00-\u9fa5]{0,64}'
|
||||
# user.loginCode: '[a-zA-Z0-9_\u4e00-\u9fa5]{4,20}'
|
||||
#
|
||||
# # 默认不启用(为兼用旧版保留,建议使用 CORS)
|
||||
# jsonp:
|
||||
# enabled: false
|
||||
# callback: __callback
|
||||
#
|
||||
# # 核心模块的Web功能(仅作为微服务时设为false)
|
||||
# core:
|
||||
# enabled: true
|
||||
#
|
||||
# # 在线API文档工具
|
||||
# swagger:
|
||||
# enabled: true
|
||||
|
||||
# 错误页面500.html是否输出错误信息(正式环境,为提供安全性可设置为false)
|
||||
#error:
|
||||
# page:
|
||||
# printErrorInfo: true
|
||||
|
||||
#======================================#
|
||||
#======== FileUpload settings =========#
|
||||
#======================================#
|
||||
|
||||
#file:
|
||||
# enabled: true
|
||||
#
|
||||
# # 文件上传根路径,设置路径中不允许包含“userfiles”,在指定目录中系统会自动创建userfiles目录,如果不设置默认为contextPath路径
|
||||
# #baseDir: D:/jeesite
|
||||
#
|
||||
# # 上传文件的相对路径(支持:yyyy, MM, dd, HH, mm, ss, E)
|
||||
# uploadPath: '{yyyy}{MM}/'
|
||||
#
|
||||
# # 上传单个文件最大字节(500M),在这之上还有 > Tomcat限制 > Nginx限制,等,此设置会覆盖 spring.http.multipart.maxFileSize 设置
|
||||
# maxFileSize: 500*1024*1024
|
||||
#
|
||||
# # 设置允许上传的文件后缀(全局设置)
|
||||
# imageAllowSuffixes: .gif,.bmp,.jpeg,.jpg,.ico,.png,.tif,.tiff,
|
||||
# mediaAllowSuffixes: .flv,.swf,.mkv,webm,.mid,.mov,.mp3,.mp4,.m4v,.mpc,.mpeg,.mpg,.swf,.wav,.wma,.wmv,.avi,.rm,.rmi,.rmvb,.aiff,.asf,.ogg,.ogv,
|
||||
# fileAllowSuffixes: .doc,.docx,.rtf,.xls,.xlsx,.csv,.ppt,.pptx,.pdf,.vsd,.txt,.md,.xml,.rar,.zip,7z,.tar,.tgz,.jar,.gz,.gzip,.bz2,.cab,.iso,.ipa,.apk,
|
||||
#
|
||||
# # 允许上传的文件内容类型(图片、word、excel、ppt)防止修改后缀恶意上传文件(默认不启用验证)
|
||||
## allowContentTypes: image/jpeg,image/gif,image/bmp,image/png,image/x-png,
|
||||
## application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,
|
||||
## application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
||||
## application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
#
|
||||
# # 上传图片自动压缩宽高,指定为 -1 不进行压缩(全局设置) v4.1.7
|
||||
# imageMaxWidth: 1024
|
||||
# imageMaxHeight: 768
|
||||
#
|
||||
# # 是否启用秒传
|
||||
# checkmd5: true
|
||||
#
|
||||
# # 是否开启分片上传
|
||||
# chunked: true
|
||||
# # 分片大小,单位字节(10M)
|
||||
# chunkSize: '10*1024*1024'
|
||||
# # 最大上传线程数
|
||||
# threads: 3
|
||||
#
|
||||
# # 是否启用检查点(支持断点续传,上传)
|
||||
# checkpoint: true
|
||||
#
|
||||
# # 是否用文件流方式下载(支持断点续传)
|
||||
# isFileStreamDown: true
|
||||
|
||||
#视频转码
|
||||
#video:
|
||||
#
|
||||
# # 视频格式转换 ffmpeg.exe 所放的路径
|
||||
# ffmpegFile: d:/tools/video/ffmpeg-4.9/bin/ffmpeg.exe
|
||||
# #ffmpegFile: d:/tools/video/libav-10.6-win64/bin/avconv.exe
|
||||
#
|
||||
# # 视频格式转换 mencoder.exe 所放的路径
|
||||
# mencoderFile: d:/tools/video/mencoder-4.9/mencoder.exe
|
||||
#
|
||||
# # 将mp4视频的元数据信息转到视频第一帧
|
||||
# qtFaststartFile: d:/tools/video/qt-faststart/qt-faststart.exe
|
||||
|
||||
# 文件管理是否启用租户模式
|
||||
#filemanager:
|
||||
# useCorpModel: false
|
||||
|
||||
#======================================#
|
||||
#========== Message settings ==========#
|
||||
#======================================#
|
||||
|
||||
# 消息提醒中心(专业版)
|
||||
#msg:
|
||||
# enabled: false
|
||||
#
|
||||
# # 是否开启实时发送消息(保存消息后立即检查未读消息并发送),分布式部署下请单独配置消息发送服务,不建议开启此选项。
|
||||
# realtime:
|
||||
# # 是否开启
|
||||
# enabled: true
|
||||
# # 消息实时推送任务Bean名称
|
||||
# beanName: msgLocalPushTask
|
||||
|
||||
# # 推送失败次数,如果推送次数超过了设定次数,仍不成功,则放弃并保存到历史
|
||||
# pushFailNumber: 3
|
||||
|
||||
# # 邮件发送参数
|
||||
# email:
|
||||
# beanName: emailSendService
|
||||
# fromAddress: test@163.com
|
||||
# fromPassword: 123456
|
||||
# fromHostName: smtp.163.com
|
||||
# sslOnConnect: false
|
||||
# sslSmtpPort: 994
|
||||
#
|
||||
# # 短信网关
|
||||
# sms:
|
||||
# beanName: smsSendService
|
||||
# url: http://localhost:80/msg/sms/send
|
||||
# data: username=jeesite&password=jeesite.com
|
||||
# prefix: 【JeeSite】
|
||||
# suffix: ~
|
||||
|
||||
#======================================#
|
||||
#========== Project settings ==========#
|
||||
#======================================#
|
||||
21
web-api/src/main/resources/config/beetl.properties
Normal file
21
web-api/src/main/resources/config/beetl.properties
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
#设置与beetl-default.properties相同的属性将被覆盖默认设置
|
||||
|
||||
##导入项目中的调用静态方法类(项目中设置,自动合并IMPORT_PACKAGE设置)
|
||||
#IMPORT_PACKAGE_PROJECT=\
|
||||
# com.jeesite.modules.project.utils.;\
|
||||
|
||||
## 内置的方法
|
||||
#FN.date = org.beetl.ext.fn.DateFunction
|
||||
|
||||
##内置的功能包
|
||||
#FNP.strutil = org.beetl.ext.fn.StringUtil
|
||||
|
||||
##内置的格式化函数
|
||||
#FT.dateFormat = org.beetl.ext.format.DateFormat
|
||||
|
||||
##内置的默认格式化函数
|
||||
#FTC.java.util.Date = org.beetl.ext.format.DateFormat
|
||||
|
||||
## 标签类
|
||||
#TAG.include= org.beetl.ext.tag.IncludeTag
|
||||
61
web-api/src/main/resources/config/logback-spring.xml
Normal file
61
web-api/src/main/resources/config/logback-spring.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false" scan="false">
|
||||
|
||||
<!-- Log file path -->
|
||||
<property name="log.path" value="${logPath:-${java.io.tmpdir:-.}}/logs" />
|
||||
|
||||
<!-- Framework level setting -->
|
||||
<include resource="config/logger-core.xml"/>
|
||||
|
||||
<!-- Project level setting -->
|
||||
<!-- <logger name="your.package" level="DEBUG" /> -->
|
||||
|
||||
<!-- Console log output -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Log file debug output -->
|
||||
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/debug.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
|
||||
</encoder>
|
||||
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>DENY</onMatch>
|
||||
<onMismatch>NEUTRAL</onMismatch>
|
||||
</filter>-->
|
||||
</appender>
|
||||
|
||||
<!-- Log file error output -->
|
||||
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||
<root level="WARN">
|
||||
<appender-ref ref="console" />
|
||||
<appender-ref ref="debug" />
|
||||
<appender-ref ref="error" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
75
web-api/src/main/resources/db/create/h2/test.sql
Normal file
75
web-api/src/main/resources/db/create/h2/test.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date datetime,
|
||||
test_datetime datetime,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_sort int,
|
||||
test_data_id varchar(64),
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date datetime,
|
||||
test_datetime datetime,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
tree_name varchar(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date datetime NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date datetime NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
);
|
||||
|
||||
|
||||
|
||||
75
web-api/src/main/resources/db/create/mssql/test.sql
Normal file
75
web-api/src/main/resources/db/create/mssql/test.sql
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE [test_data]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[test_input] varchar(200),
|
||||
[test_textarea] nvarchar(200),
|
||||
[test_select] varchar(10),
|
||||
[test_select_multiple] varchar(200),
|
||||
[test_radio] varchar(10),
|
||||
[test_checkbox] varchar(200),
|
||||
[test_date] datetime,
|
||||
[test_datetime] datetime,
|
||||
[test_user_code] varchar(64),
|
||||
[test_office_code] varchar(64),
|
||||
[test_area_code] varchar(64),
|
||||
[test_area_name] nvarchar(100),
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE [test_data_child]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[test_sort] int,
|
||||
[test_data_id] varchar(64),
|
||||
[test_input] varchar(200),
|
||||
[test_textarea] nvarchar(200),
|
||||
[test_select] varchar(10),
|
||||
[test_select_multiple] varchar(200),
|
||||
[test_radio] varchar(10),
|
||||
[test_checkbox] varchar(200),
|
||||
[test_date] datetime,
|
||||
[test_datetime] datetime,
|
||||
[test_user_code] varchar(64),
|
||||
[test_office_code] varchar(64),
|
||||
[test_area_code] varchar(64),
|
||||
[test_area_name] nvarchar(100),
|
||||
PRIMARY KEY ([id])
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE [test_tree]
|
||||
(
|
||||
[tree_code] varchar(64) NOT NULL,
|
||||
[parent_code] varchar(64) NOT NULL,
|
||||
[parent_codes] varchar(1000) NOT NULL,
|
||||
[tree_sort] decimal(10) NOT NULL,
|
||||
[tree_sorts] varchar(1000) NOT NULL,
|
||||
[tree_leaf] char(1) NOT NULL,
|
||||
[tree_level] decimal(4) NOT NULL,
|
||||
[tree_names] varchar(1000) NOT NULL,
|
||||
[tree_name] nvarchar(200) NOT NULL,
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
[update_by] varchar(64) NOT NULL,
|
||||
[update_date] datetime NOT NULL,
|
||||
[remarks] nvarchar(500),
|
||||
PRIMARY KEY ([tree_code])
|
||||
);
|
||||
|
||||
|
||||
|
||||
76
web-api/src/main/resources/db/create/mysql/test.sql
Normal file
76
web-api/src/main/resources/db/create/mysql/test.sql
Normal file
@@ -0,0 +1,76 @@
|
||||
SET SESSION FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
test_input varchar(200) COMMENT '单行文本',
|
||||
test_textarea varchar(200) COMMENT '多行文本',
|
||||
test_select varchar(10) COMMENT '下拉框',
|
||||
test_select_multiple varchar(200) COMMENT '下拉多选',
|
||||
test_radio varchar(10) COMMENT '单选框',
|
||||
test_checkbox varchar(200) COMMENT '复选框',
|
||||
test_date datetime COMMENT '日期选择',
|
||||
test_datetime datetime COMMENT '日期时间',
|
||||
test_user_code varchar(64) COMMENT '用户选择',
|
||||
test_office_code varchar(64) COMMENT '机构选择',
|
||||
test_area_code varchar(64) COMMENT '区域选择',
|
||||
test_area_name varchar(100) COMMENT '区域名称',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '测试数据';
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
test_sort int COMMENT '排序号',
|
||||
test_data_id varchar(64) COMMENT '父表主键',
|
||||
test_input varchar(200) COMMENT '单行文本',
|
||||
test_textarea varchar(200) COMMENT '多行文本',
|
||||
test_select varchar(10) COMMENT '下拉框',
|
||||
test_select_multiple varchar(200) COMMENT '下拉多选',
|
||||
test_radio varchar(10) COMMENT '单选框',
|
||||
test_checkbox varchar(200) COMMENT '复选框',
|
||||
test_date datetime COMMENT '日期选择',
|
||||
test_datetime datetime COMMENT '日期时间',
|
||||
test_user_code varchar(64) COMMENT '用户选择',
|
||||
test_office_code varchar(64) COMMENT '机构选择',
|
||||
test_area_code varchar(64) COMMENT '区域选择',
|
||||
test_area_name varchar(100) COMMENT '区域名称',
|
||||
PRIMARY KEY (id)
|
||||
) COMMENT = '测试数据子表';
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL COMMENT '节点编码',
|
||||
parent_code varchar(64) NOT NULL COMMENT '父级编号',
|
||||
parent_codes varchar(1000) NOT NULL COMMENT '所有父级编号',
|
||||
tree_sort decimal(10) NOT NULL COMMENT '排序号(升序)',
|
||||
tree_sorts varchar(1000) NOT NULL COMMENT '所有排序号',
|
||||
tree_leaf char(1) NOT NULL COMMENT '是否最末级',
|
||||
tree_level decimal(4) NOT NULL COMMENT '层次级别',
|
||||
tree_names varchar(1000) NOT NULL COMMENT '全节点名',
|
||||
tree_name varchar(200) NOT NULL COMMENT '节点名称',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) NOT NULL COMMENT '更新者',
|
||||
update_date datetime NOT NULL COMMENT '更新时间',
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
PRIMARY KEY (tree_code)
|
||||
) COMMENT = '测试树表';
|
||||
|
||||
|
||||
|
||||
132
web-api/src/main/resources/db/create/oracle/test.sql
Normal file
132
web-api/src/main/resources/db/create/oracle/test.sql
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_input varchar2(200),
|
||||
test_textarea nvarchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_area_code varchar2(64),
|
||||
test_area_name nvarchar2(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
test_sort number(10,0),
|
||||
test_data_id varchar2(64),
|
||||
test_input varchar2(200),
|
||||
test_textarea nvarchar2(200),
|
||||
test_select varchar2(10),
|
||||
test_select_multiple varchar2(200),
|
||||
test_radio varchar2(10),
|
||||
test_checkbox varchar2(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar2(64),
|
||||
test_office_code varchar2(64),
|
||||
test_area_code varchar2(64),
|
||||
test_area_name nvarchar2(100),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar2(64) NOT NULL,
|
||||
parent_code varchar2(64) NOT NULL,
|
||||
parent_codes varchar2(1000) NOT NULL,
|
||||
tree_sort number(10) NOT NULL,
|
||||
tree_sorts varchar2(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level number(4) NOT NULL,
|
||||
tree_names varchar2(1000) NOT NULL,
|
||||
tree_name nvarchar2(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar2(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks nvarchar2(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE test_data IS '测试数据';
|
||||
COMMENT ON COLUMN test_data.id IS '编号';
|
||||
COMMENT ON COLUMN test_data.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
|
||||
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_data.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_data.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_data.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_data.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_data.remarks IS '备注信息';
|
||||
COMMENT ON TABLE test_data_child IS '测试数据子表';
|
||||
COMMENT ON COLUMN test_data_child.id IS '编号';
|
||||
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
|
||||
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
|
||||
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
|
||||
COMMENT ON TABLE test_tree IS '测试树表';
|
||||
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
|
||||
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
|
||||
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
|
||||
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
|
||||
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
|
||||
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
|
||||
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
|
||||
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
|
||||
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
|
||||
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_tree.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_tree.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_tree.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
132
web-api/src/main/resources/db/create/postgresql/test.sql
Normal file
132
web-api/src/main/resources/db/create/postgresql/test.sql
Normal file
@@ -0,0 +1,132 @@
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 测试数据
|
||||
CREATE TABLE test_data
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 测试数据子表
|
||||
CREATE TABLE test_data_child
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
test_sort int,
|
||||
test_data_id varchar(64),
|
||||
test_input varchar(200),
|
||||
test_textarea varchar(200),
|
||||
test_select varchar(10),
|
||||
test_select_multiple varchar(200),
|
||||
test_radio varchar(10),
|
||||
test_checkbox varchar(200),
|
||||
test_date timestamp,
|
||||
test_datetime timestamp,
|
||||
test_user_code varchar(64),
|
||||
test_office_code varchar(64),
|
||||
test_area_code varchar(64),
|
||||
test_area_name varchar(100),
|
||||
PRIMARY KEY (id)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 测试树表
|
||||
CREATE TABLE test_tree
|
||||
(
|
||||
tree_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
tree_name varchar(200) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (tree_code)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
|
||||
/* Comments */
|
||||
|
||||
COMMENT ON TABLE test_data IS '测试数据';
|
||||
COMMENT ON COLUMN test_data.id IS '编号';
|
||||
COMMENT ON COLUMN test_data.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data.test_area_name IS '区域名称';
|
||||
COMMENT ON COLUMN test_data.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_data.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_data.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_data.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_data.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_data.remarks IS '备注信息';
|
||||
COMMENT ON TABLE test_data_child IS '测试数据子表';
|
||||
COMMENT ON COLUMN test_data_child.id IS '编号';
|
||||
COMMENT ON COLUMN test_data_child.test_sort IS '排序号';
|
||||
COMMENT ON COLUMN test_data_child.test_data_id IS '父表主键';
|
||||
COMMENT ON COLUMN test_data_child.test_input IS '单行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_textarea IS '多行文本';
|
||||
COMMENT ON COLUMN test_data_child.test_select IS '下拉框';
|
||||
COMMENT ON COLUMN test_data_child.test_select_multiple IS '下拉多选';
|
||||
COMMENT ON COLUMN test_data_child.test_radio IS '单选框';
|
||||
COMMENT ON COLUMN test_data_child.test_checkbox IS '复选框';
|
||||
COMMENT ON COLUMN test_data_child.test_date IS '日期选择';
|
||||
COMMENT ON COLUMN test_data_child.test_datetime IS '日期时间';
|
||||
COMMENT ON COLUMN test_data_child.test_user_code IS '用户选择';
|
||||
COMMENT ON COLUMN test_data_child.test_office_code IS '机构选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_code IS '区域选择';
|
||||
COMMENT ON COLUMN test_data_child.test_area_name IS '区域名称';
|
||||
COMMENT ON TABLE test_tree IS '测试树表';
|
||||
COMMENT ON COLUMN test_tree.tree_code IS '节点编码';
|
||||
COMMENT ON COLUMN test_tree.parent_code IS '父级编号';
|
||||
COMMENT ON COLUMN test_tree.parent_codes IS '所有父级编号';
|
||||
COMMENT ON COLUMN test_tree.tree_sort IS '排序号(升序)';
|
||||
COMMENT ON COLUMN test_tree.tree_sorts IS '所有排序号';
|
||||
COMMENT ON COLUMN test_tree.tree_leaf IS '是否最末级';
|
||||
COMMENT ON COLUMN test_tree.tree_level IS '层次级别';
|
||||
COMMENT ON COLUMN test_tree.tree_names IS '全节点名';
|
||||
COMMENT ON COLUMN test_tree.tree_name IS '节点名称';
|
||||
COMMENT ON COLUMN test_tree.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN test_tree.create_by IS '创建者';
|
||||
COMMENT ON COLUMN test_tree.create_date IS '创建时间';
|
||||
COMMENT ON COLUMN test_tree.update_by IS '更新者';
|
||||
COMMENT ON COLUMN test_tree.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN test_tree.remarks IS '备注信息';
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jeesite.modules.test.dao.TestDataChildDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="TestDataChild">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jeesite.modules.test.dao.TestDataDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="TestData">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
<!-- 演示Map参数和返回值,支持分页 -->
|
||||
<select id="findListForMap" resultType="map">
|
||||
SELECT * FROM test_data a
|
||||
<where>
|
||||
<if test="testInput != null and testInput != ''">
|
||||
AND a.test_input = #{testInput}
|
||||
</if>
|
||||
</where>
|
||||
<if test="page != null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jeesite.modules.test.dao.TestTreeDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="TestTree">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
5
web-api/src/main/resources/static/common/common.css
Normal file
5
web-api/src/main/resources/static/common/common.css
Normal file
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* 项目自定义的公共CSS,可覆盖jeesite.css里的样式
|
||||
*/
|
||||
5
web-api/src/main/resources/static/common/common.js
Normal file
5
web-api/src/main/resources/static/common/common.js
Normal file
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* 项目自定义的公共JavaScript,可覆盖jeesite.js里的方法
|
||||
*/
|
||||
BIN
web-api/src/main/resources/static/favicon.png
Normal file
BIN
web-api/src/main/resources/static/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
51
web-api/src/main/webapp/WEB-INF/startup.bat
Normal file
51
web-api/src/main/webapp/WEB-INF/startup.bat
Normal file
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem * No deletion without permission, or be held responsible to law.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
rem pause
|
||||
rem echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
title %cd%
|
||||
|
||||
rem <20><><EFBFBD><EFBFBD>JDKĿ¼
|
||||
rem set "JAVA_HOME=%cd%\jdk1.8.0_x64"
|
||||
|
||||
rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
||||
set "CLASS_PATH=%cd%/../"
|
||||
|
||||
rem <20>Ż<EFBFBD>JVM<56><4D><EFBFBD><EFBFBD>
|
||||
set "JAVA_OPTS=-Xms512m -Xmx1024m"
|
||||
|
||||
rem <20><>ʽһ<CABD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飩
|
||||
rem set "JAVA_OPTS=%JAVA_OPTS% -Dspring.config.location=%cd%\app.yml"
|
||||
|
||||
rem <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>ز<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
rem set "JAVA_OPTS=%JAVA_OPTS% -Dspring.profiles.active=prod"
|
||||
|
||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
||||
if not "%JAVA_HOME%" == "" goto gotJavaHome
|
||||
goto end
|
||||
|
||||
:noJavaHome
|
||||
set RUN_JAVA=java
|
||||
goto runJava
|
||||
|
||||
:gotJavaHome
|
||||
set "RUN_JAVA=%JAVA_HOME%\bin\java"
|
||||
goto runJava
|
||||
|
||||
:runJava
|
||||
call "%RUN_JAVA%" -cp %CLASS_PATH% %JAVA_OPTS% org.springframework.boot.loader.WarLauncher
|
||||
goto end
|
||||
|
||||
:end
|
||||
pause
|
||||
33
web-api/src/main/webapp/WEB-INF/startup.sh
Normal file
33
web-api/src/main/webapp/WEB-INF/startup.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# /**
|
||||
# * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
# * No deletion without permission, or be held responsible to law.
|
||||
# *
|
||||
# * Author: ThinkGem@163.com
|
||||
# */
|
||||
echo ""
|
||||
echo "[信息] 运行Web工程。"
|
||||
echo ""
|
||||
|
||||
# 设置JDK目录
|
||||
# JAVA_HOME="$PWD/jdk1.8.0_x64"
|
||||
|
||||
# 设置类加载路径
|
||||
CLASS_PATH="$PWD/../"
|
||||
|
||||
# 优化JVM参数
|
||||
JAVA_OPTS="-Xms512m -Xmx1024m"
|
||||
|
||||
# 方式一、配置外部自定义的属性文件(建议)
|
||||
# JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=$PWD/app.yml"
|
||||
|
||||
# 方式二、配置环境名称,加载不同的属性文件
|
||||
# JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=prod"
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
RUN_JAVA=java
|
||||
else
|
||||
RUN_JAVA="$JAVA_HOME"/bin/java
|
||||
fi
|
||||
|
||||
exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
|
||||
18
web-api/src/main/webapp/WEB-INF/web.xml
Normal file
18
web-api/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
|
||||
version="3.1">
|
||||
|
||||
<display-name>JeeSite</display-name>
|
||||
|
||||
<error-page>
|
||||
<error-code>500</error-code>
|
||||
<location>/error/500</location>
|
||||
</error-page>
|
||||
<error-page>
|
||||
<error-code>404</error-code>
|
||||
<location>/error/404</location>
|
||||
</error-page>
|
||||
|
||||
</web-app>
|
||||
33
web-api/src/test/java/com/jeesite/test/InitData.java
Normal file
33
web-api/src/test/java/com/jeesite/test/InitData.java
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import com.jeesite.common.tests.BaseInitDataTests;
|
||||
import com.jeesite.modules.Application;
|
||||
|
||||
/**
|
||||
* 初始化数据表
|
||||
* @author ThinkGem
|
||||
* @version 2020-5-26
|
||||
*/
|
||||
@ActiveProfiles("test")
|
||||
@SpringBootTest(classes=Application.class)
|
||||
public class InitData extends BaseInitDataTests {
|
||||
|
||||
@Test
|
||||
public void initData01() throws Exception{
|
||||
logger.info("数据库初始化完成。");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initProperty() {
|
||||
System.setProperty("jeesite.initdata", "true");
|
||||
}
|
||||
|
||||
}
|
||||
51
web-api/src/test/java/com/jeesite/test/InsertBatchTest.java
Normal file
51
web-api/src/test/java/com/jeesite/test/InsertBatchTest.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import com.jeesite.common.callback.MethodCallback;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.tests.BaseSpringContextTests;
|
||||
import com.jeesite.modules.Application;
|
||||
import com.jeesite.modules.test.dao.TestDataDao;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
|
||||
/**
|
||||
* 批量插入测试
|
||||
* @author ThinkGem
|
||||
* @version 2019年10月28日
|
||||
*/
|
||||
@ActiveProfiles("test")
|
||||
@SpringBootTest(classes=Application.class)
|
||||
public class InsertBatchTest extends BaseSpringContextTests {
|
||||
|
||||
@Autowired
|
||||
private TestDataDao testDataDao;
|
||||
|
||||
@Test
|
||||
public void testData() throws Exception{
|
||||
List<TestData> list = ListUtils.newArrayList();
|
||||
for(int i=0; i<5000; i++){
|
||||
TestData testData = new TestData();
|
||||
testData.setTestInput("test"+i);
|
||||
list.add(testData);
|
||||
}
|
||||
ListUtils.pageList(list, 100, new MethodCallback() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object execute(Object... objs) {
|
||||
return testDataDao.insertBatch((List<TestData>)objs[0]);
|
||||
}
|
||||
});
|
||||
list = testDataDao.findList(new TestData());
|
||||
System.out.println("size: " + list.size());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.tests.BaseSpringContextTests;
|
||||
import com.jeesite.modules.Application;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
|
||||
/**
|
||||
* 多数据源并发测试<br>
|
||||
* 1、将 TestDataChildDao 的数据源设置为 ds2<br>
|
||||
* 2、将 TestDataChild 的表名设置为 test_data_child2<br>
|
||||
* 3、配置 ds2 数据源,并创建 test_data_child2 表
|
||||
* @author ThinkGem
|
||||
* @version 2019-6-26
|
||||
*/
|
||||
@ActiveProfiles("test")
|
||||
@SpringBootTest(classes=Application.class)
|
||||
public class MultiDataSourceTest extends BaseSpringContextTests {
|
||||
|
||||
@Autowired
|
||||
private TestDataService testDataService;
|
||||
|
||||
@Test
|
||||
public void testData() throws Exception{
|
||||
ExecutorService pool = Executors.newCachedThreadPool();
|
||||
CountDownLatch latch = new CountDownLatch(10);
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try{
|
||||
Thread.sleep(IdGen.randomInt(1000, 3000));
|
||||
TestData testData = new TestData();
|
||||
testData.setTestDataChildList(ListUtils.newArrayList(
|
||||
new TestDataChild(), new TestDataChild(), new TestDataChild()));
|
||||
testDataService.save(testData);
|
||||
List<TestData> list = testDataService.findList(new TestData());
|
||||
System.out.println("size: " + list.size());
|
||||
list.forEach(e -> {
|
||||
System.out.println("get: " + testDataService.get(e));
|
||||
});
|
||||
} catch (Exception e) {
|
||||
System.err.println(e.getMessage());
|
||||
} finally {
|
||||
latch.countDown();
|
||||
}
|
||||
}
|
||||
};
|
||||
for (int i = 0; i < latch.getCount(); i++) {
|
||||
pool.execute(runnable);
|
||||
}
|
||||
latch.await();
|
||||
pool.shutdown();
|
||||
}
|
||||
|
||||
}
|
||||
25
web-api/src/test/java/com/jeesite/test/RememberMeKeyGen.java
Normal file
25
web-api/src/test/java/com/jeesite/test/RememberMeKeyGen.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
*/
|
||||
package com.jeesite.test;
|
||||
|
||||
import org.apache.shiro.crypto.AesCipherService;
|
||||
|
||||
/**
|
||||
* v4.1.8 开始将不为记住我功能,设置默认密钥,即启动系统时生成新密钥。
|
||||
* 这样会造成一个问题,比如:重启服务后,记住登录的用户因为解密失败,而需要重新登录。
|
||||
* 为了解决这个问题,您可以通过这个类获取一个新密钥,设置到 shiro.rememberMe.secretKey 中即可。
|
||||
* 另外,如果你从配置文件里将 shiro.rememberMe.secretKey 设置为空,启动系统时也会自动设置一个新的密钥。
|
||||
* @author ThinkGem
|
||||
* @version 2019年11月6日
|
||||
*/
|
||||
public class RememberMeKeyGen {
|
||||
|
||||
public static void main(String[] args) {
|
||||
byte[] cipherKey = new AesCipherService().generateNewKey().getEncoded();
|
||||
String secretKey = org.apache.shiro.codec.Base64.encodeToString(cipherKey);
|
||||
System.out.println("shiro.rememberMe.secretKey = " + secretKey);
|
||||
}
|
||||
|
||||
}
|
||||
19
web-api/src/test/java/logback-test.xml
Normal file
19
web-api/src/test/java/logback-test.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false" scan="false">
|
||||
|
||||
<!-- Framework level setting -->
|
||||
<include resource="config/logger-core.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<!-- Console log output -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
|
||||
<root level="WARN">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
@@ -13,6 +13,8 @@
|
||||
<artifactId>jeesite-web</artifactId>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<description>Web 服务,也可为分离端提供接口服务</description>
|
||||
|
||||
<name>JeeSite Web</name>
|
||||
<url>http://jeesite.com</url>
|
||||
<inceptionYear>2013-Now</inceptionYear>
|
||||
|
||||
@@ -11,9 +11,12 @@ companyName: ThinkGem
|
||||
productVersion: V5.0
|
||||
copyrightYear: 2022
|
||||
|
||||
#是否演示模式
|
||||
# 是否演示模式
|
||||
demoMode: false
|
||||
|
||||
# 专为分离端提供接口服务
|
||||
apiMode: false
|
||||
|
||||
#======================================#
|
||||
#========== Server settings ===========#
|
||||
#======================================#
|
||||
|
||||
@@ -62,7 +62,7 @@ $('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
dataGridPage: $('#dataGridPage'),
|
||||
autoGridHeight: function(){
|
||||
return $('#searchForm').parent().height() - $('#dataGridPage').height() - 45;
|
||||
return $('#searchForm').parent().height() - $('#dataGridPage').height() - 58;
|
||||
},
|
||||
columnModel: [
|
||||
{header:'${text("岗位名称")}', name:'postName', index:'a.post_name', width:200, align:"center"},
|
||||
@@ -91,7 +91,7 @@ $('#dataGrid2').dataGrid({
|
||||
searchForm: $("#searchForm2"),
|
||||
dataGridPage: $('#dataGrid2Page'),
|
||||
autoGridHeight: function(){
|
||||
return $('#searchForm2').parent().height() - $('#dataGrid2Page').height() - 45;
|
||||
return $('#searchForm2').parent().height() - $('#dataGrid2Page').height() - 58;
|
||||
},
|
||||
columnModel: [
|
||||
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<i class="fa icon-notebook"></i> 多页签应用示例
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" onclick="js.addTabPage(null, '机构列表', '${ctx}/sys/office/list')"><i class="fa fa-plus"></i> 添加页签(1)</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="b.addTabPage(null, '公司列表', '${ctx}/sys/company/list')"><i class="fa fa-plus"></i> 添加页签(2)</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="js.addTabPage(null, '机构列表', '${ctx}/sys/office/list'+p)"><i class="fa fa-plus"></i> 添加页签(1)</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="b.addTabPage(null, '公司列表', '${ctx}/sys/company/list'+p)"><i class="fa fa-plus"></i> 添加页签(2)</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="top.js.closeCurrentTabPage()"><i class="fa fa-close"></i> 关闭窗口</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,7 +26,10 @@
|
||||
<% } %>
|
||||
|
||||
<style>
|
||||
.tabpanel {padding-top:4px;}
|
||||
.tabpanel_tab_content {border:0;}
|
||||
.tabpanel_tab_content .tabpanel_move_content {background: #fff;}
|
||||
.tabpanel_content .html_content {background:#fff;padding:0;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -41,8 +44,9 @@
|
||||
}
|
||||
});
|
||||
// 打开示例页面(不可关闭)
|
||||
js.addTabPage(null, "机构列表", "${ctx}/sys/office/list", false);
|
||||
js.addTabPage(null, "用户列表", "${ctx}/sys/empUser/list", false);
|
||||
var p = '?__layer=true'; // 隐藏标题
|
||||
js.addTabPage(null, "机构列表", "${ctx}/sys/office/list"+p, false);
|
||||
js.addTabPage(null, "用户列表", "${ctx}/sys/empUser/list"+p, false);
|
||||
// 用于机构保存后的刷新列表页面(示例)
|
||||
window.win = $('#tabpanel1 iframe:first')[0].contentWindow;
|
||||
// 激活第一个页签
|
||||
@@ -59,8 +63,8 @@
|
||||
return height < 300 ? 300 : height;
|
||||
}
|
||||
});
|
||||
b.addTabPage(null, "岗位列表", "${ctx}/sys/post/list", false);
|
||||
b.addTabPage(null, "公司列表", "${ctx}/sys/company/list", false);
|
||||
b.addTabPage(null, "岗位列表", "${ctx}/sys/post/list"+p, false);
|
||||
b.addTabPage(null, "公司列表", "${ctx}/sys/company/list"+p, false);
|
||||
$('#tabpanel2 .tabpanel_mover li:first').click();
|
||||
|
||||
// 指定内页调用的 tab 对象
|
||||
|
||||
@@ -150,7 +150,7 @@ $('#dataGrid').dataGrid({
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
|
||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||
{header:'${text("操作")}', name:'actions', width:100, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('test:testData:edit')){ %>
|
||||
|
||||
Reference in New Issue
Block a user