Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
adc12f7b
"...git@ustchcs.com:gujinli1118/springboot-plus.git" did not exist on "cd9912b3f17a412439bcaf9fcf76d4d5fe1ef148"
Commit
adc12f7b
authored
Jun 23, 2018
by
xiandafu
Browse files
删除微服务和工作流,集中精力做核心功能
parent
1d83f41b
Changes
85
Hide whitespace changes
Inline
Side-by-side
admin-cloud/admin-cloud-eureka-server/.gitignore
deleted
100644 → 0
View file @
1d83f41b
/target/
admin-cloud/admin-cloud-eureka-server/bin/.gitignore
deleted
100644 → 0
View file @
1d83f41b
/target/
admin-cloud/admin-cloud-eureka-server/bin/pom.xml
deleted
100644 → 0
View file @
1d83f41b
<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.ibeetl
</groupId>
<artifactId>
admin-cloud
</artifactId>
<version>
1.1.1
</version>
</parent>
<artifactId>
admin-cloud-eureka-server
</artifactId>
<name>
admin-cloud-eureka-server
</name>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
admin-cloud/admin-cloud-eureka-server/bin/src/main/java/com/ibeetl/cloud/eurekaserver/EurekaServerApplication.class
deleted
100644 → 0
View file @
1d83f41b
File deleted
admin-cloud/admin-cloud-eureka-server/bin/src/main/resources/application.properties
deleted
100644 → 0
View file @
1d83f41b
server.port
=
8761
spring.application.name
=
eureka-service
#eureka-server
eureka.instance.hostname
=
localhost
eureka.client.register-with-eureka
=
false
eureka.client.fetch-registry
=
false
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:${server.port}/eureka/
admin-cloud/admin-cloud-eureka-server/pom.xml
deleted
100644 → 0
View file @
1d83f41b
<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.ibeetl
</groupId>
<artifactId>
admin-cloud
</artifactId>
<version>
1.1.3
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<artifactId>
admin-cloud-eureka-server
</artifactId>
<name>
admin-cloud-eureka-server
</name>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-server
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
admin-cloud/admin-cloud-eureka-server/src/main/java/com/ibeetl/cloud/eurekaserver/EurekaServerApplication.java
deleted
100644 → 0
View file @
1d83f41b
package
com.ibeetl.cloud.eurekaserver
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.server.EnableEurekaServer
;
/**
* 服务注册中心
* @author yangkebiao
*
*/
@EnableEurekaServer
@SpringBootApplication
public
class
EurekaServerApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
EurekaServerApplication
.
class
,
args
);
}
}
admin-cloud/admin-cloud-eureka-server/src/main/resources/application.properties
deleted
100644 → 0
View file @
1d83f41b
server.port
=
8761
spring.application.name
=
eureka-service
#eureka-server
eureka.instance.hostname
=
localhost
eureka.client.register-with-eureka
=
false
eureka.client.fetch-registry
=
false
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:${server.port}/eureka/
admin-cloud/pom.xml
deleted
100644 → 0
View file @
1d83f41b
<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.ibeetl
</groupId>
<artifactId>
admin
</artifactId>
<version>
1.1.3
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<artifactId>
admin-cloud
</artifactId>
<packaging>
pom
</packaging>
<name>
admin-cloud
</name>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
<maven.test.skip>
true
</maven.test.skip>
<skipTests>
true
</skipTests>
</properties>
<modules>
<module>
admin-cloud-eureka-server
</module>
</modules>
<!-- <build> -->
<!-- <plugins> -->
<!-- <plugin> -->
<!-- <groupId>org.springframework.boot</groupId> -->
<!-- <artifactId>spring-boot-maven-plugin</artifactId> -->
<!-- </plugin> -->
<!-- </plugins> -->
<!-- </build> -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
Finchley.M9
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>
spring-milestones
</id>
<name>
Spring Milestones
</name>
<url>
https://repo.spring.io/libs-milestone
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
</project>
\ No newline at end of file
admin-console/pom.xml
View file @
adc12f7b
...
@@ -5,20 +5,15 @@
...
@@ -5,20 +5,15 @@
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<parent>
<parent>
<groupId>
com.ibeetl
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin
-cloud
</artifactId>
<artifactId>
admin
</artifactId>
<version>
1.1.3
</version>
<version>
${plus.version}
</version>
<relativePath>
../
admin-cloud/
pom.xml
</relativePath>
<relativePath>
../pom.xml
</relativePath>
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.ibeetl
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin-core
</artifactId>
<artifactId>
admin-core
</artifactId>
<version>
1.1.3
</version>
<version>
${plus.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependency>
<!-- 重新覆盖mysql的版本,原因:虽然admin-core更新过mysql版本,但由于parent是admin-cloud,导致更新的版本失效 -->
<!-- 重新覆盖mysql的版本,原因:虽然admin-core更新过mysql版本,但由于parent是admin-cloud,导致更新的版本失效 -->
...
...
admin-console/src/main/java/com/ibeetl/admin/CosonleApplication.java
View file @
adc12f7b
...
@@ -5,9 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -5,9 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@EnableEurekaClient
@SpringBootApplication
@SpringBootApplication
@EnableCaching
@EnableCaching
public
class
CosonleApplication
extends
SpringBootServletInitializer
{
public
class
CosonleApplication
extends
SpringBootServletInitializer
{
...
...
admin-console/src/main/resources/application.properties
View file @
adc12f7b
...
@@ -8,13 +8,15 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
...
@@ -8,13 +8,15 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.password=starter2
#spring.datasource.password=starter2
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
beetlsql.ds.dataSource.basePackage
=
com
beetlsql.mutiple.datasource
=
dataSource
# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置
# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置
user.id
=
1
user.id
=
1
user.orgId
=
1
user.orgId
=
1
#打开审计功能,开发模式应该关闭
#打开审计功能,开发模式应该关闭
audit.enable
=
false
audit.enable
=
false
#单机情况下使用hashmap存放回话,集群下可以参考springboot 使用redis
spring.session.store-type
=
HASH_MAP
spring.session.store-type
=
HASH_MAP
#spring.cache.type=
#spring.cache.type=
spring.cache.type
=
SIMPLE
spring.cache.type
=
SIMPLE
...
...
admin-core/pom.xml
View file @
adc12f7b
...
@@ -3,11 +3,16 @@
...
@@ -3,11 +3,16 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
admin-core
</artifactId>
<artifactId>
admin-core
</artifactId>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<parent>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin
</artifactId>
<version>
${plus.version}
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<properties>
<properties>
<maven.test.skip>
true
</maven.test.skip>
<maven.test.skip>
true
</maven.test.skip>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
...
@@ -40,7 +45,7 @@
...
@@ -40,7 +45,7 @@
<dependency>
<dependency>
<groupId>
com.ibeetl
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
beetl-framework-starter
</artifactId>
<artifactId>
beetl-framework-starter
</artifactId>
<version>
1.1.4
7
.RELEASE
</version>
<version>
1.1.
5
4.RELEASE
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -93,12 +98,7 @@
...
@@ -93,12 +98,7 @@
</dependencies>
</dependencies>
<parent>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin
</artifactId>
<version>
1.1.3
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
</project>
</project>
admin-core/src/main/java/com/ibeetl/admin/core/gen/JavaCodeGen.java
View file @
adc12f7b
...
@@ -14,11 +14,13 @@ import com.ibeetl.admin.core.gen.model.Entity;
...
@@ -14,11 +14,13 @@ import com.ibeetl.admin.core.gen.model.Entity;
public
class
JavaCodeGen
implements
AutoGen
{
public
class
JavaCodeGen
implements
AutoGen
{
String
basePackage
;
String
basePackage
;
Entity
entity
;
Entity
entity
;
String
basicFunctionCode
=
null
;
static
String
CR
=
System
.
getProperty
(
"line.separator"
);
static
String
CR
=
System
.
getProperty
(
"line.separator"
);
public
JavaCodeGen
(
String
basePackage
,
Entity
entity
)
{
public
JavaCodeGen
(
String
basePackage
,
Entity
entity
,
String
basicFunctionCode
)
{
this
.
basePackage
=
basePackage
;
this
.
basePackage
=
basePackage
;
this
.
entity
=
entity
;
this
.
entity
=
entity
;
this
.
basicFunctionCode
=
basicFunctionCode
;
}
}
@Override
@Override
public
void
make
(
Target
target
,
Entity
entity
)
{
public
void
make
(
Target
target
,
Entity
entity
)
{
...
@@ -159,6 +161,7 @@ class JavaControllerGen implements AutoGen{
...
@@ -159,6 +161,7 @@ class JavaControllerGen implements AutoGen{
template
.
binding
(
"target"
,
target
);
template
.
binding
(
"target"
,
target
);
template
.
binding
(
"package"
,
gen
.
basePackage
+
".web"
);
template
.
binding
(
"package"
,
gen
.
basePackage
+
".web"
);
template
.
binding
(
"basePackage"
,
gen
.
basePackage
);
template
.
binding
(
"basePackage"
,
gen
.
basePackage
);
template
.
binding
(
"basicfunctionCode"
,
gen
.
basicFunctionCode
);
String
content
=
template
.
render
();
String
content
=
template
.
render
();
target
.
flush
(
this
,
content
);
target
.
flush
(
this
,
content
);
}
}
...
...
admin-core/src/main/java/com/ibeetl/admin/core/service/CorePlatformService.java
View file @
adc12f7b
...
@@ -117,7 +117,9 @@ public class CorePlatformService {
...
@@ -117,7 +117,9 @@ public class CorePlatformService {
public
CoreUser
getCurrentUser
()
{
public
CoreUser
getCurrentUser
()
{
return
(
CoreUser
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_USER
);
checkSession
();
CoreUser
user
=
(
CoreUser
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_USER
);
return
user
;
}
}
...
@@ -132,12 +134,14 @@ public class CorePlatformService {
...
@@ -132,12 +134,14 @@ public class CorePlatformService {
public
Long
getCurrentOrgId
()
{
public
Long
getCurrentOrgId
()
{
checkSession
();
CoreOrg
org
=
(
CoreOrg
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_ORG
);
CoreOrg
org
=
(
CoreOrg
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_ORG
);
return
org
.
getId
();
return
org
.
getId
();
}
}
public
CoreOrg
getCurrentOrg
()
{
public
CoreOrg
getCurrentOrg
()
{
checkSession
();
CoreOrg
org
=
(
CoreOrg
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_ORG
);
CoreOrg
org
=
(
CoreOrg
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_ORG
);
return
org
;
return
org
;
...
@@ -148,6 +152,13 @@ public class CorePlatformService {
...
@@ -148,6 +152,13 @@ public class CorePlatformService {
return
orgs
;
return
orgs
;
}
}
protected
void
checkSession
()
{
CoreOrg
org
=
(
CoreOrg
)
httpRequestLocal
.
getSessionValue
(
ACCESS_CURRENT_ORG
);
if
(
org
==
null
)
{
throw
new
PlatformException
(
"会话过期,重新登录"
);
}
}
public
void
setLoginUser
(
CoreUser
user
,
CoreOrg
currentOrg
,
List
<
CoreOrg
>
orgs
)
{
public
void
setLoginUser
(
CoreUser
user
,
CoreOrg
currentOrg
,
List
<
CoreOrg
>
orgs
)
{
httpRequestLocal
.
setSessionValue
(
CorePlatformService
.
ACCESS_CURRENT_USER
,
user
);
httpRequestLocal
.
setSessionValue
(
CorePlatformService
.
ACCESS_CURRENT_USER
,
user
);
...
...
admin-core/src/main/java/com/ibeetl/admin/core/util/beetl/DataAccessFunction.java
View file @
adc12f7b
...
@@ -76,7 +76,7 @@ public class DataAccessFunction implements Function {
...
@@ -76,7 +76,7 @@ public class DataAccessFunction implements Function {
List
<
CoreRoleFunction
>
roleFuns
=
platFormService
.
getRoleFunction
(
user
.
getId
(),
currentOrgId
,
functionCode
);
List
<
CoreRoleFunction
>
roleFuns
=
platFormService
.
getRoleFunction
(
user
.
getId
(),
currentOrgId
,
functionCode
);
if
(
roleFuns
.
isEmpty
()){
if
(
roleFuns
.
isEmpty
()){
//如果没有配置数据权限,是1=1,因此为角色指定功能的时候,需要设定数据权限,否则查询到所有数据
//如果没有配置数据权限,是1=1,因此为角色指定功能的时候,需要设定数据权限,否则查询到所有数据
return
"1=1 /*empty data access */ "
;
return
"1=1 /*
empty data access */ "
;
}
}
...
@@ -105,7 +105,7 @@ public class DataAccessFunction implements Function {
...
@@ -105,7 +105,7 @@ public class DataAccessFunction implements Function {
}
}
case
AllOrg:
{
case
AllOrg:
{
//sql 不包含组织机构过滤信息
//sql 不包含组织机构过滤信息
continue
;
sb
.
append
(
" 1=1 /* AllOrg */ "
)
;
}
}
case
OnlyUser:
{
case
OnlyUser:
{
List
<
Long
>
ids
=
ret
.
getUserIds
();
List
<
Long
>
ids
=
ret
.
getUserIds
();
...
...
admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java
View file @
adc12f7b
...
@@ -202,8 +202,9 @@ public class CoreCodeGenController {
...
@@ -202,8 +202,9 @@ public class CoreCodeGenController {
HtmlGen
htmlGen
=
new
HtmlGen
();
HtmlGen
htmlGen
=
new
HtmlGen
();
htmlGen
.
make
(
target
,
entity
);
htmlGen
.
make
(
target
,
entity
);
String
preffix
=
urlBase
.
replace
(
'/'
,
'.'
);
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
);
String
basicFunctionCode
=
preffix
+
"."
+
entity
.
getCode
();
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
,
basicFunctionCode
);
javaGen
.
make
(
target
,
entity
);
javaGen
.
make
(
target
,
entity
);
MdGen
mdGen
=
new
MdGen
();
MdGen
mdGen
=
new
MdGen
();
...
@@ -280,7 +281,10 @@ public class CoreCodeGenController {
...
@@ -280,7 +281,10 @@ public class CoreCodeGenController {
String
basePackage
=
data
.
getBasePackage
();
String
basePackage
=
data
.
getBasePackage
();
WebTarget
webTarget
=
new
WebTarget
(
entity
,
basePackage
);
WebTarget
webTarget
=
new
WebTarget
(
entity
,
basePackage
);
webTarget
.
setUrlBase
(
urlBase
);
webTarget
.
setUrlBase
(
urlBase
);
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
);
String
preffix
=
urlBase
.
replace
(
'/'
,
'.'
);
String
basicFunctionCode
=
preffix
+
"."
+
entity
.
getCode
();
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
,
basicFunctionCode
);
javaGen
.
make
(
webTarget
,
entity
);
javaGen
.
make
(
webTarget
,
entity
);
Map
<
String
,
String
>
content
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
content
=
new
HashMap
<
String
,
String
>();
for
(
Entry
<
Object
,
String
>
entry
:
webTarget
.
map
.
entrySet
())
{
for
(
Entry
<
Object
,
String
>
entry
:
webTarget
.
map
.
entrySet
())
{
...
@@ -352,13 +356,14 @@ public class CoreCodeGenController {
...
@@ -352,13 +356,14 @@ public class CoreCodeGenController {
@GetMapping
(
MODEL
+
"/{table}/test.json"
)
@GetMapping
(
MODEL
+
"/{table}/test.json"
)
@ResponseBody
@ResponseBody
public
void
test
(
@PathVariable
String
table
)
{
public
void
test
(
@PathVariable
String
table
)
{
String
urlBase
=
"cms"
;
Entity
entity
=
new
Entity
();
Entity
entity
=
new
Entity
();
entity
.
setCode
(
"blog"
);
entity
.
setCode
(
"blog"
);
entity
.
setName
(
"CmsBlog"
);
entity
.
setName
(
"CmsBlog"
);
entity
.
setDisplayName
(
"博客"
);
entity
.
setDisplayName
(
"博客"
);
entity
.
setTableName
(
"CMS_BLOG"
);
entity
.
setTableName
(
"CMS_BLOG"
);
entity
.
setSystem
(
"console"
);
entity
.
setSystem
(
"console"
);
Attribute
idAttr
=
new
Attribute
();
Attribute
idAttr
=
new
Attribute
();
idAttr
.
setColName
(
"id"
);
idAttr
.
setColName
(
"id"
);
...
@@ -423,8 +428,9 @@ public class CoreCodeGenController {
...
@@ -423,8 +428,9 @@ public class CoreCodeGenController {
HtmlGen
htmlGen
=
new
HtmlGen
();
HtmlGen
htmlGen
=
new
HtmlGen
();
htmlGen
.
make
(
target
,
entity
);
htmlGen
.
make
(
target
,
entity
);
String
preffix
=
urlBase
.
replace
(
'/'
,
'.'
);
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
);
String
basicFunctionCode
=
preffix
+
"."
+
entity
.
getCode
();
JavaCodeGen
javaGen
=
new
JavaCodeGen
(
basePackage
,
entity
,
basicFunctionCode
);
javaGen
.
make
(
target
,
entity
);
javaGen
.
make
(
target
,
entity
);
MdGen
mdGen
=
new
MdGen
();
MdGen
mdGen
=
new
MdGen
();
...
...
admin-core/src/main/resources/codeTemplate/java/controller.java
View file @
adc12f7b
...
@@ -65,7 +65,7 @@ public class ${entity.name}Controller{
...
@@ -65,7 +65,7 @@ public class ${entity.name}Controller{
/* 页面 */
/* 页面 */
\
@GetMapping
(
MODEL
+
"/index.do"
)
\
@GetMapping
(
MODEL
+
"/index.do"
)
\
@Function
(
"${
entity.c
ode}.query"
)
\
@Function
(
"${
basicfunctionC
ode}.query"
)
\
@ResponseBody
\
@ResponseBody
public
ModelAndView
index
()
{
public
ModelAndView
index
()
{
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/index.html"
)
;
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/index.html"
)
;
...
@@ -74,7 +74,7 @@ public class ${entity.name}Controller{
...
@@ -74,7 +74,7 @@ public class ${entity.name}Controller{
}
}
\
@GetMapping
(
MODEL
+
"/edit.do"
)
\
@GetMapping
(
MODEL
+
"/edit.do"
)
\
@Function
(
"${
entity.c
ode}.edit"
)
\
@Function
(
"${
basicfunctionC
ode}.edit"
)
\
@ResponseBody
\
@ResponseBody
public
ModelAndView
edit
(
$
{
entity
.
idAttribute
.
javaType
}
$
{
entity
.
idAttribute
.
name
})
{
public
ModelAndView
edit
(
$
{
entity
.
idAttribute
.
javaType
}
$
{
entity
.
idAttribute
.
name
})
{
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/edit.html"
);
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/edit.html"
);
...
@@ -84,7 +84,7 @@ public class ${entity.name}Controller{
...
@@ -84,7 +84,7 @@ public class ${entity.name}Controller{
}
}
\
@GetMapping
(
MODEL
+
"/add.do"
)
\
@GetMapping
(
MODEL
+
"/add.do"
)
\
@Function
(
"${
entity.c
ode}.add"
)
\
@Function
(
"${
basicfunctionC
ode}.add"
)
\
@ResponseBody
\
@ResponseBody
public
ModelAndView
add
()
{
public
ModelAndView
add
()
{
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/add.html"
);
ModelAndView
view
=
new
ModelAndView
(
"/${target.urlBase}/${entity.code}/add.html"
);
...
@@ -94,7 +94,7 @@ public class ${entity.name}Controller{
...
@@ -94,7 +94,7 @@ public class ${entity.name}Controller{
/* ajax json */
/* ajax json */
\
@PostMapping
(
MODEL
+
"/list.json"
)
\
@PostMapping
(
MODEL
+
"/list.json"
)
\
@Function
(
"${
entity.c
ode}.query"
)
\
@Function
(
"${
basicfunctionC
ode}.query"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
<
PageQuery
>
list
(
$
{
entity
.
name
}
Query
condtion
)
public
JsonResult
<
PageQuery
>
list
(
$
{
entity
.
name
}
Query
condtion
)
{
{
...
@@ -104,7 +104,7 @@ public class ${entity.name}Controller{
...
@@ -104,7 +104,7 @@ public class ${entity.name}Controller{
}
}
\
@PostMapping
(
MODEL
+
"/add.json"
)
\
@PostMapping
(
MODEL
+
"/add.json"
)
\
@Function
(
"${
entity.c
ode}.add"
)
\
@Function
(
"${
basicfunctionC
ode}.add"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
add
(
\
@Validated
(
ValidateConfig
.
ADD
.
class
)
$
{
entity
.
name
}
$
{
entity
.
code
})
public
JsonResult
add
(
\
@Validated
(
ValidateConfig
.
ADD
.
class
)
$
{
entity
.
name
}
$
{
entity
.
code
})
{
{
...
@@ -113,7 +113,7 @@ public class ${entity.name}Controller{
...
@@ -113,7 +113,7 @@ public class ${entity.name}Controller{
}
}
\
@PostMapping
(
MODEL
+
"/update.json"
)
\
@PostMapping
(
MODEL
+
"/update.json"
)
\
@Function
(
"${
entity.c
ode}.update"
)
\
@Function
(
"${
basicfunctionC
ode}.update"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
<
String
>
update
(
\
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
$
{
entity
.
name
}
$
{
entity
.
code
})
{
public
JsonResult
<
String
>
update
(
\
@Validated
(
ValidateConfig
.
UPDATE
.
class
)
$
{
entity
.
name
}
$
{
entity
.
code
})
{
boolean
success
=
$
{
service
}.
update
(
$
{
entity
.
code
});
boolean
success
=
$
{
service
}.
update
(
$
{
entity
.
code
});
...
@@ -127,7 +127,7 @@ public class ${entity.name}Controller{
...
@@ -127,7 +127,7 @@ public class ${entity.name}Controller{
\
@GetMapping
(
MODEL
+
"/view.json"
)
\
@GetMapping
(
MODEL
+
"/view.json"
)
\
@Function
(
"${
entity.c
ode}.query"
)
\
@Function
(
"${
basicfunctionC
ode}.query"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
<
$
{
entity
.
name
}>
queryInfo
(
$
{
entity
.
idAttribute
.
javaType
}
$
{
entity
.
idAttribute
.
name
})
{
public
JsonResult
<
$
{
entity
.
name
}>
queryInfo
(
$
{
entity
.
idAttribute
.
javaType
}
$
{
entity
.
idAttribute
.
name
})
{
$
{
entity
.
name
}
$
{
entity
.
code
}
=
$
{
service
}.
queryById
(
$
{
entity
.
idAttribute
.
name
});
$
{
entity
.
name
}
$
{
entity
.
code
}
=
$
{
service
}.
queryById
(
$
{
entity
.
idAttribute
.
name
});
...
@@ -135,7 +135,7 @@ public class ${entity.name}Controller{
...
@@ -135,7 +135,7 @@ public class ${entity.name}Controller{
}
}
\
@PostMapping
(
MODEL
+
"/delete.json"
)
\
@PostMapping
(
MODEL
+
"/delete.json"
)
\
@Function
(
"${
entity.c
ode}.delete"
)
\
@Function
(
"${
basicfunctionC
ode}.delete"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
delete
(
String
ids
)
{
public
JsonResult
delete
(
String
ids
)
{
if
(
ids
.
endsWith
(
","
))
{
if
(
ids
.
endsWith
(
","
))
{
...
@@ -149,7 +149,7 @@ public class ${entity.name}Controller{
...
@@ -149,7 +149,7 @@ public class ${entity.name}Controller{
@if
(
entity
.
includeExcel
){
@if
(
entity
.
includeExcel
){
\
@PostMapping
(
MODEL
+
"/excel/export.json"
)
\
@PostMapping
(
MODEL
+
"/excel/export.json"
)
\
@Function
(
"${
entity.c
ode}.export"
)
\
@Function
(
"${
basicfunctionC
ode}.export"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
$
{
entity
.
name
}
Query
condtion
)
{
public
JsonResult
<
String
>
export
(
HttpServletResponse
response
,
$
{
entity
.
name
}
Query
condtion
)
{
/**
/**
...
@@ -184,7 +184,7 @@ public class ${entity.name}Controller{
...
@@ -184,7 +184,7 @@ public class ${entity.name}Controller{
}
}
\
@PostMapping
(
MODEL
+
"/excel/import.do"
)
\
@PostMapping
(
MODEL
+
"/excel/import.do"
)
\
@Function
(
"${
entity.c
ode}.import"
)
\
@Function
(
"${
basicfunctionC
ode}.import"
)
\
@ResponseBody
\
@ResponseBody
public
JsonResult
importExcel
(
\
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
public
JsonResult
importExcel
(
\
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
if
(
file
.
isEmpty
())
{
if
(
file
.
isEmpty
())
{
...
...
admin-workflow/.gitignore
deleted
100644 → 0
View file @
1d83f41b
/target/
admin-workflow/bin/.gitignore
deleted
100644 → 0
View file @
1d83f41b
/target/
Prev
1
2
3
4
5
Next
Write
Preview
Supports
Markdown
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