Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
appbuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
appbuild
Commits
d7a0d715
Commit
d7a0d715
authored
May 25, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分生成代码逻辑
parent
c478037d
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
288 additions
and
150 deletions
+288
-150
appbuild-manage-ui/admin/src/views/app/list.vue
appbuild-manage-ui/admin/src/views/app/list.vue
+0
-11
appbuild-manager/pom.xml
appbuild-manager/pom.xml
+61
-1
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/model/GentableColumnEntity.java
.../xhx/base/system/gentable/model/GentableColumnEntity.java
+9
-9
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/service/impl/GentableServiceImpl.java
...ase/system/gentable/service/impl/GentableServiceImpl.java
+49
-21
appbuild-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
...va/com/mortals/xhx/base/system/user/model/UserEntity.java
+26
-0
appbuild-manager/src/main/java/com/mortals/xhx/common/utils/FreeMarkerUtils.java
...in/java/com/mortals/xhx/common/utils/FreeMarkerUtils.java
+19
-9
appbuild-manager/src/main/java/com/mortals/xhx/common/utils/ReadDoc.java
...r/src/main/java/com/mortals/xhx/common/utils/ReadDoc.java
+105
-62
appbuild-manager/src/main/resources/sqlmap/base/system/gentableExt.xml
...ger/src/main/resources/sqlmap/base/system/gentableExt.xml
+2
-2
appbuild-manager/src/main/resources/template/doc/api-two.md.ftl
...ld-manager/src/main/resources/template/doc/api-two.md.ftl
+6
-31
appbuild-manager/src/main/resources/template/java/httpclient.test.ftl
...ager/src/main/resources/template/java/httpclient.test.ftl
+5
-0
appbuild-manager/src/main/resources/template/java/serviceImpl-tree.java.ftl
...rc/main/resources/template/java/serviceImpl-tree.java.ftl
+1
-1
appbuild-manager/src/main/resources/template/java/web.java.ftl
...ild-manager/src/main/resources/template/java/web.java.ftl
+2
-2
pom.xml
pom.xml
+3
-1
No files found.
appbuild-manage-ui/admin/src/views/app/list.vue
View file @
d7a0d715
...
@@ -68,17 +68,6 @@ export default {
...
@@ -68,17 +68,6 @@ export default {
>
>
代码构建
代码构建
<
/el-button
>
<
/el-button
>
<
el
-
button
type
=
"
primary
"
icon
=
"
el-icon-s-order
"
size
=
"
mini
"
onClick
=
{()
=>
{
this
.
test
(
row
);
}}
>
测试抓包
<
/el-button
>
<
/div
>
<
/div
>
);
);
},
},
...
...
appbuild-manager/pom.xml
View file @
d7a0d715
...
@@ -94,16 +94,76 @@
...
@@ -94,16 +94,76 @@
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.deepoove
</groupId>
<artifactId>
poi-tl
</artifactId>
<version>
1.12.0
</version>
</dependency>
<!--
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.18</version>
<scope>provided</scope>
</dependency>-->
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-scratchpad
</artifactId>
<version>
5.2.2
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<resources>
<resources>
<resource>
<directory>
src/main/java
</directory>
<includes>
<include>
**/*.xml
</include>
<include>
**/*.properties
</include>
</includes>
</resource>
<resource>
<resource>
<directory>
src/main/resources
</directory>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
<filtering>
true
</filtering>
<includes>
<include>
**/*.xml
</include>
<include>
**/*.properties
</include>
<include>
**/*.json
</include>
<include>
**/*.yml
</include>
<include>
**/*.js
</include>
<include>
**/*.html
</include>
<include>
**/*.css
</include>
<include>
**/*.svg
</include>
<include>
**/*.jpg
</include>
<include>
**/*.jpeg
</include>
<include>
**/*.png
</include>
<include>
**/*.ico
</include>
<include>
**/*.woff2
</include>
<include>
**/*.txt
</include>
<include>
**/*.xlsx
</include>
<include>
**/*.xls
</include>
</includes>
<excludes>
<exclude>
env/*.properties
</exclude>
</excludes>
</resource>
</resource>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
false
</filtering>
<includes>
<include>
**/*.docx
</include>
<include>
**/*.ftl
</include>
</includes>
</resource>
</resources>
</resources>
<plugins>
<plugins>
...
...
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/model/GentableColumnEntity.java
View file @
d7a0d715
...
@@ -634,18 +634,18 @@ public class GentableColumnEntity extends GentableColumnEntityExt {
...
@@ -634,18 +634,18 @@ public class GentableColumnEntity extends GentableColumnEntityExt {
public
void
initAttrValue
()
{
public
void
initAttrValue
()
{
this
.
tableId
=
null
;
this
.
tableId
=
null
;
this
.
columnName
=
null
;
this
.
columnName
=
"1231"
;
this
.
columnComment
=
null
;
this
.
columnComment
=
"1313131"
;
this
.
columnType
=
null
;
this
.
columnType
=
null
;
this
.
javaType
=
null
;
this
.
javaType
=
null
;
this
.
javaField
=
null
;
this
.
javaField
=
null
;
this
.
isPrimaryKey
=
null
;
this
.
isPrimaryKey
=
0
;
this
.
isIncrement
=
null
;
this
.
isIncrement
=
0
;
this
.
isRequired
=
null
;
this
.
isRequired
=
0
;
this
.
isInsert
=
null
;
this
.
isInsert
=
0
;
this
.
isEdit
=
null
;
this
.
isEdit
=
0
;
this
.
isList
=
null
;
this
.
isList
=
0
;
this
.
isQuery
=
null
;
this
.
isQuery
=
0
;
this
.
htmlType
=
null
;
this
.
htmlType
=
null
;
this
.
defaultValue
=
null
;
this
.
defaultValue
=
null
;
this
.
sort
=
null
;
this
.
sort
=
null
;
...
...
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/service/impl/GentableServiceImpl.java
View file @
d7a0d715
This diff is collapsed.
Click to expand it.
appbuild-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java
View file @
d7a0d715
...
@@ -306,6 +306,32 @@ public class UserEntity extends UserEntityExt implements IUser {
...
@@ -306,6 +306,32 @@ public class UserEntity extends UserEntityExt implements IUser {
public
Integer
getUserType
()
{
public
Integer
getUserType
()
{
return
this
.
userType
;
return
this
.
userType
;
}
}
@Override
public
String
getToken
()
{
return
null
;
}
@Override
public
Long
getLoginTime
()
{
return
null
;
}
@Override
public
Long
getExpireTime
()
{
return
null
;
}
@Override
public
void
setExpireTime
(
Long
expireTime
)
{
}
@Override
public
String
getMenuUrl
()
{
return
null
;
}
/**
/**
* 设置 用户类型,0:系统用户 1:普通用户 2:工作人员,默认2
* 设置 用户类型,0:系统用户 1:普通用户 2:工作人员,默认2
* @param userType
* @param userType
...
...
appbuild-manager/src/main/java/com/mortals/xhx/common/utils/FreeMarkerUtils.java
View file @
d7a0d715
...
@@ -113,7 +113,8 @@ public class FreeMarkerUtils {
...
@@ -113,7 +113,8 @@ public class FreeMarkerUtils {
templates
.
add
(
"entityQuery.java.ftl"
);
templates
.
add
(
"entityQuery.java.ftl"
);
templates
.
add
(
"dao.java.ftl"
);
templates
.
add
(
"dao.java.ftl"
);
templates
.
add
(
"daoImpl.java.ftl"
);
templates
.
add
(
"daoImpl.java.ftl"
);
templates
.
add
(
"web.java.ftl"
);
// templates.add("web.java.ftl");
templates
.
add
(
"webBody.java.ftl"
);
templates
.
add
(
"webForm.java.ftl"
);
templates
.
add
(
"webForm.java.ftl"
);
templates
.
add
(
"sqlMap.xml.ftl"
);
templates
.
add
(
"sqlMap.xml.ftl"
);
templates
.
add
(
"db.sql.ftl"
);
templates
.
add
(
"db.sql.ftl"
);
...
@@ -128,7 +129,7 @@ public class FreeMarkerUtils {
...
@@ -128,7 +129,7 @@ public class FreeMarkerUtils {
templates
.
add
(
"serviceImpl.java.ftl"
);
templates
.
add
(
"serviceImpl.java.ftl"
);
templates
.
add
(
"webVueList.vue.ftl"
);
templates
.
add
(
"webVueList.vue.ftl"
);
templates
.
add
(
"VueDialogShow.vue.ftl"
);
templates
.
add
(
"VueDialogShow.vue.ftl"
);
templates
.
add
(
"webVueShow.vue.ftl"
);
//
templates.add("webVueShow.vue.ftl");
}
else
if
(
GenConstants
.
TPL_TREE
.
equals
(
tplCategory
))
{
}
else
if
(
GenConstants
.
TPL_TREE
.
equals
(
tplCategory
))
{
templates
.
add
(
"entity-tree.java.ftl"
);
templates
.
add
(
"entity-tree.java.ftl"
);
templates
.
add
(
"service-tree.java.ftl"
);
templates
.
add
(
"service-tree.java.ftl"
);
...
@@ -139,10 +140,10 @@ public class FreeMarkerUtils {
...
@@ -139,10 +140,10 @@ public class FreeMarkerUtils {
templates
.
add
(
"service.java.ftl"
);
templates
.
add
(
"service.java.ftl"
);
templates
.
add
(
"serviceImpl.java.ftl"
);
templates
.
add
(
"serviceImpl.java.ftl"
);
templates
.
add
(
"webVueList.vue.ftl"
);
templates
.
add
(
"webVueList.vue.ftl"
);
templates
.
add
(
"webVueShow.vue.ftl"
);
//
templates.add("webVueShow.vue.ftl");
templates
.
add
(
"VueDialogShow.vue.ftl"
);
templates
.
add
(
"VueDialogShow.vue.ftl"
);
}
}
templates
.
add
(
"webVueView.vue.ftl"
);
//
templates.add("webVueView.vue.ftl");
return
templates
;
return
templates
;
}
}
...
@@ -444,9 +445,14 @@ public class FreeMarkerUtils {
...
@@ -444,9 +445,14 @@ public class FreeMarkerUtils {
fileName
=
StringUtils
.
format
(
"{}/{}/service/impl/{}ServiceImpl.java"
,
javaPath
,
businessName
,
className
);
fileName
=
StringUtils
.
format
(
"{}/{}/service/impl/{}ServiceImpl.java"
,
javaPath
,
businessName
,
className
);
}
else
if
(
template
.
contains
(
"serviceImpl-tree.java.ftl"
))
{
}
else
if
(
template
.
contains
(
"serviceImpl-tree.java.ftl"
))
{
fileName
=
StringUtils
.
format
(
"{}/{}/service/impl/{}ServiceImpl.java"
,
javaPath
,
businessName
,
className
);
fileName
=
StringUtils
.
format
(
"{}/{}/service/impl/{}ServiceImpl.java"
,
javaPath
,
businessName
,
className
);
}
else
if
(
template
.
contains
(
"web.java.ftl"
))
{
}
// else if (template.contains("web.java.ftl")) {
// fileName = StringUtils.format("{}/{}/web/{}Controller.java", javaPath, businessName, className);
// }
else
if
(
template
.
contains
(
"webBody.java.ftl"
))
{
fileName
=
StringUtils
.
format
(
"{}/{}/web/{}Controller.java"
,
javaPath
,
businessName
,
className
);
fileName
=
StringUtils
.
format
(
"{}/{}/web/{}Controller.java"
,
javaPath
,
businessName
,
className
);
}
else
if
(
template
.
contains
(
"webForm.java.ftl"
))
{
}
else
if
(
template
.
contains
(
"webForm.java.ftl"
))
{
fileName
=
StringUtils
.
format
(
"{}/{}/web/{}Form.java"
,
javaPath
,
businessName
,
className
);
fileName
=
StringUtils
.
format
(
"{}/{}/web/{}Form.java"
,
javaPath
,
businessName
,
className
);
}
else
if
(
template
.
contains
(
"sqlMap.xml.ftl"
))
{
}
else
if
(
template
.
contains
(
"sqlMap.xml.ftl"
))
{
fileName
=
StringUtils
.
format
(
"{}/{}/{}Mapper.xml"
,
mybatisPath
,
businessName
,
className
);
fileName
=
StringUtils
.
format
(
"{}/{}/{}Mapper.xml"
,
mybatisPath
,
businessName
,
className
);
...
@@ -454,15 +460,19 @@ public class FreeMarkerUtils {
...
@@ -454,15 +460,19 @@ public class FreeMarkerUtils {
String
businessNameExt
=
getBusinessNameExt
(
genTable
.
getTableName
());
String
businessNameExt
=
getBusinessNameExt
(
genTable
.
getTableName
());
businessNameExt
=
StringUtils
.
replace
(
businessNameExt
,
"."
,
"/"
);
businessNameExt
=
StringUtils
.
replace
(
businessNameExt
,
"."
,
"/"
);
fileName
=
StringUtils
.
format
(
"{}/views/{}/list.vue"
,
vuePath
,
businessNameExt
);
fileName
=
StringUtils
.
format
(
"{}/views/{}/list.vue"
,
vuePath
,
businessNameExt
);
}
else
if
(
template
.
contains
(
"webVueShow.vue.ftl"
))
{
}
/* else if (template.contains("webVueShow.vue.ftl")) {
String businessNameExt = getBusinessNameExt(genTable.getTableName());
String businessNameExt = getBusinessNameExt(genTable.getTableName());
businessNameExt = StringUtils.replace(businessNameExt, ".", "/");
businessNameExt = StringUtils.replace(businessNameExt, ".", "/");
fileName = StringUtils.format("{}/views/{}/show.vue", vuePath, businessNameExt);
fileName = StringUtils.format("{}/views/{}/show.vue", vuePath, businessNameExt);
}
else
if
(
template
.
contains
(
"webVueView.vue.ftl"
))
{
}
else if (template.contains("webVueView.vue.ftl")) {
String businessNameExt = getBusinessNameExt(genTable.getTableName());
String businessNameExt = getBusinessNameExt(genTable.getTableName());
businessNameExt = StringUtils.replace(businessNameExt, ".", "/");
businessNameExt = StringUtils.replace(businessNameExt, ".", "/");
fileName = StringUtils.format("{}/views/{}/view.vue", vuePath, businessNameExt);
fileName = StringUtils.format("{}/views/{}/view.vue", vuePath, businessNameExt);
}
else
if
(
template
.
contains
(
"webVueTreeList.vue.ftl"
))
{
}*/
else
if
(
template
.
contains
(
"webVueTreeList.vue.ftl"
))
{
String
businessNameExt
=
getBusinessNameExt
(
genTable
.
getTableName
());
String
businessNameExt
=
getBusinessNameExt
(
genTable
.
getTableName
());
businessNameExt
=
StringUtils
.
replace
(
businessNameExt
,
"."
,
"/"
);
businessNameExt
=
StringUtils
.
replace
(
businessNameExt
,
"."
,
"/"
);
fileName
=
StringUtils
.
format
(
"{}/views/{}/list.vue"
,
vuePath
,
businessNameExt
);
fileName
=
StringUtils
.
format
(
"{}/views/{}/list.vue"
,
vuePath
,
businessNameExt
);
...
...
appbuild-manager/src/main/java/com/mortals/xhx/common/utils/ReadDoc.java
View file @
d7a0d715
This diff is collapsed.
Click to expand it.
appbuild-manager/src/main/resources/sqlmap/base/system/gentableExt.xml
View file @
d7a0d715
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
where table_schema = (select database())
where table_schema = (select database())
AND table_name NOT LIKE 'act_%'
AND table_name NOT LIKE 'act_%'
<!--过滤初始系统表-->
<!--过滤初始系统表-->
AND table_name NOT IN (
<!--
AND table_name NOT IN (
'mortals_xhx_gentable',
'mortals_xhx_gentable',
'mortals_xhx_gentable_column',
'mortals_xhx_gentable_column',
'mortals_xhx_idgenerator',
'mortals_xhx_idgenerator',
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
'mortals_xhx_user',
'mortals_xhx_user',
'mortals_xhx_valid_code',
'mortals_xhx_valid_code',
'mortals_xhx_area'
'mortals_xhx_area'
)
)
-->
<!-- AND table_name NOT LIKE 'mortals_xhx_gen%'-->
<!-- AND table_name NOT LIKE 'mortals_xhx_gen%'-->
AND table_name NOT IN (select tableName from mortals_xhx_gentable
AND table_name NOT IN (select tableName from mortals_xhx_gentable
...
...
appbuild-manager/src/main/resources/template/doc/api-two.md.ftl
View file @
d7a0d715
...
@@ -16,16 +16,19 @@
...
@@ -16,16 +16,19 @@
参数名称|类型|备注|必填|其它
参数名称|类型|备注|必填|其它
---|---|---|---|---
---|---|---|---|---
page|Integer|当前页|否|-
page|Integer|当前页|否|-
size|Integer|每页条数|否|
-
size|Integer|每页条数|否|
值为-1,查询所有记录
<#list columns as column>
<#list columns as column>
<#if column.isQuery == 1>
<#if column.isQuery == 1>
<#if column.javaType=="String" >
${column.javaField}|${column.javaType}|${column.columnComment}|否|字段前后添加%%模糊查询
<#else>
${column.javaField}|${column.javaType}|${column.columnComment}|否|-
${column.javaField}|${column.javaType}|${column.columnComment}|否|-
</#if>
</#if>
</#if>
</#list>
</#list>
**请求样例:**
**请求样例:**
```
```
{
{
<#list columns as column>
<#list columns as column>
<#if column.isQuery == 1>
<#if column.isQuery == 1>
...
@@ -70,15 +73,6 @@ dict|object|字典对象|-
...
@@ -70,15 +73,6 @@ dict|object|字典对象|-
{
{
"code":1,
"code":1,
"data":{
"data":{
"per_page":10,
"total":0,
"data":[],
"last_page":0,
"current_page":1
},
"query":{
"modelCode":"phxt1",
"modelName":"排号系统"
}
}
}
}
```
```
...
@@ -101,9 +95,7 @@ ${pkColumn.javaField}|${pkColumn.javaType}|主键,唯一|是|-
...
@@ -101,9 +95,7 @@ ${pkColumn.javaField}|${pkColumn.javaType}|主键,唯一|是|-
**请求样例:**
**请求样例:**
```
```
http://localhost/${RequestMapping}/edit?id=549
http://localhost/${RequestMapping}/edit?id=549
```
```
**响应参数:**
**响应参数:**
...
@@ -125,7 +117,6 @@ dict|object|字典对象|-
...
@@ -125,7 +117,6 @@ dict|object|字典对象|-
**响应消息样例:**
**响应消息样例:**
```
```
{
{
"code": 1,
"code": 1,
"data": {
"data": {
...
@@ -139,7 +130,6 @@ dict|object|字典对象|-
...
@@ -139,7 +130,6 @@ dict|object|字典对象|-
</#list>
</#list>
}
}
}
}
```
```
### 查看${functionName}
### 查看${functionName}
...
@@ -160,9 +150,7 @@ ${pkColumn.javaField}|${pkColumn.javaType}|主键,唯一|是|-
...
@@ -160,9 +150,7 @@ ${pkColumn.javaField}|${pkColumn.javaType}|主键,唯一|是|-
**请求样例:**
**请求样例:**
```
```
http://localhost/${RequestMapping}/info?id=549
http://localhost/${RequestMapping}/info?id=549
```
```
**响应参数:**
**响应参数:**
...
@@ -205,7 +193,6 @@ dict|object|字典对象|-
...
@@ -205,7 +193,6 @@ dict|object|字典对象|-
**请求方式:** POST
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新${functionName}:id为空时为新增保存,否则为更新提交
**简要描述:** 保存或更新${functionName}:id为空时为新增保存,否则为更新提交
...
@@ -222,7 +209,6 @@ ${column.javaField}|${column.javaType}|${column.columnComment}|是|-
...
@@ -222,7 +209,6 @@ ${column.javaField}|${column.javaType}|${column.columnComment}|是|-
**请求样例:**
**请求样例:**
```
```
{
{
<#list columns as column>
<#list columns as column>
<#if !column.isSuperColumn(column.javaField)>
<#if !column.isSuperColumn(column.javaField)>
...
@@ -252,19 +238,10 @@ data|object|数据对象|-
...
@@ -252,19 +238,10 @@ data|object|数据对象|-
**响应消息样例:**
**响应消息样例:**
```
```
{
{
"msg":"新增模块成功",
"msg":"新增模块成功",
"code":1,
"code":1,
"data":{
"data":{
"__mortals_form_state__":"ADD",
"id":4,
"entity":{
"createTime":1642486776780,
"id":4,
"modelCode":"phxt1",
"modelName":"排号系统4",
"updateTime":1642486776780
}
}
}
}
}
}
...
@@ -276,7 +253,7 @@ data|object|数据对象|-
...
@@ -276,7 +253,7 @@ data|object|数据对象|-
**请求URL:** ${RequestMapping}/delete
**请求URL:** ${RequestMapping}/delete
**请求方式:**
POS
T
**请求方式:**
GE
T
**内容类型:** application/json;charset=utf-8
**内容类型:** application/json;charset=utf-8
...
@@ -290,9 +267,7 @@ id|String|字符串,多个逗号分隔|是|-
...
@@ -290,9 +267,7 @@ id|String|字符串,多个逗号分隔|是|-
**请求样例:**
**请求样例:**
```
```
http://localhost:8080/${RequestMapping}/delete?id=1'
http://localhost:8080/${RequestMapping}/delete?id=1'
```
```
**响应参数:**
**响应参数:**
...
...
appbuild-manager/src/main/resources/template/java/httpclient.test.ftl
View file @
d7a0d715
###${functionName}列表
###${functionName}列表
POST {{baseUrl}}/${RequestMapping}/list
POST {{baseUrl}}/${RequestMapping}/list
Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
...
@@ -21,6 +22,7 @@ Content-Type: application/json
...
@@ -21,6 +22,7 @@ Content-Type: application/json
###${functionName}更新与保存
###${functionName}更新与保存
POST {{baseUrl}}/${RequestMapping}/save
POST {{baseUrl}}/${RequestMapping}/save
Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
...
@@ -42,15 +44,18 @@ client.global.set("${ClassName}_id", JSON.parse(response.body).data.id);
...
@@ -42,15 +44,18 @@ client.global.set("${ClassName}_id", JSON.parse(response.body).data.id);
###${functionName}查看
###${functionName}查看
GET {{baseUrl}}/${RequestMapping}/info?id={{${ClassName}_id}}
GET {{baseUrl}}/${RequestMapping}/info?id={{${ClassName}_id}}
Authorization: {{authToken}}
Accept: application/json
Accept: application/json
###${functionName}编辑
###${functionName}编辑
GET {{baseUrl}}/${RequestMapping}/edit?id={{${ClassName}_id}}
GET {{baseUrl}}/${RequestMapping}/edit?id={{${ClassName}_id}}
Authorization: {{authToken}}
Accept: application/json
Accept: application/json
###${functionName}删除
###${functionName}删除
GET {{baseUrl}}/${RequestMapping}/delete?id={{${ClassName}_id}}
GET {{baseUrl}}/${RequestMapping}/delete?id={{${ClassName}_id}}
Authorization: {{authToken}}
Accept: application/json
Accept: application/json
...
...
appbuild-manager/src/main/resources/template/java/serviceImpl-tree.java.ftl
View file @
d7a0d715
...
@@ -151,7 +151,7 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
...
@@ -151,7 +151,7 @@ public class ${ClassName}ServiceImpl extends ${Service}<${ClassName}Dao, ${Class
for
(
Iterator
<${
ClassName
}
Entity
>
iterator
=
list
.
iterator
();
iterator
.
hasNext
();
)
{
for
(
Iterator
<${
ClassName
}
Entity
>
iterator
=
list
.
iterator
();
iterator
.
hasNext
();
)
{
${
ClassName
}
Entity
${
ClassName
?
uncap_first
}
Entity
=
iterator
.
next
();
${
ClassName
}
Entity
${
ClassName
?
uncap_first
}
Entity
=
iterator
.
next
();
//
如果是顶级节点
,
遍历该父节点的所有子节点
if
(
!tempList.contains(${ClassName?uncap_first}Entity.get${treeParentCode?cap_first}())) {
if
(
!tempList.contains(${ClassName?uncap_first}Entity.get${treeParentCode?cap_first}())) {
recursionFn
(
list
,
${
ClassName
?
uncap_first
}
Entity
);
recursionFn
(
list
,
${
ClassName
?
uncap_first
}
Entity
);
returnList
.
add
(${
ClassName
?
uncap_first
}
Entity
);
returnList
.
add
(${
ClassName
?
uncap_first
}
Entity
);
...
...
appbuild-manager/src/main/resources/template/java/web.java.ftl
View file @
d7a0d715
...
@@ -5,11 +5,11 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -5,11 +5,11 @@ import org.springframework.web.multipart.MultipartFile;
import
com
.
alibaba
.
fastjson
.
JSONObject
;
import
com
.
alibaba
.
fastjson
.
JSONObject
;
<#
assign
Controller
=
"BaseCRUDJsonController"
>
<#
assign
Controller
=
"BaseCRUDJsonController"
>
<#
elseif
table
.
isShowControl
==
2
>
<#
elseif
table
.
isShowControl
==
2
>
<#
assign
Controller
=
"BaseCRUDJson
Php
Controller"
>
<#
assign
Controller
=
"BaseCRUDJson
BodyMapping
Controller"
>
<#
else
>
<#
else
>
<#
assign
Controller
=
"BaseCRUDJsonMappingController"
>
<#
assign
Controller
=
"BaseCRUDJsonMappingController"
>
</#
if
>
</#
if
>
import
com
.
mortals
.
framework
.
web
.
BaseCRUDJsonBodyMappingController
;
import
com
.
mortals
.
xhx
.
base
.
system
.
param
.
service
.
ParamService
;
import
com
.
mortals
.
xhx
.
base
.
system
.
param
.
service
.
ParamService
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMapping
;
...
...
pom.xml
View file @
d7a0d715
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<parent>
<parent>
<groupId>
com.mortals
</groupId>
<groupId>
com.mortals
</groupId>
<artifactId>
mortals-common
</artifactId>
<artifactId>
mortals-common
</artifactId>
<version>
1.1.
4
-SNAPSHOT
</version>
<version>
1.1.
5
-SNAPSHOT
</version>
</parent>
</parent>
<groupId>
com.mortals.xhx
</groupId>
<groupId>
com.mortals.xhx
</groupId>
<artifactId>
appbuild-platform
</artifactId>
<artifactId>
appbuild-platform
</artifactId>
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
</dependencies>
</dependencies>
<build>
<build>
<!--
<resources>
<resources>
<resource>
<resource>
<directory>src/main/resources</directory>
<directory>src/main/resources</directory>
...
@@ -124,6 +125,7 @@
...
@@ -124,6 +125,7 @@
<filtering>true</filtering>
<filtering>true</filtering>
</resource>
</resource>
</resources>
</resources>
-->
<plugins>
<plugins>
<plugin>
<plugin>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment