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
2a32cba1
Commit
2a32cba1
authored
May 16, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 5.16
个体用户还需要增加Token 代码写完 准备测试
parent
65d90702
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1268 additions
and
532 deletions
+1268
-532
MobileRegisterUserReturnVo.java
...ing/web/authority/cloudvo/MobileRegisterUserReturnVo.java
+0
-38
AuthorityController.java
...angding/web/authority/controller/AuthorityController.java
+23
-2
ComputerRegisterController.java
.../web/authority/controller/ComputerRegisterController.java
+72
-99
MobileRegisterController.java
...ng/web/authority/controller/MobileRegisterController.java
+44
-98
RoleController.java
...com/pangding/web/authority/controller/RoleController.java
+21
-0
UserController.java
...com/pangding/web/authority/controller/UserController.java
+22
-7
AuthorityDao.java
...ain/java/com/pangding/web/authority/dao/AuthorityDao.java
+0
-15
CompanyBankCardDao.java
...va/com/pangding/web/authority/dao/CompanyBankCardDao.java
+2
-2
CompanyDao.java
src/main/java/com/pangding/web/authority/dao/CompanyDao.java
+1
-1
CompanyExtendDao.java
...java/com/pangding/web/authority/dao/CompanyExtendDao.java
+10
-0
MerchantDao.java
...main/java/com/pangding/web/authority/dao/MerchantDao.java
+10
-0
AuthorityDaoImpl.java
...com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
+0
-12
CompanyBankCardDaoImpl.java
...ngding/web/authority/dao/impl/CompanyBankCardDaoImpl.java
+18
-0
CompanyDaoImpl.java
...a/com/pangding/web/authority/dao/impl/CompanyDaoImpl.java
+2
-2
CompanyExtendDaoImpl.java
...pangding/web/authority/dao/impl/CompanyExtendDaoImpl.java
+18
-0
MerchantDaoImpl.java
.../com/pangding/web/authority/dao/impl/MerchantDaoImpl.java
+18
-0
RegisterEnterpriceDto.java
...com/pangding/web/authority/dto/RegisterEnterpriceDto.java
+0
-119
ListLevel1ReqVo.java
...ava/com/pangding/web/authority/reqvo/ListLevel1ReqVo.java
+0
-17
ComputerRegisterService.java
...ngding/web/authority/service/ComputerRegisterService.java
+0
-8
RegisterService.java
...a/com/pangding/web/authority/service/RegisterService.java
+13
-12
AuthorityServiceImpl.java
...ding/web/authority/service/impl/AuthorityServiceImpl.java
+0
-1
ComputerRegisterServiceImpl.java
...b/authority/service/impl/ComputerRegisterServiceImpl.java
+0
-13
MobileRegisterServiceImpl.java
...web/authority/service/impl/MobileRegisterServiceImpl.java
+0
-56
RegisterServiceImpl.java
...gding/web/authority/service/impl/RegisterServiceImpl.java
+198
-0
AuthorityVo.java
src/main/java/com/pangding/web/authority/vo/AuthorityVo.java
+4
-5
CompanyBankCardVo.java
...java/com/pangding/web/authority/vo/CompanyBankCardVo.java
+151
-0
CompanyExtendVo.java
...n/java/com/pangding/web/authority/vo/CompanyExtendVo.java
+153
-0
CompanyVo.java
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
+10
-11
MerchantVo.java
src/main/java/com/pangding/web/authority/vo/MerchantVo.java
+228
-0
UserVo.java
src/main/java/com/pangding/web/authority/vo/UserVo.java
+4
-5
LoginReqVo.java
.../java/com/pangding/web/authority/vo/reqvo/LoginReqVo.java
+2
-2
LoginResVo.java
.../java/com/pangding/web/authority/vo/reqvo/LoginResVo.java
+30
-0
RegisterEnterpriceReqVo.java
...gding/web/authority/vo/reqvo/RegisterEnterpriceReqVo.java
+167
-0
RegisterIndividualReqVo.java
...gding/web/authority/vo/reqvo/RegisterIndividualReqVo.java
+35
-5
RegisterUserReqVo.java
...om/pangding/web/authority/vo/reqvo/RegisterUserReqVo.java
+12
-2
No files found.
src/main/java/com/pangding/web/authority/cloudvo/MobileRegisterUserReturnVo.java
deleted
100644 → 0
View file @
65d90702
package
com
.
pangding
.
web
.
authority
.
cloudvo
;
/**
* @Author zhangjinyao
* @create 2019/5/13 16:15
*/
public
class
MobileRegisterUserReturnVo
{
private
String
companyId
;
private
String
merchantId
;
private
int
companyType
;
public
int
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
int
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/controller/AuthorityController.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
controller
;
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.currency.Result
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.WebAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.WebAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.WebAuthorityResVo
;
import
com.pangding.web.authority.vo.reqvo.WebAuthorityResVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* @author zhangjinyao
* @author zhangjinyao
...
@@ -32,6 +31,12 @@ public class AuthorityController {
...
@@ -32,6 +31,12 @@ public class AuthorityController {
*/
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
public
ResponseResult
saveAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"authority"
,
authorityVo
)
.
checkException
()
.
notBlankCheck
(
"authorityName"
,
authorityVo
.
getName
())
.
notBlankCheck
(
"authorityUrl"
,
authorityVo
.
getUrl
())
.
checkException
();
authorityServiceImpl
.
save
(
authorityVo
);
authorityServiceImpl
.
save
(
authorityVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -43,6 +48,12 @@ public class AuthorityController {
...
@@ -43,6 +48,12 @@ public class AuthorityController {
*/
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
public
ResponseResult
updateAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"authority"
,
authorityVo
)
.
checkException
()
.
notBlankCheck
(
"authorityName"
,
authorityVo
.
getName
())
.
notBlankCheck
(
"authorityUrl"
,
authorityVo
.
getUrl
())
.
checkException
();
authorityServiceImpl
.
update
(
authorityVo
);
authorityServiceImpl
.
update
(
authorityVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -72,6 +83,11 @@ public class AuthorityController {
...
@@ -72,6 +83,11 @@ public class AuthorityController {
*/
*/
@RequestMapping
(
value
=
"/role"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/role"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
AuthorityVo
>
authority
(
@RequestBody
WebAuthorityReqVo
reqVo
){
public
ResponseResult
<
AuthorityVo
>
authority
(
@RequestBody
WebAuthorityReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
reqVo
)
.
checkException
()
.
notBlankCheck
(
"anthorityId"
,
reqVo
.
getId
())
.
checkException
();
return
ResponseResult
.
result
(
authorityServiceImpl
.
getAuthorityById
(
reqVo
));
return
ResponseResult
.
result
(
authorityServiceImpl
.
getAuthorityById
(
reqVo
));
}
}
...
@@ -82,6 +98,11 @@ public class AuthorityController {
...
@@ -82,6 +98,11 @@ public class AuthorityController {
*/
*/
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
delete
(
@RequestBody
WebAuthorityReqVo
reqVo
){
public
ResponseResult
delete
(
@RequestBody
WebAuthorityReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
reqVo
)
.
checkException
()
.
notBlankCheck
(
"anthorityId"
,
reqVo
.
getId
())
.
checkException
();
authorityServiceImpl
.
deleteAuthorityById
(
reqVo
);
authorityServiceImpl
.
deleteAuthorityById
(
reqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
...
...
src/main/java/com/pangding/web/authority/controller/ComputerRegisterController.java
View file @
2a32cba1
This diff is collapsed.
Click to expand it.
src/main/java/com/pangding/web/authority/controller/MobileRegisterController.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
controller
;
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.currency.Result
;
import
com.pangding.web.authority.vo.reqvo.RegisterIndividualReqVo
;
import
com.pangding.web.authority.dto.RegisterIndividualDto
;
import
com.pangding.web.authority.vo.reqvo.RegisterUserReqVo
;
import
com.pangding.web.authority.dto.RegisterUserDto
;
import
com.pangding.web.authority.service.RegisterService
;
import
com.pangding.web.authority.cloudvo.MobileRegisterUserReturnVo
;
import
com.pangding.web.authority.service.MobileRegisterService
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.MobileLoginInfo
;
import
com.pangding.web.authority.vo.reqvo.LoginReqVo
;
import
com.pangding.web.authority.vo.UserVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.token.TokenHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -27,114 +23,64 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -27,114 +23,64 @@ import org.springframework.web.bind.annotation.RestController;
public
class
MobileRegisterController
{
public
class
MobileRegisterController
{
@Autowired
@Autowired
MobileRegisterService
mobileRegisterServiceImpl
;
RegisterService
registerServiceImpl
;
@Autowired
UserService
userServiceImpl
;
/**
/**
* 验证注册第一页数据的合法性并保存
* 验证注册第一页数据的合法性并保存
*
*
* @param registerUser
Dt
o
* @param registerUser
ReqV
o
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Object
saveUser
(
@RequestBody
RegisterUserDto
registerUserDto
){
public
ResponseResult
<
CompanyVo
>
saveUser
(
@RequestBody
RegisterUserReqVo
registerUserReqVo
){
CheckerHelper
.
newInstance
()
if
(
registerUserDto
.
getCompanyType
()
!=
0
){
.
notBlankCheck
(
"reqVo"
,
registerUserReqVo
)
return
new
Result
(
4001
,
"目前仅支持个体用户"
,
registerUserDto
);
.
checkException
()
}
.
notBlankCheck
(
"account"
,
registerUserReqVo
.
getAccount
())
.
notBlankCheck
(
"password"
,
registerUserReqVo
.
getPassword
())
if
(!
userServiceImpl
.
isValid
(
registerUserDto
.
getAccount
())){
.
notBlankCheck
(
"confirmPassword"
,
registerUserReqVo
.
getConfirmPassword
())
return
new
Result
(
4001
,
"用户名由字母与数字组成,且不能为纯数字"
,
registerUserDto
);
.
notBlankCheck
(
"companyType"
,
registerUserReqVo
.
getCompanyType
())
}
.
notBlankCheck
(
"merchantId"
,
registerUserReqVo
.
getMerchantId
())
.
checkException
();
UserVo
userVo
=
new
UserVo
();
return
ResponseResult
.
result
(
registerServiceImpl
.
saveUser
(
registerUserReqVo
));
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
);
MobileRegisterUserReturnVo
returnVo
=
new
MobileRegisterUserReturnVo
();
returnVo
.
setCompanyId
(
companyId
);
returnVo
.
setMerchantId
(
merchantId
);
returnVo
.
setCompanyType
(
registerUserDto
.
getCompanyType
());
/*token内容暂时不能用,以后要改动,需要存入用户及企业信息*/
String
token
=
StringHelper
.
getNewID
();
TokenHelper
.
write
(
token
,
returnVo
);
return
new
Result
(
0
,
"SUCCESS"
,
null
);
}
}
/**
/**
* 验证注册第二页数据的合法性并保存
* 验证注册第二页数据的合法性并保存
*
*
* @param
individualDt
o
* @param
reqV
o
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/individual"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/individual"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Object
saveIndividual
(
@RequestBody
RegisterIndividualDto
individualDto
){
public
ResponseResult
saveIndividual
(
@RequestBody
RegisterIndividualReqVo
reqVo
){
CheckerHelper
.
newInstance
()
mobileRegisterServiceImpl
.
checkPhone
(
individualDto
);
.
notBlankCheck
(
"reqVo"
,
reqVo
)
.
checkException
()
CompanyVo
companyVo
=
new
CompanyVo
();
.
notBlankCheck
(
"contactName"
,
reqVo
.
getContactName
())
.
notBlankCheck
(
"contactCode"
,
reqVo
.
getContactCode
())
/*token内容暂时不能用,以后要改动*/
.
checkIdCard
(
"contactCode"
,
reqVo
.
getContactCode
())
MobileRegisterUserReturnVo
returnVo
=
TokenHelper
.
get
(
MobileRegisterUserReturnVo
.
class
);
.
notBlankCheck
(
"companyAttribute"
,
reqVo
.
getCompanyAttribute
())
.
notBlankCheck
(
"extraChoseOne"
,
reqVo
.
getExtraChoseOne
())
companyVo
.
setId
(
returnVo
.
getCompanyId
());
.
notBlankCheck
(
"extraChosetwo"
,
reqVo
.
getExtraChoseTwo
())
companyVo
.
setCompanyType
(
returnVo
.
getCompanyType
());
.
notBlankCheck
(
"contactPhone"
,
reqVo
.
getContactPhone
())
companyVo
.
setMerchantId
(
returnVo
.
getMerchantId
());
.
checkPhoneNo
(
"contactPhone"
,
reqVo
.
getContactPhone
())
companyVo
.
setContactName
(
individualDto
.
getContactName
());
.
checkException
();
companyVo
.
setContactCode
(
individualDto
.
getContactCode
());
registerServiceImpl
.
saveIndividual
(
reqVo
);
companyVo
.
setCompanyAttribute
(
individualDto
.
getCompanyAttribute
());
return
new
ResponseResult
();
companyVo
.
setContactPhone
(
individualDto
.
getContactPhone
());
if
(
individualDto
.
getCompanyAttribute
().
equals
(
"5"
)){
companyVo
.
setCompanyName
(
individualDto
.
getExtraChoseOne
());
companyVo
.
setBusinessLicenseCode
(
individualDto
.
getExtraChoseTwo
());
}
else
{
companyVo
.
setCompanyName
(
individualDto
.
getExtraChoseOne
());
companyVo
.
setAddress
(
individualDto
.
getExtraChoseTwo
());
}
mobileRegisterServiceImpl
.
saveCompany
(
companyVo
);
return
new
Result
(
0
,
"SUCCESS"
,
null
);
}
}
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Object
login
(
@RequestBody
MobileLoginInfo
info
){
public
ResponseResult
login
(
@RequestBody
LoginReqVo
reqVo
){
CheckerHelper
.
newInstance
()
String
accountOrPhone
=
info
.
getAccountOrPhone
();
.
notBlankCheck
(
"reqVo"
,
reqVo
)
UserVo
userVo
;
.
checkException
()
if
(
userServiceImpl
.
isNumeric
(
accountOrPhone
)){
.
notBlankCheck
(
"account or phone"
,
reqVo
.
getAccountOrPhone
())
userVo
=
userServiceImpl
.
getUserByPhone
(
accountOrPhone
);
.
notBlankCheck
(
"pass"
,
reqVo
.
getPassword
())
}
else
{
.
checkException
();
userVo
=
userServiceImpl
.
getUserByAccount
(
accountOrPhone
);
registerServiceImpl
.
login
(
reqVo
);
}
return
new
ResponseResult
();
if
(
userVo
==
null
){
return
new
Result
(
4001
,
"没有此用户"
,
info
);
}
if
(!
Md5AndSalt
.
verify
(
info
.
getPassword
(),
userVo
.
getPassword
())){
return
new
Result
(
4001
,
"用户名或密码错误"
,
info
);
}
/*token内容暂时不能用,以后要改动*/
String
token
=
StringHelper
.
getNewID
();
TokenHelper
.
write
(
token
,
userVo
);
return
new
Result
(
0
,
"SUCCESS"
,
null
);
}
}
}
}
src/main/java/com/pangding/web/authority/controller/RoleController.java
View file @
2a32cba1
...
@@ -5,6 +5,7 @@ import com.pangding.web.authority.vo.reqvo.ListRoleReqVo;
...
@@ -5,6 +5,7 @@ import com.pangding.web.authority.vo.reqvo.ListRoleReqVo;
import
com.pangding.web.authority.vo.reqvo.WebRoleReqVo
;
import
com.pangding.web.authority.vo.reqvo.WebRoleReqVo
;
import
com.pangding.web.authority.service.RoleService
;
import
com.pangding.web.authority.service.RoleService
;
import
com.pangding.web.authority.vo.reqvo.WebRoleResVo
;
import
com.pangding.web.authority.vo.reqvo.WebRoleResVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -29,6 +30,11 @@ public class RoleController {
...
@@ -29,6 +30,11 @@ public class RoleController {
*/
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
saveRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webRoleReqVo
)
.
checkException
()
.
notBlankCheck
(
"roleName"
,
webRoleReqVo
.
getName
())
.
checkException
();
roleServiceImpl
.
saveRole
(
webRoleReqVo
);
roleServiceImpl
.
saveRole
(
webRoleReqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -40,6 +46,11 @@ public class RoleController {
...
@@ -40,6 +46,11 @@ public class RoleController {
*/
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
updateRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webRoleReqVo
)
.
checkException
()
.
notBlankCheck
(
"roleName"
,
webRoleReqVo
.
getName
())
.
checkException
();
roleServiceImpl
.
updateRole
(
webRoleReqVo
);
roleServiceImpl
.
updateRole
(
webRoleReqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -60,6 +71,11 @@ public class RoleController {
...
@@ -60,6 +71,11 @@ public class RoleController {
*/
*/
@RequestMapping
(
value
=
"/role"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/role"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
WebRoleResVo
>
getRoleById
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
<
WebRoleResVo
>
getRoleById
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webRoleReqVo
)
.
checkException
()
.
notBlankCheck
(
"roleId"
,
webRoleReqVo
.
getId
())
.
checkException
();
return
ResponseResult
.
result
(
roleServiceImpl
.
getRoleById
(
webRoleReqVo
));
return
ResponseResult
.
result
(
roleServiceImpl
.
getRoleById
(
webRoleReqVo
));
}
}
...
@@ -70,6 +86,11 @@ public class RoleController {
...
@@ -70,6 +86,11 @@ public class RoleController {
*/
*/
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
delete
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
delete
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webRoleReqVo
)
.
checkException
()
.
notBlankCheck
(
"roleId"
,
webRoleReqVo
.
getId
())
.
checkException
();
roleServiceImpl
.
delete
(
webRoleReqVo
);
roleServiceImpl
.
delete
(
webRoleReqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
...
src/main/java/com/pangding/web/authority/controller/UserController.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
controller
;
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.currency.Result
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.PageSizeData
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* @author zhangjinyao
* @author zhangjinyao
...
@@ -32,6 +28,14 @@ public class UserController {
...
@@ -32,6 +28,14 @@ public class UserController {
*/
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
public
ResponseResult
saveUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webUserReqVo
)
.
checkException
()
.
notBlankCheck
(
"account"
,
webUserReqVo
.
getAccount
())
.
notBlankCheck
(
"password"
,
webUserReqVo
.
getPassword
())
.
checkPhoneNo
(
"phone"
,
webUserReqVo
.
getPhone
())
.
notBlankCheck
(
"companyId"
,
webUserReqVo
.
getCompanyId
())
.
checkException
();
userServiceImpl
.
saveUser
(
webUserReqVo
);
userServiceImpl
.
saveUser
(
webUserReqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -43,8 +47,14 @@ public class UserController {
...
@@ -43,8 +47,14 @@ public class UserController {
*/
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
public
ResponseResult
updateUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"reqVo"
,
webUserReqVo
)
.
checkException
()
.
notBlankCheck
(
"account"
,
webUserReqVo
.
getAccount
())
.
notBlankCheck
(
"password"
,
webUserReqVo
.
getPassword
())
.
checkPhoneNo
(
"phone"
,
webUserReqVo
.
getPhone
())
.
notBlankCheck
(
"companyId"
,
webUserReqVo
.
getCompanyId
())
.
checkException
();
userServiceImpl
.
updateUser
(
webUserReqVo
);
userServiceImpl
.
updateUser
(
webUserReqVo
);
return
new
ResponseResult
();
return
new
ResponseResult
();
}
}
...
@@ -65,6 +75,11 @@ public class UserController {
...
@@ -65,6 +75,11 @@ public class UserController {
*/
*/
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/user"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
WebUserResVo
>
user
(
@RequestBody
WebUserReqVo
webUserReqVo
){
public
ResponseResult
<
WebUserResVo
>
user
(
@RequestBody
WebUserReqVo
webUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"req"
,
webUserReqVo
)
.
checkException
()
.
notBlankCheck
(
"userId"
,
webUserReqVo
.
getId
())
.
checkException
();
return
ResponseResult
.
result
(
userServiceImpl
.
getUserById
(
webUserReqVo
.
getId
()));
return
ResponseResult
.
result
(
userServiceImpl
.
getUserById
(
webUserReqVo
.
getId
()));
}
}
...
...
src/main/java/com/pangding/web/authority/dao/AuthorityDao.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
;
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.pangding.web.authority.vo.reqvo.AuthorityGetReqVo
;
import
com.pangding.web.authority.vo.reqvo.AuthorityGetReqVo
;
import
com.pangding.web.authority.reqvo.ListLevel1ReqVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.yanzuoguang.dao.BaseDao
;
import
com.yanzuoguang.dao.BaseDao
;
...
@@ -32,19 +31,5 @@ public interface AuthorityDao extends BaseDao {
...
@@ -32,19 +31,5 @@ public interface AuthorityDao extends BaseDao {
PageSizeData
<
AuthorityVo
>
getAuthorityList
(
ListAuthorityReqVo
reqVo
);
PageSizeData
<
AuthorityVo
>
getAuthorityList
(
ListAuthorityReqVo
reqVo
);
List
<
AuthorityVo
>
getAuthoritys
(
AuthorityGetReqVo
reqVo
);
List
<
AuthorityVo
>
getAuthoritys
(
AuthorityGetReqVo
reqVo
);
/**
* 获取authorityVo对象列表
*
* @return authorityVo对象列表
*/
List
<
AuthorityVo
>
listAll
();
/**
* 获取一级权限对象列表
*
* @param listLevel1ReqVo ListLevel1ReqVo对象,仅用于拼接sql语句查询条件,无实际意义
* @return 权限对象列表
*/
List
<
AuthorityVo
>
listLevel1
(
ListLevel1ReqVo
listLevel1ReqVo
);
}
}
src/main/java/com/pangding/web/authority/dao/Comp
uterRegister
Dao.java
→
src/main/java/com/pangding/web/authority/dao/Comp
anyBankCard
Dao.java
View file @
2a32cba1
...
@@ -4,7 +4,7 @@ import com.yanzuoguang.dao.BaseDao;
...
@@ -4,7 +4,7 @@ import com.yanzuoguang.dao.BaseDao;
/**
/**
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/1
4 16:32
* @create 2019/5/1
6 19:17
*/
*/
public
interface
Comp
uterRegister
Dao
extends
BaseDao
{
public
interface
Comp
anyBankCard
Dao
extends
BaseDao
{
}
}
src/main/java/com/pangding/web/authority/dao/
MobileRegister
Dao.java
→
src/main/java/com/pangding/web/authority/dao/
Company
Dao.java
View file @
2a32cba1
...
@@ -7,7 +7,7 @@ import com.yanzuoguang.dao.BaseDao;
...
@@ -7,7 +7,7 @@ import com.yanzuoguang.dao.BaseDao;
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/13 14:24
* @create 2019/5/13 14:24
*/
*/
public
interface
MobileRegister
Dao
extends
BaseDao
{
public
interface
Company
Dao
extends
BaseDao
{
/**
/**
* 检查电话号码是否已存在
* 检查电话号码是否已存在
*
*
...
...
src/main/java/com/pangding/web/authority/dao/CompanyExtendDao.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.yanzuoguang.dao.BaseDao
;
/**
* @Author zhangjinyao
* @create 2019/5/16 17:20
*/
public
interface
CompanyExtendDao
extends
BaseDao
{
}
src/main/java/com/pangding/web/authority/dao/MerchantDao.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
;
import
com.yanzuoguang.dao.BaseDao
;
/**
* @Author zhangjinyao
* @create 2019/5/16 17:17
*/
public
interface
MerchantDao
extends
BaseDao
{
}
src/main/java/com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
View file @
2a32cba1
...
@@ -2,7 +2,6 @@ package com.pangding.web.authority.dao.impl;
...
@@ -2,7 +2,6 @@ package com.pangding.web.authority.dao.impl;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.vo.reqvo.AuthorityGetReqVo
;
import
com.pangding.web.authority.vo.reqvo.AuthorityGetReqVo
;
import
com.pangding.web.authority.reqvo.ListLevel1ReqVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.AuthorityVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.pangding.web.authority.vo.reqvo.ListAuthorityReqVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
...
@@ -52,15 +51,4 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
...
@@ -52,15 +51,4 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
return
this
.
query
(
AuthorityVo
.
class
,
SELECT
,
reqVo
);
return
this
.
query
(
AuthorityVo
.
class
,
SELECT
,
reqVo
);
}
}
@Override
public
List
<
AuthorityVo
>
listAll
()
{
return
this
.
query
(
AuthorityVo
.
class
,
SELECT
,
null
);
}
@Override
public
List
<
AuthorityVo
>
listLevel1
(
ListLevel1ReqVo
listLevel1ReqVo
)
{
return
this
.
query
(
AuthorityVo
.
class
,
SELECT
,
listLevel1ReqVo
);
}
}
}
src/main/java/com/pangding/web/authority/dao/impl/CompanyBankCardDaoImpl.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.CompanyBankCardDao
;
import
com.pangding.web.authority.vo.CompanyBankCardVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
/**
* @Author zhangjinyao
* @create 2019/5/16 19:17
*/
@Component
public
class
CompanyBankCardDaoImpl
extends
BaseDaoImpl
implements
CompanyBankCardDao
{
@Override
protected
void
init
()
{
register
(
CompanyBankCardVo
.
class
);
}
}
src/main/java/com/pangding/web/authority/dao/impl/
MobileRegister
DaoImpl.java
→
src/main/java/com/pangding/web/authority/dao/impl/
Company
DaoImpl.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.
MobileRegister
Dao
;
import
com.pangding.web.authority.dao.
Company
Dao
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
...
@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
* @create 2019/5/13 14:25
* @create 2019/5/13 14:25
*/
*/
@Component
@Component
public
class
MobileRegisterDaoImpl
extends
BaseDaoImpl
implements
MobileRegister
Dao
{
public
class
CompanyDaoImpl
extends
BaseDaoImpl
implements
Company
Dao
{
private
static
final
String
CHECK_PHONE
=
"CHECK_PHONE"
;
private
static
final
String
CHECK_PHONE
=
"CHECK_PHONE"
;
...
...
src/main/java/com/pangding/web/authority/dao/impl/CompanyExtendDaoImpl.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.CompanyExtendDao
;
import
com.pangding.web.authority.vo.CompanyExtendVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
/**
* @Author zhangjinyao
* @create 2019/5/16 17:22
*/
@Component
public
class
CompanyExtendDaoImpl
extends
BaseDaoImpl
implements
CompanyExtendDao
{
@Override
protected
void
init
()
{
register
(
CompanyExtendVo
.
class
);
}
}
src/main/java/com/pangding/web/authority/dao/impl/
ComputerRegister
DaoImpl.java
→
src/main/java/com/pangding/web/authority/dao/impl/
Merchant
DaoImpl.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
package
com
.
pangding
.
web
.
authority
.
dao
.
impl
;
import
com.pangding.web.authority.dao.ComputerRegisterDao
;
import
com.pangding.web.authority.dao.MerchantDao
;
import
com.pangding.web.authority.vo.MerchantVo
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
com.yanzuoguang.dao.impl.BaseDaoImpl
;
import
org.springframework.stereotype.Component
;
/**
/**
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/1
4 16:33
* @create 2019/5/1
6 17:20
*/
*/
public
class
ComputerRegisterDaoImpl
extends
BaseDaoImpl
implements
ComputerRegisterDao
{
@Component
public
class
MerchantDaoImpl
extends
BaseDaoImpl
implements
MerchantDao
{
@Override
@Override
protected
void
init
()
{
protected
void
init
()
{
register
(
MerchantVo
.
class
);
}
}
}
}
src/main/java/com/pangding/web/authority/dto/RegisterEnterpriceDto.java
deleted
100644 → 0
View file @
65d90702
package
com
.
pangding
.
web
.
authority
.
dto
;
/**
* @Author zhangjinyao
* @create 2019/5/14 18:30
*/
public
class
RegisterEnterpriceDto
{
private
String
enterpriceName
;
private
String
enterpriceAddress
;
private
String
businessLicenseCode
;
private
String
merchantName
;
private
String
companyAttribute
;
private
String
enterpricePhone
;
private
String
contactName
;
private
String
contactCode
;
private
String
contactPhone
;
private
String
depositBank
;
private
String
depositAccount
;
private
String
depositAddress
;
public
String
getEnterpriceName
()
{
return
enterpriceName
;
}
public
void
setEnterpriceName
(
String
enterpriceName
)
{
this
.
enterpriceName
=
enterpriceName
;
}
public
String
getCompanyAttribute
()
{
return
companyAttribute
;
}
public
void
setCompanyAttribute
(
String
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
}
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
getEnterpricePhone
()
{
return
enterpricePhone
;
}
public
void
setEnterpricePhone
(
String
enterpricePhone
)
{
this
.
enterpricePhone
=
enterpricePhone
;
}
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
getContactPhone
()
{
return
contactPhone
;
}
public
void
setContactPhone
(
String
contactPhone
)
{
this
.
contactPhone
=
contactPhone
;
}
public
String
getDepositBank
()
{
return
depositBank
;
}
public
void
setDepositBank
(
String
depositBank
)
{
this
.
depositBank
=
depositBank
;
}
public
String
getDepositAccount
()
{
return
depositAccount
;
}
public
void
setDepositAccount
(
String
depositAccount
)
{
this
.
depositAccount
=
depositAccount
;
}
public
String
getDepositAddress
()
{
return
depositAddress
;
}
public
void
setDepositAddress
(
String
depositAddress
)
{
this
.
depositAddress
=
depositAddress
;
}
}
src/main/java/com/pangding/web/authority/reqvo/ListLevel1ReqVo.java
deleted
100644 → 0
View file @
65d90702
package
com
.
pangding
.
web
.
authority
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/5/11 16:34
*/
public
class
ListLevel1ReqVo
{
private
String
exist
;
public
String
getExist
()
{
return
exist
;
}
public
void
setExist
(
String
exist
)
{
this
.
exist
=
exist
;
}
}
src/main/java/com/pangding/web/authority/service/ComputerRegisterService.java
deleted
100644 → 0
View file @
65d90702
package
com
.
pangding
.
web
.
authority
.
service
;
/**
* @Author zhangjinyao
* @create 2019/5/14 16:30
*/
public
interface
ComputerRegisterService
{
}
src/main/java/com/pangding/web/authority/service/
Mobile
RegisterService.java
→
src/main/java/com/pangding/web/authority/service/RegisterService.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
service
;
package
com
.
pangding
.
web
.
authority
.
service
;
import
com.pangding.web.authority.dto.RegisterIndividualDto
;
import
com.pangding.web.authority.vo.reqvo.LoginReqVo
;
import
com.pangding.web.authority.vo.reqvo.RegisterEnterpriceReqVo
;
import
com.pangding.web.authority.vo.reqvo.RegisterIndividualReqVo
;
import
com.pangding.web.authority.vo.reqvo.RegisterUserReqVo
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.UserVo
;
/**
/**
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/13 14:21
* @create 2019/5/13 14:21
*/
*/
public
interface
Mobile
RegisterService
{
public
interface
RegisterService
{
/**
/**
* 判断注册编码是否正确
* 判断注册编码是否正确
...
@@ -22,16 +24,9 @@ public interface MobileRegisterService {
...
@@ -22,16 +24,9 @@ public interface MobileRegisterService {
/**
/**
* 保存用户信息
* 保存用户信息
*
*
* @param
user
Vo UserVo对象
* @param
registerUserReq
Vo UserVo对象
*/
*/
void
saveUser
(
UserVo
userVo
);
CompanyVo
saveUser
(
RegisterUserReqVo
registerUserReqVo
);
/**
* 保存公司信息
*
* @param companyVo CompanyVo对象
*/
void
saveCompany
(
CompanyVo
companyVo
);
/**
/**
* 检查电话号码是否已存在
* 检查电话号码是否已存在
...
@@ -39,4 +34,10 @@ public interface MobileRegisterService {
...
@@ -39,4 +34,10 @@ public interface MobileRegisterService {
* @param contactPhone 联系电话
* @param contactPhone 联系电话
*/
*/
void
checkPhone
(
String
contactPhone
);
void
checkPhone
(
String
contactPhone
);
void
saveIndividual
(
RegisterIndividualReqVo
reqVo
);
void
saveEnterprise
(
RegisterEnterpriceReqVo
reqVo
);
void
login
(
LoginReqVo
reqVo
);
}
}
src/main/java/com/pangding/web/authority/service/impl/AuthorityServiceImpl.java
View file @
2a32cba1
...
@@ -3,7 +3,6 @@ package com.pangding.web.authority.service.impl;
...
@@ -3,7 +3,6 @@ package com.pangding.web.authority.service.impl;
import
com.pangding.web.authority.dao.RoleAuthorityDao
;
import
com.pangding.web.authority.dao.RoleAuthorityDao
;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.dao.AuthorityDao
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.reqvo.ListLevel1ReqVo
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.vo.*
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.exception.CodeException
;
import
com.yanzuoguang.util.exception.CodeException
;
...
...
src/main/java/com/pangding/web/authority/service/impl/ComputerRegisterServiceImpl.java
deleted
100644 → 0
View file @
65d90702
package
com
.
pangding
.
web
.
authority
.
service
.
impl
;
import
com.pangding.web.authority.service.ComputerRegisterService
;
import
org.springframework.stereotype.Service
;
/**
* @Author zhangjinyao
* @create 2019/5/14 16:31
*/
@Service
public
class
ComputerRegisterServiceImpl
implements
ComputerRegisterService
{
}
src/main/java/com/pangding/web/authority/service/impl/MobileRegisterServiceImpl.java
deleted
100644 → 0
View file @
65d90702
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
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @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
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveCompany
(
CompanyVo
companyVo
)
{
mobileRegisterDaoImpl
.
create
(
companyVo
);
GetUserByCompanyIdReqVo
companyId
=
new
GetUserByCompanyIdReqVo
();
companyId
.
setCompanyId
(
companyVo
.
getId
());
UserVo
userVo
=
userDaoImpl
.
getUserByCompanyId
(
companyId
);
userVo
.
setPhone
(
companyVo
.
getContactPhone
());
userDaoImpl
.
update
(
userVo
);
}
@Override
public
void
checkPhone
(
String
contactPhone
)
{
CompanyVo
companyVo
=
new
CompanyVo
();
companyVo
.
setContactPhone
(
contactPhone
);
mobileRegisterDaoImpl
.
checkPhone
(
companyVo
);
}
}
src/main/java/com/pangding/web/authority/service/impl/RegisterServiceImpl.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
service
.
impl
;
import
com.pangding.web.authority.dao.*
;
import
com.pangding.web.authority.vo.*
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.reqvo.CheckMerchantIdReqVo
;
import
com.pangding.web.authority.service.RegisterService
;
import
com.pangding.web.authority.service.UserService
;
import
com.yanzuoguang.token.TokenHelper
;
import
com.yanzuoguang.util.exception.CodeException
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @Author zhangjinyao
* @create 2019/5/13 14:23
*/
@Service
public
class
RegisterServiceImpl
implements
RegisterService
{
@Autowired
CompanyDao
companyDaoImpl
;
@Autowired
UserDao
userDaoImpl
;
@Autowired
UserService
userServiceImpl
;
@Autowired
MerchantDao
merchantDaoImpl
;
@Autowired
CompanyExtendDao
companyExtendDaoImpl
;
@Autowired
CompanyBankCardDao
companyBankCardDaoImpl
;
@Override
public
Boolean
checkMerchantId
(
String
merchantId
)
{
CheckMerchantIdReqVo
idReqVo
=
new
CheckMerchantIdReqVo
();
idReqVo
.
setId
(
merchantId
);
CompanyVo
companyVo
=
companyDaoImpl
.
load
(
idReqVo
,
CompanyVo
.
class
);
return
companyVo
==
null
?
false
:
true
;
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
CompanyVo
saveUser
(
RegisterUserReqVo
registerUserReqVo
)
{
if
(
registerUserReqVo
.
getCompanyType
()
!=
0
){
throw
new
CodeException
(
"目前仅支持个体用户"
);
}
userServiceImpl
.
isValid
(
registerUserReqVo
.
getAccount
());
UserVo
userVo
=
new
UserVo
();
userVo
.
setAccount
(
registerUserReqVo
.
getAccount
());
userServiceImpl
.
checkAccount
(
userVo
);
if
(!
registerUserReqVo
.
getPassword
().
equals
(
registerUserReqVo
.
getConfirmPassword
())){
throw
new
CodeException
(
"确认密码错误"
);
}
String
merchantId
=
registerUserReqVo
.
getMerchantId
();
if
(!
this
.
checkMerchantId
(
merchantId
)){
throw
new
CodeException
(
"注册编码错误"
);
}
String
companyId
=
StringHelper
.
getNewID
();
userVo
.
setPassword
(
StringHelper
.
md5
(
registerUserReqVo
.
getPassword
()));
userVo
.
setId
(
StringHelper
.
getNewID
());
userVo
.
setRemark
(
registerUserReqVo
.
getPassword
());
userVo
.
setCompanyId
(
companyId
);
userDaoImpl
.
create
(
userVo
);
CompanyVo
companyVo
=
new
CompanyVo
();
companyVo
.
setId
(
companyId
);
companyVo
.
setMerchantId
(
merchantId
);
companyVo
.
setCompanyType
(
registerUserReqVo
.
getCompanyType
());
companyDaoImpl
.
create
(
companyVo
);
return
companyVo
;
}
@Override
public
void
checkPhone
(
String
contactPhone
)
{
CompanyVo
companyVo
=
new
CompanyVo
();
companyVo
.
setContactPhone
(
contactPhone
);
companyDaoImpl
.
checkPhone
(
companyVo
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveIndividual
(
RegisterIndividualReqVo
reqVo
)
{
CompanyVo
companyVo
=
new
CompanyVo
();
MerchantVo
merchantVo
=
new
MerchantVo
();
CompanyExtendVo
extendVo
=
new
CompanyExtendVo
();
this
.
checkPhone
(
reqVo
.
getContactPhone
());
companyVo
.
setId
(
reqVo
.
getId
());
companyVo
.
setMerchantId
(
reqVo
.
getMerchantId
());
companyVo
.
setCompanyType
(
reqVo
.
getCompanyType
());
companyVo
.
setContactName
(
reqVo
.
getContactName
());
companyVo
.
setContactCode
(
reqVo
.
getContactCode
());
companyVo
.
setCompanyAttribute
(
reqVo
.
getCompanyAttribute
());
companyVo
.
setContactPhone
(
reqVo
.
getContactPhone
());
companyVo
.
setCompanyName
(
reqVo
.
getExtraChoseOne
());
merchantVo
.
setId
(
StringHelper
.
getNewID
());
merchantVo
.
setName
(
reqVo
.
getExtraChoseOne
());
merchantVo
.
setAttribute
(
reqVo
.
getCompanyAttribute
());
merchantVo
.
setTheProvider
(
reqVo
.
getId
());
merchantVo
.
setPhone
(
reqVo
.
getContactPhone
());
extendVo
.
setId
(
reqVo
.
getId
());
if
(
reqVo
.
getCompanyAttribute
()
==
5
){
companyVo
.
setBusinessLicenseCode
(
reqVo
.
getExtraChoseTwo
());
}
else
{
companyVo
.
setAddress
(
reqVo
.
getExtraChoseTwo
());
merchantVo
.
setAddress
(
reqVo
.
getExtraChoseTwo
());
}
companyDaoImpl
.
update
(
companyVo
);
merchantDaoImpl
.
create
(
merchantVo
);
companyExtendDaoImpl
.
create
(
merchantVo
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveEnterprise
(
RegisterEnterpriceReqVo
reqVo
)
{
CompanyVo
companyVo
=
new
CompanyVo
();
MerchantVo
merchantVo
=
new
MerchantVo
();
CompanyExtendVo
extendVo
=
new
CompanyExtendVo
();
CompanyBankCardVo
companyBankCardVo
=
new
CompanyBankCardVo
();
this
.
checkPhone
(
reqVo
.
getContactPhone
());
companyVo
.
setId
(
reqVo
.
getId
());
companyVo
.
setMerchantId
(
reqVo
.
getMerchantId
());
companyVo
.
setCompanyType
(
reqVo
.
getCompanyType
());
companyVo
.
setCompanyName
(
reqVo
.
getCompanyName
());
companyVo
.
setAddress
(
reqVo
.
getCompanyAddress
());
companyVo
.
setBusinessLicenseCode
(
reqVo
.
getBusinessLicenseCode
());
companyVo
.
setCompanyAttribute
(
reqVo
.
getCompanyAttribute
());
companyVo
.
setContactName
(
reqVo
.
getContactName
());
companyVo
.
setContactCode
(
reqVo
.
getContactCode
());
companyVo
.
setContactPhone
(
reqVo
.
getContactPhone
());
merchantVo
.
setId
(
StringHelper
.
getNewID
());
merchantVo
.
setName
(
reqVo
.
getMerchantName
());
merchantVo
.
setTheProvider
(
reqVo
.
getId
());
merchantVo
.
setAttribute
(
reqVo
.
getCompanyAttribute
());
merchantVo
.
setPhone
(
reqVo
.
getContactPhone
());
extendVo
.
setId
(
reqVo
.
getId
());
companyBankCardVo
.
setId
(
reqVo
.
getId
());
companyBankCardVo
.
setBankName
(
reqVo
.
getBankName
());
companyBankCardVo
.
setBankCardCode
(
reqVo
.
getBankCardCode
());
companyBankCardVo
.
setBankAddress
(
reqVo
.
getBankAddress
());
companyBankCardVo
.
setBankCode
(
reqVo
.
getBankCode
());
companyBankCardVo
.
setReservedPhone
(
reqVo
.
getReservedPhone
());
companyDaoImpl
.
update
(
companyVo
);
merchantDaoImpl
.
create
(
merchantVo
);
companyExtendDaoImpl
.
create
(
merchantVo
);
companyBankCardDaoImpl
.
create
(
companyBankCardVo
);
}
@Override
public
void
login
(
LoginReqVo
reqVo
)
{
String
accountOrPhone
=
reqVo
.
getAccountOrPhone
();
UserVo
userVo
;
if
(
userServiceImpl
.
isNumeric
(
accountOrPhone
)){
userVo
=
userServiceImpl
.
getUserByPhone
(
accountOrPhone
);
}
else
{
userVo
=
userServiceImpl
.
getUserByAccount
(
accountOrPhone
);
}
if
(
userVo
==
null
){
throw
new
CodeException
(
"没有此用户"
);
}
if
(!
StringHelper
.
md5
(
reqVo
.
getPassword
()).
equals
(
userVo
.
getPassword
())){
throw
new
CodeException
(
"用户名或密码错误"
);
}
CompanyVo
companyReqVo
=
new
CompanyVo
();
companyReqVo
.
setId
(
userVo
.
getCompanyId
());
CompanyVo
companyVo
=
companyDaoImpl
.
load
(
companyReqVo
,
CompanyVo
.
class
);
LoginResVo
resVo
=
new
LoginResVo
();
resVo
.
setUserVo
(
userVo
);
resVo
.
setCompanyVo
(
companyVo
);
/*token内容暂时不能用,以后要改动*/
String
token
=
StringHelper
.
getNewID
();
TokenHelper
.
write
(
token
,
resVo
);
}
}
src/main/java/com/pangding/web/authority/vo/AuthorityVo.java
View file @
2a32cba1
...
@@ -34,7 +34,7 @@ public class AuthorityVo implements Serializable, InitDao {
...
@@ -34,7 +34,7 @@ public class AuthorityVo implements Serializable, InitDao {
@TableAnnotation
(
"create_time"
)
@TableAnnotation
(
"create_time"
)
private
Timestamp
createTime
;
private
String
createTime
;
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
...
@@ -100,17 +100,16 @@ public class AuthorityVo implements Serializable, InitDao {
...
@@ -100,17 +100,16 @@ public class AuthorityVo implements Serializable, InitDao {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
Timestamp
getCreateTime
()
{
public
String
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
public
void
setCreateTime
(
Timestamp
createTime
)
{
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
@Override
@Override
public
void
init
()
{
public
void
init
()
{
String
createTimeString
=
StringHelper
.
getFirst
(
DateHelper
.
getDateTimeString
(
this
.
createTime
),
DateHelper
.
getNow
());
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
this
.
createTime
=
Timestamp
.
valueOf
(
createTimeString
);
}
}
}
}
src/main/java/com/pangding/web/authority/vo/CompanyBankCardVo.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
vo
;
import
com.yanzuoguang.dao.TableAnnotation
;
import
java.io.Serializable
;
/**
* @Author zhangjinyao
* @create 2019/5/16 14:17
*/
@TableAnnotation
(
"pd_company_bank_card"
)
public
class
CompanyBankCardVo
implements
Serializable
{
private
String
id
;
@TableAnnotation
(
"bank_card_code"
)
private
String
bankCardCode
;
@TableAnnotation
(
"bank_name"
)
private
String
bankName
;
@TableAnnotation
(
"bank_address"
)
private
String
bankAddress
;
@TableAnnotation
(
"bank_code"
)
private
String
bankCode
;
private
int
type
;
@TableAnnotation
(
"company_id"
)
private
String
companyId
;
private
String
name
;
@TableAnnotation
(
"ID_card"
)
private
String
IDCard
;
@TableAnnotation
(
"reserved_phone"
)
private
String
reservedPhone
;
private
String
status
;
@TableAnnotation
(
"binding_code"
)
private
String
bindingCode
;
@TableAnnotation
(
"binding_time"
)
private
String
bindingTime
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getBankCardCode
()
{
return
bankCardCode
;
}
public
void
setBankCardCode
(
String
bankCardCode
)
{
this
.
bankCardCode
=
bankCardCode
;
}
public
String
getBankName
()
{
return
bankName
;
}
public
void
setBankName
(
String
bankName
)
{
this
.
bankName
=
bankName
;
}
public
String
getBankAddress
()
{
return
bankAddress
;
}
public
void
setBankAddress
(
String
bankAddress
)
{
this
.
bankAddress
=
bankAddress
;
}
public
String
getBankCode
()
{
return
bankCode
;
}
public
void
setBankCode
(
String
bankCode
)
{
this
.
bankCode
=
bankCode
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getIDCard
()
{
return
IDCard
;
}
public
void
setIDCard
(
String
IDCard
)
{
this
.
IDCard
=
IDCard
;
}
public
String
getReservedPhone
()
{
return
reservedPhone
;
}
public
void
setReservedPhone
(
String
reservedPhone
)
{
this
.
reservedPhone
=
reservedPhone
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getBindingCode
()
{
return
bindingCode
;
}
public
void
setBindingCode
(
String
bindingCode
)
{
this
.
bindingCode
=
bindingCode
;
}
public
String
getBindingTime
()
{
return
bindingTime
;
}
public
void
setBindingTime
(
String
bindingTime
)
{
this
.
bindingTime
=
bindingTime
;
}
}
src/main/java/com/pangding/web/authority/vo/CompanyExtendVo.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
vo
;
import
com.yanzuoguang.dao.TableAnnotation
;
import
java.io.Serializable
;
/**
* @Author zhangjinyao
* @create 2019/5/16 15:35
*/
@TableAnnotation
(
"pd_company_extend"
)
public
class
CompanyExtendVo
implements
Serializable
{
private
String
id
;
@TableAnnotation
(
"QR_code"
)
private
String
QRCode
;
@TableAnnotation
(
"QR_code_type"
)
private
String
QRCodeType
;
@TableAnnotation
(
"QR_code_url"
)
private
String
QRCodeUrl
;
private
String
money
;
@TableAnnotation
(
"is_sub_account"
)
private
String
isSubAccount
;
@TableAnnotation
(
"sub_account_rule"
)
private
String
subAccountRule
;
@TableAnnotation
(
"is_sub_profit"
)
private
String
isSubProfit
;
@TableAnnotation
(
"sub_profit_rule"
)
private
String
subProfitRule
;
@TableAnnotation
(
"is_withdraw"
)
private
String
isWithdraw
;
@TableAnnotation
(
"withdraw_rule"
)
private
String
withdrawRule
;
@TableAnnotation
(
"is_scan_code_pay"
)
private
String
isScanCodePay
;
@TableAnnotation
(
"pay_rule"
)
private
String
payRule
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getQRCode
()
{
return
QRCode
;
}
public
void
setQRCode
(
String
QRCode
)
{
this
.
QRCode
=
QRCode
;
}
public
String
getQRCodeType
()
{
return
QRCodeType
;
}
public
void
setQRCodeType
(
String
QRCodeType
)
{
this
.
QRCodeType
=
QRCodeType
;
}
public
String
getQRCodeUrl
()
{
return
QRCodeUrl
;
}
public
void
setQRCodeUrl
(
String
QRCodeUrl
)
{
this
.
QRCodeUrl
=
QRCodeUrl
;
}
public
String
getMoney
()
{
return
money
;
}
public
void
setMoney
(
String
money
)
{
this
.
money
=
money
;
}
public
String
getIsSubAccount
()
{
return
isSubAccount
;
}
public
void
setIsSubAccount
(
String
isSubAccount
)
{
this
.
isSubAccount
=
isSubAccount
;
}
public
String
getSubAccountRule
()
{
return
subAccountRule
;
}
public
void
setSubAccountRule
(
String
subAccountRule
)
{
this
.
subAccountRule
=
subAccountRule
;
}
public
String
getIsSubProfit
()
{
return
isSubProfit
;
}
public
void
setIsSubProfit
(
String
isSubProfit
)
{
this
.
isSubProfit
=
isSubProfit
;
}
public
String
getSubProfitRule
()
{
return
subProfitRule
;
}
public
void
setSubProfitRule
(
String
subProfitRule
)
{
this
.
subProfitRule
=
subProfitRule
;
}
public
String
getIsWithdraw
()
{
return
isWithdraw
;
}
public
void
setIsWithdraw
(
String
isWithdraw
)
{
this
.
isWithdraw
=
isWithdraw
;
}
public
String
getWithdrawRule
()
{
return
withdrawRule
;
}
public
void
setWithdrawRule
(
String
withdrawRule
)
{
this
.
withdrawRule
=
withdrawRule
;
}
public
String
getIsScanCodePay
()
{
return
isScanCodePay
;
}
public
void
setIsScanCodePay
(
String
isScanCodePay
)
{
this
.
isScanCodePay
=
isScanCodePay
;
}
public
String
getPayRule
()
{
return
payRule
;
}
public
void
setPayRule
(
String
payRule
)
{
this
.
payRule
=
payRule
;
}
}
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
View file @
2a32cba1
...
@@ -34,7 +34,7 @@ public class CompanyVo implements Serializable, InitDao {
...
@@ -34,7 +34,7 @@ public class CompanyVo implements Serializable, InitDao {
private
String
address
;
private
String
address
;
@TableAnnotation
(
"company_attribute"
)
@TableAnnotation
(
"company_attribute"
)
private
String
companyAttribute
;
private
int
companyAttribute
;
@TableAnnotation
(
"contact_name"
)
@TableAnnotation
(
"contact_name"
)
private
String
contactName
;
private
String
contactName
;
...
@@ -54,10 +54,10 @@ public class CompanyVo implements Serializable, InitDao {
...
@@ -54,10 +54,10 @@ public class CompanyVo implements Serializable, InitDao {
private
String
status
;
private
String
status
;
@TableAnnotation
(
"create_time"
)
@TableAnnotation
(
"create_time"
)
private
Timestamp
createTime
;
private
String
createTime
;
@TableAnnotation
(
"update_time"
)
@TableAnnotation
(
"update_time"
)
private
Timestamp
updateTime
;
private
String
updateTime
;
private
int
nature
;
private
int
nature
;
...
@@ -117,11 +117,11 @@ public class CompanyVo implements Serializable, InitDao {
...
@@ -117,11 +117,11 @@ public class CompanyVo implements Serializable, InitDao {
this
.
address
=
address
;
this
.
address
=
address
;
}
}
public
String
getCompanyAttribute
()
{
public
int
getCompanyAttribute
()
{
return
companyAttribute
;
return
companyAttribute
;
}
}
public
void
setCompanyAttribute
(
String
companyAttribute
)
{
public
void
setCompanyAttribute
(
int
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
this
.
companyAttribute
=
companyAttribute
;
}
}
...
@@ -173,19 +173,19 @@ public class CompanyVo implements Serializable, InitDao {
...
@@ -173,19 +173,19 @@ public class CompanyVo implements Serializable, InitDao {
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
Timestamp
getCreateTime
()
{
public
String
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
public
void
setCreateTime
(
Timestamp
createTime
)
{
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
public
Timestamp
getUpdateTime
()
{
public
String
getUpdateTime
()
{
return
updateTime
;
return
updateTime
;
}
}
public
void
setUpdateTime
(
Timestamp
updateTime
)
{
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
...
@@ -199,7 +199,6 @@ public class CompanyVo implements Serializable, InitDao {
...
@@ -199,7 +199,6 @@ public class CompanyVo implements Serializable, InitDao {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
String
createTimeString
=
StringHelper
.
getFirst
(
DateHelper
.
getDateTimeString
(
this
.
createTime
),
DateHelper
.
getNow
());
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
this
.
createTime
=
Timestamp
.
valueOf
(
createTimeString
);
}
}
}
}
src/main/java/com/pangding/web/authority/vo/MerchantVo.java
0 → 100644
View file @
2a32cba1
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
;
/**
* @Author zhangjinyao
* @create 2019/5/16 14:35
*/
@TableAnnotation
(
"pd_merchant"
)
public
class
MerchantVo
implements
Serializable
,
InitDao
{
private
String
id
;
private
String
code
;
private
String
name
;
private
String
longitude
;
private
String
latitude
;
private
String
score
;
@TableAnnotation
(
"area_code"
)
private
String
areaCode
;
@TableAnnotation
(
"area_name"
)
private
String
areaName
;
private
String
address
;
private
int
attribute
;
private
String
tag
;
private
String
level
;
private
int
status
;
@TableAnnotation
(
"time_spent"
)
private
String
timeSpent
;
private
String
phone
;
@TableAnnotation
(
"the_provider"
)
private
String
theProvider
;
@TableAnnotation
(
"the_interface"
)
private
String
theInterface
;
@TableAnnotation
(
"business_start"
)
private
String
businessStart
;
@TableAnnotation
(
"business_end"
)
private
String
businessEnd
;
@TableAnnotation
(
"create_time"
)
private
String
createTime
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
String
longitude
)
{
this
.
longitude
=
longitude
;
}
public
String
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
String
latitude
)
{
this
.
latitude
=
latitude
;
}
public
String
getScore
()
{
return
score
;
}
public
void
setScore
(
String
score
)
{
this
.
score
=
score
;
}
public
String
getAreaCode
()
{
return
areaCode
;
}
public
void
setAreaCode
(
String
areaCode
)
{
this
.
areaCode
=
areaCode
;
}
public
String
getAreaName
()
{
return
areaName
;
}
public
void
setAreaName
(
String
areaName
)
{
this
.
areaName
=
areaName
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
int
getAttribute
()
{
return
attribute
;
}
public
void
setAttribute
(
int
attribute
)
{
this
.
attribute
=
attribute
;
}
public
String
getTag
()
{
return
tag
;
}
public
void
setTag
(
String
tag
)
{
this
.
tag
=
tag
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getTimeSpent
()
{
return
timeSpent
;
}
public
void
setTimeSpent
(
String
timeSpent
)
{
this
.
timeSpent
=
timeSpent
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getTheProvider
()
{
return
theProvider
;
}
public
void
setTheProvider
(
String
theProvider
)
{
this
.
theProvider
=
theProvider
;
}
public
String
getTheInterface
()
{
return
theInterface
;
}
public
void
setTheInterface
(
String
theInterface
)
{
this
.
theInterface
=
theInterface
;
}
public
String
getBusinessStart
()
{
return
businessStart
;
}
public
void
setBusinessStart
(
String
businessStart
)
{
this
.
businessStart
=
businessStart
;
}
public
String
getBusinessEnd
()
{
return
businessEnd
;
}
public
void
setBusinessEnd
(
String
businessEnd
)
{
this
.
businessEnd
=
businessEnd
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
@Override
public
void
init
()
{
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
}
}
src/main/java/com/pangding/web/authority/vo/UserVo.java
View file @
2a32cba1
...
@@ -28,7 +28,7 @@ public class UserVo implements Serializable, InitDao {
...
@@ -28,7 +28,7 @@ public class UserVo implements Serializable, InitDao {
private
String
remark
;
private
String
remark
;
@TableAnnotation
(
"create_time"
)
@TableAnnotation
(
"create_time"
)
private
Timestamp
createTime
;
private
String
createTime
;
private
String
creator
;
private
String
creator
;
...
@@ -83,11 +83,11 @@ public class UserVo implements Serializable, InitDao {
...
@@ -83,11 +83,11 @@ public class UserVo implements Serializable, InitDao {
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
Timestamp
getCreateTime
()
{
public
String
getCreateTime
()
{
return
createTime
;
return
createTime
;
}
}
public
void
setCreateTime
(
Timestamp
createTime
)
{
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
...
@@ -109,7 +109,6 @@ public class UserVo implements Serializable, InitDao {
...
@@ -109,7 +109,6 @@ public class UserVo implements Serializable, InitDao {
@Override
@Override
public
void
init
()
{
public
void
init
()
{
String
createTimeString
=
StringHelper
.
getFirst
(
DateHelper
.
getDateTimeString
(
this
.
createTime
),
DateHelper
.
getNow
());
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
this
.
createTime
=
Timestamp
.
valueOf
(
createTimeString
);
}
}
}
}
src/main/java/com/pangding/web/authority/vo/
MobileLoginInf
o.java
→
src/main/java/com/pangding/web/authority/vo/
reqvo/LoginReqV
o.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
vo
;
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
/**
/**
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/14 11:46
* @create 2019/5/14 11:46
*/
*/
public
class
MobileLoginInf
o
{
public
class
LoginReqV
o
{
private
String
accountOrPhone
;
private
String
accountOrPhone
;
...
...
src/main/java/com/pangding/web/authority/vo/reqvo/LoginResVo.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.UserVo
;
/**
* @Author zhangjinyao
* @create 2019/5/16 17:50
*/
public
class
LoginResVo
{
UserVo
userVo
;
CompanyVo
companyVo
;
public
UserVo
getUserVo
()
{
return
userVo
;
}
public
void
setUserVo
(
UserVo
userVo
)
{
this
.
userVo
=
userVo
;
}
public
CompanyVo
getCompanyVo
()
{
return
companyVo
;
}
public
void
setCompanyVo
(
CompanyVo
companyVo
)
{
this
.
companyVo
=
companyVo
;
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/RegisterEnterpriceReqVo.java
0 → 100644
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/5/14 18:30
*/
public
class
RegisterEnterpriceReqVo
{
private
String
id
;
private
String
merchantId
;
private
int
companyType
;
private
String
companyName
;
private
String
companyAddress
;
private
String
businessLicenseCode
;
private
String
merchantName
;
private
int
companyAttribute
;
private
String
contactName
;
private
String
contactCode
;
private
String
contactPhone
;
private
String
bankName
;
private
String
bankCardCode
;
private
String
bankAddress
;
private
String
bankCode
;
private
String
reservedPhone
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
public
int
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
int
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
String
getCompanyAddress
()
{
return
companyAddress
;
}
public
void
setCompanyAddress
(
String
companyAddress
)
{
this
.
companyAddress
=
companyAddress
;
}
public
String
getBusinessLicenseCode
()
{
return
businessLicenseCode
;
}
public
void
setBusinessLicenseCode
(
String
businessLicenseCode
)
{
this
.
businessLicenseCode
=
businessLicenseCode
;
}
public
String
getMerchantName
()
{
return
merchantName
;
}
public
void
setMerchantName
(
String
merchantName
)
{
this
.
merchantName
=
merchantName
;
}
public
int
getCompanyAttribute
()
{
return
companyAttribute
;
}
public
void
setCompanyAttribute
(
int
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
}
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
getContactPhone
()
{
return
contactPhone
;
}
public
void
setContactPhone
(
String
contactPhone
)
{
this
.
contactPhone
=
contactPhone
;
}
public
String
getBankName
()
{
return
bankName
;
}
public
void
setBankName
(
String
bankName
)
{
this
.
bankName
=
bankName
;
}
public
String
getBankCardCode
()
{
return
bankCardCode
;
}
public
void
setBankCardCode
(
String
bankCardCode
)
{
this
.
bankCardCode
=
bankCardCode
;
}
public
String
getBankAddress
()
{
return
bankAddress
;
}
public
void
setBankAddress
(
String
bankAddress
)
{
this
.
bankAddress
=
bankAddress
;
}
public
String
getBankCode
()
{
return
bankCode
;
}
public
void
setBankCode
(
String
bankCode
)
{
this
.
bankCode
=
bankCode
;
}
public
String
getReservedPhone
()
{
return
reservedPhone
;
}
public
void
setReservedPhone
(
String
reservedPhone
)
{
this
.
reservedPhone
=
reservedPhone
;
}
}
src/main/java/com/pangding/web/authority/
dto/RegisterIndividualDt
o.java
→
src/main/java/com/pangding/web/authority/
vo/reqvo/RegisterIndividualReqV
o.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dt
o
;
package
com
.
pangding
.
web
.
authority
.
vo
.
reqv
o
;
/**
/**
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/13 17:32
* @create 2019/5/13 17:32
*/
*/
public
class
RegisterIndividualDto
{
public
class
RegisterIndividualReqVo
{
private
String
id
;
private
String
merchantId
;
private
int
companyType
;
private
String
contactName
;
private
String
contactName
;
private
String
contactCode
;
private
String
contactCode
;
private
String
companyAttribute
;
private
int
companyAttribute
;
private
String
contactPhone
;
private
String
contactPhone
;
...
@@ -18,6 +24,30 @@ public class RegisterIndividualDto {
...
@@ -18,6 +24,30 @@ public class RegisterIndividualDto {
private
String
extraChoseTwo
;
private
String
extraChoseTwo
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
public
int
getCompanyType
()
{
return
companyType
;
}
public
void
setCompanyType
(
int
companyType
)
{
this
.
companyType
=
companyType
;
}
public
String
getExtraChoseOne
()
{
public
String
getExtraChoseOne
()
{
return
extraChoseOne
;
return
extraChoseOne
;
}
}
...
@@ -50,11 +80,11 @@ public class RegisterIndividualDto {
...
@@ -50,11 +80,11 @@ public class RegisterIndividualDto {
this
.
contactCode
=
contactCode
;
this
.
contactCode
=
contactCode
;
}
}
public
String
getCompanyAttribute
()
{
public
int
getCompanyAttribute
()
{
return
companyAttribute
;
return
companyAttribute
;
}
}
public
void
setCompanyAttribute
(
String
companyAttribute
)
{
public
void
setCompanyAttribute
(
int
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
this
.
companyAttribute
=
companyAttribute
;
}
}
...
...
src/main/java/com/pangding/web/authority/
dto/RegisterUserDt
o.java
→
src/main/java/com/pangding/web/authority/
vo/reqvo/RegisterUserReqV
o.java
View file @
2a32cba1
package
com
.
pangding
.
web
.
authority
.
dt
o
;
package
com
.
pangding
.
web
.
authority
.
vo
.
reqv
o
;
import
com.pangding.web.authority.vo.UserVo
;
import
com.pangding.web.authority.vo.UserVo
;
...
@@ -6,16 +6,26 @@ import com.pangding.web.authority.vo.UserVo;
...
@@ -6,16 +6,26 @@ import com.pangding.web.authority.vo.UserVo;
* @Author zhangjinyao
* @Author zhangjinyao
* @create 2019/5/13 15:17
* @create 2019/5/13 15:17
*/
*/
public
class
RegisterUser
Dt
o
{
public
class
RegisterUser
ReqV
o
{
private
String
account
;
private
String
account
;
private
String
password
;
private
String
password
;
private
String
confirmPassword
;
private
int
companyType
;
private
int
companyType
;
private
String
merchantId
;
private
String
merchantId
;
public
String
getConfirmPassword
()
{
return
confirmPassword
;
}
public
void
setConfirmPassword
(
String
confirmPassword
)
{
this
.
confirmPassword
=
confirmPassword
;
}
public
String
getAccount
()
{
public
String
getAccount
()
{
return
account
;
return
account
;
}
}
...
...
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