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
e84b1deb
Commit
e84b1deb
authored
May 22, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 5.22
需要增加验证码和手机验证码
parent
55293377
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
602 additions
and
299 deletions
+602
-299
AuthorityController.java
...angding/web/authority/controller/AuthorityController.java
+6
-6
ComputerRegisterController.java
.../web/authority/controller/ComputerRegisterController.java
+31
-18
MobileRegisterController.java
...ng/web/authority/controller/MobileRegisterController.java
+20
-10
RoleController.java
...com/pangding/web/authority/controller/RoleController.java
+6
-6
UserController.java
...com/pangding/web/authority/controller/UserController.java
+7
-7
AuthorityDao.java
...ain/java/com/pangding/web/authority/dao/AuthorityDao.java
+0
-16
RoleAuthorityDao.java
...java/com/pangding/web/authority/dao/RoleAuthorityDao.java
+0
-7
AuthorityDaoImpl.java
...com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
+11
-10
RoleAuthorityDaoImpl.java
...pangding/web/authority/dao/impl/RoleAuthorityDaoImpl.java
+0
-10
StoreFeign.java
...ain/java/com/pangding/web/authority/feign/StoreFeign.java
+23
-0
AuthorityService.java
.../com/pangding/web/authority/service/AuthorityService.java
+5
-2
RegisterService.java
...a/com/pangding/web/authority/service/RegisterService.java
+14
-12
RoleService.java
.../java/com/pangding/web/authority/service/RoleService.java
+8
-15
UserService.java
.../java/com/pangding/web/authority/service/UserService.java
+2
-2
AuthorityServiceImpl.java
...ding/web/authority/service/impl/AuthorityServiceImpl.java
+57
-29
RegisterServiceImpl.java
...gding/web/authority/service/impl/RegisterServiceImpl.java
+110
-60
RoleServiceImpl.java
.../pangding/web/authority/service/impl/RoleServiceImpl.java
+49
-15
UserServiceImpl.java
.../pangding/web/authority/service/impl/UserServiceImpl.java
+6
-2
CompanyVo.java
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
+3
-3
Merchant.java
src/main/java/com/pangding/web/authority/vo/Merchant.java
+95
-34
LoginResVo.java
...ava/com/pangding/web/authority/vo/cloudvo/LoginResVo.java
+16
-35
CompanyBankCardGetReqVo.java
...gding/web/authority/vo/reqvo/CompanyBankCardGetReqVo.java
+17
-0
LoginCompanyResVo.java
...om/pangding/web/authority/vo/reqvo/LoginCompanyResVo.java
+49
-0
MerchantCreateReqVo.java
.../pangding/web/authority/vo/reqvo/MerchantCreateReqVo.java
+10
-0
SaveCompanyResVo.java
...com/pangding/web/authority/vo/reqvo/SaveCompanyResVo.java
+57
-0
No files found.
src/main/java/com/pangding/web/authority/controller/AuthorityController.java
View file @
e84b1deb
...
...
@@ -26,11 +26,12 @@ public class AuthorityController {
/**
* 新增权限
* 返回权限id
* @param authorityVo
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
public
ResponseResult
<
String
>
saveAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"authorityName"
,
authorityVo
.
getName
())
.
notBlankCheck
(
"authorityUrl"
,
authorityVo
.
getUrl
())
...
...
@@ -39,17 +40,17 @@ public class AuthorityController {
.
notBlankCheck
(
"openMode"
,
authorityVo
.
getOpenMode
())
.
notBlankCheck
(
"remark"
,
authorityVo
.
getRemark
())
.
checkException
();
authorityServiceImpl
.
save
(
authorityVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
authorityServiceImpl
.
save
(
authorityVo
));
}
/**
* 修改权限信息
* 返回权限id
* @param authorityVo
* @return
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
public
ResponseResult
<
String
>
updateAuthority
(
@RequestBody
AuthorityVo
authorityVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"authorityName"
,
authorityVo
.
getName
())
.
notBlankCheck
(
"authorityUrl"
,
authorityVo
.
getUrl
())
...
...
@@ -58,8 +59,7 @@ public class AuthorityController {
.
notBlankCheck
(
"openMode"
,
authorityVo
.
getOpenMode
())
.
notBlankCheck
(
"remark"
,
authorityVo
.
getRemark
())
.
checkException
();
authorityServiceImpl
.
update
(
authorityVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
authorityServiceImpl
.
update
(
authorityVo
));
}
/**
...
...
src/main/java/com/pangding/web/authority/controller/ComputerRegisterController.java
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
controller
;
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.cloudvo.LoginResVo
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.service.RegisterService
;
import
com.pangding.web.authority.service.UserService
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.reqvo.LoginReqVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,12 +28,14 @@ public class ComputerRegisterController {
UserService
userServiceImpl
;
/**
* 验证注册第一页数据的合法性并保存
* 验证注册第一页数据的合法性并保存在pd_user表中
* 生成公司id,pd_company表中存入一条数据
* 返回公司部分信息(id,invitationCompanyId,companyType),携带到基本信息页面
*
* @param registerUserReqVo
* @return
*/
@RequestMapping
(
value
=
"/
saveU
ser"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/
u
ser"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
CompanyVo
>
saveUser
(
@RequestBody
RegisterUserReqVo
registerUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"account"
,
registerUserReqVo
.
getAccount
())
...
...
@@ -49,13 +49,15 @@ public class ComputerRegisterController {
/**
* 当用户类型选择为“个体”时进入此方法
* 验证注册第二页数据的合法性并保存
* 验证注册第二页数据的合法性并保存,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant都增加一条数据
* 并将联系电话更新到pd_user表中
* 返回pd_user,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant表的主键
*
* @param reqVo
* @return
*/
@RequestMapping
(
value
=
"/
saveI
ndividual"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveIndividual
(
@RequestBody
RegisterIndividualReqVo
reqVo
){
@RequestMapping
(
value
=
"/
i
ndividual"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
SaveCompanyResVo
>
saveIndividual
(
@RequestBody
RegisterIndividualReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"contactName"
,
reqVo
.
getContactName
())
.
notBlankCheck
(
"contactCode"
,
reqVo
.
getContactCode
())
...
...
@@ -65,12 +67,19 @@ public class ComputerRegisterController {
.
notBlankCheck
(
"contactPhone"
,
reqVo
.
getContactPhone
())
.
checkPhoneNo
(
"contactPhone"
,
reqVo
.
getContactPhone
())
.
checkException
();
registerServiceImpl
.
saveIndividual
(
reqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
registerServiceImpl
.
saveIndividual
(
reqVo
));
}
/**
* 当用户类型选择为“企业”时进入此方法
* 验证注册第二页数据的合法性并保存,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant都增加一条数据
* 并将联系电话更新到pd_user表中
* 返回pd_user,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant表的主键
* @param reqVo
* @return
*/
@RequestMapping
(
value
=
"/enterprise"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveEnterprise
(
@RequestBody
RegisterEnterpriceReqVo
reqVo
){
public
ResponseResult
<
SaveCompanyResVo
>
saveEnterprise
(
@RequestBody
RegisterEnterpriceReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"companyName"
,
reqVo
.
getCompanyName
())
.
notBlankCheck
(
"companyAddress"
,
reqVo
.
getAddress
())
...
...
@@ -92,19 +101,23 @@ public class ComputerRegisterController {
.
notBlankCheck
(
"reservedPhone"
,
reqVo
.
getReservedPhone
())
.
checkPhoneNo
(
"reservedPhone"
,
reqVo
.
getReservedPhone
())
.
checkException
();
registerServiceImpl
.
saveEnterprise
(
reqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
registerServiceImpl
.
saveEnterprise
(
reqVo
));
}
/**
* 登陆,验证用户名或手机号,密码是否正确
* 返回token,account,LoginCompanyResVo对象(id:公司id,status:公司状态,companyAttribute:属性,bankCardCodeList:绑定的银行卡数组)
*
* @param reqVo
* @return
*/
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
login
(
@RequestBody
LoginReqVo
reqVo
){
public
ResponseResult
<
LoginResVo
>
login
(
@RequestBody
LoginReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"account or phone"
,
reqVo
.
getAccountOrPhone
())
.
notBlankCheck
(
"pass"
,
reqVo
.
getPassword
())
.
checkException
();
registerServiceImpl
.
login
(
reqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
registerServiceImpl
.
login
(
reqVo
));
}
...
...
src/main/java/com/pangding/web/authority/controller/MobileRegisterController.java
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.vo.cloudvo.LoginResVo
;
import
com.pangding.web.authority.vo.reqvo.RegisterIndividualReqVo
;
import
com.pangding.web.authority.vo.reqvo.RegisterUserReqVo
;
import
com.pangding.web.authority.service.RegisterService
;
import
com.pangding.web.authority.vo.CompanyVo
;
import
com.pangding.web.authority.vo.reqvo.LoginReqVo
;
import
com.pangding.web.authority.vo.reqvo.SaveCompanyResVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -26,7 +28,9 @@ public class MobileRegisterController {
RegisterService
registerServiceImpl
;
/**
* 验证注册第一页数据的合法性并保存
* 验证注册第一页数据的合法性并保存在pd_user表中
* 生成公司id,pd_company表中存入一条数据
* 返回公司部分信息(id,invitationCompanyId,companyType),携带到基本信息页面
*
* @param registerUserReqVo
* @return
...
...
@@ -44,13 +48,16 @@ public class MobileRegisterController {
}
/**
* 验证注册第二页数据的合法性并保存
* 当用户类型选择为“个体”时进入此方法
* 验证注册第二页数据的合法性并保存,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant都增加一条数据
* 并将联系电话更新到pd_user表中
* 返回pd_user,pd_company,pd_company_bank_card,pd_company_extend,pd_merchant表的主键
*
* @param reqVo
* @return
*/
@RequestMapping
(
value
=
"/individual"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveIndividual
(
@RequestBody
RegisterIndividualReqVo
reqVo
){
public
ResponseResult
<
SaveCompanyResVo
>
saveIndividual
(
@RequestBody
RegisterIndividualReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"contactName"
,
reqVo
.
getContactName
())
.
notBlankCheck
(
"contactCode"
,
reqVo
.
getContactCode
())
...
...
@@ -60,20 +67,23 @@ public class MobileRegisterController {
.
notBlankCheck
(
"contactPhone"
,
reqVo
.
getContactPhone
())
.
checkPhoneNo
(
"contactPhone"
,
reqVo
.
getContactPhone
())
.
checkException
();
registerServiceImpl
.
saveIndividual
(
reqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
registerServiceImpl
.
saveIndividual
(
reqVo
));
}
/**
* 登陆,验证用户名或手机号,密码是否正确
* 返回token,account,LoginCompanyResVo对象(id:公司id,status:公司状态,companyAttribute:属性,bankCardCodeList:绑定的银行卡数组)
*
* @param reqVo
* @return
*/
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
login
(
@RequestBody
LoginReqVo
reqVo
){
public
ResponseResult
<
LoginResVo
>
login
(
@RequestBody
LoginReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"account or phone"
,
reqVo
.
getAccountOrPhone
())
.
notBlankCheck
(
"password"
,
reqVo
.
getPassword
())
.
checkException
();
registerServiceImpl
.
login
(
reqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
registerServiceImpl
.
login
(
reqVo
));
}
}
src/main/java/com/pangding/web/authority/controller/RoleController.java
View file @
e84b1deb
...
...
@@ -25,32 +25,32 @@ public class RoleController {
/**
* 新增角色
* 返回角色id
* @param webRoleReqVo
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
<
String
>
saveRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"roleName"
,
webRoleReqVo
.
getName
())
.
notBlankCheck
(
"remark"
,
webRoleReqVo
.
getRemark
())
.
checkException
();
roleServiceImpl
.
saveRole
(
webRoleReqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
roleServiceImpl
.
saveRole
(
webRoleReqVo
));
}
/**
* 修改角色信息
* 返回角色id
* @param webRoleReqVo
* @return
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
public
ResponseResult
<
String
>
updateRole
(
@RequestBody
WebRoleReqVo
webRoleReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"roleName"
,
webRoleReqVo
.
getName
())
.
notBlankCheck
(
"remark"
,
webRoleReqVo
.
getRemark
())
.
checkException
();
roleServiceImpl
.
updateRole
(
webRoleReqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
roleServiceImpl
.
updateRole
(
webRoleReqVo
));
}
/**
...
...
src/main/java/com/pangding/web/authority/controller/UserController.java
View file @
e84b1deb
...
...
@@ -23,11 +23,12 @@ public class UserController {
/**
* 新增用户
* 返回用户id
* @param webUserReqVo
* @return
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
saveUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
public
ResponseResult
<
String
>
saveUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"account"
,
webUserReqVo
.
getAccount
())
.
notBlankCheck
(
"password"
,
webUserReqVo
.
getPassword
())
...
...
@@ -35,17 +36,17 @@ public class UserController {
.
notBlankCheck
(
"companyId"
,
webUserReqVo
.
getCompanyId
())
.
notBlankCheck
(
"status"
,
webUserReqVo
.
getStatus
())
.
checkException
();
userServiceImpl
.
saveUser
(
webUserReqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
userServiceImpl
.
saveUser
(
webUserReqVo
));
}
/**
* 修改用户信息
* @param //userDto
* 返回用户id
* @param
* @return
*/
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
updateUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
public
ResponseResult
<
String
>
updateUser
(
@RequestBody
WebUserReqVo
webUserReqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"account"
,
webUserReqVo
.
getAccount
())
.
notBlankCheck
(
"password"
,
webUserReqVo
.
getPassword
())
...
...
@@ -53,8 +54,7 @@ public class UserController {
.
notBlankCheck
(
"companyId"
,
webUserReqVo
.
getCompanyId
())
.
notBlankCheck
(
"status"
,
webUserReqVo
.
getStatus
())
.
checkException
();
userServiceImpl
.
updateUser
(
webUserReqVo
);
return
new
ResponseResult
();
return
ResponseResult
.
result
(
userServiceImpl
.
updateUser
(
webUserReqVo
));
}
/**
...
...
src/main/java/com/pangding/web/authority/dao/AuthorityDao.java
View file @
e84b1deb
...
...
@@ -20,14 +20,6 @@ public interface AuthorityDao extends BaseDao {
*/
void
checkValid
(
AuthorityVo
authorityVo
);
/**
* 根据主键获取authorityVo对象
*
* @param authorityGetReqVo 主键
* @return authorityVo对象
*/
AuthorityVo
getAuthority
(
AuthorityGetReqVo
authorityGetReqVo
);
/**
* 获取权限分页对象
*
...
...
@@ -36,12 +28,4 @@ public interface AuthorityDao extends BaseDao {
*/
PageSizeData
<
AuthorityVo
>
getAuthorityList
(
ListAuthorityReqVo
reqVo
);
/**
* 获取权限列表
*
* @param reqVo
* @return 权限列表
*/
List
<
AuthorityVo
>
getAuthoritys
(
AuthorityGetReqVo
reqVo
);
}
src/main/java/com/pangding/web/authority/dao/RoleAuthorityDao.java
View file @
e84b1deb
...
...
@@ -11,11 +11,4 @@ import java.util.List;
*/
public
interface
RoleAuthorityDao
extends
BaseDao
{
/**
* 通过权限id获取角色权限关系表主键列表
*
* @param roleAuthorityGetReqVo 封装权限id
* @return 角色权限关系表主键列表
*/
List
<
RoleAuthorityVo
>
getRoleAuthorityList
(
RoleAuthorityGetReqVo
roleAuthorityGetReqVo
);
}
src/main/java/com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
View file @
e84b1deb
...
...
@@ -30,24 +30,25 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
.
add
(
"levelOne"
,
"and pid = ''"
);
}
/**
* 检查新建或修改的authorityVo对象是否合法
*
* @param authorityVo authorityVo对象
*/
@Override
public
void
checkValid
(
AuthorityVo
authorityVo
)
{
this
.
checkExist
(
CHECK_VALID
,
authorityVo
,
"该权限不合法,请修改权限名或权限url"
);
}
@Override
public
AuthorityVo
getAuthority
(
AuthorityGetReqVo
authorityGetReqVo
)
{
return
this
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
}
/**
* 获取权限分页对象
*
* @param reqVo
* @return 权限分页对象
*/
@Override
public
PageSizeData
<
AuthorityVo
>
getAuthorityList
(
ListAuthorityReqVo
reqVo
)
{
return
this
.
queryPage
(
AuthorityVo
.
class
,
reqVo
,
SELECT
,
reqVo
);
}
@Override
public
List
<
AuthorityVo
>
getAuthoritys
(
AuthorityGetReqVo
reqVo
)
{
return
this
.
query
(
AuthorityVo
.
class
,
SELECT
,
reqVo
);
}
}
src/main/java/com/pangding/web/authority/dao/impl/RoleAuthorityDaoImpl.java
View file @
e84b1deb
...
...
@@ -14,21 +14,11 @@ import java.util.List;
@Component
public
class
RoleAuthorityDaoImpl
extends
BaseDaoImpl
implements
RoleAuthorityDao
{
private
static
final
String
SELECT
=
"SELECT"
;
@Override
protected
void
init
()
{
register
(
RoleAuthorityVo
.
class
);
table
.
add
(
SELECT
,
"select id,role_id,authority_id from pd_role_authority where 1=1 "
)
.
add
(
"roleId"
,
"and role_id = ?"
)
.
add
(
"authorityId"
,
"and authority_id = ?"
);
}
@Override
public
List
<
RoleAuthorityVo
>
getRoleAuthorityList
(
RoleAuthorityGetReqVo
roleAuthorityGetReqVo
)
{
return
this
.
query
(
RoleAuthorityVo
.
class
,
SELECT
,
roleAuthorityGetReqVo
);
}
}
src/main/java/com/pangding/web/authority/feign/StoreFeign.java
0 → 100644
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
feign
;
import
com.pangding.web.authority.vo.reqvo.MerchantCreateReqVo
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* @Author zhangjinyao
* @create 2019/5/22 11:55
*/
@FeignClient
(
value
=
"pd-scenic"
)
@RequestMapping
(
value
=
"/scenic"
)
public
interface
StoreFeign
{
/**
* 新建景区
* @param req
* @return
*/
@RequestMapping
(
"/merchantCreate"
)
public
ResponseResult
merchantCreate
(
@RequestBody
MerchantCreateReqVo
req
);
}
src/main/java/com/pangding/web/authority/service/AuthorityService.java
View file @
e84b1deb
...
...
@@ -17,15 +17,17 @@ public interface AuthorityService {
* 保存authorityVo对象数据
*
* @param authorityVo authorityVo对象
* @return 用户id
*/
void
save
(
AuthorityVo
authorityVo
);
String
save
(
AuthorityVo
authorityVo
);
/**
* 更新authorityVo对象数据
*
* @param authorityVo authorityVo对象
* @return 用户id
*/
void
update
(
AuthorityVo
authorityVo
);
String
update
(
AuthorityVo
authorityVo
);
/**
* 通过权限表主键获取authorityVo对象
...
...
@@ -37,6 +39,7 @@ public interface AuthorityService {
/**
* 通过权限表主键删除authorityVo对象,并删除权限和角色的对应关系
* 递归删除其子权限
*
* @param reqVo 主键
*/
...
...
src/main/java/com/pangding/web/authority/service/RegisterService.java
View file @
e84b1deb
...
...
@@ -2,10 +2,8 @@ package com.pangding.web.authority.service;
import
com.pangding.web.authority.vo.CompanyExtendVo
;
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.cloudvo.LoginResVo
;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.vo.CompanyVo
;
/**
...
...
@@ -15,12 +13,12 @@ import com.pangding.web.authority.vo.CompanyVo;
public
interface
RegisterService
{
/**
* 判断注册编码是否
正确
* 判断注册编码是否
存在
*
* @param
merchantId
注册编码
* @return
false:注册编码错误 true:注册编码正确
* @param
invitationCode
注册编码
* @return
若不存在,返回null,存在则返回CompanyExtendVo对象
*/
CompanyExtendVo
checkInvitationCode
(
String
merchantId
);
CompanyExtendVo
checkInvitationCode
(
String
invitationCode
);
/**
* 保存用户信息,并返回公司信息
...
...
@@ -41,20 +39,24 @@ public interface RegisterService {
* 保存个人注册的公司信息
*
* @param reqVo
* @return 返回保存数据各表的主键
*/
void
saveIndividual
(
RegisterIndividualReqVo
reqVo
);
SaveCompanyResVo
saveIndividual
(
RegisterIndividualReqVo
reqVo
);
/**
* 保存企业注册的公司信息
*
* @param reqVo
* @return 返回保存数据各表的主键
*/
void
saveEnterprise
(
RegisterEnterpriceReqVo
reqVo
);
SaveCompanyResVo
saveEnterprise
(
RegisterEnterpriceReqVo
reqVo
);
/**
* 登录
* 登陆,验证用户名或手机号,密码是否正确
* 返回token,account,LoginCompanyResVo对象(id:公司id,status:公司状态,companyAttribute:属性,bankCardCodeList:绑定的银行卡数组)
*
* @param reqVo
* @return
*/
void
login
(
LoginReqVo
reqVo
);
LoginResVo
login
(
LoginReqVo
reqVo
);
}
src/main/java/com/pangding/web/authority/service/RoleService.java
View file @
e84b1deb
...
...
@@ -15,18 +15,20 @@ import java.util.List;
public
interface
RoleService
{
/**
* 保存Role
Dt
o对象,并保存角色权限的对应关系
* 保存Role
V
o对象,并保存角色权限的对应关系
*
* @param webRoleReqVo RoleDto对象
* @param webRoleReqVo
* @return 返回角色id
*/
void
saveRole
(
WebRoleReqVo
webRoleReqVo
);
String
saveRole
(
WebRoleReqVo
webRoleReqVo
);
/**
* 更新Role
Dt
o对象,并更新角色权限的对应关系
* 更新Role
V
o对象,并更新角色权限的对应关系
*
* @param webRoleReqVo RoleDto对象
* @return 返回角色id
*/
void
updateRole
(
WebRoleReqVo
webRoleReqVo
);
String
updateRole
(
WebRoleReqVo
webRoleReqVo
);
/**
* 通过主键id查询RoleVo对象
...
...
@@ -36,19 +38,10 @@ public interface RoleService {
*/
WebRoleResVo
getRoleById
(
WebRoleReqVo
webRoleReqVo
);
/**
* 通过角色名查询RoleVo对象
*
* @param name 角色名
* @return RoleVo对象
*/
RoleVo
getRoleByName
(
String
name
);
/**
* 检查角色名是否已存在
*
* @param roleVo RoleVo对象
* @return 角色名是否存在
*/
void
checkNameExist
(
RoleVo
roleVo
);
...
...
@@ -56,7 +49,7 @@ public interface RoleService {
* 获取RoleVo对象列表
*
* @param req
* @return RoleVo对象列表
* @return RoleVo对象列表
分页对象
*/
PageSizeData
<
RoleVo
>
getRoleVoList
(
ListRoleReqVo
req
);
...
...
src/main/java/com/pangding/web/authority/service/UserService.java
View file @
e84b1deb
...
...
@@ -16,14 +16,14 @@ public interface UserService {
*
* @param userDto UserDto对象
*/
void
saveUser
(
WebUserReqVo
userDto
);
String
saveUser
(
WebUserReqVo
userDto
);
/**
* 保存更新后的用户信息,并更新用户和角色的对应关系
*
* @param userDto UserDto对象
*/
void
updateUser
(
WebUserReqVo
userDto
);
String
updateUser
(
WebUserReqVo
userDto
);
/**
* 检查用户名是否存在
...
...
src/main/java/com/pangding/web/authority/service/impl/AuthorityServiceImpl.java
View file @
e84b1deb
...
...
@@ -5,6 +5,7 @@ import com.pangding.web.authority.dao.AuthorityDao;
import
com.pangding.web.authority.vo.reqvo.*
;
import
com.pangding.web.authority.service.AuthorityService
;
import
com.pangding.web.authority.vo.*
;
import
com.yanzuoguang.util.base.ObjectHelper
;
import
com.yanzuoguang.util.exception.CodeException
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.PageSizeData
;
...
...
@@ -27,62 +28,100 @@ public class AuthorityServiceImpl implements AuthorityService {
@Autowired
RoleAuthorityDao
roleAuthorityDao
;
/**
* 保存authorityVo对象数据
*
* @param authorityVo authorityVo对象
* @return 用户id
*/
@Override
public
void
save
(
AuthorityVo
authorityVo
)
{
public
String
save
(
AuthorityVo
authorityVo
)
{
this
.
checkValid
(
authorityVo
);
authorityVo
.
setId
(
StringHelper
.
getNewID
());
authorityDao
.
create
(
authorityVo
);
return
authorityVo
.
getId
();
}
/**
* 更新authorityVo对象数据
*
* @param authorityVo authorityVo对象
* @return 用户id
*/
@Override
public
void
update
(
AuthorityVo
authorityVo
)
{
public
String
update
(
AuthorityVo
authorityVo
)
{
this
.
checkValid
(
authorityVo
);
authorityDao
.
update
(
authorityVo
);
return
authorityVo
.
getId
();
}
/**
* 检查新建、修改的authorityVo对象是否合法
*
* @param authorityVo authorityVo对象
* @return 0:合法 else:不合法
*/
@Override
public
void
checkValid
(
AuthorityVo
authorityVo
)
{
authorityDao
.
checkValid
(
authorityVo
);
}
/**
* 通过权限表主键获取authorityVo对象
*
* @param reqVo 主键
* @return authorityVo对象
*/
@Override
public
AuthorityVo
getAuthorityById
(
WebAuthorityReqVo
reqVo
)
{
AuthorityGetReqVo
authorityGetReqVo
=
new
AuthorityGetReqVo
();
authorityGetReqVo
.
setId
(
reqVo
.
getId
());
AuthorityVo
authorityVo
=
authorityDao
.
getAuthority
(
authorityGetReqVo
);
AuthorityVo
authorityVo
=
authorityDao
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
if
(
authorityVo
==
null
){
throw
new
CodeException
(
"该权限不存在"
);
}
return
authorityVo
;
}
/**
* 通过权限表主键删除authorityVo对象,并删除权限和角色的对应关系
* 递归删除其子权限
*
* @param reqVo 主键
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAuthorityById
(
WebAuthorityReqVo
reqVo
)
{
AuthorityVo
authorityVo
=
new
AuthorityVo
();
authorityVo
.
setId
(
reqVo
.
getId
());
authorityDao
.
remove
(
authorityVo
);
RoleAuthorityGetReqVo
roleAuthorityGetReqVo
=
new
RoleAuthorityGetReqVo
();
roleAuthorityGetReqVo
.
setAuthorityId
(
reqVo
.
getId
());
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDao
.
getRoleAuthorityList
(
roleAuthorityGetReqVo
);
for
(
RoleAuthorityVo
roleAuthority:
roleAuthorityList
)
{
roleAuthorityDao
.
remove
(
roleAuthority
);
}
AuthorityGetReqVo
reqVo1
=
new
AuthorityGetReqVo
();
reqVo1
.
setPid
(
reqVo
.
getId
());
List
<
AuthorityVo
>
childList
=
authorityDao
.
getAuthoritys
(
reqVo1
);
if
(
childList
!=
null
&&
childList
.
size
()
!=
0
){
List
<
AuthorityVo
>
childList
=
authorityDao
.
loadList
(
reqVo1
,
AuthorityVo
.
class
);
if
(
childList
!=
null
&&
!
childList
.
isEmpty
()
){
for
(
AuthorityVo
child:
childList
)
{
WebAuthorityReqVo
reqVo2
=
new
WebAuthorityReqVo
();
reqVo2
.
setId
(
child
.
getId
());
this
.
deleteAuthorityById
(
reqVo2
);
}
}
}
AuthorityVo
authorityVo
=
new
AuthorityVo
();
authorityVo
.
setId
(
reqVo
.
getId
());
authorityDao
.
remove
(
authorityVo
);
RoleAuthorityGetReqVo
roleAuthorityGetReqVo
=
new
RoleAuthorityGetReqVo
();
roleAuthorityGetReqVo
.
setAuthorityId
(
reqVo
.
getId
());
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDao
.
loadList
(
roleAuthorityGetReqVo
,
RoleAuthorityVo
.
class
);
for
(
RoleAuthorityVo
roleAuthority:
roleAuthorityList
)
{
roleAuthorityDao
.
remove
(
roleAuthority
);
}
}
/**
* 获取权限返回信息分页对象
*
* @param reqVo
* @return 权限返回信息分页对象
*/
@Override
public
PageSizeData
<
WebAuthorityResVo
>
getWebAuthorityResVoList
(
ListAuthorityReqVo
reqVo
)
{
PageSizeData
<
AuthorityVo
>
authorityVoPageSizeData
=
authorityDao
.
getAuthorityList
(
reqVo
);
...
...
@@ -94,21 +133,10 @@ public class AuthorityServiceImpl implements AuthorityService {
List
<
WebAuthorityResVo
>
webAuthorityResVoList
=
new
ArrayList
(
authorityVoList
.
size
());
for
(
AuthorityVo
authorityVo:
authorityVoList
)
{
WebAuthorityResVo
resVo
=
new
WebAuthorityResVo
();
resVo
.
setUrl
(
authorityVo
.
getUrl
());
resVo
.
setType
(
authorityVo
.
getType
());
resVo
.
setRemark
(
authorityVo
.
getRemark
());
resVo
.
setPid
(
authorityVo
.
getPid
());
resVo
.
setOpenMode
(
authorityVo
.
getOpenMode
());
resVo
.
setName
(
authorityVo
.
getName
());
resVo
.
setId
(
authorityVo
.
getId
());
resVo
.
setCreateTime
(
authorityVo
.
getCreateTime
());
resVo
.
setAlias
(
authorityVo
.
getAlias
());
ObjectHelper
.
writeWithFrom
(
resVo
,
authorityVo
);
webAuthorityResVoList
.
add
(
resVo
);
}
webAuthorityResVoPageSizeData
.
setPageSize
(
authorityVoPageSizeData
.
getPageSize
());
webAuthorityResVoPageSizeData
.
setPageIndex
(
authorityVoPageSizeData
.
getPageIndex
());
webAuthorityResVoPageSizeData
.
setPageTotal
(
authorityVoPageSizeData
.
getPageTotal
());
ObjectHelper
.
writeWithFrom
(
webAuthorityResVoPageSizeData
,
authorityVoPageSizeData
);
webAuthorityResVoPageSizeData
.
setList
(
webAuthorityResVoList
);
return
webAuthorityResVoPageSizeData
;
...
...
src/main/java/com/pangding/web/authority/service/impl/RegisterServiceImpl.java
View file @
e84b1deb
This diff is collapsed.
Click to expand it.
src/main/java/com/pangding/web/authority/service/impl/RoleServiceImpl.java
View file @
e84b1deb
...
...
@@ -35,9 +35,15 @@ public class RoleServiceImpl implements RoleService {
@Autowired
AuthorityDao
authorityDaoImpl
;
/**
* 保存RoleVo对象,并保存角色权限的对应关系
*
* @param webRoleReqVo
* @return 返回角色id
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveRole
(
WebRoleReqVo
webRoleReqVo
)
{
public
String
saveRole
(
WebRoleReqVo
webRoleReqVo
)
{
RoleVo
roleVo
=
webRoleReqVo
;
this
.
checkNameExist
(
roleVo
);
webRoleReqVo
.
setId
(
StringHelper
.
getNewID
());
...
...
@@ -53,19 +59,25 @@ public class RoleServiceImpl implements RoleService {
roleAuthorityDaoImpl
.
create
(
roleAuthorityRelation
);
}
}
return
roleVo
.
getId
();
}
/**
* 更新RoleVo对象,并更新角色权限的对应关系
*
* @param webRoleReqVo RoleDto对象
* @return 返回角色id
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateRole
(
WebRoleReqVo
webRoleReqVo
)
{
public
String
updateRole
(
WebRoleReqVo
webRoleReqVo
)
{
RoleVo
roleVo
=
webRoleReqVo
;
this
.
checkNameExist
(
roleVo
);
roleDao
.
update
(
roleVo
);
RoleAuthorityGetReqVo
reqVo
=
new
RoleAuthorityGetReqVo
();
reqVo
.
setRoleId
(
webRoleReqVo
.
getId
());
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDaoImpl
.
getRoleAuthorityList
(
reqVo
);
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDaoImpl
.
loadList
(
reqVo
,
RoleAuthorityVo
.
class
);
if
(
roleAuthorityList
!=
null
&&
!
roleAuthorityList
.
isEmpty
()){
for
(
RoleAuthorityVo
roleAuthorityRelation:
roleAuthorityList
)
{
roleAuthorityDaoImpl
.
remove
(
roleAuthorityRelation
);
...
...
@@ -81,9 +93,15 @@ public class RoleServiceImpl implements RoleService {
roleAuthorityDaoImpl
.
create
(
roleAuthorityRelation
);
}
}
return
roleVo
.
getId
();
}
/**
* 通过主键id查询RoleVo对象
*
* @param webRoleReqVo 主键
* @return RoleVo对象
*/
@Override
public
WebRoleResVo
getRoleById
(
WebRoleReqVo
webRoleReqVo
)
{
RoleGetReqVo
roleGetReqVo
=
new
RoleGetReqVo
();
...
...
@@ -96,18 +114,22 @@ public class RoleServiceImpl implements RoleService {
return
this
.
makeResVo
(
roleVo
,
authorityList
);
}
@Override
public
RoleVo
getRoleByName
(
String
name
)
{
RoleGetReqVo
getRoleByRoleNameReqVo
=
new
RoleGetReqVo
();
getRoleByRoleNameReqVo
.
setName
(
name
);
return
roleDao
.
getRoleByRoleName
(
getRoleByRoleNameReqVo
);
}
/**
* 检查角色名是否已存在
*
* @param roleVo RoleVo对象
*/
@Override
public
void
checkNameExist
(
RoleVo
roleVo
){
roleDao
.
checkNameExist
(
roleVo
);
}
/**
* 获取RoleVo对象列表
*
* @param req
* @return RoleVo对象列表分页对象
*/
@Override
public
PageSizeData
<
RoleVo
>
getRoleVoList
(
ListRoleReqVo
req
)
{
...
...
@@ -118,6 +140,12 @@ public class RoleServiceImpl implements RoleService {
return
roleVoPageSizeData
;
}
/**
* 获取角色返回信息分页对象
*
* @param req
* @return 角色返回信息分页对象
*/
@Override
public
PageSizeData
<
WebRoleResVo
>
getWebRoleResVoList
(
ListRoleReqVo
req
)
{
PageSizeData
<
RoleVo
>
roleVoPageSizeData
=
this
.
getRoleVoList
(
req
);
...
...
@@ -144,11 +172,17 @@ public class RoleServiceImpl implements RoleService {
return
webRoleResVoPageSizeData
;
}
/**
* 通过角色id查询该角色权限id列表
*
* @param roleId 角色id
* @return 权限id列表
*/
@Override
public
List
<
AuthorityVo
>
getAuthorityListByRoleId
(
String
roleId
)
{
RoleAuthorityGetReqVo
reqVo
=
new
RoleAuthorityGetReqVo
();
reqVo
.
setRoleId
(
roleId
);
List
<
RoleAuthorityVo
>
roleAuthorityRelationList
=
roleAuthorityDaoImpl
.
getRoleAuthorityList
(
reqVo
);
List
<
RoleAuthorityVo
>
roleAuthorityRelationList
=
roleAuthorityDaoImpl
.
loadList
(
reqVo
,
RoleAuthorityVo
.
class
);
if
(
roleAuthorityRelationList
!=
null
&&
!
roleAuthorityRelationList
.
isEmpty
()){
List
<
AuthorityVo
>
authorityList
=
new
ArrayList
(
roleAuthorityRelationList
.
size
());
for
(
RoleAuthorityVo
roleAuthorityRelation:
roleAuthorityRelationList
)
{
...
...
@@ -166,7 +200,7 @@ public class RoleServiceImpl implements RoleService {
public
String
getAuthorityNameByAuthorityId
(
String
authorityId
)
{
AuthorityGetReqVo
authorityGetReqVo
=
new
AuthorityGetReqVo
();
authorityGetReqVo
.
setId
(
authorityId
);
AuthorityVo
authorityVo
=
authorityDaoImpl
.
getAuthority
(
authorityGetReqVo
);
AuthorityVo
authorityVo
=
authorityDaoImpl
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
return
authorityVo
.
getName
();
}
...
...
@@ -198,7 +232,7 @@ public class RoleServiceImpl implements RoleService {
RoleAuthorityGetReqVo
reqVo
=
new
RoleAuthorityGetReqVo
();
reqVo
.
setRoleId
(
roleVo
.
getId
());
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDaoImpl
.
getRoleAuthorityList
(
reqVo
);
List
<
RoleAuthorityVo
>
roleAuthorityList
=
roleAuthorityDaoImpl
.
loadList
(
reqVo
,
RoleAuthorityVo
.
class
);
if
(
roleAuthorityList
!=
null
&&
!
roleAuthorityList
.
isEmpty
()){
for
(
RoleAuthorityVo
roleAuthority:
roleAuthorityList
)
{
roleAuthorityDaoImpl
.
remove
(
roleAuthority
);
...
...
src/main/java/com/pangding/web/authority/service/impl/UserServiceImpl.java
View file @
e84b1deb
...
...
@@ -33,7 +33,7 @@ public class UserServiceImpl implements UserService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveUser
(
WebUserReqVo
webUserReqVo
)
{
public
String
saveUser
(
WebUserReqVo
webUserReqVo
)
{
this
.
isValid
(
webUserReqVo
.
getAccount
());
this
.
checkAccount
(
webUserReqVo
);
this
.
checkPhone
(
webUserReqVo
);
...
...
@@ -45,6 +45,8 @@ public class UserServiceImpl implements UserService {
UserVo
userVo
=
webUserReqVo
;
userDao
.
create
(
userVo
);
saveUserRole
(
webUserReqVo
);
return
userVo
.
getId
();
}
private
void
saveUserRole
(
WebUserReqVo
webUserReqVo
){
...
...
@@ -62,7 +64,7 @@ public class UserServiceImpl implements UserService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateUser
(
WebUserReqVo
webUserReqVo
)
{
public
String
updateUser
(
WebUserReqVo
webUserReqVo
)
{
this
.
isValid
(
webUserReqVo
.
getAccount
());
this
.
checkAccount
(
webUserReqVo
);
this
.
checkPhone
(
webUserReqVo
);
...
...
@@ -88,6 +90,8 @@ public class UserServiceImpl implements UserService {
}
}
saveUserRole
(
webUserReqVo
);
return
userVo
.
getId
();
}
@Override
...
...
src/main/java/com/pangding/web/authority/vo/CompanyVo.java
View file @
e84b1deb
...
...
@@ -51,7 +51,7 @@ public class CompanyVo implements Serializable, InitDao {
@TableAnnotation
(
"signing_status"
)
private
String
signingStatus
;
private
String
status
;
private
int
status
;
@TableAnnotation
(
"create_time"
)
private
String
createTime
;
...
...
@@ -165,11 +165,11 @@ public class CompanyVo implements Serializable, InitDao {
this
.
signingStatus
=
signingStatus
;
}
public
String
getStatus
()
{
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
...
...
src/main/java/com/pangding/web/authority/vo/Merchant
Vo
.java
→
src/main/java/com/pangding/web/authority/vo/Merchant.java
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yanzuoguang.dao.TableAnnotation
;
import
com.yanzuoguang.util.helper.DateHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.InitDao
;
import
com.yanzuoguang.util.vo.BaseVo
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* @Author zhangjinyao
* @create 2019/5/21 11:31
* @author LBW
* @name 商家(景区)基本信息
* @create 2019-04-28 15:21
*/
@TableAnnotation
(
"pd_merchant"
)
public
class
MerchantVo
implements
Serializable
,
InitDao
{
public
class
Merchant
extends
BaseVo
{
/**
* 主键
*/
private
String
id
;
/**
* 编号
*/
private
String
code
;
/**
* 名称
*/
private
String
name
;
/**
* 经度
*/
private
BigDecimal
longitude
;
/**
* 纬度
*/
private
BigDecimal
latitude
;
/**
* 评分
*/
private
BigDecimal
score
;
@TableAnnotation
(
"area_code"
)
/**
* 行政区域编号
*/
private
String
areaCode
;
@TableAnnotation
(
"area_name"
)
/**
* 行政区域名称
*/
private
String
areaName
;
/**
* 地址
*/
private
String
address
;
private
int
type
;
/**
* 类型(1:景区;2:餐饮;3:酒店)
*/
private
Integer
type
;
/**
* 标签
*/
private
String
tag
;
/**
* 等级
*/
private
String
level
;
private
int
status
;
/**
* 状态(0:上架;1:下架)
*/
private
Integer
status
;
/**
* 游玩耗时
*/
@TableAnnotation
(
"time_spent"
)
private
String
timeSpent
;
/**
* 电话
*/
private
String
phone
;
/**
* 供应商
*/
@TableAnnotation
(
"product_company_id"
)
private
String
productCompanyId
;
/**
* 接口商
*/
@TableAnnotation
(
"interface_company_id"
)
private
String
interfaceCompanyId
;
/**
* 营业时间(开始)
*/
@TableAnnotation
(
"business_start"
)
private
String
businessStart
;
/**
* 营业时间(结束)
*/
@TableAnnotation
(
"business_end"
)
private
String
businessEnd
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@TableAnnotation
(
"create_time"
)
private
String
createTime
;
/**
* 创建者ID
*/
@TableAnnotation
(
"user_id"
)
private
String
userId
;
private
String
userName
;
/**
* 创建者
*/
private
String
username
;
/**
* 来源
*/
private
String
source
;
public
String
getSource
()
{
return
source
;
}
public
void
setSource
(
String
source
)
{
this
.
source
=
source
;
}
public
String
getId
()
{
return
id
;
}
...
...
@@ -141,11 +215,11 @@ public class MerchantVo implements Serializable, InitDao {
this
.
address
=
address
;
}
public
int
getType
()
{
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
...
...
@@ -165,11 +239,11 @@ public class MerchantVo implements Serializable, InitDao {
this
.
level
=
level
;
}
public
int
getStatus
()
{
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
...
...
@@ -237,24 +311,11 @@ public class MerchantVo implements Serializable, InitDao {
this
.
userId
=
userId
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getSource
()
{
return
source
;
}
public
void
setSource
(
String
source
)
{
this
.
source
=
source
;
public
String
getUsername
()
{
return
username
;
}
@Override
public
void
init
()
{
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
}
src/main/java/com/pangding/web/authority/vo/cloudvo/LoginResVo.java
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
.
cloudvo
;
import
com.pangding.web.authority.vo.*
;
import
com.pangding.web.authority.vo.reqvo.LoginCompanyResVo
;
import
java.util.List
;
...
...
@@ -9,53 +10,33 @@ import java.util.List;
* @create 2019/5/16 17:50
*/
public
class
LoginResVo
{
UserVo
userVo
;
private
String
token
;
CompanyVo
companyVo
;
private
String
account
;
CompanyBankCardVo
companyBankCard
Vo
;
private
LoginCompanyResVo
companyRes
Vo
;
CompanyExtendVo
companyExtendVo
;
List
<
RoleVo
>
roleVoList
;
public
List
<
RoleVo
>
getRoleVoList
()
{
return
roleVoList
;
}
public
void
setRoleVoList
(
List
<
RoleVo
>
roleVoList
)
{
this
.
roleVoList
=
roleVoList
;
}
public
CompanyExtendVo
getCompanyExtendVo
()
{
return
companyExtendVo
;
}
public
void
setCompanyExtendVo
(
CompanyExtendVo
companyExtendVo
)
{
this
.
companyExtendVo
=
companyExtendVo
;
}
public
CompanyBankCardVo
getCompanyBankCardVo
()
{
return
companyBankCardVo
;
public
String
getToken
()
{
return
token
;
}
public
void
set
CompanyBankCardVo
(
CompanyBankCardVo
companyBankCardVo
)
{
this
.
companyBankCardVo
=
companyBankCardVo
;
public
void
set
Token
(
String
token
)
{
this
.
token
=
token
;
}
public
UserVo
getUserVo
()
{
return
userVo
;
public
String
getAccount
()
{
return
account
;
}
public
void
set
UserVo
(
UserVo
userVo
)
{
this
.
userVo
=
userVo
;
public
void
set
Account
(
String
account
)
{
this
.
account
=
account
;
}
public
CompanyVo
getCompany
Vo
()
{
return
companyVo
;
public
LoginCompanyResVo
getCompanyRes
Vo
()
{
return
company
Res
Vo
;
}
public
void
setCompany
Vo
(
CompanyVo
company
Vo
)
{
this
.
company
Vo
=
company
Vo
;
public
void
setCompany
ResVo
(
LoginCompanyResVo
companyRes
Vo
)
{
this
.
company
ResVo
=
companyRes
Vo
;
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/CompanyBankCardGetReqVo.java
0 → 100644
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/5/21 17:28
*/
public
class
CompanyBankCardGetReqVo
{
private
String
companyId
;
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/LoginCompanyResVo.java
0 → 100644
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
import
java.util.List
;
/**
* @Author zhangjinyao
* @create 2019/5/21 17:01
*/
public
class
LoginCompanyResVo
{
private
String
id
;
private
int
status
;
private
int
companyAttribute
;
private
List
<
String
>
bankCardCodeList
;
public
int
getCompanyAttribute
()
{
return
companyAttribute
;
}
public
void
setCompanyAttribute
(
int
companyAttribute
)
{
this
.
companyAttribute
=
companyAttribute
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
List
<
String
>
getBankCardCodeList
()
{
return
bankCardCodeList
;
}
public
void
setBankCardCodeList
(
List
<
String
>
bankCardCodeList
)
{
this
.
bankCardCodeList
=
bankCardCodeList
;
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/MerchantCreateReqVo.java
0 → 100644
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
import
com.pangding.web.authority.vo.Merchant
;
/**
* @Author zhangjinyao
* @create 2019/5/22 11:56
*/
public
class
MerchantCreateReqVo
extends
Merchant
{
}
src/main/java/com/pangding/web/authority/vo/reqvo/SaveCompanyResVo.java
0 → 100644
View file @
e84b1deb
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/5/22 14:42
*/
public
class
SaveCompanyResVo
{
private
String
companyId
;
private
String
companyExtendId
;
private
String
companyBankCardId
;
private
String
merchantId
;
private
String
userId
;
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyExtendId
()
{
return
companyExtendId
;
}
public
void
setCompanyExtendId
(
String
companyExtendId
)
{
this
.
companyExtendId
=
companyExtendId
;
}
public
String
getCompanyBankCardId
()
{
return
companyBankCardId
;
}
public
void
setCompanyBankCardId
(
String
companyBankCardId
)
{
this
.
companyBankCardId
=
companyBankCardId
;
}
public
String
getMerchantId
()
{
return
merchantId
;
}
public
void
setMerchantId
(
String
merchantId
)
{
this
.
merchantId
=
merchantId
;
}
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
}
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