Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
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
TCM
tcm-system
Commits
1a5fe017
Commit
1a5fe017
authored
May 13, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 5.13
准备开始保存企业信息 需要用新的工具类TokenHelper进行改动
parent
3c0c6e6f
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
637 additions
and
44 deletions
+637
-44
MobileRegisterController.java
...ng/web/authority/controller/MobileRegisterController.java
+70
-0
RoleController.java
...com/pangding/web/authority/controller/RoleController.java
+2
-2
UserController.java
...com/pangding/web/authority/controller/UserController.java
+6
-2
AuthorityDao.java
...ain/java/com/pangding/web/authority/dao/AuthorityDao.java
+2
-2
MobileRegisterDao.java
...ava/com/pangding/web/authority/dao/MobileRegisterDao.java
+10
-0
RoleAuthorityDao.java
...java/com/pangding/web/authority/dao/RoleAuthorityDao.java
+2
-2
RoleDao.java
src/main/java/com/pangding/web/authority/dao/RoleDao.java
+2
-2
UserDao.java
src/main/java/com/pangding/web/authority/dao/UserDao.java
+1
-2
UserRoleDao.java
...main/java/com/pangding/web/authority/dao/UserRoleDao.java
+2
-2
AuthorityDaoImpl.java
...com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
+2
-2
MobileRegisterDaoImpl.java
...angding/web/authority/dao/impl/MobileRegisterDaoImpl.java
+18
-0
RoleAuthorityDaoImpl.java
...pangding/web/authority/dao/impl/RoleAuthorityDaoImpl.java
+2
-2
RoleDaoImpl.java
...java/com/pangding/web/authority/dao/impl/RoleDaoImpl.java
+2
-2
UserDaoImpl.java
...java/com/pangding/web/authority/dao/impl/UserDaoImpl.java
+1
-2
UserRoleDaoImpl.java
.../com/pangding/web/authority/dao/impl/UserRoleDaoImpl.java
+2
-2
MobileRegisterCompanyDto.java
.../pangding/web/authority/dto/MobileRegisterCompanyDto.java
+98
-0
MobileRegisterUserDto.java
...com/pangding/web/authority/dto/MobileRegisterUserDto.java
+50
-0
MobileRegisterUserReturnDto.java
...ngding/web/authority/dto/MobileRegisterUserReturnDto.java
+38
-0
CheckMerchantIdReqVo.java
...om/pangding/web/authority/reqvo/CheckMerchantIdReqVo.java
+17
-0
GetAuthorityByIdReqVo.java
...m/pangding/web/authority/reqvo/GetAuthorityByIdReqVo.java
+1
-1
GetRoleAuthorityListByAuthorityIdReqVo.java
...thority/reqvo/GetRoleAuthorityListByAuthorityIdReqVo.java
+1
-1
GetRoleAuthorityListByRoleIdReqVo.java
...eb/authority/reqvo/GetRoleAuthorityListByRoleIdReqVo.java
+1
-1
GetRoleByRoleIdReqVo.java
...om/pangding/web/authority/reqvo/GetRoleByRoleIdReqVo.java
+1
-1
GetRoleByRoleNameReqVo.java
.../pangding/web/authority/reqvo/GetRoleByRoleNameReqVo.java
+1
-1
GetUserByAccountReqVo.java
...m/pangding/web/authority/reqvo/GetUserByAccountReqVo.java
+1
-1
GetUserByIdReqVo.java
...va/com/pangding/web/authority/reqvo/GetUserByIdReqVo.java
+1
-1
GetUserRoleListByRoleIdReqVo.java
...ing/web/authority/reqvo/GetUserRoleListByRoleIdReqVo.java
+1
-1
GetUserRoleListByUserIdReqVo.java
...ing/web/authority/reqvo/GetUserRoleListByUserIdReqVo.java
+1
-1
ListLevel1ReqVo.java
...ava/com/pangding/web/authority/reqvo/ListLevel1ReqVo.java
+1
-1
RoleDaoCheckNameExistReqVo.java
...gding/web/authority/reqvo/RoleDaoCheckNameExistReqVo.java
+1
-1
UserRoleDaoRemoveReqVo.java
.../pangding/web/authority/reqvo/UserRoleDaoRemoveReqVo.java
+1
-1
MobileRegisterService.java
...pangding/web/authority/service/MobileRegisterService.java
+27
-0
UserService.java
.../java/com/pangding/web/authority/service/UserService.java
+2
-0
AuthorityServiceImpl.java
...ding/web/authority/service/impl/AuthorityServiceImpl.java
+5
-2
MobileRegisterServiceImpl.java
...web/authority/service/impl/MobileRegisterServiceImpl.java
+37
-0
RoleServiceImpl.java
.../pangding/web/authority/service/impl/RoleServiceImpl.java
+4
-3
UserServiceImpl.java
.../pangding/web/authority/service/impl/UserServiceImpl.java
+7
-3
CompanyVo.java
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
+205
-0
UserVo.java
src/main/java/com/pangding/web/authority/vo/UserVo.java
+11
-0
No files found.
src/main/java/com/pangding/web/authority/controller/MobileRegisterController.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.currency.Result
;
import
com.pangding.web.authority.dto.MobileRegisterCompanyDto
;
import
com.pangding.web.authority.dto.MobileRegisterUserDto
;
import
com.pangding.web.authority.dto.MobileRegisterUserReturnDto
;
import
com.pangding.web.authority.service.MobileRegisterService
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.utils.Md5AndSalt
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.UserVo
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
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
;
/**
* @Author zhangjinyao
* @create 2019/5/13 11:26
*/
@RestController
@RequestMapping
(
value
=
"/mobileRegister"
)
public
class
MobileRegisterController
{
@Autowired
MobileRegisterService
mobileRegisterServiceImpl
;
@Autowired
UserService
userServiceImpl
;
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Object
saveUser
(
@RequestBody
MobileRegisterUserDto
registerUserDto
){
if
(!
registerUserDto
.
getCompanyType
().
equals
(
"个体"
)){
return
new
Result
(
4001
,
"目前仅支持个体用户"
,
registerUserDto
);
}
UserVo
userVo
=
new
UserVo
();
userVo
.
setAccount
(
registerUserDto
.
getAccount
());
userServiceImpl
.
checkAccount
(
userVo
);
String
merchantId
=
registerUserDto
.
getMerchantId
();
if
(!
mobileRegisterServiceImpl
.
checkMerchantId
(
merchantId
)){
return
new
Result
(
4001
,
"注册编码错误"
,
registerUserDto
);
}
String
companyId
=
StringHelper
.
getNewID
();
userVo
.
setPassword
(
Md5AndSalt
.
generate
(
registerUserDto
.
getPassword
()));
userVo
.
setId
(
StringHelper
.
getNewID
());
userVo
.
setRemark
(
registerUserDto
.
getPassword
());
userVo
.
setCompanyId
(
companyId
);
mobileRegisterServiceImpl
.
saveUser
(
userVo
);
MobileRegisterUserReturnDto
returnDto
=
new
MobileRegisterUserReturnDto
();
returnDto
.
setCompanyId
(
companyId
);
returnDto
.
setMerchantId
(
merchantId
);
returnDto
.
setCompanyType
(
registerUserDto
.
getCompanyType
());
return
new
Result
(
0
,
"SUCCESS"
,
returnDto
);
}
@RequestMapping
(
value
=
"company"
)
public
Object
saveCompany
(
@RequestBody
MobileRegisterCompanyDto
companyDto
){
CompanyVo
companyVo
=
new
CompanyVo
();
companyVo
.
setId
(
companyDto
.
getCompanyId
());
return
null
;
}
}
src/main/java/com/pangding/web/authority/controller/RoleController.java
View file @
1a5fe017
...
...
@@ -5,13 +5,13 @@ import com.pangding.web.authority.currency.Result;
import
com.pangding.web.authority.dto.RoleDto
;
import
com.pangding.web.authority.service.RoleService
;
import
com.pangding.web.authority.vo.RoleVo
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
/**
* @author zhangjinyao
...
...
@@ -32,7 +32,7 @@ public class RoleController {
public
Object
saveRole
(
@RequestBody
RoleDto
roleDto
){
RoleVo
roleVo
=
roleDto
;
roleServiceImpl
.
checkNameExist
(
roleVo
);
roleDto
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
roleDto
.
setId
(
StringHelper
.
getNewID
(
));
roleServiceImpl
.
saveRole
(
roleDto
);
return
new
Result
(
0
,
"SUCCESS"
,
null
);
}
...
...
src/main/java/com/pangding/web/authority/controller/UserController.java
View file @
1a5fe017
...
...
@@ -3,15 +3,17 @@ package com.pangding.web.authority.controller;
import
com.pangding.web.authority.currency.Result
;
import
com.pangding.web.authority.dto.UserDto
;
import
com.pangding.web.authority.reqvo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
/**
* @author zhangjinyao
...
...
@@ -32,9 +34,10 @@ public class UserController {
public
Object
saveUser
(
@RequestBody
UserDto
userDto
){
userServiceImpl
.
checkAccount
(
userDto
);
userDto
.
setRemark
(
userDto
.
getPassword
());
String
saltPassword
=
userServiceImpl
.
passwordEncoder
(
userDto
.
getPassword
());
userDto
.
setPassword
(
saltPassword
);
userDto
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
userDto
.
setId
(
StringHelper
.
getNewID
(
));
userServiceImpl
.
saveUser
(
userDto
);
Result
result
=
new
Result
(
0
,
"SUCCESS"
,
null
);
return
result
;
...
...
@@ -48,6 +51,7 @@ public class UserController {
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Object
updateUser
(
@RequestBody
UserDto
userDto
){
userServiceImpl
.
checkAccount
(
userDto
);
userDto
.
setRemark
(
userDto
.
getPassword
());
userDto
.
setPassword
(
userServiceImpl
.
passwordEncoder
(
userDto
.
getPassword
()));
userServiceImpl
.
updateUser
(
userDto
);
Result
result
=
new
Result
(
0
,
"SUCCESS"
,
null
);
...
...
src/main/java/com/pangding/web/authority/dao/AuthorityDao.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.GetAuthorityByIdReqVo
;
import
com.pangding.web.authority.vo.ListLevel1ReqVo
;
import
com.pangding.web.authority.
req
vo.GetAuthorityByIdReqVo
;
import
com.pangding.web.authority.
req
vo.ListLevel1ReqVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.yanzuoguang.dao.BaseDao
;
...
...
src/main/java/com/pangding/web/authority/dao/MobileRegisterDao.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.yanzuoguang.dao.BaseDao
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:24
*/
public
interface
MobileRegisterDao
extends
BaseDao
{
}
src/main/java/com/pangding/web/authority/dao/RoleAuthorityDao.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.GetRoleAuthorityListByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetRoleAuthorityListByAuthorityIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleAuthorityListByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleAuthorityListByAuthorityIdReqVo
;
import
com.pangding.web.authority.vo.RoleAuthorityRelation
;
import
com.yanzuoguang.dao.BaseDao
;
...
...
src/main/java/com/pangding/web/authority/dao/RoleDao.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetRoleByRoleNameReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleByRoleNameReqVo
;
import
com.pangding.web.authority.vo.RoleVo
;
import
com.yanzuoguang.dao.BaseDao
;
...
...
src/main/java/com/pangding/web/authority/dao/UserDao.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.GetUserByAccountReqVo
;
import
com.pangding.web.authority.vo.GetUserByIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserByIdReqVo
;
import
com.pangding.web.authority.vo.UserVo
;
import
com.yanzuoguang.dao.BaseDao
;
...
...
src/main/java/com/pangding/web/authority/dao/UserRoleDao.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.GetUserRoleListByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetUserRoleListByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.vo.UserRoleRelation
;
import
com.yanzuoguang.dao.BaseDao
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.vo.GetAuthorityByIdReqVo
;
import
com.pangding.web.authority.vo.ListLevel1ReqVo
;
import
com.pangding.web.authority.
req
vo.GetAuthorityByIdReqVo
;
import
com.pangding.web.authority.
req
vo.ListLevel1ReqVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/MobileRegisterDaoImpl.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.MobileRegisterDao
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:25
*/
@Component
public
class
MobileRegisterDaoImpl
extends
BaseDaoImpl
implements
MobileRegisterDao
{
@Override
protected
void
init
()
{
register
(
CompanyVo
.
class
);
}
}
src/main/java/com/pangding/web/authority/dao/impl/RoleAuthorityDaoImpl.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.RoleAuthorityDao
;
import
com.pangding.web.authority.vo.GetRoleAuthorityListByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetRoleAuthorityListByAuthorityIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleAuthorityListByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleAuthorityListByAuthorityIdReqVo
;
import
com.pangding.web.authority.vo.RoleAuthorityRelation
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/RoleDaoImpl.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.RoleDao
;
import
com.pangding.web.authority.vo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetRoleByRoleNameReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetRoleByRoleNameReqVo
;
import
com.pangding.web.authority.vo.RoleVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/UserDaoImpl.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.UserDao
;
import
com.pangding.web.authority.vo.GetUserByAccountReqVo
;
import
com.pangding.web.authority.vo.GetUserByIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserByIdReqVo
;
import
com.pangding.web.authority.vo.UserVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/UserRoleDaoImpl.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.UserRoleDao
;
import
com.pangding.web.authority.vo.GetUserRoleListByRoleIdReqVo
;
import
com.pangding.web.authority.vo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetUserRoleListByRoleIdReqVo
;
import
com.pangding.web.authority.
req
vo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.vo.UserRoleRelation
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/com/pangding/web/authority/dto/MobileRegisterCompanyDto.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dto
;
/**
* @Author zhangjinyao
* @create 2019/5/13 17:32
*/
public
class
MobileRegisterCompanyDto
{
private
String
companyId
;
private
String
merchantId
;
private
String
companyType
;
private
String
contactName
;
private
String
contactCode
;
private
String
companyAttribute
;
private
String
contactPhone
;
private
String
extraChoseOne
;
private
String
extraChoseTwo
;
public
String
getExtraChoseOne
()
{
return
extraChoseOne
;
}
public
void
setExtraChoseOne
(
String
extraChoseOne
)
{
this
.
extraChoseOne
=
extraChoseOne
;
}
public
String
getExtraChoseTwo
()
{
return
extraChoseTwo
;
}
public
void
setExtraChoseTwo
(
String
extraChoseTwo
)
{
this
.
extraChoseTwo
=
extraChoseTwo
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
public
String
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
String
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getContactName
()
{
return
contactName
;
}
public
void
setContactName
(
String
contactName
)
{
this
.
contactName
=
contactName
;
}
public
String
getContactCode
()
{
return
contactCode
;
}
public
void
setContactCode
(
String
contactCode
)
{
this
.
contactCode
=
contactCode
;
}
public
String
getCompanyAttribute
()
{
return
companyAttribute
;
}
public
void
setCompanyAttribute
(
String
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
}
public
String
getContactPhone
()
{
return
contactPhone
;
}
public
void
setContactPhone
(
String
contactPhone
)
{
this
.
contactPhone
=
contactPhone
;
}
}
src/main/java/com/pangding/web/authority/dto/MobileRegisterUserDto.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dto
;
import
com.pangding.web.authority.vo.UserVo
;
/**
* @Author zhangjinyao
* @create 2019/5/13 15:17
*/
public
class
MobileRegisterUserDto
{
private
String
account
;
private
String
password
;
private
String
companyType
;
private
String
merchantId
;
public
String
getAccount
()
{
return
account
;
}
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
String
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
}
src/main/java/com/pangding/web/authority/dto/MobileRegisterUserReturnDto.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
dto
;
/**
* @Author zhangjinyao
* @create 2019/5/13 16:15
*/
public
class
MobileRegisterUserReturnDto
{
private
String
companyId
;
private
String
merchantId
;
private
String
companyType
;
public
String
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
String
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
}
src/main/java/com/pangding/web/authority/reqvo/CheckMerchantIdReqVo.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/5/13 15:45
*/
public
class
CheckMerchantIdReqVo
{
private
String
id
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
}
src/main/java/com/pangding/web/authority/vo/GetAuthorityByIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetAuthorityByIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetRoleAuthorityListByAuthorityIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetRoleAuthorityListByAuthorityIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetRoleAuthorityListByRoleIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetRoleAuthorityListByRoleIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
import
com.yanzuoguang.util.vo.BaseVo
;
...
...
src/main/java/com/pangding/web/authority/vo/GetRoleByRoleIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetRoleByRoleIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetRoleByRoleNameReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetRoleByRoleNameReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetUserByAccountReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetUserByAccountReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
import
org.springframework.context.annotation.Bean
;
...
...
src/main/java/com/pangding/web/authority/vo/GetUserByIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetUserByIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetUserRoleListByRoleIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetUserRoleListByRoleIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/GetUserRoleListByUserIdReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/GetUserRoleListByUserIdReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/ListLevel1ReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/ListLevel1ReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/RoleDaoCheckNameExistReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/RoleDaoCheckNameExistReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/vo/UserRoleDaoRemoveReqVo.java
→
src/main/java/com/pangding/web/authority/
req
vo/UserRoleDaoRemoveReqVo.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
req
vo
;
/**
* @Author zhangjinyao
...
...
src/main/java/com/pangding/web/authority/service/MobileRegisterService.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
service
;
import
com.pangding.web.authority.dto.UserDto
;
import
com.pangding.web.authority.vo.UserVo
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:21
*/
public
interface
MobileRegisterService
{
/**
* 判断注册编码是否正确
*
* @param merchantId 注册编码
* @return false:注册编码错误 true:注册编码正确
*/
Boolean
checkMerchantId
(
String
merchantId
);
/**
* 保存用户信息
*
* @param userVo UserVo对象
*/
void
saveUser
(
UserVo
userVo
);
}
src/main/java/com/pangding/web/authority/service/UserService.java
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
service
;
import
com.pangding.web.authority.dto.UserDto
;
import
com.pangding.web.authority.reqvo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.vo.*
;
import
java.util.List
;
...
...
src/main/java/com/pangding/web/authority/service/impl/AuthorityServiceImpl.java
View file @
1a5fe017
...
...
@@ -2,14 +2,17 @@ package com.pangding.web.authority.service.impl;
import
com.pangding.web.authority.dao.RoleAuthorityDao
;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.reqvo.GetAuthorityByIdReqVo
;
import
com.pangding.web.authority.reqvo.GetRoleAuthorityListByAuthorityIdReqVo
;
import
com.pangding.web.authority.reqvo.ListLevel1ReqVo
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.UUID
;
/**
* @author zhangjinyao
...
...
@@ -25,7 +28,7 @@ public class AuthorityServiceImpl implements AuthorityService {
@Override
public
void
save
(
AuthorityVo
authorityVo
)
{
authorityVo
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
authorityVo
.
setId
(
StringHelper
.
getNewID
(
));
authorityDao
.
create
(
authorityVo
);
}
...
...
src/main/java/com/pangding/web/authority/service/impl/MobileRegisterServiceImpl.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
service
.
impl
;
import
com.pangding.web.authority.dao.MobileRegisterDao
;
import
com.pangding.web.authority.dao.UserDao
;
import
com.pangding.web.authority.reqvo.CheckMerchantIdReqVo
;
import
com.pangding.web.authority.service.MobileRegisterService
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.UserVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:23
*/
@Service
public
class
MobileRegisterServiceImpl
implements
MobileRegisterService
{
@Autowired
MobileRegisterDao
mobileRegisterDaoImpl
;
@Autowired
UserDao
userDaoImpl
;
@Override
public
Boolean
checkMerchantId
(
String
merchantId
)
{
CheckMerchantIdReqVo
idReqVo
=
new
CheckMerchantIdReqVo
();
idReqVo
.
setId
(
merchantId
);
CompanyVo
companyVo
=
mobileRegisterDaoImpl
.
load
(
idReqVo
,
CompanyVo
.
class
);
return
companyVo
==
null
?
false
:
true
;
}
@Override
public
void
saveUser
(
UserVo
userVo
)
{
userDaoImpl
.
create
(
userVo
);
}
}
src/main/java/com/pangding/web/authority/service/impl/RoleServiceImpl.java
View file @
1a5fe017
...
...
@@ -5,15 +5,16 @@ import com.pangding.web.authority.dao.RoleAuthorityDao;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.dao.UserRoleDao
;
import
com.pangding.web.authority.dto.RoleDto
;
import
com.pangding.web.authority.reqvo.*
;
import
com.pangding.web.authority.service.RoleService
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
/**
* @author zhangjinyao
...
...
@@ -43,7 +44,7 @@ public class RoleServiceImpl implements RoleService {
RoleAuthorityRelation
roleAuthorityRelation
=
new
RoleAuthorityRelation
();
roleAuthorityRelation
.
setAuthorityId
(
authorityId
);
roleAuthorityRelation
.
setRoleId
(
roleDto
.
getId
());
roleAuthorityRelation
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
roleAuthorityRelation
.
setId
(
StringHelper
.
getNewID
(
));
roleAuthorityDaoImpl
.
create
(
roleAuthorityRelation
);
}
}
...
...
@@ -66,7 +67,7 @@ public class RoleServiceImpl implements RoleService {
RoleAuthorityRelation
roleAuthorityRelation
=
new
RoleAuthorityRelation
();
roleAuthorityRelation
.
setAuthorityId
(
authorityId
);
roleAuthorityRelation
.
setRoleId
(
roleDto
.
getId
());
roleAuthorityRelation
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
roleAuthorityRelation
.
setId
(
StringHelper
.
getNewID
(
));
roleAuthorityDaoImpl
.
create
(
roleAuthorityRelation
);
}
}
...
...
src/main/java/com/pangding/web/authority/service/impl/UserServiceImpl.java
View file @
1a5fe017
...
...
@@ -4,16 +4,20 @@ import com.pangding.web.authority.dao.RoleDao;
import
com.pangding.web.authority.dao.UserDao
;
import
com.pangding.web.authority.dao.UserRoleDao
;
import
com.pangding.web.authority.dto.UserDto
;
import
com.pangding.web.authority.reqvo.GetRoleByRoleIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserByIdReqVo
;
import
com.pangding.web.authority.reqvo.GetUserRoleListByUserIdReqVo
;
import
com.pangding.web.authority.reqvo.UserRoleDaoRemoveReqVo
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.utils.Md5AndSalt
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.UUID
;
/**
* @author zhangjinyao
...
...
@@ -41,7 +45,7 @@ public class UserServiceImpl implements UserService {
UserRoleRelation
userRoleRelation
=
new
UserRoleRelation
();
userRoleRelation
.
setRoleId
(
roleId
);
userRoleRelation
.
setUserId
(
userDto
.
getId
());
userRoleRelation
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
userRoleRelation
.
setId
(
StringHelper
.
getNewID
(
));
userRoleDao
.
create
(
userRoleRelation
);
}
}
...
...
@@ -72,7 +76,7 @@ public class UserServiceImpl implements UserService {
UserRoleRelation
userRoleRelation
=
new
UserRoleRelation
();
userRoleRelation
.
setRoleId
(
roleId
);
userRoleRelation
.
setUserId
(
userDto
.
getId
());
userRoleRelation
.
setId
(
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
));
userRoleRelation
.
setId
(
StringHelper
.
getNewID
(
));
userRoleDao
.
create
(
userRoleRelation
);
}
}
...
...
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
0 → 100644
View file @
1a5fe017
package
com
.
pangding
.
web
.
authority
.
vo
;
import
com.yanzuoguang.dao.TableAnnotation
;
import
com.yanzuoguang.util.helper.DateHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.InitDao
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:44
*/
@TableAnnotation
(
"pd_company"
)
public
class
CompanyVo
implements
Serializable
,
InitDao
{
private
String
id
;
private
String
pid
;
@TableAnnotation
(
"merchant_id"
)
private
String
merchantId
;
@TableAnnotation
(
"company_name"
)
private
String
companyName
;
@TableAnnotation
(
"company_type"
)
private
int
companyType
;
@TableAnnotation
(
"business_license_code"
)
private
String
businessLicenseCode
;
private
String
address
;
@TableAnnotation
(
"company_attribute"
)
private
String
companyAttribute
;
@TableAnnotation
(
"contact_name"
)
private
String
contactName
;
@TableAnnotation
(
"contact_phone"
)
private
String
contactPhone
;
@TableAnnotation
(
"contact_code"
)
private
String
contactCode
;
@TableAnnotation
(
"electronic_agreement_code"
)
private
String
electronicAgreementCode
;
@TableAnnotation
(
"signing_status"
)
private
String
signingStatus
;
private
String
status
;
@TableAnnotation
(
"create_time"
)
private
Timestamp
createTime
;
@TableAnnotation
(
"update_time"
)
private
Timestamp
updateTime
;
private
int
nature
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getPid
()
{
return
pid
;
}
public
void
setPid
(
String
pid
)
{
this
.
pid
=
pid
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
int
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
int
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getBusinessLicenseCode
()
{
return
businessLicenseCode
;
}
public
void
setBusinessLicenseCode
(
String
businessLicenseCode
)
{
this
.
businessLicenseCode
=
businessLicenseCode
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getCompanyAttribute
()
{
return
companyAttribute
;
}
public
void
setCompanyAttribute
(
String
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
}
public
String
getContactName
()
{
return
contactName
;
}
public
void
setContactName
(
String
contactName
)
{
this
.
contactName
=
contactName
;
}
public
String
getContactPhone
()
{
return
contactPhone
;
}
public
void
setContactPhone
(
String
contactPhone
)
{
this
.
contactPhone
=
contactPhone
;
}
public
String
getContactCode
()
{
return
contactCode
;
}
public
void
setContactCode
(
String
contactCode
)
{
this
.
contactCode
=
contactCode
;
}
public
String
getElectronicAgreementCode
()
{
return
electronicAgreementCode
;
}
public
void
setElectronicAgreementCode
(
String
electronicAgreementCode
)
{
this
.
electronicAgreementCode
=
electronicAgreementCode
;
}
public
String
getSigningStatus
()
{
return
signingStatus
;
}
public
void
setSigningStatus
(
String
signingStatus
)
{
this
.
signingStatus
=
signingStatus
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
Timestamp
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Timestamp
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Timestamp
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Timestamp
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
int
getNature
()
{
return
nature
;
}
public
void
setNature
(
int
nature
)
{
this
.
nature
=
nature
;
}
@Override
public
void
init
()
{
String
createTimeString
=
StringHelper
.
getFirst
(
DateHelper
.
getDateTimeString
(
this
.
createTime
),
DateHelper
.
getNow
());
this
.
createTime
=
Timestamp
.
valueOf
(
createTimeString
);
}
}
src/main/java/com/pangding/web/authority/vo/UserVo.java
View file @
1a5fe017
...
...
@@ -32,6 +32,9 @@ public class UserVo implements Serializable, InitDao {
private
String
creator
;
@TableAnnotation
(
"company_id"
)
private
String
companyId
;
public
String
getId
()
{
return
id
;
}
...
...
@@ -96,6 +99,14 @@ public class UserVo implements Serializable, InitDao {
this
.
creator
=
creator
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
@Override
public
void
init
()
{
String
createTimeString
=
StringHelper
.
getFirst
(
DateHelper
.
getDateTimeString
(
this
.
createTime
),
DateHelper
.
getNow
());
...
...
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