Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
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
姚本章
jz-dmp-service
Commits
23fae18b
Commit
23fae18b
authored
Mar 14, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
8b964097
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
147 additions
and
44 deletions
+147
-44
CommConstant.java
src/main/java/com/jz/common/constant/CommConstant.java
+7
-0
CustomUserService.java
...ain/java/com/jz/common/interceptor/CustomUserService.java
+1
-1
DmpDevelopTaskHistoryController.java
...p/modules/controller/DmpDevelopTaskHistoryController.java
+4
-0
DmpNavigationTreeController.java
...z/dmp/modules/controller/DmpNavigationTreeController.java
+5
-0
DmpProjectController.java
...a/com/jz/dmp/modules/controller/DmpProjectController.java
+4
-0
DmpProjectRequest.java
...com/jz/dmp/modules/controller/bean/DmpProjectRequest.java
+31
-0
DmpProjectConfigInfoController.java
...controller/projconfig/DmpProjectConfigInfoController.java
+3
-1
DmpPublicConfigInfoController.java
.../controller/projconfig/DmpPublicConfigInfoController.java
+3
-0
DmpMemberController.java
...om/jz/dmp/modules/controller/sys/DmpMemberController.java
+5
-0
DmpMemberProjectRoleController.java
...odules/controller/sys/DmpMemberProjectRoleController.java
+4
-0
DmpDevelopTask.java
src/main/java/com/jz/dmp/modules/model/DmpDevelopTask.java
+11
-0
DmpMemberService.java
...java/com/jz/dmp/modules/service/sys/DmpMemberService.java
+2
-2
DmpMemberServiceImpl.java
...jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
+2
-2
SystemCommonServiceImpl.java
...dmp/modules/service/sys/impl/SystemCommonServiceImpl.java
+26
-13
application-test.yml
src/main/resources/application-test.yml
+2
-0
DmpProjectMapper.xml
src/main/resources/mapper/dmp/DmpProjectMapper.xml
+32
-20
DmpRoleMapper.xml
src/main/resources/mapper/sys/DmpRoleMapper.xml
+5
-5
No files found.
src/main/java/com/jz/common/constant/CommConstant.java
View file @
23fae18b
...
...
@@ -97,5 +97,12 @@ public class CommConstant {
public
static
final
String
MODULAR_DATASERVICE_DEV
=
"数据服务/服务开发"
;
//数据服务/服务开发
public
static
final
String
MODULAR_DATASERVICE_ORG
=
"数据服务/组织管理"
;
//数据服务/组织管理
public
static
final
String
MODULAR_DATASERVICE_AUTHMANAG
=
"数据服务/授权管理"
;
//数据服务/授权管理
public
static
final
String
MODULAR_WORKMANG
=
"工作台管理"
;
//工作台管理
public
static
final
String
MODULAR_WORKMANG_SYSCONFIG
=
"工作台管理/系统配置"
;
//工作台管理/系统配置
public
static
final
String
MODULAR_WORKSPACEMANG
=
"工作空间管理"
;
//工作台管理
public
static
final
String
MODULAR_WORKSPACEMANG_LIST
=
"工作空间管理/工作空间列表"
;
//工作空间管理/工作空间列表
public
static
final
String
MODULAR_WORKSPACEMANG_MEMBER
=
"工作空间管理/成员管理"
;
//工作空间管理/成员管理
public
static
final
String
MODULAR_WORKSPACEMANG_SYSCONFIG
=
"工作空间管理/系统配置"
;
//工作空间管理/系统配置
}
src/main/java/com/jz/common/interceptor/CustomUserService.java
View file @
23fae18b
...
...
@@ -46,7 +46,7 @@ public class CustomUserService implements UserDetailsService {
}
if
(
user
!=
null
)
{
//设置登录用户默认项目
Integer
defaultProjectId
=
dmpMemberService
.
getDefProjectByUser
Name
(
user
.
getUsername
());
Integer
defaultProjectId
=
dmpMemberService
.
getDefProjectByUser
Id
(
user
.
getUserId
());
user
.
setCurrentProjectId
(
defaultProjectId
);
//设置UserRole
List
<
DmpRole
>
memberRoles
=
dmpRoleService
.
findMemberRolesByUserId
(
user
.
getUserId
());
...
...
src/main/java/com/jz/dmp/modules/controller/DmpDevelopTaskHistoryController.java
View file @
23fae18b
...
...
@@ -10,9 +10,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryDto
;
import
com.jz.dmp.modules.controller.bean.DmpDevelopTaskHistoryRequest
;
...
...
@@ -62,6 +64,7 @@ public class DmpDevelopTaskHistoryController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/taskVersionRollback"
)
@ApiOperation
(
value
=
"版本回滚"
,
notes
=
"版本回滚"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"任务历史版本主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"版本回滚"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseResponse
taskVersionRollback
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
Integer
id
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
...
...
@@ -82,6 +85,7 @@ public class DmpDevelopTaskHistoryController {
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改任务历史版本"
,
notes
=
"修改任务历史版本"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"修改任务历史版本"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpDevelopTaskHistory
>
edit
(
@RequestBody
DmpDevelopTaskHistory
dmpDevelopTaskHistory
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpDevelopTaskHistory
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpDevelopTaskHistory
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpNavigationTreeController.java
View file @
23fae18b
...
...
@@ -11,8 +11,10 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeDto
;
import
com.jz.dmp.modules.controller.bean.DmpNavigationTreeRequest
;
...
...
@@ -80,6 +82,7 @@ public class DmpNavigationTreeController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增DMP资源导航树"
,
notes
=
"新增DMP资源导航树"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新建任务目录"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpNavigationTree
>
add
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpNavigationTree
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTree
>();
...
...
@@ -120,6 +123,7 @@ public class DmpNavigationTreeController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/deleteById"
)
@ApiOperation
(
value
=
"删除DMP资源导航树"
,
notes
=
"删除DMP资源导航树"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"DMP资源导航树主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除任务目录"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseResponse
deleteById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
Integer
id
,
HttpServletRequest
httpRequest
)
{
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
...
...
@@ -149,6 +153,7 @@ public class DmpNavigationTreeController {
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改DMP资源导航树"
,
notes
=
"修改DMP资源导航树"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"修改任务目录"
,
optModular
=
CommConstant
.
MODULAR_DATADEV
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpNavigationTree
>
edit
(
@RequestBody
DmpNavigationTree
dmpNavigationTree
,
HttpServletRequest
httpRequest
)
{
BaseBeanResponse
<
DmpNavigationTree
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpNavigationTree
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/DmpProjectController.java
View file @
23fae18b
...
...
@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.bean.DmpProjectDto
;
import
com.jz.dmp.modules.controller.bean.DmpProjectRequest
;
...
...
@@ -82,6 +84,7 @@ public class DmpProjectController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/softDelete"
)
@ApiOperation
(
value
=
"软删除项目信息"
,
notes
=
"软删除项目信息"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"项目信息主键"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"删除项目信息"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_LIST
,
isProjOpt
=
false
)
public
BaseResponse
softDelete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
Integer
id
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
...
...
@@ -101,6 +104,7 @@ public class DmpProjectController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增项目信息"
,
notes
=
"新增项目信息"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新增项目信息"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_LIST
,
isProjOpt
=
false
)
public
BaseBeanResponse
<
DmpProject
>
add
(
@RequestBody
DmpProject
dmpProject
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpProject
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProject
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/bean/DmpProjectRequest.java
View file @
23fae18b
...
...
@@ -206,6 +206,12 @@ public class DmpProjectRequest extends BasePageBean {
@ApiModelProperty
(
value
=
"数据更新时间止"
)
private
Date
updateTimeEnd
;
/**
* 拥有该项目权限的用户ID
*/
@ApiModelProperty
(
value
=
"拥有该项目权限的用户ID"
)
private
Integer
ownerAuthUserId
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -413,4 +419,29 @@ public class DmpProjectRequest extends BasePageBean {
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getOwnerAuthUserId
()
{
return
ownerAuthUserId
;
}
public
void
setOwnerAuthUserId
(
Integer
ownerAuthUserId
)
{
this
.
ownerAuthUserId
=
ownerAuthUserId
;
}
}
src/main/java/com/jz/dmp/modules/controller/projconfig/DmpProjectConfigInfoController.java
View file @
23fae18b
...
...
@@ -10,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpProjectConfigInfoRequest
;
...
...
@@ -82,7 +84,7 @@ public class DmpProjectConfigInfoController {
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addOrEdit"
)
@ApiOperation
(
value
=
"新增或修改项目配置表"
,
notes
=
"新增或修改项目配置表"
)
@
ApiImplicitParam
(
name
=
"id"
,
value
=
"组织id"
,
required
=
true
)
@
SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADDOREDIT
,
descrption
=
"新增或修改项目配置表"
,
optModular
=
CommConstant
.
MODULAR_WORKMANG_SYSCONFIG
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpProjectConfigInfo
>
addOrEdit
(
@RequestBody
DmpProjectConfigInfo
dmpProjectConfigInfo
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpProjectConfigInfo
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpProjectConfigInfo
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/projconfig/DmpPublicConfigInfoController.java
View file @
23fae18b
...
...
@@ -9,7 +9,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.MethodCallLogPrint
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineDto
;
import
com.jz.dmp.modules.controller.projconfig.bean.DmpComputEngineRequest
;
...
...
@@ -65,6 +67,7 @@ public class DmpPublicConfigInfoController {
@MethodCallLogPrint
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addOrEdit"
)
@ApiOperation
(
value
=
"新增或修改公共配置表"
,
notes
=
"新增或修改公共配置表"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADDOREDIT
,
descrption
=
"新增或修改公共配置表"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_SYSCONFIG
,
isProjOpt
=
false
)
public
BaseBeanResponse
<
DmpPublicConfigInfo
>
addOrEdit
(
@RequestBody
DmpPublicConfigInfo
dmpPublicConfigInfo
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpPublicConfigInfo
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpPublicConfigInfo
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/sys/DmpMemberController.java
View file @
23fae18b
...
...
@@ -14,8 +14,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch
;
...
...
@@ -151,6 +153,7 @@ public class DmpMemberController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/softDelete"
)
@ApiOperation
(
value
=
"软删除用户表"
,
notes
=
"软删除用户表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"用户表主键集(逗号隔开)"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_DELETE
,
descrption
=
"软删除用户表"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_MEMBER
,
isProjOpt
=
false
)
public
BaseResponse
softDelete
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
...
...
@@ -176,6 +179,7 @@ public class DmpMemberController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增用户表"
,
notes
=
"新增用户表"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_ADD
,
descrption
=
"新增用户"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_MEMBER
,
isProjOpt
=
false
)
public
BaseBeanResponse
<
DmpMember
>
add
(
@RequestBody
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMember
>();
try
{
...
...
@@ -234,6 +238,7 @@ public class DmpMemberController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/switchProj"
)
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目主键"
)
@ApiOperation
(
value
=
"用户项目切换"
,
notes
=
"用户项目切换"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_EDIT
,
descrption
=
"用户项目切换"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_MEMBER
,
isProjOpt
=
true
)
public
BaseBeanResponse
<
DmpMember
>
switchProj
(
@RequestParam
(
name
=
"projectId"
,
required
=
true
)
Integer
projectId
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMember
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/controller/sys/DmpMemberProjectRoleController.java
View file @
23fae18b
...
...
@@ -9,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.annotation.SysOperationLogAnnotation
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.CommConstant
;
import
com.jz.common.constant.StatuConstant
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto
;
...
...
@@ -181,6 +183,7 @@ public class DmpMemberProjectRoleController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增用户项目角色表"
,
notes
=
"新增用户项目角色表"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_MEMBERCONFIG
,
descrption
=
"工作空间成员配置"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_LIST
,
isProjOpt
=
false
)
public
BaseBeanResponse
<
DmpMemberProjectRole
>
add
(
@RequestBody
DmpMemberProjectRole
dmpMemberProjectRole
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMemberProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMemberProjectRole
>();
try
{
...
...
@@ -238,6 +241,7 @@ public class DmpMemberProjectRoleController {
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addProjMembers"
)
@ApiOperation
(
value
=
"项目成员添加"
,
notes
=
"项目成员添加"
)
@SysOperationLogAnnotation
(
actionType
=
CommConstant
.
OPT_TYPE_MEMBERCONFIG
,
descrption
=
"工作空间成员配置"
,
optModular
=
CommConstant
.
MODULAR_WORKSPACEMANG_LIST
,
isProjOpt
=
false
)
public
BaseBeanResponse
<
DmpMemberProjectRole
>
addProjMembers
(
@RequestBody
MembProjRoleBatchReq
membProjRoleBatchReq
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMemberProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMemberProjectRole
>();
try
{
...
...
src/main/java/com/jz/dmp/modules/model/DmpDevelopTask.java
View file @
23fae18b
...
...
@@ -437,4 +437,15 @@ public class DmpDevelopTask implements Serializable {
this
.
name
=
name
;
}
/**
* @Title: getAzkabanName
* @Description: TODO(拼接azkaban用名称)
* @param @return 参数
* @return String 返回类型
* @throws
*/
public
String
getAzkabanName
()
{
return
"jz_dmp_"
+
this
.
id
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/sys/DmpMemberService.java
View file @
23fae18b
...
...
@@ -101,12 +101,12 @@ public interface DmpMemberService {
/**
* @Title: getDefProjectByUserName
* @Description: TODO(获取用户默认的项目)
* @param @param user
name
* @param @param user
Id
* @param @return 参数
* @return Integer 返回类型
* @throws
*/
public
Integer
getDefProjectByUser
Name
(
String
username
);
public
Integer
getDefProjectByUser
Id
(
Integer
userId
);
/**
...
...
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
View file @
23fae18b
...
...
@@ -444,9 +444,9 @@ public class DmpMemberServiceImpl extends BaseService implements DmpMemberServic
*根据用户获取默认项目ID
*/
@Override
public
Integer
getDefProjectByUser
Name
(
String
username
)
{
public
Integer
getDefProjectByUser
Id
(
Integer
userId
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"owner
Id"
,
username
);
params
.
put
(
"owner
AuthUserId"
,
userId
);
List
<
DmpProject
>
projects
=
dmpProjectDao
.
getExampleQuery
(
params
);
if
(
CollectionUtils
.
isEmpty
(
projects
))
{
logger
.
info
(
"该用户没有项目"
);
...
...
src/main/java/com/jz/dmp/modules/service/sys/impl/SystemCommonServiceImpl.java
View file @
23fae18b
...
...
@@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.regex.Pattern
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -49,7 +50,12 @@ public class SystemCommonServiceImpl implements SystemCommonService {
BaseBeanResponse
<
String
>
baseBeanResponse
=
new
BaseBeanResponse
<
String
>();
//CronSequenceGenerator cronSequenceGenerator = new CronSequenceGenerator("* * * * * ?");
corn
=
corn
.
replace
(
"/"
,
"0/"
);
boolean
flag
=
Pattern
.
matches
(
"^/"
,
corn
);
if
(
flag
)
{
corn
=
corn
.
replace
(
" /"
,
" 0/"
);
}
CronSequenceGenerator
cronSequenceGenerator
=
new
CronSequenceGenerator
(
corn
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -70,19 +76,26 @@ public class SystemCommonServiceImpl implements SystemCommonService {
}
public
static
void
main
(
String
[]
args
)
{
CronSequenceGenerator
cronSequenceGenerator
=
new
CronSequenceGenerator
(
"0 1-3 * * * ?"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
corn
=
"0 0/1 * /2 * *"
;
corn
=
corn
.
replace
(
" /"
,
" 0/"
);
List
<
String
>
list
=
new
ArrayList
<
String
>(
10
);
Date
nextTimePoint
=
new
Date
();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
nextTimePoint
=
cronSequenceGenerator
.
next
(
nextTimePoint
);
list
.
add
(
sdf
.
format
(
nextTimePoint
));
}
System
.
out
.
println
(
JSONObject
.
toJSONString
(
list
));
System
.
out
.
println
(
corn
);
/*
* CronSequenceGenerator cronSequenceGenerator = new
* CronSequenceGenerator("0 1-3 * * * ?");
*
* SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
*
* List<String> list = new ArrayList<String>(10);
*
* Date nextTimePoint = new Date();
*
* for (int i = 0; i < 10; i++) { nextTimePoint =
* cronSequenceGenerator.next(nextTimePoint);
* list.add(sdf.format(nextTimePoint)); }
* System.out.println(JSONObject.toJSONString(list));
*/
}
}
src/main/resources/application-test.yml
View file @
23fae18b
...
...
@@ -2,6 +2,8 @@
server
:
port
:
7181
#contextPath: /resource
#servlet:
# context-path: /prod-api
management
:
port
:
54003
...
...
src/main/resources/mapper/dmp/DmpProjectMapper.xml
View file @
23fae18b
...
...
@@ -49,6 +49,15 @@
id,owner_id,production_id,data_warehouse_id,name,display_name,project_desc,publish_target_id,is_enable_scheduler,is_edit_task_code,is_enable_select,dw_name,dw_access_type,dw_is_enable_acl,dw_is_enable_access_obj,dw_is_enable_auth_obj,dw_is_protect_data,data_status,create_user_id,create_time,update_user_id,update_time,impala_jdbc_url,impala_master_fqdn
</sql>
<sql
id=
"FIND_ALL_COLUMN_SUFFIX"
>
_project.id,_project.owner_id,_project.production_id,_project.data_warehouse_id,_project.name,
_project.display_name,_project.project_desc,_project.publish_target_id,_project.is_enable_scheduler,
_project.is_edit_task_code,_project.is_enable_select,_project.dw_name,_project.dw_access_type,_project.dw_is_enable_acl,
_project.dw_is_enable_access_obj,_project.dw_is_enable_auth_obj,_project.dw_is_protect_data,_project.data_status,
_project.create_user_id,_project.create_time,_project.update_user_id,_project.update_time,_project.impala_jdbc_url,
_project.impala_master_fqdn
</sql>
<!-- 模块共有接口实现 -->
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyProperty=
"id"
parameterType=
"com.jz.dmp.modules.model.DmpProject"
>
...
...
@@ -141,25 +150,28 @@
<select
id=
"getExampleQuery"
parameterType=
"java.util.Map"
resultType=
"com.jz.dmp.modules.model.DmpProject"
>
SELECT
<include
refid=
"FIND_ALL_COLUMN"
/>
FROM dmp_project WHERE 1=1
<if
test=
"ownerId != null"
>
AND owner_id = #{ownerId}
</if>
<if
test=
"productionId != null"
>
AND production_id = #{productionId}
</if>
<if
test=
"dataWarehouseId != null"
>
AND data_warehouse_id = #{dataWarehouseId}
</if>
<if
test=
"name != null"
>
AND name = #{name}
</if>
<if
test=
"displayName != null"
>
AND display_name = #{displayName}
</if>
<if
test=
"projectDesc != null"
>
AND project_desc = #{projectDesc}
</if>
<if
test=
"publishTargetId != null"
>
AND publish_target_id = #{publishTargetId}
</if>
<if
test=
"isEnableScheduler != null"
>
AND is_enable_scheduler = #{isEnableScheduler}
</if>
<if
test=
"isEditTaskCode != null"
>
AND is_edit_task_code = #{isEditTaskCode}
</if>
<if
test=
"isEnableSelect != null"
>
AND is_enable_select = #{isEnableSelect}
</if>
<if
test=
"dwName != null"
>
AND dw_name = #{dwName}
</if>
<if
test=
"dwAccessType != null"
>
AND dw_access_type = #{dwAccessType}
</if>
<if
test=
"dwIsEnableAcl != null"
>
AND dw_is_enable_acl = #{dwIsEnableAcl}
</if>
<if
test=
"dwIsEnableAccessObj != null"
>
AND dw_is_enable_access_obj = #{dwIsEnableAccessObj}
</if>
<if
test=
"dwIsEnableAuthObj != null"
>
AND dw_is_enable_auth_obj = #{dwIsEnableAuthObj}
</if>
<if
test=
"dwIsProtectData != null"
>
AND dw_is_protect_data = #{dwIsProtectData}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus}
</if>
<include
refid=
"FIND_ALL_COLUMN_SUFFIX"
/>
FROM dmp_project _project
LEFT JOIN dmp_member_project_role _mprole ON _project.id = _mprole.project_id
WHERE 1=1
<if
test=
"ownerId != null"
>
AND _project.owner_id = #{ownerId}
</if>
<if
test=
"productionId != null"
>
AND _project.production_id = #{productionId}
</if>
<if
test=
"dataWarehouseId != null"
>
AND _project.data_warehouse_id = #{dataWarehouseId}
</if>
<if
test=
"name != null"
>
AND _project.name = #{name}
</if>
<if
test=
"displayName != null"
>
AND _project.display_name = #{displayName}
</if>
<if
test=
"projectDesc != null"
>
AND _project.project_desc = #{projectDesc}
</if>
<if
test=
"publishTargetId != null"
>
AND _project.publish_target_id = #{publishTargetId}
</if>
<if
test=
"isEnableScheduler != null"
>
AND _project.is_enable_scheduler = #{isEnableScheduler}
</if>
<if
test=
"isEditTaskCode != null"
>
AND _project.is_edit_task_code = #{isEditTaskCode}
</if>
<if
test=
"isEnableSelect != null"
>
AND _project.is_enable_select = #{isEnableSelect}
</if>
<if
test=
"dwName != null"
>
AND _project.dw_name = #{dwName}
</if>
<if
test=
"dwAccessType != null"
>
AND _project.dw_access_type = #{dwAccessType}
</if>
<if
test=
"dwIsEnableAcl != null"
>
AND _project.dw_is_enable_acl = #{dwIsEnableAcl}
</if>
<if
test=
"dwIsEnableAccessObj != null"
>
AND _project.dw_is_enable_access_obj = #{dwIsEnableAccessObj}
</if>
<if
test=
"dwIsEnableAuthObj != null"
>
AND _project.dw_is_enable_auth_obj = #{dwIsEnableAuthObj}
</if>
<if
test=
"dwIsProtectData != null"
>
AND _project.dw_is_protect_data = #{dwIsProtectData}
</if>
<if
test=
"dataStatus != null"
>
AND _project.data_status = #{dataStatus}
</if>
<if
test=
"ownerAuthUserId != null"
>
AND _mprole.user_id = #{ownerAuthUserId}
</if>
</select>
<select
id=
"getProjectPage1"
resultType=
"java.util.Map"
...
...
src/main/resources/mapper/sys/DmpRoleMapper.xml
View file @
23fae18b
...
...
@@ -300,6 +300,11 @@
<!-- 项目角色用户人数统计 -->
<select
id=
"projRoleStat"
resultType=
"map"
>
select
'ALL' AS roleCode,'全部' AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member member
where member.data_status='1'
UNION
select
role.role_code AS roleCode,role.role_name AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member_project_role mprole
...
...
@@ -307,11 +312,6 @@
left join dmp_member member on mprole.user_id=member.user_id
where member.data_status='1'
group by role.role_code,role.role_name
UNION
select
'' AS roleCode,'全部' AS roleName,COUNT(DISTINCT member.user_id) AS statCount
from dmp_member member
where member.data_status='1'
</select>
</mapper>
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