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
8aead7d8
Commit
8aead7d8
authored
Dec 31, 2020
by
mcb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dmp_dev' of
http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service
into dmp_dev
parents
fd8112f7
3e9cbe89
Changes
78
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
7826 additions
and
3 deletions
+7826
-3
pom.xml
pom.xml
+10
-0
BaseBeanResponse.java
src/main/java/com/jz/common/bean/BaseBeanResponse.java
+55
-0
BaseResponse.java
src/main/java/com/jz/common/bean/BaseResponse.java
+40
-0
PageInfoResponse.java
src/main/java/com/jz/common/bean/PageInfoResponse.java
+21
-0
CustomUserService.java
...ain/java/com/jz/common/interceptor/CustomUserService.java
+51
-0
MyAccessDecisionManager.java
...va/com/jz/common/interceptor/MyAccessDecisionManager.java
+72
-0
MyFilterSecurityInterceptor.java
...om/jz/common/interceptor/MyFilterSecurityInterceptor.java
+82
-0
MyInvocationSecurityMetadataSource.java
...ommon/interceptor/MyInvocationSecurityMetadataSource.java
+109
-0
MyPasswordEncoder.java
...ain/java/com/jz/common/interceptor/MyPasswordEncoder.java
+28
-0
BaseService.java
src/main/java/com/jz/common/persistence/BaseService.java
+13
-0
DataSourceConfig1.java
src/main/java/com/jz/dmp/config/DataSourceConfig1.java
+1
-1
SecurityConfiguration.java
src/main/java/com/jz/dmp/config/SecurityConfiguration.java
+114
-0
DmpMemberController.java
...om/jz/dmp/modules/controller/sys/DmpMemberController.java
+152
-0
DmpCodeDictionaryBatch.java
...p/modules/controller/sys/bean/DmpCodeDictionaryBatch.java
+23
-0
DmpCodeDictionaryDto.java
...dmp/modules/controller/sys/bean/DmpCodeDictionaryDto.java
+14
-0
DmpCodeDictionaryRequest.java
...modules/controller/sys/bean/DmpCodeDictionaryRequest.java
+183
-0
DmpMemberBatch.java
...om/jz/dmp/modules/controller/sys/bean/DmpMemberBatch.java
+23
-0
DmpMemberDto.java
.../com/jz/dmp/modules/controller/sys/bean/DmpMemberDto.java
+14
-0
DmpMemberProjectRoleBatch.java
...odules/controller/sys/bean/DmpMemberProjectRoleBatch.java
+23
-0
DmpMemberProjectRoleDto.java
.../modules/controller/sys/bean/DmpMemberProjectRoleDto.java
+14
-0
DmpMemberProjectRoleRequest.java
...ules/controller/sys/bean/DmpMemberProjectRoleRequest.java
+70
-0
DmpMemberRequest.java
.../jz/dmp/modules/controller/sys/bean/DmpMemberRequest.java
+267
-0
DmpMemberRoleBatch.java
...z/dmp/modules/controller/sys/bean/DmpMemberRoleBatch.java
+23
-0
DmpMemberRoleDto.java
.../jz/dmp/modules/controller/sys/bean/DmpMemberRoleDto.java
+14
-0
DmpMemberRoleRequest.java
...dmp/modules/controller/sys/bean/DmpMemberRoleRequest.java
+56
-0
DmpPermissionBatch.java
...z/dmp/modules/controller/sys/bean/DmpPermissionBatch.java
+23
-0
DmpPermissionDto.java
.../jz/dmp/modules/controller/sys/bean/DmpPermissionDto.java
+14
-0
DmpPermissionRequest.java
...dmp/modules/controller/sys/bean/DmpPermissionRequest.java
+239
-0
DmpProjectRoleBatch.java
.../dmp/modules/controller/sys/bean/DmpProjectRoleBatch.java
+23
-0
DmpProjectRoleDto.java
...jz/dmp/modules/controller/sys/bean/DmpProjectRoleDto.java
+14
-0
DmpProjectRoleRequest.java
...mp/modules/controller/sys/bean/DmpProjectRoleRequest.java
+56
-0
DmpRoleBatch.java
.../com/jz/dmp/modules/controller/sys/bean/DmpRoleBatch.java
+23
-0
DmpRoleDto.java
...va/com/jz/dmp/modules/controller/sys/bean/DmpRoleDto.java
+14
-0
DmpRolePermissionBatch.java
...p/modules/controller/sys/bean/DmpRolePermissionBatch.java
+23
-0
DmpRolePermissionDto.java
...dmp/modules/controller/sys/bean/DmpRolePermissionDto.java
+14
-0
DmpRolePermissionRequest.java
...modules/controller/sys/bean/DmpRolePermissionRequest.java
+56
-0
DmpRoleRequest.java
...om/jz/dmp/modules/controller/sys/bean/DmpRoleRequest.java
+197
-0
DmpCodeDictionaryMapper.java
...a/com/jz/dmp/modules/dao/sys/DmpCodeDictionaryMapper.java
+77
-0
DmpMemberMapper.java
...main/java/com/jz/dmp/modules/dao/sys/DmpMemberMapper.java
+88
-0
DmpMemberProjectRoleMapper.java
...om/jz/dmp/modules/dao/sys/DmpMemberProjectRoleMapper.java
+77
-0
DmpMemberRoleMapper.java
.../java/com/jz/dmp/modules/dao/sys/DmpMemberRoleMapper.java
+77
-0
DmpPermissionMapper.java
.../java/com/jz/dmp/modules/dao/sys/DmpPermissionMapper.java
+77
-0
DmpProjectRoleMapper.java
...java/com/jz/dmp/modules/dao/sys/DmpProjectRoleMapper.java
+77
-0
DmpRoleMapper.java
src/main/java/com/jz/dmp/modules/dao/sys/DmpRoleMapper.java
+77
-0
DmpRolePermissionMapper.java
...a/com/jz/dmp/modules/dao/sys/DmpRolePermissionMapper.java
+77
-0
DmpCodeDictionary.java
...main/java/com/jz/dmp/modules/model/DmpCodeDictionary.java
+153
-0
DmpMember.java
src/main/java/com/jz/dmp/modules/model/DmpMember.java
+276
-0
DmpMemberProjectRole.java
...n/java/com/jz/dmp/modules/model/DmpMemberProjectRole.java
+68
-0
DmpMemberRole.java
src/main/java/com/jz/dmp/modules/model/DmpMemberRole.java
+54
-0
DmpPermission.java
src/main/java/com/jz/dmp/modules/model/DmpPermission.java
+209
-0
DmpProjectRole.java
src/main/java/com/jz/dmp/modules/model/DmpProjectRole.java
+54
-0
DmpRole.java
src/main/java/com/jz/dmp/modules/model/DmpRole.java
+167
-0
DmpRolePermission.java
...main/java/com/jz/dmp/modules/model/DmpRolePermission.java
+54
-0
DmpCodeDictionaryService.java
.../jz/dmp/modules/service/sys/DmpCodeDictionaryService.java
+69
-0
DmpMemberProjectRoleService.java
.../dmp/modules/service/sys/DmpMemberProjectRoleService.java
+69
-0
DmpMemberRoleService.java
.../com/jz/dmp/modules/service/sys/DmpMemberRoleService.java
+69
-0
DmpMemberService.java
...java/com/jz/dmp/modules/service/sys/DmpMemberService.java
+81
-0
DmpPermissionService.java
.../com/jz/dmp/modules/service/sys/DmpPermissionService.java
+69
-0
DmpProjectRoleService.java
...com/jz/dmp/modules/service/sys/DmpProjectRoleService.java
+69
-0
DmpRolePermissionService.java
.../jz/dmp/modules/service/sys/DmpRolePermissionService.java
+69
-0
DmpRoleService.java
...n/java/com/jz/dmp/modules/service/sys/DmpRoleService.java
+69
-0
DmpCodeDictionaryServiceImpl.java
...odules/service/sys/impl/DmpCodeDictionaryServiceImpl.java
+235
-0
DmpMemberProjectRoleServiceImpl.java
...les/service/sys/impl/DmpMemberProjectRoleServiceImpl.java
+180
-0
DmpMemberRoleServiceImpl.java
...mp/modules/service/sys/impl/DmpMemberRoleServiceImpl.java
+176
-0
DmpMemberServiceImpl.java
...jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
+269
-0
DmpPermissionServiceImpl.java
...mp/modules/service/sys/impl/DmpPermissionServiceImpl.java
+251
-0
DmpProjectRoleServiceImpl.java
...p/modules/service/sys/impl/DmpProjectRoleServiceImpl.java
+176
-0
DmpRolePermissionServiceImpl.java
...odules/service/sys/impl/DmpRolePermissionServiceImpl.java
+176
-0
DmpRoleServiceImpl.java
...m/jz/dmp/modules/service/sys/impl/DmpRoleServiceImpl.java
+239
-0
application-test.yml
src/main/resources/application-test.yml
+2
-2
DmpCodeDictionaryMapper.xml
src/main/resources/mapper/sys/DmpCodeDictionaryMapper.xml
+248
-0
DmpMemberMapper.xml
src/main/resources/mapper/sys/DmpMemberMapper.xml
+334
-0
DmpMemberProjectRoleMapper.xml
src/main/resources/mapper/sys/DmpMemberProjectRoleMapper.xml
+153
-0
DmpMemberRoleMapper.xml
src/main/resources/mapper/sys/DmpMemberRoleMapper.xml
+139
-0
DmpPermissionMapper.xml
src/main/resources/mapper/sys/DmpPermissionMapper.xml
+309
-0
DmpProjectRoleMapper.xml
src/main/resources/mapper/sys/DmpProjectRoleMapper.xml
+139
-0
DmpRoleMapper.xml
src/main/resources/mapper/sys/DmpRoleMapper.xml
+267
-0
DmpRolePermissionMapper.xml
src/main/resources/mapper/sys/DmpRolePermissionMapper.xml
+139
-0
No files found.
pom.xml
View file @
8aead7d8
...
@@ -262,6 +262,16 @@
...
@@ -262,6 +262,16 @@
<artifactId>
httpclient
</artifactId>
<artifactId>
httpclient
</artifactId>
<version>
4.5.3
</version>
<!--$NO-MVN-MAN-VER$-->
<version>
4.5.3
</version>
<!--$NO-MVN-MAN-VER$-->
</dependency>
</dependency>
<!-- 引入boot-security权限框架 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<finalName>
jz-dmp-service
</finalName>
<finalName>
jz-dmp-service
</finalName>
...
...
src/main/java/com/jz/common/bean/BaseBeanResponse.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
bean
;
import
java.util.List
;
/**
* @author ybz
*
*/
public
class
BaseBeanResponse
<
T
>
extends
BaseResponse
{
private
T
data
;
private
List
<
T
>
datas
;
public
BaseBeanResponse
(){
super
();
}
public
BaseBeanResponse
(
String
code
,
T
data
)
{
super
(
code
);
this
.
data
=
data
;
}
public
BaseBeanResponse
(
String
code
,
List
<
T
>
datas
)
{
super
(
code
);
this
.
datas
=
datas
;
}
public
BaseBeanResponse
(
String
code
,
String
message
,
T
data
)
{
super
(
code
,
message
);
this
.
data
=
data
;
}
public
BaseBeanResponse
(
String
code
,
String
message
,
List
<
T
>
datas
)
{
super
(
code
,
message
);
this
.
datas
=
datas
;
}
public
T
getData
()
{
return
data
;
}
public
void
setData
(
T
data
)
{
this
.
data
=
data
;
}
public
List
<
T
>
getDatas
()
{
return
datas
;
}
public
void
setDatas
(
List
<
T
>
datas
)
{
this
.
datas
=
datas
;
}
}
src/main/java/com/jz/common/bean/BaseResponse.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
bean
;
/**
* @author ybz
*
*/
public
class
BaseResponse
{
//错误码
private
String
code
;
//错误消息
private
String
message
;
public
BaseResponse
()
{}
public
BaseResponse
(
String
code
)
{
this
.
code
=
code
;
}
public
BaseResponse
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
}
src/main/java/com/jz/common/bean/PageInfoResponse.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
bean
;
import
com.github.pagehelper.PageInfo
;
/**
* @author ybz
*
*/
public
class
PageInfoResponse
<
T
>
extends
BaseResponse
{
private
PageInfo
<
T
>
data
;
public
PageInfo
<
T
>
getData
()
{
return
data
;
}
public
void
setData
(
PageInfo
<
T
>
data
)
{
this
.
data
=
data
;
}
}
src/main/java/com/jz/common/interceptor/CustomUserService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
interceptor
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
org.springframework.stereotype.Service
;
import
com.jz.dmp.modules.model.DmpMember
;
import
com.jz.dmp.modules.service.sys.DmpMemberService
;
@Service
public
class
CustomUserService
implements
UserDetailsService
{
//@Autowired
//DmpMemberprojectrole projectMemberRoleDao;
@Autowired
DmpMemberService
dmpMemberService
;
@Override
public
UserDetails
loadUserByUsername
(
String
userName
)
{
DmpMember
user
=
null
;
try
{
user
=
dmpMemberService
.
findByUserName
(
userName
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(
user
!=
null
)
{
List
<
GrantedAuthority
>
grantedAuthorities
=
new
ArrayList
<>();
//List<DmpPermission> permissions = permissionDao.getDmpDefaultPermission();
/*
* DmpProjectMemberRole pmr = new DmpProjectMemberRole();
* pmr.setMemberId(userName); List<DmpProjectMemberRole> mrs =
* projectMemberRoleDao.getMemberProjectRole(pmr); for (DmpProjectMemberRole mr
* : mrs) { if (mr != null) { GrantedAuthority grantedAuthority = new
* CustomGrantedAuthority( mr.getProjectId().intValue(), mr.getRoleId());
* grantedAuthorities.add(grantedAuthority); } }
* user.setGrantedAuthorities(grantedAuthorities);
*/
return
user
;
}
else
{
throw
new
UsernameNotFoundException
(
"用户: "
+
userName
+
" 不存在!"
);
}
}
}
\ No newline at end of file
src/main/java/com/jz/common/interceptor/MyAccessDecisionManager.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
interceptor
;
import
java.util.Collection
;
import
org.springframework.security.access.AccessDecisionManager
;
import
org.springframework.security.access.AccessDeniedException
;
import
org.springframework.security.access.ConfigAttribute
;
import
org.springframework.security.authentication.InsufficientAuthenticationException
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.stereotype.Component
;
/**
* @ClassName: MyAccessDecisionManager
* @Description: TODO(这里用一句话描述这个类的作用)
* @author ybz
* @date 2017年12月15日 下午5:16:30
*
*/
@Component
public
class
MyAccessDecisionManager
implements
AccessDecisionManager
{
/* (非 Javadoc)
* <p>Title: decide</p>
* <p>Description: </p>
* @param arg0
* @param arg1
* @param arg2
* @throws AccessDeniedException
* @throws InsufficientAuthenticationException
* @see org.springframework.security.access.AccessDecisionManager#decide(org.springframework.security.core.Authentication, java.lang.Object, java.util.Collection)
*/
//decide 方法是判定是否拥有权限的决策方法。
//authentication 是UserDetailService实现中循环添加到GrantedAuthority对象中的权限信息集合
//object 包含客户端发起的请求的request信息,可转换为 HttpServletRequest request = ((FilterInvocation)object).getHttpRequest();
//configAttribute 为MyInvocationSecurityMetadataSource的getAttributes(Object object)这个方法返回的结果,此方法是为了判定用户请求的url
//是否在权限表中,如果在权限表中,则返回给decide方法,用来判定用户是否有此权限。如过不在权限表中则放行。
@Override
public
void
decide
(
Authentication
authentication
,
Object
object
,
Collection
<
ConfigAttribute
>
configAttributes
)
throws
AccessDeniedException
,
InsufficientAuthenticationException
{
if
(
configAttributes
==
null
||
configAttributes
.
size
()<=
0
)
{
return
;
}
String
needRole
;
for
(
ConfigAttribute
configAttribute
:
configAttributes
)
{
needRole
=
configAttribute
.
getAttribute
();
for
(
GrantedAuthority
grantedAuthority
:
authentication
.
getAuthorities
())
{
if
(
needRole
.
trim
().
equals
(
grantedAuthority
.
getAuthority
()))
{
return
;
}
}
}
throw
new
AccessDeniedException
(
"no right"
);
}
@Override
public
boolean
supports
(
ConfigAttribute
attribute
)
{
// TODO Auto-generated method stub
return
true
;
}
@Override
public
boolean
supports
(
Class
<?>
clazz
)
{
// TODO Auto-generated method stub
return
true
;
}
}
src/main/java/com/jz/common/interceptor/MyFilterSecurityInterceptor.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
interceptor
;
import
java.io.IOException
;
import
javax.servlet.Filter
;
import
javax.servlet.FilterChain
;
import
javax.servlet.FilterConfig
;
import
javax.servlet.ServletException
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.SecurityMetadataSource
;
import
org.springframework.security.access.intercept.AbstractSecurityInterceptor
;
import
org.springframework.security.access.intercept.InterceptorStatusToken
;
import
org.springframework.security.web.FilterInvocation
;
import
org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource
;
import
org.springframework.stereotype.Component
;
/**
* @ClassName: MyFilterSecurityInterceptor
* @Description: TODO(这里用一句话描述这个类的作用)
* @author ybz
* @date 2017年12月15日 下午5:08:09
*
*/
@Component
public
class
MyFilterSecurityInterceptor
extends
AbstractSecurityInterceptor
implements
Filter
{
@Autowired
private
FilterInvocationSecurityMetadataSource
securityMetadataSource
;
@Autowired
public
void
setMyAccessDecisionManager
(
MyAccessDecisionManager
myAccessDecisionManager
){
super
.
setAccessDecisionManager
(
myAccessDecisionManager
);
}
@Override
public
void
init
(
FilterConfig
filterConfig
)
throws
ServletException
{
}
@Override
public
void
doFilter
(
ServletRequest
request
,
ServletResponse
response
,
FilterChain
chain
)
throws
IOException
,
ServletException
{
FilterInvocation
fi
=
new
FilterInvocation
(
request
,
response
,
chain
);
invoke
(
fi
);
}
public
void
invoke
(
FilterInvocation
fi
)
throws
IOException
,
ServletException
{
//fi里面存在一个被拦截的url
//里面调用MyInvocationSecurityMetedataSrouce的getAttributes(Object object)这个方法获取fi对应的所有权限
//再调用MyAccessDecisionManager的decide方法来检验用户的权限是否足够
InterceptorStatusToken
token
=
super
.
beforeInvocation
(
fi
);
try
{
fi
.
getChain
().
doFilter
(
fi
.
getRequest
(),
fi
.
getResponse
());
}
finally
{
super
.
afterInvocation
(
token
,
null
);
}
}
@Override
public
void
destroy
()
{
}
@Override
public
Class
<?>
getSecureObjectClass
()
{
return
FilterInvocation
.
class
;
}
@Override
public
SecurityMetadataSource
obtainSecurityMetadataSource
()
{
return
this
.
securityMetadataSource
;
}
}
src/main/java/com/jz/common/interceptor/MyInvocationSecurityMetadataSource.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
interceptor
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.security.access.ConfigAttribute
;
import
org.springframework.security.web.FilterInvocation
;
import
org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource
;
import
org.springframework.security.web.util.matcher.AntPathRequestMatcher
;
import
org.springframework.stereotype.Component
;
//import com.jz.dmp.web.ui.modules.sys.repository.domain.DmpSystemMenu;
//import com.jz.dmp.web.ui.modules.sys.service.DmpSystemMenuService;
/**
* @ClassName: MyInvocationSecurityMetadataSource
* @Description: TODO(这里用一句话描述这个类的作用)
* @author ybz
* @date 2017年12月15日 下午5:54:15
*
*/
@Component
public
class
MyInvocationSecurityMetadataSource
implements
FilterInvocationSecurityMetadataSource
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MyInvocationSecurityMetadataSource
.
class
);
private
boolean
isExpire
;
//加载资源是否过期
//@Autowired
//private DmpSystemMenuService dspSystemMenuService;
private
Map
<
String
,
Collection
<
ConfigAttribute
>>
map
=
null
;
//加载权限表中所有权限
@SuppressWarnings
(
"unused"
)
public
void
loadResourceDefine
(){
map
=
new
HashMap
<>();
Collection
<
ConfigAttribute
>
configAttributes
;
ConfigAttribute
cfg
;
System
.
err
.
println
(
"1234444444444444444--------------------"
);
/*List<DmpSystemMenu> resources = dspSystemMenuService.findAllList();
for (DmpSystemMenu dspSystemMenu : resources) {
configAttributes = new ArrayList<>();
cfg = new SecurityConfig(dspSystemMenu.getMenuTarget());
//此处只添加了用户的名字,其实还可以添加更多的权限信息,例如请求方法到ConfigAttribute的集合中去。
//此处添加的信息将会作为MyAccessDecisionManager类的decide的第三个参数。
configAttributes.add(cfg);
//用权限的getUrl()作为map的key,用configAttribute的集合作为value。
map.put(dspSystemMenu.getMenuHref(), configAttributes);
}*/
}
@Override
public
Collection
<
ConfigAttribute
>
getAllConfigAttributes
()
{
// TODO Auto-generated method stub
return
null
;
}
//此方法是为了判定用户请求的url是否在权限表中,如果在权限表中,则返回给decide方法,用来判定用户是否有此权限。如果不在权限表中则放行。
@Override
public
Collection
<
ConfigAttribute
>
getAttributes
(
Object
object
)
throws
IllegalArgumentException
{
if
(
map
==
null
||
isExpire
)
{
//如果map为null 或者资源过期,则重新加载资源
logger
.
info
(
"资源重新加载..."
);
loadResourceDefine
();
isExpire
=
false
;
}
//object中包含用户请求的request信息
HttpServletRequest
request
=
((
FilterInvocation
)
object
).
getHttpRequest
();
AntPathRequestMatcher
matcher
;
String
resUrl
;
for
(
Entry
<
String
,
Collection
<
ConfigAttribute
>>
entry
:
map
.
entrySet
())
{
resUrl
=
entry
.
getKey
();
matcher
=
new
AntPathRequestMatcher
(
resUrl
);
if
(
matcher
.
matches
(
request
))
{
return
entry
.
getValue
();
}
}
return
null
;
}
@Override
public
boolean
supports
(
Class
<?>
arg0
)
{
// TODO Auto-generated method stub
return
true
;
}
/**
* @Title: setExpire
* @Description: TODO(设置是否过期)
* @param @param isExpire 设定文件
* @return void 返回类型
* @throws
*/
public
void
setExpire
(
boolean
isExpire
)
{
this
.
isExpire
=
isExpire
;
}
}
src/main/java/com/jz/common/interceptor/MyPasswordEncoder.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
common
.
interceptor
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.stereotype.Component
;
/**
* @ClassName: MyPasswordEncoder
* @Description: TODO(这里用一句话描述这个类的作用)
* @author ybz
* @date 2017年12月21日 下午5:23:19
*
*/
@Component
public
class
MyPasswordEncoder
implements
PasswordEncoder
{
@Override
public
boolean
matches
(
CharSequence
rawPassword
,
String
encodedPassword
)
{
// TODO Auto-generated method stub
return
encodedPassword
.
equals
(
encodedPassword
);
}
@Override
public
String
encode
(
CharSequence
rawPassword
)
{
// TODO Auto-generated method stub
return
(
String
)
rawPassword
;
}
}
src/main/java/com/jz/common/persistence/BaseService.java
View file @
8aead7d8
...
@@ -9,6 +9,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -9,6 +9,8 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.crypto.Cipher
;
import
javax.crypto.Cipher
;
import
javax.crypto.spec.SecretKeySpec
;
import
javax.crypto.spec.SecretKeySpec
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.security.Key
;
import
java.security.Key
;
import
java.util.Base64
;
import
java.util.Base64
;
...
@@ -67,5 +69,16 @@ public class BaseService {
...
@@ -67,5 +69,16 @@ public class BaseService {
}
}
return
str
;
return
str
;
}
}
/**获取当前用户的主键
* @param httpRequest
* @return
* @throws Exception
*/
public
Integer
getHttpRequestUserId
(
HttpServletRequest
httpRequest
)
throws
Exception
{
return
null
;
}
}
}
src/main/java/com/jz/dmp/config/DataSourceConfig1.java
View file @
8aead7d8
...
@@ -68,7 +68,7 @@ public class DataSourceConfig1 {
...
@@ -68,7 +68,7 @@ public class DataSourceConfig1 {
sessionFactory
.
setConfigLocation
(
new
ClassPathResource
(
"mybatis-config.xml"
));
sessionFactory
.
setConfigLocation
(
new
ClassPathResource
(
"mybatis-config.xml"
));
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
sessionFactory
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
()
.
getResources
(
"classpath:mapper/
dmp
/*.xml"
));
.
getResources
(
"classpath:mapper/
*
/*.xml"
));
return
sessionFactory
.
getObject
();
return
sessionFactory
.
getObject
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
src/main/java/com/jz/dmp/config/SecurityConfiguration.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
config
;
import
java.io.PrintWriter
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.authentication.BadCredentialsException
;
import
org.springframework.security.authentication.DisabledException
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jz.common.interceptor.MyFilterSecurityInterceptor
;
@Configuration
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
SecurityConfiguration
extends
WebSecurityConfigurerAdapter
{
@Autowired
private
MyFilterSecurityInterceptor
myFilterSecurityInterceptor
;
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
()
.
httpBasic
().
authenticationEntryPoint
((
request
,
response
,
authException
)
->
{
response
.
setContentType
(
"application/json;charset=utf-8"
);
response
.
setStatus
(
HttpServletResponse
.
SC_FORBIDDEN
);
PrintWriter
out
=
response
.
getWriter
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
403
);
map
.
put
(
"message"
,
"未登录"
);
out
.
write
(
JSONObject
.
toJSONString
(
map
));
out
.
flush
();
out
.
close
();
})
.
and
()
.
authorizeRequests
()
.
antMatchers
(
"/login"
,
"/logout"
).
permitAll
()
.
anyRequest
().
authenticated
()
.
and
()
.
formLogin
().
loginProcessingUrl
(
"/login"
)
.
failureHandler
((
request
,
response
,
ex
)
->
{
response
.
setContentType
(
"application/json;charset=utf-8"
);
response
.
setStatus
(
HttpServletResponse
.
SC_UNAUTHORIZED
);
PrintWriter
out
=
response
.
getWriter
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
401
);
if
(
ex
instanceof
UsernameNotFoundException
||
ex
instanceof
BadCredentialsException
)
{
map
.
put
(
"message"
,
"用户名或密码错误"
);
}
else
if
(
ex
instanceof
DisabledException
)
{
map
.
put
(
"message"
,
"账户被禁用"
);
}
else
{
map
.
put
(
"message"
,
"登录失败!"
);
}
out
.
write
(
JSONObject
.
toJSONString
(
map
));
out
.
flush
();
out
.
close
();
})
//登录成功,返回json
.
successHandler
((
request
,
response
,
authentication
)
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
200
);
map
.
put
(
"message"
,
"登录成功"
);
map
.
put
(
"data"
,
authentication
);
response
.
setContentType
(
"application/json;charset=utf-8"
);
PrintWriter
out
=
response
.
getWriter
();
out
.
write
(
JSONObject
.
toJSONString
(
map
));
out
.
flush
();
out
.
close
();
})
.
and
()
//.addFilter(myFilterSecurityInterceptor)
//.addFilterAfter(myFilterSecurityInterceptor, afterFilter)
.
exceptionHandling
()
//没有权限返回json
.
accessDeniedHandler
((
request
,
response
,
ex
)
->
{
response
.
setContentType
(
"application/json;charset=utf-8"
);
response
.
setStatus
(
HttpServletResponse
.
SC_FORBIDDEN
);
PrintWriter
out
=
response
.
getWriter
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
403
);
map
.
put
(
"message"
,
"权限不足"
);
out
.
write
(
JSONObject
.
toJSONString
(
map
));
out
.
flush
();
out
.
close
();
})
.
and
()
.
logout
()
//退出成功,返回json
.
logoutSuccessHandler
((
request
,
response
,
authentication
)
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
200
);
map
.
put
(
"message"
,
"退出成功"
);
map
.
put
(
"data"
,
authentication
);
response
.
setContentType
(
"application/json;charset=utf-8"
);
PrintWriter
out
=
response
.
getWriter
();
out
.
write
(
JSONObject
.
toJSONString
(
map
));
out
.
flush
();
out
.
close
();
})
.
permitAll
();
}
}
src/main/java/com/jz/dmp/modules/controller/sys/DmpMemberController.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest
;
import
com.jz.dmp.modules.model.DmpMember
;
import
com.jz.dmp.modules.service.sys.DmpMemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 用户表Controller
* @author ybz
*
*/
@RestController
@RequestMapping
(
"/dmp/member"
)
@Api
(
tags
=
"用户表"
)
public
class
DmpMemberController
{
@Autowired
private
DmpMemberService
dmpMemberService
;
/**列表查询用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/findList"
)
@ApiOperation
(
value
=
"列表查询用户表"
,
notes
=
"列表查询用户表"
)
public
PageInfoResponse
<
DmpMemberDto
>
findList
(
@RequestBody
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
){
PageInfoResponse
<
DmpMemberDto
>
pageInfo
=
new
PageInfoResponse
<
DmpMemberDto
>();
try
{
pageInfo
=
dmpMemberService
.
findList
(
dmpMemberRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
pageInfo
.
setMessage
(
"查询失败"
);
pageInfo
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
pageInfo
;
}
/**主键查询用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/view"
)
@ApiOperation
(
value
=
"主键查询用户表"
,
notes
=
"主键查询用户表"
)
public
BaseBeanResponse
<
DmpMemberDto
>
view
(
@RequestBody
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMemberDto
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMemberDto
>();
try
{
baseBeanResponse
=
dmpMemberService
.
findById
(
dmpMemberRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"请求失败"
);
baseBeanResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**删除用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/delete"
)
@ApiOperation
(
value
=
"删除用户表"
,
notes
=
"删除用户表"
)
public
BaseResponse
delete
(
@RequestBody
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
){
BaseResponse
baseResponse
=
new
BaseResponse
();
try
{
baseResponse
=
dmpMemberService
.
deleteById
(
dmpMemberRequest
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseResponse
.
setMessage
(
"删除失败"
);
baseResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseResponse
;
}
/**新增用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
@ApiOperation
(
value
=
"新增用户表"
,
notes
=
"新增用户表"
)
public
BaseBeanResponse
<
DmpMember
>
add
(
@RequestBody
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMember
>();
try
{
baseBeanResponse
=
dmpMemberService
.
add
(
dmpMember
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"新增失败"
);
baseBeanResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**批量新增用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/addBatch"
)
@ApiOperation
(
value
=
"批量新增用户表"
,
notes
=
"批量新增用户表"
)
public
BaseBeanResponse
<
DmpMemberBatch
>
addBatch
(
@RequestBody
DmpMemberBatch
dmpMemberBatch
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMemberBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMemberBatch
>();
try
{
baseBeanResponse
=
dmpMemberService
.
addBatch
(
dmpMemberBatch
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"批量新增失败"
);
baseBeanResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
/**修改用户表
* @param dmpMemberRequest
* @return
*/
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
@ApiOperation
(
value
=
"修改用户表"
,
notes
=
"修改用户表"
)
public
BaseBeanResponse
<
DmpMember
>
edit
(
@RequestBody
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
){
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<
DmpMember
>();
try
{
baseBeanResponse
=
dmpMemberService
.
edit
(
dmpMember
,
httpRequest
);
}
catch
(
Exception
e
)
{
baseBeanResponse
.
setMessage
(
"修改失败"
);
baseBeanResponse
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
.
val
());
e
.
printStackTrace
();
}
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpCodeDictionaryBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpCodeDictionary
;
/**
* @author ybz
*
*/
public
class
DmpCodeDictionaryBatch
{
private
List
<
DmpCodeDictionary
>
dmpCodeDictionarys
;
public
List
<
DmpCodeDictionary
>
getDmpCodeDictionarys
()
{
return
dmpCodeDictionarys
;
}
public
void
setDmpCodeDictionarys
(
List
<
DmpCodeDictionary
>
dmpCodeDictionarys
)
{
this
.
dmpCodeDictionarys
=
dmpCodeDictionarys
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpCodeDictionaryDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpCodeDictionary
;
import
io.swagger.annotations.ApiModel
;
/**编码字典Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"编码字典Dto"
,
description
=
"编码字典Dto"
)
public
class
DmpCodeDictionaryDto
extends
DmpCodeDictionary
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpCodeDictionaryRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.Date
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**编码字典参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"编码字典参数请求封装"
,
description
=
"编码字典参数请求封装"
)
public
class
DmpCodeDictionaryRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
codeId
;
/**
* 编码分类
*/
@ApiModelProperty
(
value
=
"编码分类"
)
private
String
codeType
;
/**
* 编码CODE
*/
@ApiModelProperty
(
value
=
"编码CODE"
)
private
String
codeKey
;
/**
* 编码值
*/
@ApiModelProperty
(
value
=
"编码值"
)
private
String
codeValue
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间起
*/
@ApiModelProperty
(
value
=
"创建时间起"
)
private
Date
createTimeStart
;
/**
* 创建时间止
*/
@ApiModelProperty
(
value
=
"创建时间止"
)
private
Date
createTimeEnd
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间起
*/
@ApiModelProperty
(
value
=
"修改时间起"
)
private
Date
updateTimeStart
;
/**
* 修改时间止
*/
@ApiModelProperty
(
value
=
"修改时间止"
)
private
Date
updateTimeEnd
;
public
Integer
getCodeId
()
{
return
codeId
;
}
public
void
setCodeId
(
Integer
codeId
)
{
this
.
codeId
=
codeId
;
}
public
String
getCodeType
()
{
return
codeType
;
}
public
void
setCodeType
(
String
codeType
)
{
this
.
codeType
=
codeType
;
}
public
String
getCodeKey
()
{
return
codeKey
;
}
public
void
setCodeKey
(
String
codeKey
)
{
this
.
codeKey
=
codeKey
;
}
public
String
getCodeValue
()
{
return
codeValue
;
}
public
void
setCodeValue
(
String
codeValue
)
{
this
.
codeValue
=
codeValue
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
public
void
setCreateTimeStart
(
Date
createTimeStart
)
{
this
.
createTimeStart
=
createTimeStart
;
}
public
Date
getCreateTimeEnd
()
{
return
createTimeEnd
;
}
public
void
setCreateTimeEnd
(
Date
createTimeEnd
)
{
this
.
createTimeEnd
=
createTimeEnd
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
public
void
setUpdateTimeStart
(
Date
updateTimeStart
)
{
this
.
updateTimeStart
=
updateTimeStart
;
}
public
Date
getUpdateTimeEnd
()
{
return
updateTimeEnd
;
}
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpMember
;
/**
* @author ybz
*
*/
public
class
DmpMemberBatch
{
private
List
<
DmpMember
>
dmpMembers
;
public
List
<
DmpMember
>
getDmpMembers
()
{
return
dmpMembers
;
}
public
void
setDmpMembers
(
List
<
DmpMember
>
dmpMembers
)
{
this
.
dmpMembers
=
dmpMembers
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpMember
;
import
io.swagger.annotations.ApiModel
;
/**用户表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"用户表Dto"
,
description
=
"用户表Dto"
)
public
class
DmpMemberDto
extends
DmpMember
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberProjectRoleBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpMemberProjectRole
;
/**
* @author ybz
*
*/
public
class
DmpMemberProjectRoleBatch
{
private
List
<
DmpMemberProjectRole
>
dmpMemberProjectRoles
;
public
List
<
DmpMemberProjectRole
>
getDmpMemberProjectRoles
()
{
return
dmpMemberProjectRoles
;
}
public
void
setDmpMemberProjectRoles
(
List
<
DmpMemberProjectRole
>
dmpMemberProjectRoles
)
{
this
.
dmpMemberProjectRoles
=
dmpMemberProjectRoles
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberProjectRoleDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpMemberProjectRole
;
import
io.swagger.annotations.ApiModel
;
/**用户项目角色表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"用户项目角色表Dto"
,
description
=
"用户项目角色表Dto"
)
public
class
DmpMemberProjectRoleDto
extends
DmpMemberProjectRole
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberProjectRoleRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**用户项目角色表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"用户项目角色表参数请求封装"
,
description
=
"用户项目角色表参数请求封装"
)
public
class
DmpMemberProjectRoleRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
memberProjectRoleId
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 项目ID
*/
@ApiModelProperty
(
value
=
"项目ID"
)
private
Integer
projectId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getMemberProjectRoleId
()
{
return
memberProjectRoleId
;
}
public
void
setMemberProjectRoleId
(
Integer
memberProjectRoleId
)
{
this
.
memberProjectRoleId
=
memberProjectRoleId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.Date
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**用户表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"用户表参数请求封装"
,
description
=
"用户表参数请求封装"
)
public
class
DmpMemberRequest
extends
BasePageBean
{
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 登录账号
*/
@ApiModelProperty
(
value
=
"登录账号"
)
private
String
userAccount
;
/**
* 用户名称
*/
@ApiModelProperty
(
value
=
"用户名称"
)
private
String
userName
;
/**
* 登录密码
*/
@ApiModelProperty
(
value
=
"登录密码"
)
private
String
userPassword
;
/**
* 联系电话
*/
@ApiModelProperty
(
value
=
"联系电话"
)
private
String
userPhone
;
/**
* 登录IP
*/
@ApiModelProperty
(
value
=
"登录IP"
)
private
String
loginIp
;
/**
* 最近登录时间起
*/
@ApiModelProperty
(
value
=
"最近登录时间起"
)
private
Date
loginTimeStart
;
/**
* 最近登录时间止
*/
@ApiModelProperty
(
value
=
"最近登录时间止"
)
private
Date
loginTimeEnd
;
/**
* 是否登录锁定(0:否,1:是)
*/
@ApiModelProperty
(
value
=
"是否登录锁定(0:否,1:是)"
)
private
String
loginLocked
;
/**
* 连续登录错误次数
*/
@ApiModelProperty
(
value
=
"连续登录错误次数"
)
private
Integer
loginErrtimes
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间起
*/
@ApiModelProperty
(
value
=
"创建时间起"
)
private
Date
createTimeStart
;
/**
* 创建时间止
*/
@ApiModelProperty
(
value
=
"创建时间止"
)
private
Date
createTimeEnd
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间起
*/
@ApiModelProperty
(
value
=
"修改时间起"
)
private
Date
updateTimeStart
;
/**
* 修改时间止
*/
@ApiModelProperty
(
value
=
"修改时间止"
)
private
Date
updateTimeEnd
;
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserAccount
()
{
return
userAccount
;
}
public
void
setUserAccount
(
String
userAccount
)
{
this
.
userAccount
=
userAccount
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getUserPassword
()
{
return
userPassword
;
}
public
void
setUserPassword
(
String
userPassword
)
{
this
.
userPassword
=
userPassword
;
}
public
String
getUserPhone
()
{
return
userPhone
;
}
public
void
setUserPhone
(
String
userPhone
)
{
this
.
userPhone
=
userPhone
;
}
public
String
getLoginIp
()
{
return
loginIp
;
}
public
void
setLoginIp
(
String
loginIp
)
{
this
.
loginIp
=
loginIp
;
}
public
Date
getLoginTimeStart
()
{
return
loginTimeStart
;
}
public
void
setLoginTimeStart
(
Date
loginTimeStart
)
{
this
.
loginTimeStart
=
loginTimeStart
;
}
public
Date
getLoginTimeEnd
()
{
return
loginTimeEnd
;
}
public
void
setLoginTimeEnd
(
Date
loginTimeEnd
)
{
this
.
loginTimeEnd
=
loginTimeEnd
;
}
public
String
getLoginLocked
()
{
return
loginLocked
;
}
public
void
setLoginLocked
(
String
loginLocked
)
{
this
.
loginLocked
=
loginLocked
;
}
public
Integer
getLoginErrtimes
()
{
return
loginErrtimes
;
}
public
void
setLoginErrtimes
(
Integer
loginErrtimes
)
{
this
.
loginErrtimes
=
loginErrtimes
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
public
void
setCreateTimeStart
(
Date
createTimeStart
)
{
this
.
createTimeStart
=
createTimeStart
;
}
public
Date
getCreateTimeEnd
()
{
return
createTimeEnd
;
}
public
void
setCreateTimeEnd
(
Date
createTimeEnd
)
{
this
.
createTimeEnd
=
createTimeEnd
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
public
void
setUpdateTimeStart
(
Date
updateTimeStart
)
{
this
.
updateTimeStart
=
updateTimeStart
;
}
public
Date
getUpdateTimeEnd
()
{
return
updateTimeEnd
;
}
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberRoleBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpMemberRole
;
/**
* @author ybz
*
*/
public
class
DmpMemberRoleBatch
{
private
List
<
DmpMemberRole
>
dmpMemberRoles
;
public
List
<
DmpMemberRole
>
getDmpMemberRoles
()
{
return
dmpMemberRoles
;
}
public
void
setDmpMemberRoles
(
List
<
DmpMemberRole
>
dmpMemberRoles
)
{
this
.
dmpMemberRoles
=
dmpMemberRoles
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberRoleDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpMemberRole
;
import
io.swagger.annotations.ApiModel
;
/**用户角色关系表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"用户角色关系表Dto"
,
description
=
"用户角色关系表Dto"
)
public
class
DmpMemberRoleDto
extends
DmpMemberRole
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpMemberRoleRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**用户角色关系表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"用户角色关系表参数请求封装"
,
description
=
"用户角色关系表参数请求封装"
)
public
class
DmpMemberRoleRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
userRoleId
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getUserRoleId
()
{
return
userRoleId
;
}
public
void
setUserRoleId
(
Integer
userRoleId
)
{
this
.
userRoleId
=
userRoleId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpPermissionBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpPermission
;
/**
* @author ybz
*
*/
public
class
DmpPermissionBatch
{
private
List
<
DmpPermission
>
dmpPermissions
;
public
List
<
DmpPermission
>
getDmpPermissions
()
{
return
dmpPermissions
;
}
public
void
setDmpPermissions
(
List
<
DmpPermission
>
dmpPermissions
)
{
this
.
dmpPermissions
=
dmpPermissions
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpPermissionDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpPermission
;
import
io.swagger.annotations.ApiModel
;
/**资源表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"资源表Dto"
,
description
=
"资源表Dto"
)
public
class
DmpPermissionDto
extends
DmpPermission
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpPermissionRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.Date
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**资源表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"资源表参数请求封装"
,
description
=
"资源表参数请求封装"
)
public
class
DmpPermissionRequest
extends
BasePageBean
{
/**
* 资源ID
*/
@ApiModelProperty
(
value
=
"资源ID"
)
private
Integer
permissionId
;
/**
* 资源编码
*/
@ApiModelProperty
(
value
=
"资源编码"
)
private
String
permissionCode
;
/**
* 资源名称
*/
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
permissionName
;
/**
* 资源描述
*/
@ApiModelProperty
(
value
=
"资源描述"
)
private
String
permissionDesc
;
/**
* 资源URL
*/
@ApiModelProperty
(
value
=
"资源URL"
)
private
String
permissionUrl
;
/**
* 资源类型(关联字典编码表)
*/
@ApiModelProperty
(
value
=
"资源类型(关联字典编码表)"
)
private
String
permissionType
;
/**
* 排序
*/
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
permissionSort
;
/**
* 父级编码
*/
@ApiModelProperty
(
value
=
"父级编码"
)
private
String
parentCode
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间起
*/
@ApiModelProperty
(
value
=
"创建时间起"
)
private
Date
createTimeStart
;
/**
* 创建时间止
*/
@ApiModelProperty
(
value
=
"创建时间止"
)
private
Date
createTimeEnd
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间起
*/
@ApiModelProperty
(
value
=
"修改时间起"
)
private
Date
updateTimeStart
;
/**
* 修改时间止
*/
@ApiModelProperty
(
value
=
"修改时间止"
)
private
Date
updateTimeEnd
;
public
Integer
getPermissionId
()
{
return
permissionId
;
}
public
void
setPermissionId
(
Integer
permissionId
)
{
this
.
permissionId
=
permissionId
;
}
public
String
getPermissionCode
()
{
return
permissionCode
;
}
public
void
setPermissionCode
(
String
permissionCode
)
{
this
.
permissionCode
=
permissionCode
;
}
public
String
getPermissionName
()
{
return
permissionName
;
}
public
void
setPermissionName
(
String
permissionName
)
{
this
.
permissionName
=
permissionName
;
}
public
String
getPermissionDesc
()
{
return
permissionDesc
;
}
public
void
setPermissionDesc
(
String
permissionDesc
)
{
this
.
permissionDesc
=
permissionDesc
;
}
public
String
getPermissionUrl
()
{
return
permissionUrl
;
}
public
void
setPermissionUrl
(
String
permissionUrl
)
{
this
.
permissionUrl
=
permissionUrl
;
}
public
String
getPermissionType
()
{
return
permissionType
;
}
public
void
setPermissionType
(
String
permissionType
)
{
this
.
permissionType
=
permissionType
;
}
public
Integer
getPermissionSort
()
{
return
permissionSort
;
}
public
void
setPermissionSort
(
Integer
permissionSort
)
{
this
.
permissionSort
=
permissionSort
;
}
public
String
getParentCode
()
{
return
parentCode
;
}
public
void
setParentCode
(
String
parentCode
)
{
this
.
parentCode
=
parentCode
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
public
void
setCreateTimeStart
(
Date
createTimeStart
)
{
this
.
createTimeStart
=
createTimeStart
;
}
public
Date
getCreateTimeEnd
()
{
return
createTimeEnd
;
}
public
void
setCreateTimeEnd
(
Date
createTimeEnd
)
{
this
.
createTimeEnd
=
createTimeEnd
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
public
void
setUpdateTimeStart
(
Date
updateTimeStart
)
{
this
.
updateTimeStart
=
updateTimeStart
;
}
public
Date
getUpdateTimeEnd
()
{
return
updateTimeEnd
;
}
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpProjectRoleBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpProjectRole
;
/**
* @author ybz
*
*/
public
class
DmpProjectRoleBatch
{
private
List
<
DmpProjectRole
>
dmpProjectRoles
;
public
List
<
DmpProjectRole
>
getDmpProjectRoles
()
{
return
dmpProjectRoles
;
}
public
void
setDmpProjectRoles
(
List
<
DmpProjectRole
>
dmpProjectRoles
)
{
this
.
dmpProjectRoles
=
dmpProjectRoles
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpProjectRoleDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpProjectRole
;
import
io.swagger.annotations.ApiModel
;
/**项目角色关系表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"项目角色关系表Dto"
,
description
=
"项目角色关系表Dto"
)
public
class
DmpProjectRoleDto
extends
DmpProjectRole
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpProjectRoleRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**项目角色关系表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"项目角色关系表参数请求封装"
,
description
=
"项目角色关系表参数请求封装"
)
public
class
DmpProjectRoleRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
projectRoleId
;
/**
* 项目ID
*/
@ApiModelProperty
(
value
=
"项目ID"
)
private
Integer
projectId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getProjectRoleId
()
{
return
projectRoleId
;
}
public
void
setProjectRoleId
(
Integer
projectRoleId
)
{
this
.
projectRoleId
=
projectRoleId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRoleBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpRole
;
/**
* @author ybz
*
*/
public
class
DmpRoleBatch
{
private
List
<
DmpRole
>
dmpRoles
;
public
List
<
DmpRole
>
getDmpRoles
()
{
return
dmpRoles
;
}
public
void
setDmpRoles
(
List
<
DmpRole
>
dmpRoles
)
{
this
.
dmpRoles
=
dmpRoles
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRoleDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpRole
;
import
io.swagger.annotations.ApiModel
;
/**角色表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"角色表Dto"
,
description
=
"角色表Dto"
)
public
class
DmpRoleDto
extends
DmpRole
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRolePermissionBatch.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.List
;
import
com.jz.dmp.modules.model.DmpRolePermission
;
/**
* @author ybz
*
*/
public
class
DmpRolePermissionBatch
{
private
List
<
DmpRolePermission
>
dmpRolePermissions
;
public
List
<
DmpRolePermission
>
getDmpRolePermissions
()
{
return
dmpRolePermissions
;
}
public
void
setDmpRolePermissions
(
List
<
DmpRolePermission
>
dmpRolePermissions
)
{
this
.
dmpRolePermissions
=
dmpRolePermissions
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRolePermissionDto.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.dmp.modules.model.DmpRolePermission
;
import
io.swagger.annotations.ApiModel
;
/**角色资源关系表Dto
* @author ybz
*
*/
@ApiModel
(
value
=
"角色资源关系表Dto"
,
description
=
"角色资源关系表Dto"
)
public
class
DmpRolePermissionDto
extends
DmpRolePermission
{
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRolePermissionRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**角色资源关系表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"角色资源关系表参数请求封装"
,
description
=
"角色资源关系表参数请求封装"
)
public
class
DmpRolePermissionRequest
extends
BasePageBean
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
rolePermissionId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
/**
* 资源ID
*/
@ApiModelProperty
(
value
=
"资源ID"
)
private
Integer
permissionId
;
public
Integer
getRolePermissionId
()
{
return
rolePermissionId
;
}
public
void
setRolePermissionId
(
Integer
rolePermissionId
)
{
this
.
rolePermissionId
=
rolePermissionId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Integer
getPermissionId
()
{
return
permissionId
;
}
public
void
setPermissionId
(
Integer
permissionId
)
{
this
.
permissionId
=
permissionId
;
}
}
src/main/java/com/jz/dmp/modules/controller/sys/bean/DmpRoleRequest.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
controller
.
sys
.
bean
;
import
java.util.Date
;
import
com.jz.common.bean.BasePageBean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**角色表参数请求封装
* @author ybz
*
*/
@ApiModel
(
value
=
"角色表参数请求封装"
,
description
=
"角色表参数请求封装"
)
public
class
DmpRoleRequest
extends
BasePageBean
{
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
/**
* 角色编码
*/
@ApiModelProperty
(
value
=
"角色编码"
)
private
String
roleCode
;
/**
* 角色名称
*/
@ApiModelProperty
(
value
=
"角色名称"
)
private
String
roleName
;
/**
* 角色描述
*/
@ApiModelProperty
(
value
=
"角色描述"
)
private
String
roleDesc
;
/**
* 角色类型
*/
@ApiModelProperty
(
value
=
"角色类型"
)
private
String
roleType
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间起
*/
@ApiModelProperty
(
value
=
"创建时间起"
)
private
Date
createTimeStart
;
/**
* 创建时间止
*/
@ApiModelProperty
(
value
=
"创建时间止"
)
private
Date
createTimeEnd
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间起
*/
@ApiModelProperty
(
value
=
"修改时间起"
)
private
Date
updateTimeStart
;
/**
* 修改时间止
*/
@ApiModelProperty
(
value
=
"修改时间止"
)
private
Date
updateTimeEnd
;
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getRoleCode
()
{
return
roleCode
;
}
public
void
setRoleCode
(
String
roleCode
)
{
this
.
roleCode
=
roleCode
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getRoleDesc
()
{
return
roleDesc
;
}
public
void
setRoleDesc
(
String
roleDesc
)
{
this
.
roleDesc
=
roleDesc
;
}
public
String
getRoleType
()
{
return
roleType
;
}
public
void
setRoleType
(
String
roleType
)
{
this
.
roleType
=
roleType
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
public
void
setCreateTimeStart
(
Date
createTimeStart
)
{
this
.
createTimeStart
=
createTimeStart
;
}
public
Date
getCreateTimeEnd
()
{
return
createTimeEnd
;
}
public
void
setCreateTimeEnd
(
Date
createTimeEnd
)
{
this
.
createTimeEnd
=
createTimeEnd
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTimeStart
()
{
return
updateTimeStart
;
}
public
void
setUpdateTimeStart
(
Date
updateTimeStart
)
{
this
.
updateTimeStart
=
updateTimeStart
;
}
public
Date
getUpdateTimeEnd
()
{
return
updateTimeEnd
;
}
public
void
setUpdateTimeEnd
(
Date
updateTimeEnd
)
{
this
.
updateTimeEnd
=
updateTimeEnd
;
}
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpCodeDictionaryMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryDto
;
import
com.jz.dmp.modules.model.DmpCodeDictionary
;
/**编码字典 mapper
* @author ybz
*
*/
public
interface
DmpCodeDictionaryMapper
{
/**新增编码字典
* @param dmpCodeDictionary
* @return
* @throws Exception
*/
public
int
insert
(
DmpCodeDictionary
dmpCodeDictionary
)
throws
Exception
;
/**选择性增加编码字典
* @param dmpCodeDictionary
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpCodeDictionary
dmpCodeDictionary
)
throws
Exception
;
/**主键修改编码字典
* @param dmpCodeDictionary
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpCodeDictionary
dmpCodeDictionary
)
throws
Exception
;
/**选择性修改编码字典
* @param dmpCodeDictionary
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpCodeDictionary
dmpCodeDictionary
)
throws
Exception
;
/**主键查询编码字典
* @param dmpCodeDictionaryId
* @return
* @throws Exception
*/
public
DmpCodeDictionary
selectByPrimaryKey
(
Integer
dmpCodeDictionaryId
)
throws
Exception
;
/**主键删除编码字典
* @param dmpCodeDictionaryId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpCodeDictionaryId
)
throws
Exception
;
/**条件查询编码字典
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpCodeDictionaryDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询编码字典
* @param dmpCodeDictionaryId
* @return
* @throws Exception
*/
public
DmpCodeDictionaryDto
findById
(
Integer
dmpCodeDictionaryId
)
throws
Exception
;
/**批量新增编码字典
* @param dmpCodeDictionarys
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpCodeDictionary
>
dmpCodeDictionarys
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpMemberMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.model.DmpMember
;
/**用户表 mapper
* @author ybz
*
*/
public
interface
DmpMemberMapper
{
/**新增用户表
* @param dmpMember
* @return
* @throws Exception
*/
public
int
insert
(
DmpMember
dmpMember
)
throws
Exception
;
/**选择性增加用户表
* @param dmpMember
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpMember
dmpMember
)
throws
Exception
;
/**主键修改用户表
* @param dmpMember
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpMember
dmpMember
)
throws
Exception
;
/**选择性修改用户表
* @param dmpMember
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpMember
dmpMember
)
throws
Exception
;
/**主键查询用户表
* @param dmpMemberId
* @return
* @throws Exception
*/
public
DmpMember
selectByPrimaryKey
(
Integer
dmpMemberId
)
throws
Exception
;
/**主键删除用户表
* @param dmpMemberId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpMemberId
)
throws
Exception
;
/**条件查询用户表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpMemberDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询用户表
* @param dmpMemberId
* @return
* @throws Exception
*/
public
DmpMemberDto
findById
(
Integer
dmpMemberId
)
throws
Exception
;
/**批量新增用户表
* @param dmpMembers
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpMember
>
dmpMembers
)
throws
Exception
;
/**
* @Title: findByUserName
* @Description: TODO(通过用户名获取用户信息)
* @param @param userName
* @param @return
* @param @throws Exception 参数
* @return DmpMember 返回类型
* @throws
*/
public
DmpMember
findByUserName
(
String
userName
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpMemberProjectRoleMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto
;
import
com.jz.dmp.modules.model.DmpMemberProjectRole
;
/**用户项目角色表 mapper
* @author ybz
*
*/
public
interface
DmpMemberProjectRoleMapper
{
/**新增用户项目角色表
* @param dmpMemberProjectRole
* @return
* @throws Exception
*/
public
int
insert
(
DmpMemberProjectRole
dmpMemberProjectRole
)
throws
Exception
;
/**选择性增加用户项目角色表
* @param dmpMemberProjectRole
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpMemberProjectRole
dmpMemberProjectRole
)
throws
Exception
;
/**主键修改用户项目角色表
* @param dmpMemberProjectRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpMemberProjectRole
dmpMemberProjectRole
)
throws
Exception
;
/**选择性修改用户项目角色表
* @param dmpMemberProjectRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpMemberProjectRole
dmpMemberProjectRole
)
throws
Exception
;
/**主键查询用户项目角色表
* @param dmpMemberProjectRoleId
* @return
* @throws Exception
*/
public
DmpMemberProjectRole
selectByPrimaryKey
(
Integer
dmpMemberProjectRoleId
)
throws
Exception
;
/**主键删除用户项目角色表
* @param dmpMemberProjectRoleId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpMemberProjectRoleId
)
throws
Exception
;
/**条件查询用户项目角色表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpMemberProjectRoleDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询用户项目角色表
* @param dmpMemberProjectRoleId
* @return
* @throws Exception
*/
public
DmpMemberProjectRoleDto
findById
(
Integer
dmpMemberProjectRoleId
)
throws
Exception
;
/**批量新增用户项目角色表
* @param dmpMemberProjectRoles
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpMemberProjectRole
>
dmpMemberProjectRoles
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpMemberRoleMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleDto
;
import
com.jz.dmp.modules.model.DmpMemberRole
;
/**用户角色关系表 mapper
* @author ybz
*
*/
public
interface
DmpMemberRoleMapper
{
/**新增用户角色关系表
* @param dmpMemberRole
* @return
* @throws Exception
*/
public
int
insert
(
DmpMemberRole
dmpMemberRole
)
throws
Exception
;
/**选择性增加用户角色关系表
* @param dmpMemberRole
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpMemberRole
dmpMemberRole
)
throws
Exception
;
/**主键修改用户角色关系表
* @param dmpMemberRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpMemberRole
dmpMemberRole
)
throws
Exception
;
/**选择性修改用户角色关系表
* @param dmpMemberRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpMemberRole
dmpMemberRole
)
throws
Exception
;
/**主键查询用户角色关系表
* @param dmpMemberRoleId
* @return
* @throws Exception
*/
public
DmpMemberRole
selectByPrimaryKey
(
Integer
dmpMemberRoleId
)
throws
Exception
;
/**主键删除用户角色关系表
* @param dmpMemberRoleId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpMemberRoleId
)
throws
Exception
;
/**条件查询用户角色关系表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpMemberRoleDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询用户角色关系表
* @param dmpMemberRoleId
* @return
* @throws Exception
*/
public
DmpMemberRoleDto
findById
(
Integer
dmpMemberRoleId
)
throws
Exception
;
/**批量新增用户角色关系表
* @param dmpMemberRoles
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpMemberRole
>
dmpMemberRoles
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpPermissionMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionDto
;
import
com.jz.dmp.modules.model.DmpPermission
;
/**资源表 mapper
* @author ybz
*
*/
public
interface
DmpPermissionMapper
{
/**新增资源表
* @param dmpPermission
* @return
* @throws Exception
*/
public
int
insert
(
DmpPermission
dmpPermission
)
throws
Exception
;
/**选择性增加资源表
* @param dmpPermission
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpPermission
dmpPermission
)
throws
Exception
;
/**主键修改资源表
* @param dmpPermission
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpPermission
dmpPermission
)
throws
Exception
;
/**选择性修改资源表
* @param dmpPermission
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpPermission
dmpPermission
)
throws
Exception
;
/**主键查询资源表
* @param dmpPermissionId
* @return
* @throws Exception
*/
public
DmpPermission
selectByPrimaryKey
(
Integer
dmpPermissionId
)
throws
Exception
;
/**主键删除资源表
* @param dmpPermissionId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpPermissionId
)
throws
Exception
;
/**条件查询资源表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpPermissionDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询资源表
* @param dmpPermissionId
* @return
* @throws Exception
*/
public
DmpPermissionDto
findById
(
Integer
dmpPermissionId
)
throws
Exception
;
/**批量新增资源表
* @param dmpPermissions
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpPermission
>
dmpPermissions
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpProjectRoleMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleDto
;
import
com.jz.dmp.modules.model.DmpProjectRole
;
/**项目角色关系表 mapper
* @author ybz
*
*/
public
interface
DmpProjectRoleMapper
{
/**新增项目角色关系表
* @param dmpProjectRole
* @return
* @throws Exception
*/
public
int
insert
(
DmpProjectRole
dmpProjectRole
)
throws
Exception
;
/**选择性增加项目角色关系表
* @param dmpProjectRole
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpProjectRole
dmpProjectRole
)
throws
Exception
;
/**主键修改项目角色关系表
* @param dmpProjectRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpProjectRole
dmpProjectRole
)
throws
Exception
;
/**选择性修改项目角色关系表
* @param dmpProjectRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpProjectRole
dmpProjectRole
)
throws
Exception
;
/**主键查询项目角色关系表
* @param dmpProjectRoleId
* @return
* @throws Exception
*/
public
DmpProjectRole
selectByPrimaryKey
(
Integer
dmpProjectRoleId
)
throws
Exception
;
/**主键删除项目角色关系表
* @param dmpProjectRoleId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpProjectRoleId
)
throws
Exception
;
/**条件查询项目角色关系表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpProjectRoleDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询项目角色关系表
* @param dmpProjectRoleId
* @return
* @throws Exception
*/
public
DmpProjectRoleDto
findById
(
Integer
dmpProjectRoleId
)
throws
Exception
;
/**批量新增项目角色关系表
* @param dmpProjectRoles
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpProjectRole
>
dmpProjectRoles
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpRoleMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleDto
;
import
com.jz.dmp.modules.model.DmpRole
;
/**角色表 mapper
* @author ybz
*
*/
public
interface
DmpRoleMapper
{
/**新增角色表
* @param dmpRole
* @return
* @throws Exception
*/
public
int
insert
(
DmpRole
dmpRole
)
throws
Exception
;
/**选择性增加角色表
* @param dmpRole
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpRole
dmpRole
)
throws
Exception
;
/**主键修改角色表
* @param dmpRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpRole
dmpRole
)
throws
Exception
;
/**选择性修改角色表
* @param dmpRole
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpRole
dmpRole
)
throws
Exception
;
/**主键查询角色表
* @param dmpRoleId
* @return
* @throws Exception
*/
public
DmpRole
selectByPrimaryKey
(
Integer
dmpRoleId
)
throws
Exception
;
/**主键删除角色表
* @param dmpRoleId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpRoleId
)
throws
Exception
;
/**条件查询角色表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpRoleDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询角色表
* @param dmpRoleId
* @return
* @throws Exception
*/
public
DmpRoleDto
findById
(
Integer
dmpRoleId
)
throws
Exception
;
/**批量新增角色表
* @param dmpRoles
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpRole
>
dmpRoles
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/dao/sys/DmpRolePermissionMapper.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
dao
.
sys
;
import
java.util.List
;
import
java.util.Map
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionDto
;
import
com.jz.dmp.modules.model.DmpRolePermission
;
/**角色资源关系表 mapper
* @author ybz
*
*/
public
interface
DmpRolePermissionMapper
{
/**新增角色资源关系表
* @param dmpRolePermission
* @return
* @throws Exception
*/
public
int
insert
(
DmpRolePermission
dmpRolePermission
)
throws
Exception
;
/**选择性增加角色资源关系表
* @param dmpRolePermission
* @return
* @throws Exception
*/
public
int
insertSelective
(
DmpRolePermission
dmpRolePermission
)
throws
Exception
;
/**主键修改角色资源关系表
* @param dmpRolePermission
* @return
* @throws Exception
*/
public
int
updateByPrimaryKey
(
DmpRolePermission
dmpRolePermission
)
throws
Exception
;
/**选择性修改角色资源关系表
* @param dmpRolePermission
* @return
* @throws Exception
*/
public
int
updateByPrimaryKeySelective
(
DmpRolePermission
dmpRolePermission
)
throws
Exception
;
/**主键查询角色资源关系表
* @param dmpRolePermissionId
* @return
* @throws Exception
*/
public
DmpRolePermission
selectByPrimaryKey
(
Integer
dmpRolePermissionId
)
throws
Exception
;
/**主键删除角色资源关系表
* @param dmpRolePermissionId
* @return
* @throws Exception
*/
public
int
deleteByPrimaryKey
(
Integer
dmpRolePermissionId
)
throws
Exception
;
/**条件查询角色资源关系表
* @param param
* @return
* @throws Exception
*/
public
List
<
DmpRolePermissionDto
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**主键查询角色资源关系表
* @param dmpRolePermissionId
* @return
* @throws Exception
*/
public
DmpRolePermissionDto
findById
(
Integer
dmpRolePermissionId
)
throws
Exception
;
/**批量新增角色资源关系表
* @param dmpRolePermissions
* @throws Exception
*/
public
void
insertBatch
(
List
<
DmpRolePermission
>
dmpRolePermissions
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/model/DmpCodeDictionary.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**编码字典
* @author ybz
*
*/
@ApiModel
(
value
=
"编码字典"
,
description
=
"编码字典"
)
public
class
DmpCodeDictionary
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
codeId
;
/**
* 编码分类
*/
@ApiModelProperty
(
value
=
"编码分类"
)
private
String
codeType
;
/**
* 编码CODE
*/
@ApiModelProperty
(
value
=
"编码CODE"
)
private
String
codeKey
;
/**
* 编码值
*/
@ApiModelProperty
(
value
=
"编码值"
)
private
String
codeValue
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
public
Integer
getCodeId
()
{
return
codeId
;
}
public
void
setCodeId
(
Integer
codeId
)
{
this
.
codeId
=
codeId
;
}
public
String
getCodeType
()
{
return
codeType
;
}
public
void
setCodeType
(
String
codeType
)
{
this
.
codeType
=
codeType
;
}
public
String
getCodeKey
()
{
return
codeKey
;
}
public
void
setCodeKey
(
String
codeKey
)
{
this
.
codeKey
=
codeKey
;
}
public
String
getCodeValue
()
{
return
codeValue
;
}
public
void
setCodeValue
(
String
codeValue
)
{
this
.
codeValue
=
codeValue
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpMember.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.userdetails.UserDetails
;
/**用户表
* @author ybz
*
*/
@ApiModel
(
value
=
"用户表"
,
description
=
"用户表"
)
public
class
DmpMember
implements
UserDetails
{
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 用户名称
*/
@ApiModelProperty
(
value
=
"用户名称"
)
private
String
userName
;
/**
* 登录密码
*/
@ApiModelProperty
(
value
=
"登录密码"
)
private
String
userPassword
;
/**
* 真实姓名
*/
@ApiModelProperty
(
value
=
"真实姓名"
)
private
String
realName
;
/**
* 联系电话
*/
@ApiModelProperty
(
value
=
"联系电话"
)
private
String
userPhone
;
/**
* 登录IP
*/
@ApiModelProperty
(
value
=
"登录IP"
)
private
String
loginIp
;
/**
* 最近登录时间
*/
@ApiModelProperty
(
value
=
"最近登录时间"
)
private
Date
loginTime
;
/**
* 是否登录锁定(0:否,1:是)
*/
@ApiModelProperty
(
value
=
"是否登录锁定(0:否,1:是)"
)
private
String
loginLocked
;
/**
* 连续登录错误次数
*/
@ApiModelProperty
(
value
=
"连续登录错误次数"
)
private
Integer
loginErrtimes
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
private
List
<?
extends
GrantedAuthority
>
authorities
;
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getUserPassword
()
{
return
userPassword
;
}
public
void
setUserPassword
(
String
userPassword
)
{
this
.
userPassword
=
userPassword
;
}
public
String
getRealName
()
{
return
realName
;
}
public
void
setRealName
(
String
realName
)
{
this
.
realName
=
realName
;
}
public
String
getUserPhone
()
{
return
userPhone
;
}
public
void
setUserPhone
(
String
userPhone
)
{
this
.
userPhone
=
userPhone
;
}
public
String
getLoginIp
()
{
return
loginIp
;
}
public
void
setLoginIp
(
String
loginIp
)
{
this
.
loginIp
=
loginIp
;
}
public
Date
getLoginTime
()
{
return
loginTime
;
}
public
void
setLoginTime
(
Date
loginTime
)
{
this
.
loginTime
=
loginTime
;
}
public
String
getLoginLocked
()
{
return
loginLocked
;
}
public
void
setLoginLocked
(
String
loginLocked
)
{
this
.
loginLocked
=
loginLocked
;
}
public
Integer
getLoginErrtimes
()
{
return
loginErrtimes
;
}
public
void
setLoginErrtimes
(
Integer
loginErrtimes
)
{
this
.
loginErrtimes
=
loginErrtimes
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
void
setAuthorities
(
List
<?
extends
GrantedAuthority
>
authorities
)
{
this
.
authorities
=
authorities
;
}
@Override
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
// TODO Auto-generated method stub
return
this
.
authorities
;
}
@Override
public
String
getPassword
()
{
// TODO Auto-generated method stub
return
this
.
userPassword
;
}
@Override
public
String
getUsername
()
{
// TODO Auto-generated method stub
return
this
.
userName
;
}
@Override
public
boolean
isAccountNonExpired
()
{
// TODO Auto-generated method stub
return
true
;
}
@Override
public
boolean
isAccountNonLocked
()
{
// TODO Auto-generated method stub
return
true
;
}
@Override
public
boolean
isCredentialsNonExpired
()
{
// TODO Auto-generated method stub
return
true
;
}
@Override
public
boolean
isEnabled
()
{
// TODO Auto-generated method stub
return
true
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpMemberProjectRole.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**用户项目角色表
* @author ybz
*
*/
@ApiModel
(
value
=
"用户项目角色表"
,
description
=
"用户项目角色表"
)
public
class
DmpMemberProjectRole
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
memberProjectRoleId
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 项目ID
*/
@ApiModelProperty
(
value
=
"项目ID"
)
private
Integer
projectId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getMemberProjectRoleId
()
{
return
memberProjectRoleId
;
}
public
void
setMemberProjectRoleId
(
Integer
memberProjectRoleId
)
{
this
.
memberProjectRoleId
=
memberProjectRoleId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpMemberRole.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**用户角色关系表
* @author ybz
*
*/
@ApiModel
(
value
=
"用户角色关系表"
,
description
=
"用户角色关系表"
)
public
class
DmpMemberRole
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
userRoleId
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getUserRoleId
()
{
return
userRoleId
;
}
public
void
setUserRoleId
(
Integer
userRoleId
)
{
this
.
userRoleId
=
userRoleId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpPermission.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**资源表
* @author ybz
*
*/
@ApiModel
(
value
=
"资源表"
,
description
=
"资源表"
)
public
class
DmpPermission
{
/**
* 资源ID
*/
@ApiModelProperty
(
value
=
"资源ID"
)
private
Integer
permissionId
;
/**
* 资源编码
*/
@ApiModelProperty
(
value
=
"资源编码"
)
private
String
permissionCode
;
/**
* 资源名称
*/
@ApiModelProperty
(
value
=
"资源名称"
)
private
String
permissionName
;
/**
* 资源描述
*/
@ApiModelProperty
(
value
=
"资源描述"
)
private
String
permissionDesc
;
/**
* 资源URL
*/
@ApiModelProperty
(
value
=
"资源URL"
)
private
String
permissionUrl
;
/**
* 资源类型(关联字典编码表)
*/
@ApiModelProperty
(
value
=
"资源类型(关联字典编码表)"
)
private
String
permissionType
;
/**
* 排序
*/
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
permissionSort
;
/**
* 父级编码
*/
@ApiModelProperty
(
value
=
"父级编码"
)
private
String
parentCode
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
public
Integer
getPermissionId
()
{
return
permissionId
;
}
public
void
setPermissionId
(
Integer
permissionId
)
{
this
.
permissionId
=
permissionId
;
}
public
String
getPermissionCode
()
{
return
permissionCode
;
}
public
void
setPermissionCode
(
String
permissionCode
)
{
this
.
permissionCode
=
permissionCode
;
}
public
String
getPermissionName
()
{
return
permissionName
;
}
public
void
setPermissionName
(
String
permissionName
)
{
this
.
permissionName
=
permissionName
;
}
public
String
getPermissionDesc
()
{
return
permissionDesc
;
}
public
void
setPermissionDesc
(
String
permissionDesc
)
{
this
.
permissionDesc
=
permissionDesc
;
}
public
String
getPermissionUrl
()
{
return
permissionUrl
;
}
public
void
setPermissionUrl
(
String
permissionUrl
)
{
this
.
permissionUrl
=
permissionUrl
;
}
public
String
getPermissionType
()
{
return
permissionType
;
}
public
void
setPermissionType
(
String
permissionType
)
{
this
.
permissionType
=
permissionType
;
}
public
Integer
getPermissionSort
()
{
return
permissionSort
;
}
public
void
setPermissionSort
(
Integer
permissionSort
)
{
this
.
permissionSort
=
permissionSort
;
}
public
String
getParentCode
()
{
return
parentCode
;
}
public
void
setParentCode
(
String
parentCode
)
{
this
.
parentCode
=
parentCode
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpProjectRole.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**项目角色关系表
* @author ybz
*
*/
@ApiModel
(
value
=
"项目角色关系表"
,
description
=
"项目角色关系表"
)
public
class
DmpProjectRole
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
projectRoleId
;
/**
* 项目ID
*/
@ApiModelProperty
(
value
=
"项目ID"
)
private
Integer
projectId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
public
Integer
getProjectRoleId
()
{
return
projectRoleId
;
}
public
void
setProjectRoleId
(
Integer
projectRoleId
)
{
this
.
projectRoleId
=
projectRoleId
;
}
public
Integer
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
Integer
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpRole.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
/**角色表
* @author ybz
*
*/
@ApiModel
(
value
=
"角色表"
,
description
=
"角色表"
)
public
class
DmpRole
{
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
/**
* 角色编码
*/
@ApiModelProperty
(
value
=
"角色编码"
)
private
String
roleCode
;
/**
* 角色名称
*/
@ApiModelProperty
(
value
=
"角色名称"
)
private
String
roleName
;
/**
* 角色描述
*/
@ApiModelProperty
(
value
=
"角色描述"
)
private
String
roleDesc
;
/**
* 角色类型
*/
@ApiModelProperty
(
value
=
"角色类型"
)
private
String
roleType
;
/**
* 备注
*/
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
/**
* 数据状态(0:删除,1,未删除)
*/
@ApiModelProperty
(
value
=
"数据状态(0:删除,1,未删除)"
)
private
String
dataStatus
;
/**
* 创建用户ID
*/
@ApiModelProperty
(
value
=
"创建用户ID"
)
private
Integer
createUserId
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
/**
* 修改用户ID
*/
@ApiModelProperty
(
value
=
"修改用户ID"
)
private
Integer
updateUserId
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
private
Date
updateTime
;
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getRoleCode
()
{
return
roleCode
;
}
public
void
setRoleCode
(
String
roleCode
)
{
this
.
roleCode
=
roleCode
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getRoleDesc
()
{
return
roleDesc
;
}
public
void
setRoleDesc
(
String
roleDesc
)
{
this
.
roleDesc
=
roleDesc
;
}
public
String
getRoleType
()
{
return
roleType
;
}
public
void
setRoleType
(
String
roleType
)
{
this
.
roleType
=
roleType
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getDataStatus
()
{
return
dataStatus
;
}
public
void
setDataStatus
(
String
dataStatus
)
{
this
.
dataStatus
=
dataStatus
;
}
public
Integer
getCreateUserId
()
{
return
createUserId
;
}
public
void
setCreateUserId
(
Integer
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getUpdateUserId
()
{
return
updateUserId
;
}
public
void
setUpdateUserId
(
Integer
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
src/main/java/com/jz/dmp/modules/model/DmpRolePermission.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**角色资源关系表
* @author ybz
*
*/
@ApiModel
(
value
=
"角色资源关系表"
,
description
=
"角色资源关系表"
)
public
class
DmpRolePermission
{
/**
* 主键
*/
@ApiModelProperty
(
value
=
"主键"
)
private
Integer
rolePermissionId
;
/**
* 角色ID
*/
@ApiModelProperty
(
value
=
"角色ID"
)
private
Integer
roleId
;
/**
* 资源ID
*/
@ApiModelProperty
(
value
=
"资源ID"
)
private
Integer
permissionId
;
public
Integer
getRolePermissionId
()
{
return
rolePermissionId
;
}
public
void
setRolePermissionId
(
Integer
rolePermissionId
)
{
this
.
rolePermissionId
=
rolePermissionId
;
}
public
Integer
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Integer
roleId
)
{
this
.
roleId
=
roleId
;
}
public
Integer
getPermissionId
()
{
return
permissionId
;
}
public
void
setPermissionId
(
Integer
permissionId
)
{
this
.
permissionId
=
permissionId
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/DmpCodeDictionaryService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryRequest
;
import
com.jz.dmp.modules.model.DmpCodeDictionary
;
/**
* 编码字典服务接口
* @author ybz
*
*/
public
interface
DmpCodeDictionaryService
{
/**条件查询所有编码字典
* @param dmpCodeDictionaryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpCodeDictionaryDto
>
findList
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增编码字典
* @param dmpCodeDictionary
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpCodeDictionary
>
add
(
DmpCodeDictionary
dmpCodeDictionary
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询编码字典
* @param dmpCodeDictionaryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpCodeDictionaryDto
>
findById
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改编码字典
* @param dmpCodeDictionary
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpCodeDictionary
>
edit
(
DmpCodeDictionary
dmpCodeDictionary
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除编码字典
* @param dmpCodeDictionaryRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增编码字典
* @param dmpCodeDictionaryVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpCodeDictionaryBatch
>
addBatch
(
DmpCodeDictionaryBatch
dmpCodeDictionaryBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpMemberProjectRoleService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleRequest
;
import
com.jz.dmp.modules.model.DmpMemberProjectRole
;
/**
* 用户项目角色表服务接口
* @author ybz
*
*/
public
interface
DmpMemberProjectRoleService
{
/**条件查询所有用户项目角色表
* @param dmpMemberProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpMemberProjectRoleDto
>
findList
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增用户项目角色表
* @param dmpMemberProjectRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberProjectRole
>
add
(
DmpMemberProjectRole
dmpMemberProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询用户项目角色表
* @param dmpMemberProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberProjectRoleDto
>
findById
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改用户项目角色表
* @param dmpMemberProjectRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberProjectRole
>
edit
(
DmpMemberProjectRole
dmpMemberProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除用户项目角色表
* @param dmpMemberProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增用户项目角色表
* @param dmpMemberProjectRoleVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberProjectRoleBatch
>
addBatch
(
DmpMemberProjectRoleBatch
dmpMemberProjectRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpMemberRoleService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleRequest
;
import
com.jz.dmp.modules.model.DmpMemberRole
;
/**
* 用户角色关系表服务接口
* @author ybz
*
*/
public
interface
DmpMemberRoleService
{
/**条件查询所有用户角色关系表
* @param dmpMemberRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpMemberRoleDto
>
findList
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增用户角色关系表
* @param dmpMemberRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberRole
>
add
(
DmpMemberRole
dmpMemberRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询用户角色关系表
* @param dmpMemberRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberRoleDto
>
findById
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改用户角色关系表
* @param dmpMemberRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberRole
>
edit
(
DmpMemberRole
dmpMemberRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除用户角色关系表
* @param dmpMemberRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增用户角色关系表
* @param dmpMemberRoleVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberRoleBatch
>
addBatch
(
DmpMemberRoleBatch
dmpMemberRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpMemberService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest
;
import
com.jz.dmp.modules.model.DmpMember
;
/**
* 用户表服务接口
* @author ybz
*
*/
public
interface
DmpMemberService
{
/**条件查询所有用户表
* @param dmpMemberRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpMemberDto
>
findList
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增用户表
* @param dmpMember
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMember
>
add
(
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询用户表
* @param dmpMemberRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberDto
>
findById
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改用户表
* @param dmpMember
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMember
>
edit
(
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除用户表
* @param dmpMemberRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增用户表
* @param dmpMemberVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpMemberBatch
>
addBatch
(
DmpMemberBatch
dmpMemberBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**
* @Title: findByUserName
* @Description: TODO(通过用户名获取用户)
* @param @param userName
* @param @return
* @param @throws Exception 参数
* @return DmpMember 返回类型
* @throws
*/
public
DmpMember
findByUserName
(
String
userName
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpPermissionService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionRequest
;
import
com.jz.dmp.modules.model.DmpPermission
;
/**
* 资源表服务接口
* @author ybz
*
*/
public
interface
DmpPermissionService
{
/**条件查询所有资源表
* @param dmpPermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpPermissionDto
>
findList
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增资源表
* @param dmpPermission
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpPermission
>
add
(
DmpPermission
dmpPermission
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询资源表
* @param dmpPermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpPermissionDto
>
findById
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改资源表
* @param dmpPermission
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpPermission
>
edit
(
DmpPermission
dmpPermission
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除资源表
* @param dmpPermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增资源表
* @param dmpPermissionVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpPermissionBatch
>
addBatch
(
DmpPermissionBatch
dmpPermissionBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpProjectRoleService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleRequest
;
import
com.jz.dmp.modules.model.DmpProjectRole
;
/**
* 项目角色关系表服务接口
* @author ybz
*
*/
public
interface
DmpProjectRoleService
{
/**条件查询所有项目角色关系表
* @param dmpProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpProjectRoleDto
>
findList
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增项目角色关系表
* @param dmpProjectRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpProjectRole
>
add
(
DmpProjectRole
dmpProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询项目角色关系表
* @param dmpProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpProjectRoleDto
>
findById
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改项目角色关系表
* @param dmpProjectRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpProjectRole
>
edit
(
DmpProjectRole
dmpProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除项目角色关系表
* @param dmpProjectRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增项目角色关系表
* @param dmpProjectRoleVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpProjectRoleBatch
>
addBatch
(
DmpProjectRoleBatch
dmpProjectRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpRolePermissionService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionRequest
;
import
com.jz.dmp.modules.model.DmpRolePermission
;
/**
* 角色资源关系表服务接口
* @author ybz
*
*/
public
interface
DmpRolePermissionService
{
/**条件查询所有角色资源关系表
* @param dmpRolePermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpRolePermissionDto
>
findList
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增角色资源关系表
* @param dmpRolePermission
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRolePermission
>
add
(
DmpRolePermission
dmpRolePermission
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询角色资源关系表
* @param dmpRolePermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRolePermissionDto
>
findById
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改角色资源关系表
* @param dmpRolePermission
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRolePermission
>
edit
(
DmpRolePermission
dmpRolePermission
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除角色资源关系表
* @param dmpRolePermissionRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增角色资源关系表
* @param dmpRolePermissionVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRolePermissionBatch
>
addBatch
(
DmpRolePermissionBatch
dmpRolePermissionBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/DmpRoleService.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
;
import
javax.servlet.http.HttpServletRequest
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleRequest
;
import
com.jz.dmp.modules.model.DmpRole
;
/**
* 角色表服务接口
* @author ybz
*
*/
public
interface
DmpRoleService
{
/**条件查询所有角色表
* @param dmpRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
PageInfoResponse
<
DmpRoleDto
>
findList
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**新增角色表
* @param dmpRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRole
>
add
(
DmpRole
dmpRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键查询角色表
* @param dmpRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRoleDto
>
findById
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**修改角色表
* @param dmpRole
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRole
>
edit
(
DmpRole
dmpRole
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**主键删除角色表
* @param dmpRoleRequest
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseResponse
deleteById
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
;
/**批量新增角色表
* @param dmpRoleVo
* @param httpRequest
* @return
* @throws Exception
*/
public
BaseBeanResponse
<
DmpRoleBatch
>
addBatch
(
DmpRoleBatch
dmpRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
;
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpCodeDictionaryServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryRequest
;
import
com.jz.dmp.modules.dao.sys.DmpCodeDictionaryMapper
;
import
com.jz.dmp.modules.model.DmpCodeDictionary
;
import
com.jz.dmp.modules.service.sys.DmpCodeDictionaryService
;
/**
* 编码字典服务的实现?
* @author ybz
*
*/
@Service
(
"dmpCodeDictionaryService"
)
public
class
DmpCodeDictionaryServiceImpl
extends
BaseService
implements
DmpCodeDictionaryService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpCodeDictionaryServiceImpl
.
class
);
@Autowired
private
DmpCodeDictionaryMapper
dmpCodeDictionaryMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#findList(com.ycxc.vmts.controller.bean.DmpCodeDictionaryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpCodeDictionaryDto
>
findList
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpCodeDictionaryDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpCodeDictionaryRequest
.
getCodeId
()
!=
null
)
{
param
.
put
(
"codeId"
,
dmpCodeDictionaryRequest
.
getCodeId
());
}
//编码分类
if
(!
StringUtils
.
isEmpty
(
dmpCodeDictionaryRequest
.
getCodeType
()))
{
param
.
put
(
"codeType"
,
dmpCodeDictionaryRequest
.
getCodeType
());
}
//编码CODE
if
(!
StringUtils
.
isEmpty
(
dmpCodeDictionaryRequest
.
getCodeKey
()))
{
param
.
put
(
"codeKey"
,
dmpCodeDictionaryRequest
.
getCodeKey
());
}
//编码值
if
(!
StringUtils
.
isEmpty
(
dmpCodeDictionaryRequest
.
getCodeValue
()))
{
param
.
put
(
"codeValue"
,
dmpCodeDictionaryRequest
.
getCodeValue
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpCodeDictionaryRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpCodeDictionaryRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpCodeDictionaryRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpCodeDictionaryRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpCodeDictionaryRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpCodeDictionaryRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpCodeDictionaryRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpCodeDictionaryRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpCodeDictionaryRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpCodeDictionaryRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpCodeDictionaryRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpCodeDictionaryRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpCodeDictionaryRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpCodeDictionaryRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpCodeDictionaryRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpCodeDictionaryRequest
.
getUpdateTimeEnd
());
}
PageHelper
.
startPage
(
dmpCodeDictionaryRequest
.
getPageNum
(),
dmpCodeDictionaryRequest
.
getPageSize
());
List
<
DmpCodeDictionaryDto
>
list
=
dmpCodeDictionaryMapper
.
findList
(
param
);
PageInfo
<
DmpCodeDictionaryDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#add(com.ycxc.vmts.entity.DmpCodeDictionary, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpCodeDictionary
>
add
(
DmpCodeDictionary
dmpCodeDictionary
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpCodeDictionary
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
/*$*setCodeIdCodeReplace*$*/
//创建人
dmpCodeDictionary
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
//创建时间
dmpCodeDictionary
.
setCreateTime
(
new
Date
());
dmpCodeDictionaryMapper
.
insertSelective
(
dmpCodeDictionary
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpCodeDictionary
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#edit(com.ycxc.vmts.entity.DmpCodeDictionary, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpCodeDictionary
>
edit
(
DmpCodeDictionary
dmpCodeDictionary
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpCodeDictionary
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
//修改人
dmpCodeDictionary
.
setUpdateUserId
(
getHttpRequestUserId
(
httpRequest
));
//修改时间
dmpCodeDictionary
.
setUpdateTime
(
new
Date
());
dmpCodeDictionaryMapper
.
updateByPrimaryKeySelective
(
dmpCodeDictionary
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpCodeDictionary
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#findById(com.ycxc.vmts.controller.bean.DmpCodeDictionaryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpCodeDictionaryDto
>
findById
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpCodeDictionaryDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpCodeDictionaryDto
dmpCodeDictionaryDto
=
dmpCodeDictionaryMapper
.
findById
(
dmpCodeDictionaryRequest
.
getCodeId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpCodeDictionaryDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#deleteById(com.ycxc.vmts.controller.bean.DmpCodeDictionaryRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpCodeDictionaryRequest
dmpCodeDictionaryRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpCodeDictionaryMapper
.
deleteByPrimaryKey
(
dmpCodeDictionaryRequest
.
getCodeId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpCodeDictionaryService#addBatch(com.ycxc.vmts.controller.bean.DmpCodeDictionaryVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpCodeDictionaryBatch
>
addBatch
(
DmpCodeDictionaryBatch
dmpCodeDictionaryBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpCodeDictionaryBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpCodeDictionary
>
dmpCodeDictionarys
=
dmpCodeDictionaryBatch
.
getDmpCodeDictionarys
();
if
(
CollectionUtils
.
isEmpty
(
dmpCodeDictionarys
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpCodeDictionarys
=
dmpCodeDictionarys
.
stream
().
map
(
dmpCodeDictionary
->
{
/*$*setCodeIdCodeReplace*$*/
//创建人
try
{
dmpCodeDictionary
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
}
catch
(
Exception
e
)
{
logger
.
info
(
e
.
getMessage
());
e
.
printStackTrace
();
}
//创建时间
dmpCodeDictionary
.
setCreateTime
(
new
Date
());
return
dmpCodeDictionary
;
}).
collect
(
Collectors
.
toList
());
dmpCodeDictionaryMapper
.
insertBatch
(
dmpCodeDictionarys
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpCodeDictionaryBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberProjectRoleServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleRequest
;
import
com.jz.dmp.modules.dao.sys.DmpMemberProjectRoleMapper
;
import
com.jz.dmp.modules.model.DmpMemberProjectRole
;
import
com.jz.dmp.modules.service.sys.DmpMemberProjectRoleService
;
/**
* 用户项目角色表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpMemberProjectRoleService"
)
public
class
DmpMemberProjectRoleServiceImpl
extends
BaseService
implements
DmpMemberProjectRoleService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpMemberProjectRoleServiceImpl
.
class
);
@Autowired
private
DmpMemberProjectRoleMapper
dmpMemberProjectRoleMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#findList(com.ycxc.vmts.controller.bean.DmpMemberProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpMemberProjectRoleDto
>
findList
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpMemberProjectRoleDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpMemberProjectRoleRequest
.
getMemberProjectRoleId
()
!=
null
)
{
param
.
put
(
"memberProjectRoleId"
,
dmpMemberProjectRoleRequest
.
getMemberProjectRoleId
());
}
//用户ID
if
(
dmpMemberProjectRoleRequest
.
getUserId
()
!=
null
)
{
param
.
put
(
"userId"
,
dmpMemberProjectRoleRequest
.
getUserId
());
}
//项目ID
if
(
dmpMemberProjectRoleRequest
.
getProjectId
()
!=
null
)
{
param
.
put
(
"projectId"
,
dmpMemberProjectRoleRequest
.
getProjectId
());
}
//角色ID
if
(
dmpMemberProjectRoleRequest
.
getRoleId
()
!=
null
)
{
param
.
put
(
"roleId"
,
dmpMemberProjectRoleRequest
.
getRoleId
());
}
PageHelper
.
startPage
(
dmpMemberProjectRoleRequest
.
getPageNum
(),
dmpMemberProjectRoleRequest
.
getPageSize
());
List
<
DmpMemberProjectRoleDto
>
list
=
dmpMemberProjectRoleMapper
.
findList
(
param
);
PageInfo
<
DmpMemberProjectRoleDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#add(com.ycxc.vmts.entity.DmpMemberProjectRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberProjectRole
>
add
(
DmpMemberProjectRole
dmpMemberProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpMemberProjectRoleMapper
.
insertSelective
(
dmpMemberProjectRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpMemberProjectRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#edit(com.ycxc.vmts.entity.DmpMemberProjectRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberProjectRole
>
edit
(
DmpMemberProjectRole
dmpMemberProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpMemberProjectRoleMapper
.
updateByPrimaryKeySelective
(
dmpMemberProjectRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpMemberProjectRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#findById(com.ycxc.vmts.controller.bean.DmpMemberProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpMemberProjectRoleDto
>
findById
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberProjectRoleDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpMemberProjectRoleDto
dmpMemberProjectRoleDto
=
dmpMemberProjectRoleMapper
.
findById
(
dmpMemberProjectRoleRequest
.
getMemberProjectRoleId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpMemberProjectRoleDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#deleteById(com.ycxc.vmts.controller.bean.DmpMemberProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpMemberProjectRoleRequest
dmpMemberProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpMemberProjectRoleMapper
.
deleteByPrimaryKey
(
dmpMemberProjectRoleRequest
.
getMemberProjectRoleId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberProjectRoleService#addBatch(com.ycxc.vmts.controller.bean.DmpMemberProjectRoleVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberProjectRoleBatch
>
addBatch
(
DmpMemberProjectRoleBatch
dmpMemberProjectRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberProjectRoleBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpMemberProjectRole
>
dmpMemberProjectRoles
=
dmpMemberProjectRoleBatch
.
getDmpMemberProjectRoles
();
if
(
CollectionUtils
.
isEmpty
(
dmpMemberProjectRoles
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpMemberProjectRoles
=
dmpMemberProjectRoles
.
stream
().
map
(
dmpMemberProjectRole
->
{
return
dmpMemberProjectRole
;
}).
collect
(
Collectors
.
toList
());
dmpMemberProjectRoleMapper
.
insertBatch
(
dmpMemberProjectRoles
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpMemberProjectRoleBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberRoleServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleRequest
;
import
com.jz.dmp.modules.dao.sys.DmpMemberRoleMapper
;
import
com.jz.dmp.modules.model.DmpMemberRole
;
import
com.jz.dmp.modules.service.sys.DmpMemberRoleService
;
/**
* 用户角色关系表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpMemberRoleService"
)
public
class
DmpMemberRoleServiceImpl
extends
BaseService
implements
DmpMemberRoleService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpMemberRoleServiceImpl
.
class
);
@Autowired
private
DmpMemberRoleMapper
dmpMemberRoleMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#findList(com.ycxc.vmts.controller.bean.DmpMemberRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpMemberRoleDto
>
findList
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpMemberRoleDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpMemberRoleRequest
.
getUserRoleId
()
!=
null
)
{
param
.
put
(
"userRoleId"
,
dmpMemberRoleRequest
.
getUserRoleId
());
}
//用户ID
if
(
dmpMemberRoleRequest
.
getUserId
()
!=
null
)
{
param
.
put
(
"userId"
,
dmpMemberRoleRequest
.
getUserId
());
}
//角色ID
if
(
dmpMemberRoleRequest
.
getRoleId
()
!=
null
)
{
param
.
put
(
"roleId"
,
dmpMemberRoleRequest
.
getRoleId
());
}
PageHelper
.
startPage
(
dmpMemberRoleRequest
.
getPageNum
(),
dmpMemberRoleRequest
.
getPageSize
());
List
<
DmpMemberRoleDto
>
list
=
dmpMemberRoleMapper
.
findList
(
param
);
PageInfo
<
DmpMemberRoleDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#add(com.ycxc.vmts.entity.DmpMemberRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberRole
>
add
(
DmpMemberRole
dmpMemberRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpMemberRoleMapper
.
insertSelective
(
dmpMemberRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpMemberRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#edit(com.ycxc.vmts.entity.DmpMemberRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberRole
>
edit
(
DmpMemberRole
dmpMemberRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpMemberRoleMapper
.
updateByPrimaryKeySelective
(
dmpMemberRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpMemberRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#findById(com.ycxc.vmts.controller.bean.DmpMemberRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpMemberRoleDto
>
findById
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberRoleDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpMemberRoleDto
dmpMemberRoleDto
=
dmpMemberRoleMapper
.
findById
(
dmpMemberRoleRequest
.
getUserRoleId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpMemberRoleDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#deleteById(com.ycxc.vmts.controller.bean.DmpMemberRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpMemberRoleRequest
dmpMemberRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpMemberRoleMapper
.
deleteByPrimaryKey
(
dmpMemberRoleRequest
.
getUserRoleId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberRoleService#addBatch(com.ycxc.vmts.controller.bean.DmpMemberRoleVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberRoleBatch
>
addBatch
(
DmpMemberRoleBatch
dmpMemberRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberRoleBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpMemberRole
>
dmpMemberRoles
=
dmpMemberRoleBatch
.
getDmpMemberRoles
();
if
(
CollectionUtils
.
isEmpty
(
dmpMemberRoles
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpMemberRoles
=
dmpMemberRoles
.
stream
().
map
(
dmpMemberRole
->
{
return
dmpMemberRole
;
}).
collect
(
Collectors
.
toList
());
dmpMemberRoleMapper
.
insertBatch
(
dmpMemberRoles
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpMemberRoleBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpMemberServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpMemberRequest
;
import
com.jz.dmp.modules.dao.sys.DmpMemberMapper
;
import
com.jz.dmp.modules.model.DmpMember
;
import
com.jz.dmp.modules.service.sys.DmpMemberService
;
/**
* 用户表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpMemberService"
)
public
class
DmpMemberServiceImpl
extends
BaseService
implements
DmpMemberService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpMemberServiceImpl
.
class
);
@Autowired
private
DmpMemberMapper
dmpMemberMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#findList(com.ycxc.vmts.controller.bean.DmpMemberRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpMemberDto
>
findList
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpMemberDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//用户ID
if
(
dmpMemberRequest
.
getUserId
()
!=
null
)
{
param
.
put
(
"userId"
,
dmpMemberRequest
.
getUserId
());
}
//登录账号
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getUserAccount
()))
{
param
.
put
(
"userAccount"
,
dmpMemberRequest
.
getUserAccount
());
}
//用户名称
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getUserName
()))
{
param
.
put
(
"userName"
,
dmpMemberRequest
.
getUserName
());
}
//登录密码
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getUserPassword
()))
{
param
.
put
(
"userPassword"
,
dmpMemberRequest
.
getUserPassword
());
}
//联系电话
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getUserPhone
()))
{
param
.
put
(
"userPhone"
,
dmpMemberRequest
.
getUserPhone
());
}
//登录IP
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getLoginIp
()))
{
param
.
put
(
"loginIp"
,
dmpMemberRequest
.
getLoginIp
());
}
//最近登录时间起
if
(
dmpMemberRequest
.
getLoginTimeStart
()
!=
null
)
{
param
.
put
(
"loginTimeStart"
,
dmpMemberRequest
.
getLoginTimeStart
());
}
//最近登录时间止
if
(
dmpMemberRequest
.
getLoginTimeEnd
()
!=
null
)
{
param
.
put
(
"loginTimeEnd"
,
dmpMemberRequest
.
getLoginTimeEnd
());
}
//是否登录锁定(0:否,1:是)
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getLoginLocked
()))
{
param
.
put
(
"loginLocked"
,
dmpMemberRequest
.
getLoginLocked
());
}
//连续登录错误次数
if
(
dmpMemberRequest
.
getLoginErrtimes
()
!=
null
)
{
param
.
put
(
"loginErrtimes"
,
dmpMemberRequest
.
getLoginErrtimes
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpMemberRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpMemberRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpMemberRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpMemberRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpMemberRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpMemberRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpMemberRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpMemberRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpMemberRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpMemberRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpMemberRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpMemberRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpMemberRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpMemberRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpMemberRequest
.
getUpdateTimeEnd
());
}
PageHelper
.
startPage
(
dmpMemberRequest
.
getPageNum
(),
dmpMemberRequest
.
getPageSize
());
List
<
DmpMemberDto
>
list
=
dmpMemberMapper
.
findList
(
param
);
PageInfo
<
DmpMemberDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#add(com.ycxc.vmts.entity.DmpMember, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMember
>
add
(
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
/*$*setUserIdCodeReplace*$*/
//创建人
dmpMember
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
//创建时间
dmpMember
.
setCreateTime
(
new
Date
());
dmpMemberMapper
.
insertSelective
(
dmpMember
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpMember
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#edit(com.ycxc.vmts.entity.DmpMember, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMember
>
edit
(
DmpMember
dmpMember
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMember
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
//修改人
dmpMember
.
setUpdateUserId
(
getHttpRequestUserId
(
httpRequest
));
//修改时间
dmpMember
.
setUpdateTime
(
new
Date
());
dmpMemberMapper
.
updateByPrimaryKeySelective
(
dmpMember
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpMember
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#findById(com.ycxc.vmts.controller.bean.DmpMemberRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpMemberDto
>
findById
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpMemberDto
dmpMemberDto
=
dmpMemberMapper
.
findById
(
dmpMemberRequest
.
getUserId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpMemberDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#deleteById(com.ycxc.vmts.controller.bean.DmpMemberRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpMemberRequest
dmpMemberRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpMemberMapper
.
deleteByPrimaryKey
(
dmpMemberRequest
.
getUserId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpMemberService#addBatch(com.ycxc.vmts.controller.bean.DmpMemberVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpMemberBatch
>
addBatch
(
DmpMemberBatch
dmpMemberBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpMemberBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpMember
>
dmpMembers
=
dmpMemberBatch
.
getDmpMembers
();
if
(
CollectionUtils
.
isEmpty
(
dmpMembers
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpMembers
=
dmpMembers
.
stream
().
map
(
dmpMember
->
{
/*$*setUserIdCodeReplace*$*/
//创建人
try
{
dmpMember
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
}
catch
(
Exception
e
)
{
logger
.
info
(
e
.
getMessage
());
e
.
printStackTrace
();
}
//创建时间
dmpMember
.
setCreateTime
(
new
Date
());
return
dmpMember
;
}).
collect
(
Collectors
.
toList
());
dmpMemberMapper
.
insertBatch
(
dmpMembers
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpMemberBatch
);
return
baseBeanResponse
;
}
/**
*通过用户名获取用户信息
*/
@Override
public
DmpMember
findByUserName
(
String
userName
)
throws
Exception
{
DmpMember
dmpMember
=
dmpMemberMapper
.
findByUserName
(
userName
);
return
dmpMember
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpPermissionServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpPermissionRequest
;
import
com.jz.dmp.modules.dao.sys.DmpPermissionMapper
;
import
com.jz.dmp.modules.model.DmpPermission
;
import
com.jz.dmp.modules.service.sys.DmpPermissionService
;
/**
* 资源表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpPermissionService"
)
public
class
DmpPermissionServiceImpl
extends
BaseService
implements
DmpPermissionService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpPermissionServiceImpl
.
class
);
@Autowired
private
DmpPermissionMapper
dmpPermissionMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#findList(com.ycxc.vmts.controller.bean.DmpPermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpPermissionDto
>
findList
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpPermissionDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//资源ID
if
(
dmpPermissionRequest
.
getPermissionId
()
!=
null
)
{
param
.
put
(
"permissionId"
,
dmpPermissionRequest
.
getPermissionId
());
}
//资源编码
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getPermissionCode
()))
{
param
.
put
(
"permissionCode"
,
dmpPermissionRequest
.
getPermissionCode
());
}
//资源名称
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getPermissionName
()))
{
param
.
put
(
"permissionName"
,
dmpPermissionRequest
.
getPermissionName
());
}
//资源描述
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getPermissionDesc
()))
{
param
.
put
(
"permissionDesc"
,
dmpPermissionRequest
.
getPermissionDesc
());
}
//资源URL
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getPermissionUrl
()))
{
param
.
put
(
"permissionUrl"
,
dmpPermissionRequest
.
getPermissionUrl
());
}
//资源类型(关联字典编码表)
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getPermissionType
()))
{
param
.
put
(
"permissionType"
,
dmpPermissionRequest
.
getPermissionType
());
}
//排序
if
(
dmpPermissionRequest
.
getPermissionSort
()
!=
null
)
{
param
.
put
(
"permissionSort"
,
dmpPermissionRequest
.
getPermissionSort
());
}
//父级编码
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getParentCode
()))
{
param
.
put
(
"parentCode"
,
dmpPermissionRequest
.
getParentCode
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpPermissionRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpPermissionRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpPermissionRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpPermissionRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpPermissionRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpPermissionRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpPermissionRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpPermissionRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpPermissionRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpPermissionRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpPermissionRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpPermissionRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpPermissionRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpPermissionRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpPermissionRequest
.
getUpdateTimeEnd
());
}
PageHelper
.
startPage
(
dmpPermissionRequest
.
getPageNum
(),
dmpPermissionRequest
.
getPageSize
());
List
<
DmpPermissionDto
>
list
=
dmpPermissionMapper
.
findList
(
param
);
PageInfo
<
DmpPermissionDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#add(com.ycxc.vmts.entity.DmpPermission, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpPermission
>
add
(
DmpPermission
dmpPermission
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermission
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
/*$*setPermissionIdCodeReplace*$*/
//创建人
dmpPermission
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
//创建时间
dmpPermission
.
setCreateTime
(
new
Date
());
dmpPermissionMapper
.
insertSelective
(
dmpPermission
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpPermission
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#edit(com.ycxc.vmts.entity.DmpPermission, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpPermission
>
edit
(
DmpPermission
dmpPermission
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermission
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
//修改人
dmpPermission
.
setUpdateUserId
(
getHttpRequestUserId
(
httpRequest
));
//修改时间
dmpPermission
.
setUpdateTime
(
new
Date
());
dmpPermissionMapper
.
updateByPrimaryKeySelective
(
dmpPermission
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpPermission
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#findById(com.ycxc.vmts.controller.bean.DmpPermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpPermissionDto
>
findById
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermissionDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpPermissionDto
dmpPermissionDto
=
dmpPermissionMapper
.
findById
(
dmpPermissionRequest
.
getPermissionId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpPermissionDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#deleteById(com.ycxc.vmts.controller.bean.DmpPermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpPermissionRequest
dmpPermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpPermissionMapper
.
deleteByPrimaryKey
(
dmpPermissionRequest
.
getPermissionId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpPermissionService#addBatch(com.ycxc.vmts.controller.bean.DmpPermissionVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpPermissionBatch
>
addBatch
(
DmpPermissionBatch
dmpPermissionBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpPermissionBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpPermission
>
dmpPermissions
=
dmpPermissionBatch
.
getDmpPermissions
();
if
(
CollectionUtils
.
isEmpty
(
dmpPermissions
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpPermissions
=
dmpPermissions
.
stream
().
map
(
dmpPermission
->
{
/*$*setPermissionIdCodeReplace*$*/
//创建人
try
{
dmpPermission
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
}
catch
(
Exception
e
)
{
logger
.
info
(
e
.
getMessage
());
e
.
printStackTrace
();
}
//创建时间
dmpPermission
.
setCreateTime
(
new
Date
());
return
dmpPermission
;
}).
collect
(
Collectors
.
toList
());
dmpPermissionMapper
.
insertBatch
(
dmpPermissions
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpPermissionBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpProjectRoleServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleRequest
;
import
com.jz.dmp.modules.dao.sys.DmpProjectRoleMapper
;
import
com.jz.dmp.modules.model.DmpProjectRole
;
import
com.jz.dmp.modules.service.sys.DmpProjectRoleService
;
/**
* 项目角色关系表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpProjectRoleService"
)
public
class
DmpProjectRoleServiceImpl
extends
BaseService
implements
DmpProjectRoleService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpProjectRoleServiceImpl
.
class
);
@Autowired
private
DmpProjectRoleMapper
dmpProjectRoleMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#findList(com.ycxc.vmts.controller.bean.DmpProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpProjectRoleDto
>
findList
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpProjectRoleDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpProjectRoleRequest
.
getProjectRoleId
()
!=
null
)
{
param
.
put
(
"projectRoleId"
,
dmpProjectRoleRequest
.
getProjectRoleId
());
}
//项目ID
if
(
dmpProjectRoleRequest
.
getProjectId
()
!=
null
)
{
param
.
put
(
"projectId"
,
dmpProjectRoleRequest
.
getProjectId
());
}
//角色ID
if
(
dmpProjectRoleRequest
.
getRoleId
()
!=
null
)
{
param
.
put
(
"roleId"
,
dmpProjectRoleRequest
.
getRoleId
());
}
PageHelper
.
startPage
(
dmpProjectRoleRequest
.
getPageNum
(),
dmpProjectRoleRequest
.
getPageSize
());
List
<
DmpProjectRoleDto
>
list
=
dmpProjectRoleMapper
.
findList
(
param
);
PageInfo
<
DmpProjectRoleDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#add(com.ycxc.vmts.entity.DmpProjectRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpProjectRole
>
add
(
DmpProjectRole
dmpProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpProjectRoleMapper
.
insertSelective
(
dmpProjectRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpProjectRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#edit(com.ycxc.vmts.entity.DmpProjectRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpProjectRole
>
edit
(
DmpProjectRole
dmpProjectRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpProjectRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpProjectRoleMapper
.
updateByPrimaryKeySelective
(
dmpProjectRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpProjectRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#findById(com.ycxc.vmts.controller.bean.DmpProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpProjectRoleDto
>
findById
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpProjectRoleDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpProjectRoleDto
dmpProjectRoleDto
=
dmpProjectRoleMapper
.
findById
(
dmpProjectRoleRequest
.
getProjectRoleId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpProjectRoleDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#deleteById(com.ycxc.vmts.controller.bean.DmpProjectRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpProjectRoleRequest
dmpProjectRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpProjectRoleMapper
.
deleteByPrimaryKey
(
dmpProjectRoleRequest
.
getProjectRoleId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpProjectRoleService#addBatch(com.ycxc.vmts.controller.bean.DmpProjectRoleVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpProjectRoleBatch
>
addBatch
(
DmpProjectRoleBatch
dmpProjectRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpProjectRoleBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpProjectRole
>
dmpProjectRoles
=
dmpProjectRoleBatch
.
getDmpProjectRoles
();
if
(
CollectionUtils
.
isEmpty
(
dmpProjectRoles
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpProjectRoles
=
dmpProjectRoles
.
stream
().
map
(
dmpProjectRole
->
{
return
dmpProjectRole
;
}).
collect
(
Collectors
.
toList
());
dmpProjectRoleMapper
.
insertBatch
(
dmpProjectRoles
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpProjectRoleBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpRolePermissionServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionRequest
;
import
com.jz.dmp.modules.dao.sys.DmpRolePermissionMapper
;
import
com.jz.dmp.modules.model.DmpRolePermission
;
import
com.jz.dmp.modules.service.sys.DmpRolePermissionService
;
/**
* 角色资源关系表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpRolePermissionService"
)
public
class
DmpRolePermissionServiceImpl
extends
BaseService
implements
DmpRolePermissionService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpRolePermissionServiceImpl
.
class
);
@Autowired
private
DmpRolePermissionMapper
dmpRolePermissionMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#findList(com.ycxc.vmts.controller.bean.DmpRolePermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpRolePermissionDto
>
findList
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpRolePermissionDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//主键
if
(
dmpRolePermissionRequest
.
getRolePermissionId
()
!=
null
)
{
param
.
put
(
"rolePermissionId"
,
dmpRolePermissionRequest
.
getRolePermissionId
());
}
//角色ID
if
(
dmpRolePermissionRequest
.
getRoleId
()
!=
null
)
{
param
.
put
(
"roleId"
,
dmpRolePermissionRequest
.
getRoleId
());
}
//资源ID
if
(
dmpRolePermissionRequest
.
getPermissionId
()
!=
null
)
{
param
.
put
(
"permissionId"
,
dmpRolePermissionRequest
.
getPermissionId
());
}
PageHelper
.
startPage
(
dmpRolePermissionRequest
.
getPageNum
(),
dmpRolePermissionRequest
.
getPageSize
());
List
<
DmpRolePermissionDto
>
list
=
dmpRolePermissionMapper
.
findList
(
param
);
PageInfo
<
DmpRolePermissionDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#add(com.ycxc.vmts.entity.DmpRolePermission, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRolePermission
>
add
(
DmpRolePermission
dmpRolePermission
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRolePermission
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpRolePermissionMapper
.
insertSelective
(
dmpRolePermission
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpRolePermission
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#edit(com.ycxc.vmts.entity.DmpRolePermission, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRolePermission
>
edit
(
DmpRolePermission
dmpRolePermission
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRolePermission
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
dmpRolePermissionMapper
.
updateByPrimaryKeySelective
(
dmpRolePermission
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpRolePermission
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#findById(com.ycxc.vmts.controller.bean.DmpRolePermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpRolePermissionDto
>
findById
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRolePermissionDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpRolePermissionDto
dmpRolePermissionDto
=
dmpRolePermissionMapper
.
findById
(
dmpRolePermissionRequest
.
getRolePermissionId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpRolePermissionDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#deleteById(com.ycxc.vmts.controller.bean.DmpRolePermissionRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpRolePermissionRequest
dmpRolePermissionRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpRolePermissionMapper
.
deleteByPrimaryKey
(
dmpRolePermissionRequest
.
getRolePermissionId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRolePermissionService#addBatch(com.ycxc.vmts.controller.bean.DmpRolePermissionVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRolePermissionBatch
>
addBatch
(
DmpRolePermissionBatch
dmpRolePermissionBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRolePermissionBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpRolePermission
>
dmpRolePermissions
=
dmpRolePermissionBatch
.
getDmpRolePermissions
();
if
(
CollectionUtils
.
isEmpty
(
dmpRolePermissions
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpRolePermissions
=
dmpRolePermissions
.
stream
().
map
(
dmpRolePermission
->
{
return
dmpRolePermission
;
}).
collect
(
Collectors
.
toList
());
dmpRolePermissionMapper
.
insertBatch
(
dmpRolePermissions
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpRolePermissionBatch
);
return
baseBeanResponse
;
}
}
src/main/java/com/jz/dmp/modules/service/sys/impl/DmpRoleServiceImpl.java
0 → 100644
View file @
8aead7d8
package
com
.
jz
.
dmp
.
modules
.
service
.
sys
.
impl
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.jz.common.bean.BaseBeanResponse
;
import
com.jz.common.bean.BaseResponse
;
import
com.jz.common.bean.PageInfoResponse
;
import
com.jz.common.constant.Constants
;
import
com.jz.common.constant.ResultCode
;
import
com.jz.common.persistence.BaseService
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleBatch
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleDto
;
import
com.jz.dmp.modules.controller.sys.bean.DmpRoleRequest
;
import
com.jz.dmp.modules.dao.sys.DmpRoleMapper
;
import
com.jz.dmp.modules.model.DmpRole
;
import
com.jz.dmp.modules.service.sys.DmpRoleService
;
/**
* 角色表服务的实现?
* @author ybz
*
*/
@Service
(
"dmpRoleService"
)
public
class
DmpRoleServiceImpl
extends
BaseService
implements
DmpRoleService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DmpRoleServiceImpl
.
class
);
@Autowired
private
DmpRoleMapper
dmpRoleMapper
;
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#findList(com.ycxc.vmts.controller.bean.DmpRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
PageInfoResponse
<
DmpRoleDto
>
findList
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
PageInfoResponse
<
DmpRoleDto
>
pageInfoResponse
=
new
PageInfoResponse
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
//角色ID
if
(
dmpRoleRequest
.
getRoleId
()
!=
null
)
{
param
.
put
(
"roleId"
,
dmpRoleRequest
.
getRoleId
());
}
//角色编码
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getRoleCode
()))
{
param
.
put
(
"roleCode"
,
dmpRoleRequest
.
getRoleCode
());
}
//角色名称
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getRoleName
()))
{
param
.
put
(
"roleName"
,
dmpRoleRequest
.
getRoleName
());
}
//角色描述
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getRoleDesc
()))
{
param
.
put
(
"roleDesc"
,
dmpRoleRequest
.
getRoleDesc
());
}
//角色类型
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getRoleType
()))
{
param
.
put
(
"roleType"
,
dmpRoleRequest
.
getRoleType
());
}
//备注
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getRemark
()))
{
param
.
put
(
"remark"
,
dmpRoleRequest
.
getRemark
());
}
//数据状态(0:删除,1,未删除)
if
(!
StringUtils
.
isEmpty
(
dmpRoleRequest
.
getDataStatus
()))
{
param
.
put
(
"dataStatus"
,
dmpRoleRequest
.
getDataStatus
());
}
//创建用户ID
if
(
dmpRoleRequest
.
getCreateUserId
()
!=
null
)
{
param
.
put
(
"createUserId"
,
dmpRoleRequest
.
getCreateUserId
());
}
//创建时间起
if
(
dmpRoleRequest
.
getCreateTimeStart
()
!=
null
)
{
param
.
put
(
"createTimeStart"
,
dmpRoleRequest
.
getCreateTimeStart
());
}
//创建时间止
if
(
dmpRoleRequest
.
getCreateTimeEnd
()
!=
null
)
{
param
.
put
(
"createTimeEnd"
,
dmpRoleRequest
.
getCreateTimeEnd
());
}
//修改用户ID
if
(
dmpRoleRequest
.
getUpdateUserId
()
!=
null
)
{
param
.
put
(
"updateUserId"
,
dmpRoleRequest
.
getUpdateUserId
());
}
//修改时间起
if
(
dmpRoleRequest
.
getUpdateTimeStart
()
!=
null
)
{
param
.
put
(
"updateTimeStart"
,
dmpRoleRequest
.
getUpdateTimeStart
());
}
//修改时间止
if
(
dmpRoleRequest
.
getUpdateTimeEnd
()
!=
null
)
{
param
.
put
(
"updateTimeEnd"
,
dmpRoleRequest
.
getUpdateTimeEnd
());
}
PageHelper
.
startPage
(
dmpRoleRequest
.
getPageNum
(),
dmpRoleRequest
.
getPageSize
());
List
<
DmpRoleDto
>
list
=
dmpRoleMapper
.
findList
(
param
);
PageInfo
<
DmpRoleDto
>
pageInfo
=
new
PageInfo
<>(
list
);
pageInfoResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
pageInfoResponse
.
setMessage
(
"查询成功"
);
pageInfoResponse
.
setData
(
pageInfo
);
return
pageInfoResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#add(com.ycxc.vmts.entity.DmpRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRole
>
add
(
DmpRole
dmpRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
/*$*setRoleIdCodeReplace*$*/
//创建人
dmpRole
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
//创建时间
dmpRole
.
setCreateTime
(
new
Date
());
dmpRoleMapper
.
insertSelective
(
dmpRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"新增成功"
);
baseBeanResponse
.
setData
(
dmpRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#edit(com.ycxc.vmts.entity.DmpRole, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRole
>
edit
(
DmpRole
dmpRole
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRole
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
//修改人
dmpRole
.
setUpdateUserId
(
getHttpRequestUserId
(
httpRequest
));
//修改时间
dmpRole
.
setUpdateTime
(
new
Date
());
dmpRoleMapper
.
updateByPrimaryKeySelective
(
dmpRole
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"修改成功"
);
baseBeanResponse
.
setData
(
dmpRole
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#findById(com.ycxc.vmts.controller.bean.DmpRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
public
BaseBeanResponse
<
DmpRoleDto
>
findById
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRoleDto
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
DmpRoleDto
dmpRoleDto
=
dmpRoleMapper
.
findById
(
dmpRoleRequest
.
getRoleId
());
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"查询成功"
);
baseBeanResponse
.
setData
(
dmpRoleDto
);
return
baseBeanResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#deleteById(com.ycxc.vmts.controller.bean.DmpRoleRequest, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
deleteById
(
DmpRoleRequest
dmpRoleRequest
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseResponse
baseResponse
=
new
BaseResponse
();
dmpRoleMapper
.
deleteByPrimaryKey
(
dmpRoleRequest
.
getRoleId
());
baseResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseResponse
.
setMessage
(
"删除成功"
);
return
baseResponse
;
}
/* (non-Javadoc)
* @see com.ycxc.vmts.service.DmpRoleService#addBatch(com.ycxc.vmts.controller.bean.DmpRoleVo, javax.servlet.http.HttpServletRequest)
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseBeanResponse
<
DmpRoleBatch
>
addBatch
(
DmpRoleBatch
dmpRoleBatch
,
HttpServletRequest
httpRequest
)
throws
Exception
{
BaseBeanResponse
<
DmpRoleBatch
>
baseBeanResponse
=
new
BaseBeanResponse
<>();
List
<
DmpRole
>
dmpRoles
=
dmpRoleBatch
.
getDmpRoles
();
if
(
CollectionUtils
.
isEmpty
(
dmpRoles
))
{
baseBeanResponse
.
setCode
(
ResultCode
.
PARAMS_ERROR
.
val
());
baseBeanResponse
.
setMessage
(
"数据不能为空!"
);
return
baseBeanResponse
;
}
dmpRoles
=
dmpRoles
.
stream
().
map
(
dmpRole
->
{
/*$*setRoleIdCodeReplace*$*/
//创建人
try
{
dmpRole
.
setCreateUserId
(
getHttpRequestUserId
(
httpRequest
));
}
catch
(
Exception
e
)
{
logger
.
info
(
e
.
getMessage
());
e
.
printStackTrace
();
}
//创建时间
dmpRole
.
setCreateTime
(
new
Date
());
return
dmpRole
;
}).
collect
(
Collectors
.
toList
());
dmpRoleMapper
.
insertBatch
(
dmpRoles
);
baseBeanResponse
.
setCode
(
ResultCode
.
SUCCESS
.
val
());
baseBeanResponse
.
setMessage
(
"批量新增成功"
);
baseBeanResponse
.
setData
(
dmpRoleBatch
);
return
baseBeanResponse
;
}
}
src/main/resources/application-test.yml
View file @
8aead7d8
...
@@ -12,10 +12,10 @@ management:
...
@@ -12,10 +12,10 @@ management:
spring
:
spring
:
profiles
:
test
profiles
:
test
datasource1
:
datasource1
:
url
:
jdbc:mysql://1
19.23.32.151:3306/dmp_web
?characterEncoding=utf8&useSSL=false
url
:
jdbc:mysql://1
92.168.1.140:3307/dmp_web_new
?characterEncoding=utf8&useSSL=false
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
username
:
dmp
username
:
dmp
password
:
Ioubuy
@2019@!
password
:
Ioubuy
123
hikari
:
hikari
:
maxLifetime
:
1765000
maxLifetime
:
1765000
maximumPoolSize
:
20
maximumPoolSize
:
20
...
...
src/main/resources/mapper/sys/DmpCodeDictionaryMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpCodeDictionaryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
<result
column=
"code_id"
property=
"codeId"
jdbcType=
"INTEGER"
/>
<result
column=
"code_type"
property=
"codeType"
jdbcType=
"VARCHAR"
/>
<result
column=
"code_key"
property=
"codeKey"
jdbcType=
"VARCHAR"
/>
<result
column=
"code_value"
property=
"codeValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpCodeDictionaryDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
code_id, code_type, code_key, code_value, remark,
data_status, create_user_id, create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询编码字典 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_code_dictionary
where code_id = #{codeId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除编码字典 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_code_dictionary
where code_id = #{codeId,jdbcType=INTEGER}
</delete>
<!-- 插入编码字典 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
insert into dmp_code_dictionary (
code_id, code_type, code_key, code_value, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values (
#{codeId,jdbcType=INTEGER}, #{codeType,jdbcType=VARCHAR}, #{codeKey,jdbcType=VARCHAR}, #{codeValue,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增编码字典 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
insert into dmp_code_dictionary (
code_id, code_type, code_key, code_value, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.codeId,jdbcType=INTEGER}, #{item.codeType,jdbcType=VARCHAR}, #{item.codeKey,jdbcType=VARCHAR}, #{item.codeValue,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR},
#{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入编码字典 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
insert into dmp_code_dictionary
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"codeId != null"
>
code_id,
</if>
<if
test=
"codeType != null"
>
code_type,
</if>
<if
test=
"codeKey != null"
>
code_key,
</if>
<if
test=
"codeValue != null"
>
code_value,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"codeId != null"
>
#{codeId,jdbcType=INTEGER},
</if>
<if
test=
"codeType != null"
>
#{codeType,jdbcType=VARCHAR},
</if>
<if
test=
"codeKey != null"
>
#{codeKey,jdbcType=VARCHAR},
</if>
<if
test=
"codeValue != null"
>
#{codeValue,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改编码字典 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
update dmp_code_dictionary set
code_id = #{codeId,jdbcType=INTEGER},
code_type = #{codeType,jdbcType=VARCHAR},
code_key = #{codeKey,jdbcType=VARCHAR},
code_value = #{codeValue,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where code_id = #{codeId,jdbcType=INTEGER}
</update>
<!-- 选择性修改编码字典 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpCodeDictionary"
>
update dmp_code_dictionary
<set>
<if
test=
"codeId != null"
>
code_id = #{codeId,jdbcType=INTEGER},
</if>
<if
test=
"codeType != null"
>
code_type = #{codeType,jdbcType=VARCHAR},
</if>
<if
test=
"codeKey != null"
>
code_key = #{codeKey,jdbcType=VARCHAR},
</if>
<if
test=
"codeValue != null"
>
code_value = #{codeValue,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where code_id = #{codeId,jdbcType=INTEGER}
</update>
<!-- 条件查询编码字典 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_code_dictionary
<where>
<if
test=
"codeId != null"
>
AND code_id = #{codeId,jdbcType=INTEGER}
</if>
<if
test=
"codeType != null"
>
AND code_type = #{codeType,jdbcType=VARCHAR}
</if>
<if
test=
"codeKey != null"
>
AND code_key = #{codeKey,jdbcType=VARCHAR}
</if>
<if
test=
"codeValue != null"
>
AND code_value = #{codeValue,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</where>
</select>
<!-- 主键查询编码字典 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_code_dictionary
where code_id = #{codeId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpMemberMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpMemberMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpMember"
>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_name"
property=
"userName"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_password"
property=
"userPassword"
jdbcType=
"VARCHAR"
/>
<result
column=
"real_name"
property=
"realName"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_phone"
property=
"userPhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"login_ip"
property=
"loginIp"
jdbcType=
"VARCHAR"
/>
<result
column=
"login_time"
property=
"loginTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"login_locked"
property=
"loginLocked"
jdbcType=
"CHAR"
/>
<result
column=
"login_errtimes"
property=
"loginErrtimes"
jdbcType=
"INTEGER"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpMemberDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
user_id, user_name, user_password, real_name, user_phone,
login_ip, login_time, login_locked, login_errtimes, remark,
data_status, create_user_id, create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询用户表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_member
where user_id = #{userId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除用户表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_member
where user_id = #{userId,jdbcType=INTEGER}
</delete>
<!-- 插入用户表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpMember"
>
insert into dmp_member (
user_id, user_name, user_password, real_name, user_phone,
login_ip, login_time, login_locked, login_errtimes, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values (
#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{userPassword,jdbcType=VARCHAR}, #{realName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR},
#{loginIp,jdbcType=VARCHAR}, #{loginTime,jdbcType=TIMESTAMP}, #{loginLocked,jdbcType=CHAR}, #{loginErrtimes,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增用户表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpMember"
>
insert into dmp_member (
user_id, user_name, user_password, real_name, user_phone,
login_ip, login_time, login_locked, login_errtimes, remark,
data_status, create_user_id, create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.userId,jdbcType=INTEGER}, #{item.userName,jdbcType=VARCHAR}, #{item.userPassword,jdbcType=VARCHAR}, #{item.realName,jdbcType=VARCHAR}, #{item.userPhone,jdbcType=VARCHAR},
#{item.loginIp,jdbcType=VARCHAR}, #{item.loginTime,jdbcType=TIMESTAMP}, #{item.loginLocked,jdbcType=CHAR}, #{item.loginErrtimes,jdbcType=INTEGER}, #{item.remark,jdbcType=VARCHAR},
#{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入用户表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpMember"
>
insert into dmp_member
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"userName != null"
>
user_name,
</if>
<if
test=
"userPassword != null"
>
user_password,
</if>
<if
test=
"realName != null"
>
real_name,
</if>
<if
test=
"userPhone != null"
>
user_phone,
</if>
<if
test=
"loginIp != null"
>
login_ip,
</if>
<if
test=
"loginTime != null"
>
login_time,
</if>
<if
test=
"loginLocked != null"
>
login_locked,
</if>
<if
test=
"loginErrtimes != null"
>
login_errtimes,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"userName != null"
>
#{userName,jdbcType=VARCHAR},
</if>
<if
test=
"userPassword != null"
>
#{userPassword,jdbcType=VARCHAR},
</if>
<if
test=
"realName != null"
>
#{realName,jdbcType=VARCHAR},
</if>
<if
test=
"userPhone != null"
>
#{userPhone,jdbcType=VARCHAR},
</if>
<if
test=
"loginIp != null"
>
#{loginIp,jdbcType=VARCHAR},
</if>
<if
test=
"loginTime != null"
>
#{loginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"loginLocked != null"
>
#{loginLocked,jdbcType=CHAR},
</if>
<if
test=
"loginErrtimes != null"
>
#{loginErrtimes,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改用户表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpMember"
>
update dmp_member set
user_id = #{userId,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
user_password = #{userPassword,jdbcType=VARCHAR},
real_name = #{realName,jdbcType=VARCHAR},
user_phone = #{userPhone,jdbcType=VARCHAR},
login_ip = #{loginIp,jdbcType=VARCHAR},
login_time = #{loginTime,jdbcType=TIMESTAMP},
login_locked = #{loginLocked,jdbcType=CHAR},
login_errtimes = #{loginErrtimes,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where user_id = #{userId,jdbcType=INTEGER}
</update>
<!-- 选择性修改用户表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpMember"
>
update dmp_member
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"userName != null"
>
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if
test=
"userPassword != null"
>
user_password = #{userPassword,jdbcType=VARCHAR},
</if>
<if
test=
"realName != null"
>
real_name = #{realName,jdbcType=VARCHAR},
</if>
<if
test=
"userPhone != null"
>
user_phone = #{userPhone,jdbcType=VARCHAR},
</if>
<if
test=
"loginIp != null"
>
login_ip = #{loginIp,jdbcType=VARCHAR},
</if>
<if
test=
"loginTime != null"
>
login_time = #{loginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"loginLocked != null"
>
login_locked = #{loginLocked,jdbcType=CHAR},
</if>
<if
test=
"loginErrtimes != null"
>
login_errtimes = #{loginErrtimes,jdbcType=INTEGER},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where user_id = #{userId,jdbcType=INTEGER}
</update>
<!-- 条件查询用户表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_member
<where>
<if
test=
"userId != null"
>
AND user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"userName != null"
>
AND user_name = #{userName,jdbcType=VARCHAR}
</if>
<if
test=
"userPassword != null"
>
AND user_password = #{userPassword,jdbcType=VARCHAR}
</if>
<if
test=
"realName != null"
>
AND real_name = #{realName,jdbcType=VARCHAR}
</if>
<if
test=
"userPhone != null"
>
AND user_phone = #{userPhone,jdbcType=VARCHAR}
</if>
<if
test=
"loginIp != null"
>
AND login_ip = #{loginIp,jdbcType=VARCHAR}
</if>
<if
test=
"loginTimeStart != null"
>
AND login_time >= #{loginTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"loginTimeEnd != null"
>
AND login_time
<![CDATA[ <= ]]>
#{loginTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"loginLocked != null"
>
AND login_locked = #{loginLocked,jdbcType=CHAR}
</if>
<if
test=
"loginErrtimes != null"
>
AND login_errtimes = #{loginErrtimes,jdbcType=INTEGER}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</where>
</select>
<!-- 主键查询用户表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_member
where user_id = #{userId,jdbcType=INTEGER}
</select>
<!-- 通过用户名获取用户信息 -->
<select
id=
"findByUserName"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_member
where user_name = #{userName,jdbcType=VARCHAR}
</select>
</mapper>
src/main/resources/mapper/sys/DmpMemberProjectRoleMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpMemberProjectRoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
<result
column=
"member_project_role_id"
property=
"memberProjectRoleId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"INTEGER"
/>
<result
column=
"role_id"
property=
"roleId"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpMemberProjectRoleDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
member_project_role_id, user_id, project_id, role_id
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询用户项目角色表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_member_project_role
where member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除用户项目角色表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_member_project_role
where member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</delete>
<!-- 插入用户项目角色表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
insert into dmp_member_project_role (
member_project_role_id, user_id, project_id, role_id
)
values (
#{memberProjectRoleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}
)
</insert>
<!-- 批量新增用户项目角色表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
insert into dmp_member_project_role (
member_project_role_id, user_id, project_id, role_id
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.memberProjectRoleId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.roleId,jdbcType=INTEGER}
)
</foreach>
</insert>
<!-- 选择性插入用户项目角色表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
insert into dmp_member_project_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberProjectRoleId != null"
>
member_project_role_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"memberProjectRoleId != null"
>
#{memberProjectRoleId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!-- 修改用户项目角色表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
update dmp_member_project_role set
member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER}
where member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</update>
<!-- 选择性修改用户项目角色表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpMemberProjectRole"
>
update dmp_member_project_role
<set>
<if
test=
"memberProjectRoleId != null"
>
member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=INTEGER},
</if>
</set>
where member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</update>
<!-- 条件查询用户项目角色表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_member_project_role
<where>
<if
test=
"memberProjectRoleId != null"
>
AND member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</if>
<if
test=
"userId != null"
>
AND user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"roleId != null"
>
AND role_id = #{roleId,jdbcType=INTEGER}
</if>
</where>
</select>
<!-- 主键查询用户项目角色表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_member_project_role
where member_project_role_id = #{memberProjectRoleId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpMemberRoleMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpMemberRoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpMemberRole"
>
<result
column=
"user_role_id"
property=
"userRoleId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"role_id"
property=
"roleId"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpMemberRoleDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
user_role_id, user_id, role_id
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询用户角色关系表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_member_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除用户角色关系表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_member_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</delete>
<!-- 插入用户角色关系表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpMemberRole"
>
insert into dmp_member_role (
user_role_id, user_id, role_id
)
values (
#{userRoleId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}
)
</insert>
<!-- 批量新增用户角色关系表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpMemberRole"
>
insert into dmp_member_role (
user_role_id, user_id, role_id
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.userRoleId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER}, #{item.roleId,jdbcType=INTEGER}
)
</foreach>
</insert>
<!-- 选择性插入用户角色关系表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpMemberRole"
>
insert into dmp_member_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userRoleId != null"
>
user_role_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userRoleId != null"
>
#{userRoleId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!-- 修改用户角色关系表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpMemberRole"
>
update dmp_member_role set
user_role_id = #{userRoleId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER}
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</update>
<!-- 选择性修改用户角色关系表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpMemberRole"
>
update dmp_member_role
<set>
<if
test=
"userRoleId != null"
>
user_role_id = #{userRoleId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=INTEGER},
</if>
</set>
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</update>
<!-- 条件查询用户角色关系表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_member_role
<where>
<if
test=
"userRoleId != null"
>
AND user_role_id = #{userRoleId,jdbcType=INTEGER}
</if>
<if
test=
"userId != null"
>
AND user_id = #{userId,jdbcType=INTEGER}
</if>
<if
test=
"roleId != null"
>
AND role_id = #{roleId,jdbcType=INTEGER}
</if>
</where>
</select>
<!-- 主键查询用户角色关系表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_member_role
where user_role_id = #{userRoleId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpPermissionMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpPermissionMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpPermission"
>
<result
column=
"permission_id"
property=
"permissionId"
jdbcType=
"INTEGER"
/>
<result
column=
"permission_code"
property=
"permissionCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"permission_name"
property=
"permissionName"
jdbcType=
"VARCHAR"
/>
<result
column=
"permission_desc"
property=
"permissionDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"permission_url"
property=
"permissionUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"permission_type"
property=
"permissionType"
jdbcType=
"VARCHAR"
/>
<result
column=
"permission_sort"
property=
"permissionSort"
jdbcType=
"INTEGER"
/>
<result
column=
"parent_code"
property=
"parentCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpPermissionDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
permission_id, permission_code, permission_name, permission_desc, permission_url,
permission_type, permission_sort, parent_code, remark, data_status,
create_user_id, create_time, update_user_id, update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询资源表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除资源表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</delete>
<!-- 插入资源表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpPermission"
>
insert into dmp_permission (
permission_id, permission_code, permission_name, permission_desc, permission_url,
permission_type, permission_sort, parent_code, remark, data_status,
create_user_id, create_time, update_user_id, update_time
)
values (
#{permissionId,jdbcType=INTEGER}, #{permissionCode,jdbcType=VARCHAR}, #{permissionName,jdbcType=VARCHAR}, #{permissionDesc,jdbcType=VARCHAR}, #{permissionUrl,jdbcType=VARCHAR},
#{permissionType,jdbcType=VARCHAR}, #{permissionSort,jdbcType=INTEGER}, #{parentCode,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR},
#{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增资源表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpPermission"
>
insert into dmp_permission (
permission_id, permission_code, permission_name, permission_desc, permission_url,
permission_type, permission_sort, parent_code, remark, data_status,
create_user_id, create_time, update_user_id, update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.permissionId,jdbcType=INTEGER}, #{item.permissionCode,jdbcType=VARCHAR}, #{item.permissionName,jdbcType=VARCHAR}, #{item.permissionDesc,jdbcType=VARCHAR}, #{item.permissionUrl,jdbcType=VARCHAR},
#{item.permissionType,jdbcType=VARCHAR}, #{item.permissionSort,jdbcType=INTEGER}, #{item.parentCode,jdbcType=VARCHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR},
#{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER}, #{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入资源表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpPermission"
>
insert into dmp_permission
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"permissionId != null"
>
permission_id,
</if>
<if
test=
"permissionCode != null"
>
permission_code,
</if>
<if
test=
"permissionName != null"
>
permission_name,
</if>
<if
test=
"permissionDesc != null"
>
permission_desc,
</if>
<if
test=
"permissionUrl != null"
>
permission_url,
</if>
<if
test=
"permissionType != null"
>
permission_type,
</if>
<if
test=
"permissionSort != null"
>
permission_sort,
</if>
<if
test=
"parentCode != null"
>
parent_code,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"permissionId != null"
>
#{permissionId,jdbcType=INTEGER},
</if>
<if
test=
"permissionCode != null"
>
#{permissionCode,jdbcType=VARCHAR},
</if>
<if
test=
"permissionName != null"
>
#{permissionName,jdbcType=VARCHAR},
</if>
<if
test=
"permissionDesc != null"
>
#{permissionDesc,jdbcType=VARCHAR},
</if>
<if
test=
"permissionUrl != null"
>
#{permissionUrl,jdbcType=VARCHAR},
</if>
<if
test=
"permissionType != null"
>
#{permissionType,jdbcType=VARCHAR},
</if>
<if
test=
"permissionSort != null"
>
#{permissionSort,jdbcType=INTEGER},
</if>
<if
test=
"parentCode != null"
>
#{parentCode,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改资源表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpPermission"
>
update dmp_permission set
permission_id = #{permissionId,jdbcType=INTEGER},
permission_code = #{permissionCode,jdbcType=VARCHAR},
permission_name = #{permissionName,jdbcType=VARCHAR},
permission_desc = #{permissionDesc,jdbcType=VARCHAR},
permission_url = #{permissionUrl,jdbcType=VARCHAR},
permission_type = #{permissionType,jdbcType=VARCHAR},
permission_sort = #{permissionSort,jdbcType=INTEGER},
parent_code = #{parentCode,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where permission_id = #{permissionId,jdbcType=INTEGER}
</update>
<!-- 选择性修改资源表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpPermission"
>
update dmp_permission
<set>
<if
test=
"permissionId != null"
>
permission_id = #{permissionId,jdbcType=INTEGER},
</if>
<if
test=
"permissionCode != null"
>
permission_code = #{permissionCode,jdbcType=VARCHAR},
</if>
<if
test=
"permissionName != null"
>
permission_name = #{permissionName,jdbcType=VARCHAR},
</if>
<if
test=
"permissionDesc != null"
>
permission_desc = #{permissionDesc,jdbcType=VARCHAR},
</if>
<if
test=
"permissionUrl != null"
>
permission_url = #{permissionUrl,jdbcType=VARCHAR},
</if>
<if
test=
"permissionType != null"
>
permission_type = #{permissionType,jdbcType=VARCHAR},
</if>
<if
test=
"permissionSort != null"
>
permission_sort = #{permissionSort,jdbcType=INTEGER},
</if>
<if
test=
"parentCode != null"
>
parent_code = #{parentCode,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where permission_id = #{permissionId,jdbcType=INTEGER}
</update>
<!-- 条件查询资源表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_permission
<where>
<if
test=
"permissionId != null"
>
AND permission_id = #{permissionId,jdbcType=INTEGER}
</if>
<if
test=
"permissionCode != null"
>
AND permission_code = #{permissionCode,jdbcType=VARCHAR}
</if>
<if
test=
"permissionName != null"
>
AND permission_name = #{permissionName,jdbcType=VARCHAR}
</if>
<if
test=
"permissionDesc != null"
>
AND permission_desc = #{permissionDesc,jdbcType=VARCHAR}
</if>
<if
test=
"permissionUrl != null"
>
AND permission_url = #{permissionUrl,jdbcType=VARCHAR}
</if>
<if
test=
"permissionType != null"
>
AND permission_type = #{permissionType,jdbcType=VARCHAR}
</if>
<if
test=
"permissionSort != null"
>
AND permission_sort = #{permissionSort,jdbcType=INTEGER}
</if>
<if
test=
"parentCode != null"
>
AND parent_code = #{parentCode,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</where>
</select>
<!-- 主键查询资源表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpProjectRoleMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpProjectRoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpProjectRole"
>
<result
column=
"project_role_id"
property=
"projectRoleId"
jdbcType=
"INTEGER"
/>
<result
column=
"project_id"
property=
"projectId"
jdbcType=
"INTEGER"
/>
<result
column=
"role_id"
property=
"roleId"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpProjectRoleDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
project_role_id, project_id, role_id
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询项目角色关系表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_project_role
where project_role_id = #{projectRoleId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除项目角色关系表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_project_role
where project_role_id = #{projectRoleId,jdbcType=INTEGER}
</delete>
<!-- 插入项目角色关系表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpProjectRole"
>
insert into dmp_project_role (
project_role_id, project_id, role_id
)
values (
#{projectRoleId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}
)
</insert>
<!-- 批量新增项目角色关系表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpProjectRole"
>
insert into dmp_project_role (
project_role_id, project_id, role_id
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.projectRoleId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.roleId,jdbcType=INTEGER}
)
</foreach>
</insert>
<!-- 选择性插入项目角色关系表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpProjectRole"
>
insert into dmp_project_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectRoleId != null"
>
project_role_id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectRoleId != null"
>
#{projectRoleId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!-- 修改项目角色关系表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpProjectRole"
>
update dmp_project_role set
project_role_id = #{projectRoleId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER}
where project_role_id = #{projectRoleId,jdbcType=INTEGER}
</update>
<!-- 选择性修改项目角色关系表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpProjectRole"
>
update dmp_project_role
<set>
<if
test=
"projectRoleId != null"
>
project_role_id = #{projectRoleId,jdbcType=INTEGER},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=INTEGER},
</if>
</set>
where project_role_id = #{projectRoleId,jdbcType=INTEGER}
</update>
<!-- 条件查询项目角色关系表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_project_role
<where>
<if
test=
"projectRoleId != null"
>
AND project_role_id = #{projectRoleId,jdbcType=INTEGER}
</if>
<if
test=
"projectId != null"
>
AND project_id = #{projectId,jdbcType=INTEGER}
</if>
<if
test=
"roleId != null"
>
AND role_id = #{roleId,jdbcType=INTEGER}
</if>
</where>
</select>
<!-- 主键查询项目角色关系表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_project_role
where project_role_id = #{projectRoleId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpRoleMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpRoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpRole"
>
<result
column=
"role_id"
property=
"roleId"
jdbcType=
"INTEGER"
/>
<result
column=
"role_code"
property=
"roleCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"role_name"
property=
"roleName"
jdbcType=
"VARCHAR"
/>
<result
column=
"role_desc"
property=
"roleDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"role_type"
property=
"roleType"
jdbcType=
"VARCHAR"
/>
<result
column=
"remark"
property=
"remark"
jdbcType=
"VARCHAR"
/>
<result
column=
"data_status"
property=
"dataStatus"
jdbcType=
"CHAR"
/>
<result
column=
"create_user_id"
property=
"createUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_user_id"
property=
"updateUserId"
jdbcType=
"INTEGER"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpRoleDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
role_id, role_code, role_name, role_desc, role_type,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询角色表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_role
where role_id = #{roleId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除角色表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_role
where role_id = #{roleId,jdbcType=INTEGER}
</delete>
<!-- 插入角色表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpRole"
>
insert into dmp_role (
role_id, role_code, role_name, role_desc, role_type,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values (
#{roleId,jdbcType=INTEGER}, #{roleCode,jdbcType=VARCHAR}, #{roleName,jdbcType=VARCHAR}, #{roleDesc,jdbcType=VARCHAR}, #{roleType,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{dataStatus,jdbcType=CHAR}, #{createUserId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<!-- 批量新增角色表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpRole"
>
insert into dmp_role (
role_id, role_code, role_name, role_desc, role_type,
remark, data_status, create_user_id, create_time, update_user_id,
update_time
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.roleId,jdbcType=INTEGER}, #{item.roleCode,jdbcType=VARCHAR}, #{item.roleName,jdbcType=VARCHAR}, #{item.roleDesc,jdbcType=VARCHAR}, #{item.roleType,jdbcType=VARCHAR},
#{item.remark,jdbcType=VARCHAR}, #{item.dataStatus,jdbcType=CHAR}, #{item.createUserId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUserId,jdbcType=INTEGER},
#{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<!-- 选择性插入角色表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpRole"
>
insert into dmp_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"roleCode != null"
>
role_code,
</if>
<if
test=
"roleName != null"
>
role_name,
</if>
<if
test=
"roleDesc != null"
>
role_desc,
</if>
<if
test=
"roleType != null"
>
role_type,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"dataStatus != null"
>
data_status,
</if>
<if
test=
"createUserId != null"
>
create_user_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateUserId != null"
>
update_user_id,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=INTEGER},
</if>
<if
test=
"roleCode != null"
>
#{roleCode,jdbcType=VARCHAR},
</if>
<if
test=
"roleName != null"
>
#{roleName,jdbcType=VARCHAR},
</if>
<if
test=
"roleDesc != null"
>
#{roleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"roleType != null"
>
#{roleType,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
#{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
#{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
#{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 修改角色表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpRole"
>
update dmp_role set
role_id = #{roleId,jdbcType=INTEGER},
role_code = #{roleCode,jdbcType=VARCHAR},
role_name = #{roleName,jdbcType=VARCHAR},
role_desc = #{roleDesc,jdbcType=VARCHAR},
role_type = #{roleType,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
data_status = #{dataStatus,jdbcType=CHAR},
create_user_id = #{createUserId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_user_id = #{updateUserId,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where role_id = #{roleId,jdbcType=INTEGER}
</update>
<!-- 选择性修改角色表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpRole"
>
update dmp_role
<set>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if
test=
"roleCode != null"
>
role_code = #{roleCode,jdbcType=VARCHAR},
</if>
<if
test=
"roleName != null"
>
role_name = #{roleName,jdbcType=VARCHAR},
</if>
<if
test=
"roleDesc != null"
>
role_desc = #{roleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"roleType != null"
>
role_type = #{roleType,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus,jdbcType=CHAR},
</if>
<if
test=
"createUserId != null"
>
create_user_id = #{createUserId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUserId != null"
>
update_user_id = #{updateUserId,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where role_id = #{roleId,jdbcType=INTEGER}
</update>
<!-- 条件查询角色表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_role
<where>
<if
test=
"roleId != null"
>
AND role_id = #{roleId,jdbcType=INTEGER}
</if>
<if
test=
"roleCode != null"
>
AND role_code = #{roleCode,jdbcType=VARCHAR}
</if>
<if
test=
"roleName != null"
>
AND role_name = #{roleName,jdbcType=VARCHAR}
</if>
<if
test=
"roleDesc != null"
>
AND role_desc = #{roleDesc,jdbcType=VARCHAR}
</if>
<if
test=
"roleType != null"
>
AND role_type = #{roleType,jdbcType=VARCHAR}
</if>
<if
test=
"remark != null"
>
AND remark = #{remark,jdbcType=VARCHAR}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus,jdbcType=CHAR}
</if>
<if
test=
"createUserId != null"
>
AND create_user_id = #{createUserId,jdbcType=INTEGER}
</if>
<if
test=
"createTimeStart != null"
>
AND create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"createTimeEnd != null"
>
AND create_time
<![CDATA[ <= ]]>
#{createTimeEnd,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateUserId != null"
>
AND update_user_id = #{updateUserId,jdbcType=INTEGER}
</if>
<if
test=
"updateTimeStart != null"
>
AND update_time >= #{updateTimeStart,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTimeEnd != null"
>
AND update_time
<![CDATA[ <= ]]>
#{updateTimeEnd,jdbcType=TIMESTAMP}
</if>
</where>
</select>
<!-- 主键查询角色表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_role
where role_id = #{roleId,jdbcType=INTEGER}
</select>
</mapper>
src/main/resources/mapper/sys/DmpRolePermissionMapper.xml
0 → 100644
View file @
8aead7d8
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dmp.modules.dao.sys.DmpRolePermissionMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jz.dmp.modules.model.DmpRolePermission"
>
<result
column=
"role_permission_id"
property=
"rolePermissionId"
jdbcType=
"INTEGER"
/>
<result
column=
"role_id"
property=
"roleId"
jdbcType=
"INTEGER"
/>
<result
column=
"permission_id"
property=
"permissionId"
jdbcType=
"INTEGER"
/>
</resultMap>
<resultMap
id=
"BaseDtoResultMap"
type=
"com.jz.dmp.modules.controller.sys.bean.DmpRolePermissionDto"
extends=
"BaseResultMap"
>
<!-- /*$BaseDtoResultMapContent$*/ -->
</resultMap>
<sql
id=
"Base_Column_List"
>
role_permission_id, role_id, permission_id
</sql>
<sql
id=
"BaseDto_Column_List"
>
<include
refid=
"Base_Column_List"
/>
<!-- /*$BaseDtoColumnListContent$*/ -->
</sql>
<!-- 根据主键查询角色资源关系表 -->
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from dmp_role_permission
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</select>
<!-- 根据主键删除角色资源关系表 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from dmp_role_permission
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</delete>
<!-- 插入角色资源关系表 -->
<insert
id=
"insert"
parameterType=
"com.jz.dmp.modules.model.DmpRolePermission"
>
insert into dmp_role_permission (
role_permission_id, role_id, permission_id
)
values (
#{rolePermissionId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}
)
</insert>
<!-- 批量新增角色资源关系表 -->
<insert
id=
"insertBatch"
parameterType=
"com.jz.dmp.modules.model.DmpRolePermission"
>
insert into dmp_role_permission (
role_permission_id, role_id, permission_id
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.rolePermissionId,jdbcType=INTEGER}, #{item.roleId,jdbcType=INTEGER}, #{item.permissionId,jdbcType=INTEGER}
)
</foreach>
</insert>
<!-- 选择性插入角色资源关系表 -->
<insert
id=
"insertSelective"
parameterType=
"com.jz.dmp.modules.model.DmpRolePermission"
>
insert into dmp_role_permission
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"rolePermissionId != null"
>
role_permission_id,
</if>
<if
test=
"roleId != null"
>
role_id,
</if>
<if
test=
"permissionId != null"
>
permission_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"rolePermissionId != null"
>
#{rolePermissionId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
#{roleId,jdbcType=INTEGER},
</if>
<if
test=
"permissionId != null"
>
#{permissionId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!-- 修改角色资源关系表 -->
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jz.dmp.modules.model.DmpRolePermission"
>
update dmp_role_permission set
role_permission_id = #{rolePermissionId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},
permission_id = #{permissionId,jdbcType=INTEGER}
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</update>
<!-- 选择性修改角色资源关系表 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jz.dmp.modules.model.DmpRolePermission"
>
update dmp_role_permission
<set>
<if
test=
"rolePermissionId != null"
>
role_permission_id = #{rolePermissionId,jdbcType=INTEGER},
</if>
<if
test=
"roleId != null"
>
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if
test=
"permissionId != null"
>
permission_id = #{permissionId,jdbcType=INTEGER},
</if>
</set>
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</update>
<!-- 条件查询角色资源关系表 -->
<select
id=
"findList"
resultMap=
"BaseDtoResultMap"
>
SELECT
<include
refid=
"BaseDto_Column_List"
/>
FROM dmp_role_permission
<where>
<if
test=
"rolePermissionId != null"
>
AND role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</if>
<if
test=
"roleId != null"
>
AND role_id = #{roleId,jdbcType=INTEGER}
</if>
<if
test=
"permissionId != null"
>
AND permission_id = #{permissionId,jdbcType=INTEGER}
</if>
</where>
</select>
<!-- 主键查询角色资源关系表 -->
<select
id=
"findById"
resultMap=
"BaseDtoResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"BaseDto_Column_List"
/>
from dmp_role_permission
where role_permission_id = #{rolePermissionId,jdbcType=INTEGER}
</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