Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanlei
zhny
Commits
21571b60
Commit
21571b60
authored
Apr 03, 2018
by
gaoliwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改项目结构
parent
aad0c089
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
582 additions
and
24 deletions
+582
-24
Test.java
src/main/java/business/Test.java
+0
-7
EducationApplication.java
src/main/java/org/rcisoft/EducationApplication.java
+3
-1
BuildTpController.java
...cisoft/business/buildtp/controller/BuildTpController.java
+89
-0
BuildTpRepository.java
...a/org/rcisoft/business/buildtp/dao/BuildTpRepository.java
+28
-0
BuildTp.java
...ain/java/org/rcisoft/business/buildtp/entity/BuildTp.java
+45
-0
BuildTpService.java
.../org/rcisoft/business/buildtp/service/BuildTpService.java
+53
-0
BuildTpServiceImpl.java
...oft/business/buildtp/service/impl/BuildTpServiceImpl.java
+96
-0
CodeServiceImpl.java
...n/java/org/rcisoft/code/service/impl/CodeServiceImpl.java
+1
-1
SecurityConfig.java
src/main/java/org/rcisoft/config/SecurityConfig.java
+1
-0
DataEntity.java
src/main/java/org/rcisoft/core/entity/DataEntity.java
+55
-0
IdEntity.java
src/main/java/org/rcisoft/core/entity/IdEntity.java
+16
-0
IdNotDataEntity.java
src/main/java/org/rcisoft/core/entity/IdNotDataEntity.java
+16
-0
DlswPageGridModel.java
src/main/java/org/rcisoft/core/model/DlswPageGridModel.java
+144
-0
JwtUser.java
src/main/java/org/rcisoft/core/model/JwtUser.java
+7
-0
UserUtil.java
src/main/java/org/rcisoft/core/util/UserUtil.java
+2
-0
SysUserMapper.java
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
+1
-0
BuildTpMapper.xml
...ain/resources/mapper/sys/buildtp/mapper/BuildTpMapper.xml
+10
-0
controller.ftl
src/main/resources/templates/codeftl/controller.ftl
+3
-3
entity.ftl
src/main/resources/templates/codeftl/entity.ftl
+1
-1
entityNotCommon.ftl
src/main/resources/templates/codeftl/entityNotCommon.ftl
+1
-1
mapper.ftl
src/main/resources/templates/codeftl/mapper.ftl
+2
-2
repository.ftl
src/main/resources/templates/codeftl/repository.ftl
+2
-2
service.ftl
src/main/resources/templates/codeftl/service.ftl
+2
-2
serviceimpl.ftl
src/main/resources/templates/codeftl/serviceimpl.ftl
+4
-4
No files found.
src/main/java/business/Test.java
deleted
100644 → 0
View file @
aad0c089
package
business
;
public
class
Test
{
public
static
void
main
(){
sysout
.
out
.
println
(
"Hello"
);
}
}
src/main/java/org/rcisoft/EducationApplication.java
View file @
21571b60
...
@@ -3,6 +3,7 @@ package org.rcisoft;
...
@@ -3,6 +3,7 @@ package org.rcisoft;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
...
@@ -18,7 +19,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -18,7 +19,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@EnableSwagger2
@EnableScheduling
@EnableScheduling
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
@MapperScan
(
basePackages
=
"org.rcisoft.**.dao"
)
//扫描dao 不需要@repository
@ComponentScan
(
basePackages
={
"org.rcisoft"
})
@MapperScan
(
basePackages
=
{
"org.rcisoft.**.dao"
,
"org.rcisoft.business.*.dao"
})
//扫描dao 不需要@repository
public
class
EducationApplication
{
public
class
EducationApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/org/rcisoft/business/buildtp/controller/BuildTpController.java
0 → 100644
View file @
21571b60
package
org
.
rcisoft
.
business
.
buildtp
.
controller
;
/*固定导入*/
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.controller.PaginationController
;
import
org.rcisoft.core.model.GridModel
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.Result
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.business.buildtp.entity.BuildTp
;
import
org.rcisoft.business.buildtp.service.BuildTpService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
*
* @author
* @date 2018-4-3 10:11:34
*/
@RestController
@RequestMapping
(
"buildtp"
)
public
class
BuildTpController
extends
PaginationController
<
BuildTp
>
{
@Autowired
private
BuildTpService
buildTpServiceImpl
;
@ApiOperation
(
value
=
"添加"
,
notes
=
"添加"
)
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
@Valid
BuildTp
buildTp
,
BindingResult
bindingResult
)
{
buildTp
.
setToken
(
getToken
());
PersistModel
data
=
buildTpServiceImpl
.
save
(
buildTp
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
buildTp
);
}
@ApiOperation
(
value
=
"逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
false
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete/{id:\\w+}"
)
public
Result
delete
(
@PathVariable
String
id
)
{
BuildTp
buildTp
=
new
BuildTp
();
buildTp
.
setBusinessId
(
id
);
buildTp
.
setToken
(
getToken
());
PersistModel
data
=
buildTpServiceImpl
.
remove
(
buildTp
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
id
);
}
@ApiOperation
(
value
=
"修改"
,
notes
=
"修改"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)})
@PutMapping
(
"/update/{id:\\w+}"
)
public
Result
update
(
@Valid
BuildTp
buildTp
,
BindingResult
bindingResult
)
{
buildTp
.
setToken
(
getToken
());
PersistModel
data
=
buildTpServiceImpl
.
merge
(
buildTp
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
buildTp
);
}
@ApiOperation
(
value
=
"查看单 "
,
notes
=
"查看单 "
)
@GetMapping
(
"/detail/{id:\\w+}"
)
public
Result
detail
(
@PathVariable
String
id
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
buildTpServiceImpl
.
findById
(
id
));
}
@ApiOperation
(
value
=
"查看 集合"
,
notes
=
"查看 集合"
)
@GetMapping
(
value
=
"/queryBuildTpByPagination"
)
public
GridModel
listByPagination
(
BuildTp
buildTp
)
{
buildTpServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
buildTp
);
return
getGridModelResponse
();
}
}
src/main/java/org/rcisoft/business/buildtp/dao/BuildTpRepository.java
0 → 100644
View file @
21571b60
package
org
.
rcisoft
.
business
.
buildtp
.
dao
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.buildtp.entity.BuildTp
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created with on 2018-4-3 10:11:34.
*/
@Repository
public
interface
BuildTpRepository
extends
BaseMapper
<
BuildTp
>
{
/**
* 分页查询 buildTp
*
*/
@Select
(
"<script>select * from build_tp where 1=1 "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BuildTp
>
queryBuildTps
(
BuildTp
buildTp
);
}
src/main/java/org/rcisoft/business/buildtp/entity/BuildTp.java
0 → 100644
View file @
21571b60
package
org
.
rcisoft
.
business
.
buildtp
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.entity.IdNotDataEntity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
/**
* Created with on 2018-4-3 10:11:34.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"build_tp"
)
public
class
BuildTp
extends
IdNotDataEntity
<
BuildTp
>
{
private
String
bldTpId
;
private
String
bldTpNm
;
public
String
getBldTpId
()
{
return
bldTpId
;
}
public
void
setBldTpId
(
String
bldTpId
)
{
this
.
bldTpId
=
bldTpId
;
}
public
String
getBldTpNm
()
{
return
bldTpNm
;
}
public
void
setBldTpNm
(
String
bldTpNm
)
{
this
.
bldTpNm
=
bldTpNm
;
}
}
src/main/java/org/rcisoft/business/buildtp/service/BuildTpService.java
0 → 100644
View file @
21571b60
package
org
.
rcisoft
.
business
.
buildtp
.
service
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.business.buildtp.entity.BuildTp
;
import
java.util.List
;
/**
* Created by on 2018-4-3 10:11:34.
*/
public
interface
BuildTpService
{
/**
* 保存
* @param buildTp
* @return
*/
PersistModel
save
(
BuildTp
buildTp
);
/**
* 逻辑删除
* @param buildTp
* @return
*/
PersistModel
remove
(
BuildTp
buildTp
);
/**
* 修改
* @param buildTp
* @return
*/
PersistModel
merge
(
BuildTp
buildTp
);
/**
* 根据id查询
* @param id
* @return
*/
BuildTp
findById
(
String
id
);
/**
* 分页查询
* @param buildTp
* @return
*/
List
<
BuildTp
>
findAllByPagination
(
PageUtil
<
BuildTp
>
paginationUtility
,
BuildTp
buildTp
);
}
src/main/java/org/rcisoft/business/buildtp/service/impl/BuildTpServiceImpl.java
0 → 100644
View file @
21571b60
package
org
.
rcisoft
.
business
.
buildtp
.
service
.
impl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.business.buildtp.dao.BuildTpRepository
;
import
org.rcisoft.business.buildtp.entity.BuildTp
;
import
org.rcisoft.business.buildtp.service.BuildTpService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* Created by on 2018-4-3 10:11:34.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
BuildTpServiceImpl
implements
BuildTpService
{
@Autowired
private
BuildTpRepository
buildTpRepository
;
/**
* 保存 buildTp
* @param buildTp
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
save
(
BuildTp
buildTp
){
//增加操作
int
line
=
buildTpRepository
.
insertSelective
(
buildTp
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
buildTp
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"新增了ID为"
+
buildTp
.
getBusinessId
()+
"的信息"
);
return
new
PersistModel
(
line
);
}
/**
* 逻辑删除
* @param buildTp
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
remove
(
BuildTp
buildTp
){
int
line
=
buildTpRepository
.
logicalDelete
(
buildTp
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
buildTp
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"逻辑删除了ID为"
+
buildTp
.
getBusinessId
()+
"的信息"
);
return
new
PersistModel
(
line
);
}
/**
* 修改 buildTp
* @param buildTp
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
merge
(
BuildTp
buildTp
){
int
line
=
buildTpRepository
.
updateByPrimaryKeySelective
(
buildTp
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
buildTp
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"修改了ID为"
+
buildTp
.
getBusinessId
()+
"的信息"
);
return
new
PersistModel
(
line
);
}
/**
* 根据id查询 buildTp
* @param id
* @return
*/
@Override
public
BuildTp
findById
(
String
id
){
return
buildTpRepository
.
selectByPrimaryKey
(
id
);
}
/**
* 分页查询 buildTp
* @param buildTp
* @return
*/
@Override
public
List
<
BuildTp
>
findAllByPagination
(
PageUtil
<
BuildTp
>
paginationUtility
,
BuildTp
buildTp
){
return
buildTpRepository
.
queryBuildTps
(
buildTp
);
}
}
src/main/java/org/rcisoft/code/service/impl/CodeServiceImpl.java
View file @
21571b60
...
@@ -154,7 +154,7 @@ public class CodeServiceImpl extends BaseService implements CodeService {
...
@@ -154,7 +154,7 @@ public class CodeServiceImpl extends BaseService implements CodeService {
String
zipPath
=
dirPath
+
".zip"
;
String
zipPath
=
dirPath
+
".zip"
;
String
zipDirPath
=
dirPath
;
String
zipDirPath
=
dirPath
;
//将. 换/
//将. 换/
String
pathPattern
=
"org.rcisoft.business"
.
replaceAll
(
"\\."
,
"\\"
+
File
.
separator
);
String
pathPattern
=
"org.rcisoft.
org.rcisoft.
business"
.
replaceAll
(
"\\."
,
"\\"
+
File
.
separator
);
//存在删除
//存在删除
dirPath
=
dirPath
+
File
.
separator
+
pathPattern
;
//!! 此行一定要在 zipPath 生成后
dirPath
=
dirPath
+
File
.
separator
+
pathPattern
;
//!! 此行一定要在 zipPath 生成后
File
dirF
=
new
File
(
dirPath
);
File
dirF
=
new
File
(
dirPath
);
...
...
src/main/java/org/rcisoft/config/SecurityConfig.java
View file @
21571b60
...
@@ -76,6 +76,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -76,6 +76,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
"/swagger-resources/**"
).
permitAll
()
.
antMatchers
(
"/swagger-resources/**"
).
permitAll
()
.
antMatchers
(
"/swagger-resources/**"
).
permitAll
()
.
antMatchers
(
"/swagger-resources/**"
).
permitAll
()
.
antMatchers
(
"/api-docs/**"
).
permitAll
()
.
antMatchers
(
"/api-docs/**"
).
permitAll
()
.
antMatchers
(
"/buildtp/**"
).
permitAll
()
//登录注册等请求过滤
.
antMatchers
(
"/auth/**"
).
permitAll
()
//登录注册等请求过滤
.
antMatchers
(
"/auth/**"
).
permitAll
()
//登录注册等请求过滤
.
antMatchers
(
"/code/**"
).
permitAll
()
//登录注册等请求过滤
.
antMatchers
(
"/code/**"
).
permitAll
()
//登录注册等请求过滤
.
antMatchers
(
"/excelUtil/**"
).
permitAll
()
//excel类
.
antMatchers
(
"/excelUtil/**"
).
permitAll
()
//excel类
...
...
src/main/java/org/rcisoft/core/entity/DataEntity.java
View file @
21571b60
...
@@ -71,4 +71,59 @@ public abstract class DataEntity<T> implements Serializable {
...
@@ -71,4 +71,59 @@ public abstract class DataEntity<T> implements Serializable {
this
.
setFlag
(
FlagStatus
.
ABNORMAL
.
getStatus
());
this
.
setFlag
(
FlagStatus
.
ABNORMAL
.
getStatus
());
}
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
Date
getUpdateDate
()
{
return
updateDate
;
}
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
}
public
String
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
String
getFlag
()
{
return
flag
;
}
public
void
setFlag
(
String
flag
)
{
this
.
flag
=
flag
;
}
}
}
src/main/java/org/rcisoft/core/entity/IdEntity.java
View file @
21571b60
...
@@ -39,4 +39,20 @@ public abstract class IdEntity<T> extends DataEntity<T> implements Serializable
...
@@ -39,4 +39,20 @@ public abstract class IdEntity<T> extends DataEntity<T> implements Serializable
public
void
setCommonBusinessId
(){
public
void
setCommonBusinessId
(){
this
.
setBusinessId
(
IdGen
.
uuid
());
this
.
setBusinessId
(
IdGen
.
uuid
());
}
}
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
public
String
getToken
()
{
return
token
;
}
public
void
setToken
(
String
token
)
{
this
.
token
=
token
;
}
}
}
\ No newline at end of file
src/main/java/org/rcisoft/core/entity/IdNotDataEntity.java
View file @
21571b60
...
@@ -39,4 +39,20 @@ public abstract class IdNotDataEntity<T> implements Serializable {
...
@@ -39,4 +39,20 @@ public abstract class IdNotDataEntity<T> implements Serializable {
public
void
setCommonBusinessId
(){
public
void
setCommonBusinessId
(){
this
.
setBusinessId
(
IdGen
.
uuid
());
this
.
setBusinessId
(
IdGen
.
uuid
());
}
}
public
String
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
String
businessId
)
{
this
.
businessId
=
businessId
;
}
public
String
getToken
()
{
return
token
;
}
public
void
setToken
(
String
token
)
{
this
.
token
=
token
;
}
}
}
\ No newline at end of file
src/main/java/org/rcisoft/core/model/DlswPageGridModel.java
View file @
21571b60
...
@@ -125,4 +125,148 @@ public class DlswPageGridModel implements GridModel {
...
@@ -125,4 +125,148 @@ public class DlswPageGridModel implements GridModel {
this
.
recordCount
=
paginationUtility
.
getTotal
();
this
.
recordCount
=
paginationUtility
.
getTotal
();
this
.
startRecord
=
paginationUtility
.
getStartRow
();
this
.
startRecord
=
paginationUtility
.
getStartRow
();
}
}
public
boolean
isSuccess
()
{
return
isSuccess
;
}
public
void
setSuccess
(
boolean
success
)
{
isSuccess
=
success
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
int
getStartRecord
()
{
return
startRecord
;
}
public
void
setStartRecord
(
int
startRecord
)
{
this
.
startRecord
=
startRecord
;
}
public
int
getNowPage
()
{
return
nowPage
;
}
public
void
setNowPage
(
int
nowPage
)
{
this
.
nowPage
=
nowPage
;
}
public
long
getRecordCount
()
{
return
recordCount
;
}
public
void
setRecordCount
(
long
recordCount
)
{
this
.
recordCount
=
recordCount
;
}
public
int
getPageCount
()
{
return
pageCount
;
}
public
void
setPageCount
(
int
pageCount
)
{
this
.
pageCount
=
pageCount
;
}
public
Map
<
String
,
Object
>
getParameters
()
{
return
parameters
;
}
public
void
setParameters
(
Map
<
String
,
Object
>
parameters
)
{
this
.
parameters
=
parameters
;
}
public
Map
<
String
,
Object
>
getFastQueryParameters
()
{
return
fastQueryParameters
;
}
public
void
setFastQueryParameters
(
Map
<
String
,
Object
>
fastQueryParameters
)
{
this
.
fastQueryParameters
=
fastQueryParameters
;
}
public
List
<
Condition
>
getAdvanceQueryConditions
()
{
return
advanceQueryConditions
;
}
public
void
setAdvanceQueryConditions
(
List
<
Condition
>
advanceQueryConditions
)
{
this
.
advanceQueryConditions
=
advanceQueryConditions
;
}
public
List
<
Sort
>
getAdvanceQuerySorts
()
{
return
advanceQuerySorts
;
}
public
void
setAdvanceQuerySorts
(
List
<
Sort
>
advanceQuerySorts
)
{
this
.
advanceQuerySorts
=
advanceQuerySorts
;
}
public
List
<
Object
>
getExhibitDatas
()
{
return
exhibitDatas
;
}
public
void
setExhibitDatas
(
List
<
Object
>
exhibitDatas
)
{
this
.
exhibitDatas
=
exhibitDatas
;
}
public
boolean
isExport
()
{
return
isExport
;
}
public
void
setExport
(
boolean
export
)
{
isExport
=
export
;
}
public
String
getExportType
()
{
return
exportType
;
}
public
void
setExportType
(
String
exportType
)
{
this
.
exportType
=
exportType
;
}
public
String
getExportFileName
()
{
return
exportFileName
;
}
public
void
setExportFileName
(
String
exportFileName
)
{
this
.
exportFileName
=
exportFileName
;
}
public
List
<
Column
>
getExportColumns
()
{
return
exportColumns
;
}
public
void
setExportColumns
(
List
<
Column
>
exportColumns
)
{
this
.
exportColumns
=
exportColumns
;
}
public
boolean
isExportAllData
()
{
return
exportAllData
;
}
public
void
setExportAllData
(
boolean
exportAllData
)
{
this
.
exportAllData
=
exportAllData
;
}
public
boolean
isExportDataIsProcessed
()
{
return
exportDataIsProcessed
;
}
public
void
setExportDataIsProcessed
(
boolean
exportDataIsProcessed
)
{
this
.
exportDataIsProcessed
=
exportDataIsProcessed
;
}
public
List
<
Map
<
String
,
Object
>>
getExportDatas
()
{
return
exportDatas
;
}
public
void
setExportDatas
(
List
<
Map
<
String
,
Object
>>
exportDatas
)
{
this
.
exportDatas
=
exportDatas
;
}
}
}
src/main/java/org/rcisoft/core/model/JwtUser.java
View file @
21571b60
...
@@ -37,6 +37,9 @@ public class JwtUser implements UserDetails{
...
@@ -37,6 +37,9 @@ public class JwtUser implements UserDetails{
this
.
authorities
=
authorities
;
this
.
authorities
=
authorities
;
}
}
public
String
getBusinessId
()
{
return
businessId
;
}
@Override
@Override
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
...
@@ -54,18 +57,22 @@ public class JwtUser implements UserDetails{
...
@@ -54,18 +57,22 @@ public class JwtUser implements UserDetails{
return
username
;
return
username
;
}
}
@Override
@JsonIgnore
@JsonIgnore
public
boolean
isAccountNonExpired
()
{
public
boolean
isAccountNonExpired
()
{
return
true
;
return
true
;
}
}
@Override
@JsonIgnore
@JsonIgnore
public
boolean
isAccountNonLocked
()
{
public
boolean
isAccountNonLocked
()
{
return
true
;
return
true
;
}
}
@Override
@JsonIgnore
@JsonIgnore
public
boolean
isCredentialsNonExpired
()
{
public
boolean
isCredentialsNonExpired
()
{
return
true
;
return
true
;
}
}
@Override
@JsonIgnore
@JsonIgnore
public
boolean
isEnabled
()
{
public
boolean
isEnabled
()
{
return
true
;
return
true
;
...
...
src/main/java/org/rcisoft/core/util/UserUtil.java
View file @
21571b60
...
@@ -30,6 +30,8 @@ public class UserUtil {
...
@@ -30,6 +30,8 @@ public class UserUtil {
*/
*/
public
static
String
getUserInfoProp
(
String
token
,
String
prop
){
public
static
String
getUserInfoProp
(
String
token
,
String
prop
){
Claims
claims
=
JwtUtil
.
getUserClaimsFromToken
(
token
);
Claims
claims
=
JwtUtil
.
getUserClaimsFromToken
(
token
);
if
(
null
==
claims
)
return
""
;
return
claims
.
get
(
prop
).
toString
();
return
claims
.
get
(
prop
).
toString
();
}
}
...
...
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
View file @
21571b60
...
@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.*;
...
@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.*;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.entity.UserRole
;
import
org.rcisoft.sys.user.entity.UserRole
;
import
org.springframework.stereotype.Repository
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/resources/mapper/sys/buildtp/mapper/BuildTpMapper.xml
0 → 100644
View file @
21571b60
<?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=
"org.rcisoft.business.buildtp.dao.BuildTpRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.buildtp.entity.BuildTp"
>
<id
column=
"BLD_TP_ID"
jdbcType=
"VARCHAR"
property=
"bldTpId"
/>
<result
column=
"BLD_TP_NM"
jdbcType=
"VARCHAR"
property=
"bldTpNm"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
src/main/resources/templates/codeftl/controller.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
controller
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
controller
;
/*
固定导入
*/
/*
固定导入
*/
...
@@ -20,8 +20,8 @@ import org.rcisoft.core.exception.ServiceException;
...
@@ -20,8 +20,8 @@ import org.rcisoft.core.exception.ServiceException;
import
javax
.
validation
.
Valid
;
import
javax
.
validation
.
Valid
;
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.${
table
.
entityName
}
Service
;
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.${
table
.
entityName
}
Service
;
import
java
.
util
.
List
;
import
java
.
util
.
List
;
...
...
src/main/resources/templates/codeftl/entity.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
;
import
lombok
.*;
import
lombok
.*;
...
...
src/main/resources/templates/codeftl/entityNotCommon.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
;
import
lombok
.*;
import
lombok
.*;
...
...
src/main/resources/templates/codeftl/mapper.ftl
View file @
21571b60
<?xml version="1.0" encoding="UTF-8"?>
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.rcisoft.business.${table.entityName?lower_case}.dao.${table.entityName}Repository"
>
<mapper
namespace=
"org.rcisoft.
org.rcisoft.
business.${table.entityName?lower_case}.dao.${table.entityName}Repository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.${table.entityName?lower_case}.entity.${table.entityName}"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.
org.rcisoft.
business.${table.entityName?lower_case}.entity.${table.entityName}"
>
<
#list table.columnModels as item>
<
#list table.columnModels as item>
<
#if item.isKey>
<
#if item.isKey>
<id
column=
"${item.colName}"
jdbcType=
"${item.typeNameUpper}"
property=
"${item.columnNameLowerCamel}"
/>
<id
column=
"${item.colName}"
jdbcType=
"${item.typeNameUpper}"
property=
"${item.columnNameLowerCamel}"
/>
...
...
src/main/resources/templates/codeftl/repository.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
dao
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
dao
;
import
org
.
rcisoft
.
core
.
base
.
BaseMapper
;
import
org
.
rcisoft
.
core
.
base
.
BaseMapper
;
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
apache
.
ibatis
.
annotations
.
ResultMap
;
import
org
.
apache
.
ibatis
.
annotations
.
ResultMap
;
import
org
.
apache
.
ibatis
.
annotations
.
Select
;
import
org
.
apache
.
ibatis
.
annotations
.
Select
;
import
org
.
springframework
.
stereotype
.
Repository
;
import
org
.
springframework
.
stereotype
.
Repository
;
...
...
src/main/resources/templates/codeftl/service.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
;
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
core
.
model
.
PersistModel
;
import
org
.
rcisoft
.
core
.
model
.
PersistModel
;
import
org
.
rcisoft
.
core
.
aop
.
PageUtil
;
import
org
.
rcisoft
.
core
.
aop
.
PageUtil
;
...
...
src/main/resources/templates/codeftl/serviceimpl.ftl
View file @
21571b60
package
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.
impl
;
package
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.
impl
;
import
org
.
rcisoft
.
core
.
util
.
UserUtil
;
import
org
.
rcisoft
.
core
.
util
.
UserUtil
;
import
org
.
rcisoft
.
core
.
aop
.
PageUtil
;
import
org
.
rcisoft
.
core
.
aop
.
PageUtil
;
import
org
.
rcisoft
.
core
.
model
.
PersistModel
;
import
org
.
rcisoft
.
core
.
model
.
PersistModel
;
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
dao
.${
table
.
entityName
}
Repository
;
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
dao
.${
table
.
entityName
}
Repository
;
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
entity
.${
table
.
entityName
};
import
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.${
table
.
entityName
}
Service
;
import
org
.
rcisoft
.
org
.
rcisoft
.
business
.${
table
.
entityName
?
lower_case
}.
service
.${
table
.
entityName
}
Service
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
import
org
.
springframework
.
beans
.
factory
.
annotation
.
Autowired
;
...
...
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