Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
5bd85c3e
Commit
5bd85c3e
authored
Oct 21, 2020
by
zhangjw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://119.28.51.83/hewei/Jumeirah
into Jw
parents
82727ac2
99db8fdd
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
505 additions
and
182 deletions
+505
-182
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserController.java
+54
-64
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserManagerController.java
+156
-0
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserPermissionController.java
+82
-51
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/MerchantUserAddParam.java
+36
-0
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/MerchantUserUpdateParam.java
+35
-0
common/src/main/java/com/jumeirah/common/entity/MerchantUser.java
+2
-2
common/src/main/java/com/jumeirah/common/entity/MerchantUserPermission.java
+2
-2
common/src/main/java/com/jumeirah/common/mapper/MerchantUserMapper.java
+3
-0
common/src/main/java/com/jumeirah/common/mapper/MerchantUserPermissionMapper.java
+4
-0
common/src/main/java/com/jumeirah/common/param/MerchantPermissionPageParam.java
+1
-1
common/src/main/java/com/jumeirah/common/param/MerchantUserPermissionDetailVo.java
+37
-0
common/src/main/java/com/jumeirah/common/param/MerchantUserPermissionQueryVo.java
+0
-3
common/src/main/java/com/jumeirah/common/service/MerchantUserPermissionService.java
+12
-0
common/src/main/java/com/jumeirah/common/service/MerchantUserService.java
+3
-0
common/src/main/java/com/jumeirah/common/service/impl/MerchantUserPermissionServiceImpl.java
+7
-0
common/src/main/java/com/jumeirah/common/service/impl/MerchantUserServiceImpl.java
+24
-2
common/src/main/java/com/jumeirah/common/vo/LoginMerUserTokenVo.java
+3
-0
common/src/main/java/com/jumeirah/common/vo/MerchantUserQueryVo.java
+7
-45
common/src/main/resources/mapper/MerchantUserPermissionMapper.xml
+27
-9
common/src/main/resources/mapper/merchant/MerchantUserMapper.xml
+9
-2
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/jwt/JwtToken.java
+1
-1
No files found.
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserController.java
View file @
5bd85c3e
package
com
.
jumeirah
.
api
.
merchant
.
controller
;
import
com.jumeirah.common.entity.MerchantUser
;
import
com.jumeirah.common.param.MerchantLoginParam
;
import
com.jumeirah.common.param.MerchantUserPageParam
;
import
com.jumeirah.common.service.MerchantService
;
import
com.jumeirah.common.service.MerchantUserService
;
import
com.jumeirah.common.vo.LoginMerUserTokenVo
;
import
com.jumeirah.common.vo.MerchantUserQueryVo
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.Module
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLogIgnore
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -48,60 +38,60 @@ public class MerchantUserController extends BaseController {
@Autowired
private
MerchantService
merchantService
;
/**
* 添加商家用户
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加商家用户"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
addMerchantUser
(
@Validated
(
Add
.
class
)
@RequestBody
MerchantUser
merchantUser
)
throws
Exception
{
boolean
flag
=
merchantUserService
.
saveMerchantUser
(
merchantUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改商家用户
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改商家用户"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
updateMerchantUser
(
@Validated
(
Update
.
class
)
@RequestBody
MerchantUser
merchantUser
)
throws
Exception
{
boolean
flag
=
merchantUserService
.
updateMerchantUser
(
merchantUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除商家用户
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除商家用户"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
deleteMerchantUser
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
merchantUserService
.
deleteMerchantUser
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取商家用户详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"商家用户详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"商家用户详情"
,
response
=
MerchantUserQueryVo
.
class
)
public
ApiResult
<
MerchantUserQueryVo
>
getMerchantUser
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
MerchantUserQueryVo
merchantUserQueryVo
=
merchantUserService
.
getMerchantUserById
(
id
);
return
ApiResult
.
ok
(
merchantUserQueryVo
);
}
/**
* 商家用户分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"商家用户分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"商家用户分页列表"
,
response
=
MerchantUserQueryVo
.
class
)
public
ApiResult
<
Paging
<
MerchantUserQueryVo
>>
getMerchantUserPageList
(
@Validated
@RequestBody
MerchantUserPageParam
merchantUserPageParam
)
throws
Exception
{
Paging
<
MerchantUserQueryVo
>
paging
=
merchantUserService
.
getMerchantUserPageList
(
merchantUserPageParam
);
return
ApiResult
.
ok
(
paging
);
}
//
/**
//
* 添加商家用户
//
*/
//
@PostMapping("/add")
//
@OperationLog(name = "添加商家用户", type = OperationLogType.ADD)
//
@ApiOperation(value = "添加商家用户", response = ApiResult.class)
//
public ApiResult<Boolean> addMerchantUser(@Validated(Add.class) @RequestBody MerchantUser merchantUser) throws Exception {
//
boolean flag = merchantUserService.saveMerchantUser(merchantUser);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 修改商家用户
//
*/
//
@PostMapping("/update")
//
@OperationLog(name = "修改商家用户", type = OperationLogType.UPDATE)
//
@ApiOperation(value = "修改商家用户", response = ApiResult.class)
//
public ApiResult<Boolean> updateMerchantUser(@Validated(Update.class) @RequestBody MerchantUser merchantUser) throws Exception {
//
boolean flag = merchantUserService.updateMerchantUser(merchantUser);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 删除商家用户
//
*/
//
@PostMapping("/delete/{id}")
//
@OperationLog(name = "删除商家用户", type = OperationLogType.DELETE)
//
@ApiOperation(value = "删除商家用户", response = ApiResult.class)
//
public ApiResult<Boolean> deleteMerchantUser(@PathVariable("id") Long id) throws Exception {
//
boolean flag = merchantUserService.deleteMerchantUser(id);
//
return ApiResult.result(flag);
//
}
//
//
/**
//
* 获取商家用户详情
//
*/
//
@GetMapping("/info/{id}")
//
@OperationLog(name = "商家用户详情", type = OperationLogType.INFO)
//
@ApiOperation(value = "商家用户详情", response = MerchantUserQueryVo.class)
//
public ApiResult<MerchantUserQueryVo> getMerchantUser(@PathVariable("id") Long id) throws Exception {
//
MerchantUserQueryVo merchantUserQueryVo = merchantUserService.getMerchantUserById(id);
//
return ApiResult.ok(merchantUserQueryVo);
//
}
//
//
/**
//
* 商家用户分页列表
//
*/
//
@PostMapping("/getPageList")
//
@OperationLog(name = "商家用户分页列表", type = OperationLogType.PAGE)
//
@ApiOperation(value = "商家用户分页列表", response = MerchantUserQueryVo.class)
//
public ApiResult<Paging<MerchantUserQueryVo>> getMerchantUserPageList(@Validated @RequestBody MerchantUserPageParam merchantUserPageParam) throws Exception {
//
Paging<MerchantUserQueryVo> paging = merchantUserService.getMerchantUserPageList(merchantUserPageParam);
//
return ApiResult.ok(paging);
//
}
@PostMapping
(
"/login"
)
@OperationLogIgnore
...
...
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserManagerController.java
0 → 100644
View file @
5bd85c3e
package
com
.
jumeirah
.
api
.
merchant
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.jumeirah.api.merchant.entity.param.MerchantUserAddParam
;
import
com.jumeirah.api.merchant.entity.param.MerchantUserUpdateParam
;
import
com.jumeirah.common.entity.MerchantUser
;
import
com.jumeirah.common.service.MerchantUserService
;
import
com.jumeirah.common.vo.MerchantUserQueryVo
;
import
io.geekidea.springbootplus.config.properties.SpringBootPlusProperties
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.Module
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.geekidea.springbootplus.framework.shiro.jwt.JwtToken
;
import
io.geekidea.springbootplus.framework.shiro.util.SaltUtil
;
import
io.geekidea.springbootplus.framework.util.PasswordUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 商家用户 控制器
*
* @author wei
* @since 2020-09-27
*/
@Slf4j
@RestController
@RequestMapping
(
"/merchant/user/manager"
)
@Module
(
"${cfg.module}"
)
@Api
(
value
=
"商家账户管理API"
,
tags
=
{
"商家账户管理"
})
public
class
MerchantUserManagerController
extends
BaseController
{
@Autowired
private
MerchantUserService
merchantUserService
;
@Autowired
private
SpringBootPlusProperties
springBootPlusProperties
;
/**
* 添加商家用户
*/
@PostMapping
(
"/add"
)
@OperationLog
(
name
=
"添加商家用户"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"添加商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
addMerchantUser
(
@Validated
(
Add
.
class
)
@RequestBody
MerchantUserAddParam
merchantUserAddParam
)
throws
Exception
{
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
MerchantUser
merchantUser
=
new
MerchantUser
();
BeanUtils
.
copyProperties
(
merchantUserAddParam
,
merchantUser
);
merchantUser
.
setMcId
(
jwtToken
.
getMcId
());
// 生成盐值
String
salt
=
null
;
String
password
=
merchantUserAddParam
.
getPassword
();
// 如果密码为空,则设置默认密码
if
(
StringUtils
.
isBlank
(
password
))
{
salt
=
springBootPlusProperties
.
getLoginInitSalt
();
password
=
springBootPlusProperties
.
getLoginInitPassword
();
}
else
{
salt
=
SaltUtil
.
generateSalt
();
}
// 密码加密
merchantUser
.
setSalt
(
salt
);
merchantUser
.
setPassword
(
PasswordUtil
.
encrypt
(
password
,
salt
));
merchantUser
.
setIsAdmin
(
0
);
boolean
flag
=
merchantUserService
.
saveMerchantUser
(
merchantUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* 修改商家用户
*/
@PostMapping
(
"/update"
)
@OperationLog
(
name
=
"修改商家用户"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"修改商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
updateMerchantUser
(
@Validated
(
Update
.
class
)
@RequestBody
MerchantUserUpdateParam
merchantUserUpdateParam
)
throws
Exception
{
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
MerchantUser
sysUser
=
new
MerchantUser
().
setUsername
(
merchantUserUpdateParam
.
getUsername
());
MerchantUser
one
=
merchantUserService
.
getOne
(
new
QueryWrapper
<
MerchantUser
>(
sysUser
));
MerchantUser
merchantUser
=
new
MerchantUser
();
BeanUtils
.
copyProperties
(
merchantUserUpdateParam
,
merchantUser
);
merchantUser
.
setMcId
(
jwtToken
.
getMcId
());
merchantUser
.
setId
(
one
.
getId
());
// 生成盐值
String
salt
=
null
;
String
password
=
merchantUserUpdateParam
.
getPassword
();
// 如果密码为空,则设置默认密码
if
(
StringUtils
.
isBlank
(
password
))
{
salt
=
springBootPlusProperties
.
getLoginInitSalt
();
password
=
springBootPlusProperties
.
getLoginInitPassword
();
}
else
{
salt
=
SaltUtil
.
generateSalt
();
}
// 密码加密
merchantUser
.
setSalt
(
salt
);
merchantUser
.
setPassword
(
PasswordUtil
.
encrypt
(
password
,
salt
));
boolean
flag
=
merchantUserService
.
updateMerchantUser
(
merchantUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* 删除商家用户
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除商家用户"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除商家用户"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
deleteMerchantUser
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
boolean
flag
=
merchantUserService
.
deleteMerchantUser
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取商家用户详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"商家用户详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"商家用户详情"
,
response
=
MerchantUserQueryVo
.
class
)
public
ApiResult
<
MerchantUserQueryVo
>
getMerchantUser
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
MerchantUserQueryVo
merchantUserQueryVo
=
merchantUserService
.
getMerchantUserById
(
id
);
return
ApiResult
.
ok
(
merchantUserQueryVo
);
}
/**
* 商家用户分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"商家用户分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"商家用户分页列表"
)
public
ApiResult
<
List
<
MerchantUserQueryVo
>>
getMerchantUserPageList
()
throws
Exception
{
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
List
<
MerchantUserQueryVo
>
merchantUserListByMcId
=
merchantUserService
.
getMerchantUserListByMcId
(
jwtToken
.
getMcId
());
return
ApiResult
.
ok
(
merchantUserListByMcId
);
}
}
api-merchant/src/main/java/com/jumeirah/api/merchant/controller/MerchantUserPermissionController.java
View file @
5bd85c3e
package
com
.
jumeirah
.
api
.
merchant
.
controller
;
import
com.jumeirah.common.entity.MerchantUserPermission
;
import
com.jumeirah.common.param.MerchantUserPermissionPageParam
;
import
com.jumeirah.common.param.MerchantUserPermissionDetailVo
;
import
com.jumeirah.common.param.MerchantUserPermissionQueryVo
;
import
com.jumeirah.common.service.MerchantUserPermissionService
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Add
;
import
io.geekidea.springbootplus.framework.core.validator.groups.Update
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 商家用户权限关系 控制器
*
...
...
@@ -39,59 +35,94 @@ public class MerchantUserPermissionController extends BaseController {
private
MerchantUserPermissionService
merchantUserPermissionService
;
/**
*
添加商家用户权限关系
*
查询商家用户权限详情
*/
@PostMapping
(
"/
add
"
)
@OperationLog
(
name
=
"
添加商家用户权限关系"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"
添加商家用户权限关系
"
)
public
ApiResult
<
Boolean
>
addMerchantUserPermission
(
@Validated
(
Add
.
class
)
@RequestBody
MerchantUserPermission
merchantUserPermission
)
throws
Exception
{
boolean
flag
=
merchantUserPermissionService
.
saveMerchantUserPermission
(
merchantUserPermission
);
return
ApiResult
.
result
(
flag
);
@PostMapping
(
"/
update/{id}
"
)
@OperationLog
(
name
=
"
修改商家用户权限"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"
修改商家用户权限
"
)
public
ApiResult
<
MerchantUserPermissionQueryVo
>
update
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
MerchantUserPermissionQueryVo
merchantUserPermissionQueryVo
=
merchantUserPermissionService
.
getMerchantUserPermissionById
(
id
);
return
ApiResult
.
ok
(
merchantUserPermissionQueryVo
);
}
/**
*
修改商家用户权限关系
*
查询某商家用户权限列表
*/
@
PostMapping
(
"/update
"
)
@OperationLog
(
name
=
"
修改商家用户权限关系"
,
type
=
OperationLogType
.
UPDATE
)
@ApiOperation
(
value
=
"
修改商家用户权限关系
"
)
public
ApiResult
<
Boolean
>
updateMerchantUserPermission
(
@Validated
(
Update
.
class
)
@RequestBody
MerchantUserPermission
merchantUserPermission
)
throws
Exception
{
boolean
flag
=
merchantUserPermissionService
.
updateMerchantUserPermission
(
merchantUserPermission
);
return
ApiResult
.
result
(
flag
);
@
GetMapping
(
"/get/{userId}
"
)
@OperationLog
(
name
=
"
查询某商家用户权限列表"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"
查询某商家用户权限列表
"
)
public
ApiResult
<
List
<
MerchantUserPermissionDetailVo
>>
get
(
@PathVariable
(
"userId"
)
Long
userId
)
throws
Exception
{
List
<
MerchantUserPermissionDetailVo
>
merchantUserPermissionByUserId
=
merchantUserPermissionService
.
getMerchantUserPermissionByUserId
(
userId
);
return
ApiResult
.
ok
(
merchantUserPermissionByUserId
);
}
/**
* 删除商家用户权限关系
*/
@PostMapping
(
"/delete/{id}"
)
@OperationLog
(
name
=
"删除商家用户权限关系"
,
type
=
OperationLogType
.
DELETE
)
@ApiOperation
(
value
=
"删除商家用户权限关系"
)
public
ApiResult
<
Boolean
>
deleteMerchantUserPermission
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
boolean
flag
=
merchantUserPermissionService
.
deleteMerchantUserPermission
(
id
);
return
ApiResult
.
result
(
flag
);
}
/**
* 获取商家用户权限关系详情
*/
@GetMapping
(
"/info/{id}"
)
@OperationLog
(
name
=
"商家用户权限关系详情"
,
type
=
OperationLogType
.
INFO
)
@ApiOperation
(
value
=
"商家用户权限关系详情"
)
public
ApiResult
<
MerchantUserPermissionQueryVo
>
getMerchantUserPermission
(
@PathVariable
(
"id"
)
Long
id
)
throws
Exception
{
MerchantUserPermissionQueryVo
merchantUserPermissionQueryVo
=
merchantUserPermissionService
.
getMerchantUserPermissionById
(
id
);
return
ApiResult
.
ok
(
merchantUserPermissionQueryVo
);
}
//
// /**
// *查询商家用户权限详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "商家用户权限关系详情", type = OperationLogType.INFO)
// @ApiOperation(value = "商家用户权限关系详情")
// public ApiResult<MerchantUserPermissionQueryVo> getMerchantUserPermission(@PathVariable("id") Long id) throws Exception {
// MerchantUserPermissionQueryVo merchantUserPermissionQueryVo = merchantUserPermissionService.getMerchantUserPermissionById(id);
// return ApiResult.ok(merchantUserPermissionQueryVo);
// }
/**
* 商家用户权限关系分页列表
*/
@PostMapping
(
"/getPageList"
)
@OperationLog
(
name
=
"商家用户权限关系分页列表"
,
type
=
OperationLogType
.
PAGE
)
@ApiOperation
(
value
=
"商家用户权限关系分页列表"
)
public
ApiResult
<
Paging
<
MerchantUserPermissionQueryVo
>>
getMerchantUserPermissionPageList
(
@Validated
@RequestBody
MerchantUserPermissionPageParam
merchantUserPermissionPageParam
)
throws
Exception
{
Paging
<
MerchantUserPermissionQueryVo
>
paging
=
merchantUserPermissionService
.
getMerchantUserPermissionPageList
(
merchantUserPermissionPageParam
);
return
ApiResult
.
ok
(
paging
);
}
// /**
// * 添加商家用户权限关系
// */
// @PostMapping("/add")
// @OperationLog(name = "添加商家用户权限关系", type = OperationLogType.ADD)
// @ApiOperation(value = "添加商家用户权限关系")
// public ApiResult<Boolean> addMerchantUserPermission(@Validated(Add.class) @RequestBody MerchantUserPermission merchantUserPermission) throws Exception {
// boolean flag = merchantUserPermissionService.saveMerchantUserPermission(merchantUserPermission);
// return ApiResult.result(flag);
// }
//
// /**
// * 修改商家用户权限关系
// */
// @PostMapping("/update")
// @OperationLog(name = "修改商家用户权限关系", type = OperationLogType.UPDATE)
// @ApiOperation(value = "修改商家用户权限关系")
// public ApiResult<Boolean> updateMerchantUserPermission(@Validated(Update.class) @RequestBody MerchantUserPermission merchantUserPermission) throws Exception {
// boolean flag = merchantUserPermissionService.updateMerchantUserPermission(merchantUserPermission);
// return ApiResult.result(flag);
// }
//
// /**
// * 删除商家用户权限关系
// */
// @PostMapping("/delete/{id}")
// @OperationLog(name = "删除商家用户权限关系", type = OperationLogType.DELETE)
// @ApiOperation(value = "删除商家用户权限关系")
// public ApiResult<Boolean> deleteMerchantUserPermission(@PathVariable("id") Long id) throws Exception {
// boolean flag = merchantUserPermissionService.deleteMerchantUserPermission(id);
// return ApiResult.result(flag);
// }
//
// /**
// * 获取商家用户权限关系详情
// */
// @GetMapping("/info/{id}")
// @OperationLog(name = "商家用户权限关系详情", type = OperationLogType.INFO)
// @ApiOperation(value = "商家用户权限关系详情")
// public ApiResult<MerchantUserPermissionQueryVo> getMerchantUserPermission(@PathVariable("id") Long id) throws Exception {
// MerchantUserPermissionQueryVo merchantUserPermissionQueryVo = merchantUserPermissionService.getMerchantUserPermissionById(id);
// return ApiResult.ok(merchantUserPermissionQueryVo);
// }
//
// /**
// * 商家用户权限关系分页列表
// */
// @PostMapping("/getPageList")
// @OperationLog(name = "商家用户权限关系分页列表", type = OperationLogType.PAGE)
// @ApiOperation(value = "商家用户权限关系分页列表")
// public ApiResult<Paging<MerchantUserPermissionQueryVo>> getMerchantUserPermissionPageList(@Validated @RequestBody MerchantUserPermissionPageParam merchantUserPermissionPageParam) throws Exception {
// Paging<MerchantUserPermissionQueryVo> paging = merchantUserPermissionService.getMerchantUserPermissionPageList(merchantUserPermissionPageParam);
// return ApiResult.ok(paging);
// }
}
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/MerchantUserAddParam.java
0 → 100644
View file @
5bd85c3e
package
com
.
jumeirah
.
api
.
merchant
.
entity
.
param
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
/**
* 商家
*
* @author wei
* @since 2020-09-28
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"MerchantUserAddParam对象"
)
public
class
MerchantUserAddParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@NotBlank
(
message
=
"账号不能为空"
)
@ApiModelProperty
(
"账号"
)
private
String
username
;
@NotBlank
(
message
=
"密码不能为空"
)
@ApiModelProperty
(
"密码"
)
private
String
password
;
@ApiModelProperty
(
"职位"
)
private
String
position
;
}
api-merchant/src/main/java/com/jumeirah/api/merchant/entity/param/MerchantUserUpdateParam.java
0 → 100644
View file @
5bd85c3e
package
com
.
jumeirah
.
api
.
merchant
.
entity
.
param
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
/**
* 商家
*
* @author wei
* @since 2020-09-28
*/
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"MerchantUserUpdateParam对象"
)
public
class
MerchantUserUpdateParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"用户名"
)
private
String
username
;
@NotBlank
(
message
=
"密码不能为空"
)
@ApiModelProperty
(
"密码"
)
private
String
password
;
@ApiModelProperty
(
"职位"
)
private
String
position
;
}
common/src/main/java/com/jumeirah/common/entity/MerchantUser.java
View file @
5bd85c3e
...
...
@@ -66,8 +66,8 @@ public class MerchantUser extends BaseEntity {
@ApiModelProperty
(
"头像"
)
private
String
head
;
@ApiModelProperty
(
"
备注
"
)
private
String
remark
;
@ApiModelProperty
(
"
职位
"
)
private
String
position
;
@ApiModelProperty
(
"状态,0:禁用,1:启用,2:锁定"
)
private
Integer
state
;
...
...
common/src/main/java/com/jumeirah/common/entity/MerchantUserPermission.java
View file @
5bd85c3e
...
...
@@ -46,8 +46,8 @@ public class MerchantUserPermission extends BaseEntity {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"职位名称"
)
private
String
positionName
;
//
@ApiModelProperty("职位名称")
//
private String positionName;
@ApiModelProperty
(
"版本"
)
@Version
...
...
common/src/main/java/com/jumeirah/common/mapper/MerchantUserMapper.java
View file @
5bd85c3e
...
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.stereotype.Repository
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 商家 Mapper 接口
...
...
@@ -37,4 +38,6 @@ public interface MerchantUserMapper extends BaseMapper<MerchantUser> {
*/
IPage
<
MerchantUserQueryVo
>
getMerchantUserPageList
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
MerchantUserPageParam
merchantUserPageParam
);
List
<
MerchantUserQueryVo
>
getMerchantUserListByMcId
(
Serializable
id
);
}
common/src/main/java/com/jumeirah/common/mapper/MerchantUserPermissionMapper.java
View file @
5bd85c3e
...
...
@@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.jumeirah.common.entity.MerchantUserPermission
;
import
com.jumeirah.common.param.MerchantUserPermissionDetailVo
;
import
com.jumeirah.common.param.MerchantUserPermissionPageParam
;
import
com.jumeirah.common.param.MerchantUserPermissionQueryVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.Set
;
/**
...
...
@@ -29,6 +31,8 @@ public interface MerchantUserPermissionMapper extends BaseMapper<MerchantUserPer
*/
Set
<
String
>
getPermissionCodesByUserId
(
@Param
(
"userId"
)
Long
userId
);
List
<
MerchantUserPermissionDetailVo
>
getMerchantUserPermissionByUserId
(
Long
userId
);
/**
* 根据ID获取查询对象
*
...
...
common/src/main/java/com/jumeirah/common/param/MerchantPermissionPageParam.java
View file @
5bd85c3e
package
com
.
jumeirah
.
common
.
param
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
io.geekidea.springbootplus.framework.core.pagination.BasePageOrderParam
;
/**
* <pre>
...
...
common/src/main/java/com/jumeirah/common/param/MerchantUserPermissionDetailVo.java
0 → 100644
View file @
5bd85c3e
package
com
.
jumeirah
.
common
.
param
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* <pre>
* 商家用户权限关系 查询结果对象
* </pre>
*
* @author giao
* @date 2020-10-19
*/
@Data
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"MerchantUserPermissionDetailVo对象"
)
public
class
MerchantUserPermissionDetailVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"权限id"
)
private
Long
permissionId
;
@ApiModelProperty
(
"权限code"
)
private
String
permissionCode
;
@ApiModelProperty
(
"权限中文名"
)
private
String
permissionName
;
@ApiModelProperty
(
"0:没有该权限,1:有该权限"
)
private
Integer
isHasPermission
;
}
\ No newline at end of file
common/src/main/java/com/jumeirah/common/param/MerchantUserPermissionQueryVo.java
View file @
5bd85c3e
...
...
@@ -37,9 +37,6 @@ public class MerchantUserPermissionQueryVo implements Serializable {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"职位名称"
)
private
String
positionName
;
@ApiModelProperty
(
"版本"
)
private
Integer
version
;
...
...
common/src/main/java/com/jumeirah/common/service/MerchantUserPermissionService.java
View file @
5bd85c3e
package
com
.
jumeirah
.
common
.
service
;
import
com.jumeirah.common.entity.MerchantUserPermission
;
import
com.jumeirah.common.param.MerchantUserPermissionDetailVo
;
import
com.jumeirah.common.param.MerchantUserPermissionPageParam
;
import
com.jumeirah.common.param.MerchantUserPermissionQueryVo
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
java.util.List
;
import
java.util.Set
;
/**
...
...
@@ -62,6 +64,16 @@ public interface MerchantUserPermissionService extends BaseService<MerchantUserP
MerchantUserPermissionQueryVo
getMerchantUserPermissionById
(
Long
id
)
throws
Exception
;
/**
* 根据user获取查询对象
*
* @param userId
* @return
* @throws Exception
*/
List
<
MerchantUserPermissionDetailVo
>
getMerchantUserPermissionByUserId
(
Long
userId
)
throws
Exception
;
/**
* 获取分页对象
*
* @param merchantUserPermissionPageParam
...
...
common/src/main/java/com/jumeirah/common/service/MerchantUserService.java
View file @
5bd85c3e
...
...
@@ -9,6 +9,8 @@ import io.geekidea.springbootplus.framework.common.api.ApiResult;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
io.geekidea.springbootplus.framework.core.pagination.Paging
;
import
java.util.List
;
/**
* 商家 服务类
*
...
...
@@ -75,6 +77,7 @@ public interface MerchantUserService extends BaseService<MerchantUser> {
*/
Paging
<
MerchantUserQueryVo
>
getMerchantUserPageList
(
MerchantUserPageParam
merchantUserPageParam
)
throws
Exception
;
List
<
MerchantUserQueryVo
>
getMerchantUserListByMcId
(
Long
mcId
)
throws
Exception
;
...
...
common/src/main/java/com/jumeirah/common/service/impl/MerchantUserPermissionServiceImpl.java
View file @
5bd85c3e
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.OrderItem;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.jumeirah.common.entity.MerchantUserPermission
;
import
com.jumeirah.common.mapper.MerchantUserPermissionMapper
;
import
com.jumeirah.common.param.MerchantUserPermissionDetailVo
;
import
com.jumeirah.common.param.MerchantUserPermissionPageParam
;
import
com.jumeirah.common.param.MerchantUserPermissionQueryVo
;
import
com.jumeirah.common.service.MerchantUserPermissionService
;
...
...
@@ -16,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Set
;
/**
...
...
@@ -60,6 +62,11 @@ public class MerchantUserPermissionServiceImpl extends BaseServiceImpl<MerchantU
}
@Override
public
List
<
MerchantUserPermissionDetailVo
>
getMerchantUserPermissionByUserId
(
Long
userId
)
throws
Exception
{
return
merchantUserPermissionMapper
.
getMerchantUserPermissionByUserId
(
userId
);
}
@Override
public
Paging
<
MerchantUserPermissionQueryVo
>
getMerchantUserPermissionPageList
(
MerchantUserPermissionPageParam
merchantUserPermissionPageParam
)
throws
Exception
{
Page
<
MerchantUserPermissionQueryVo
>
page
=
new
PageInfo
<>(
merchantUserPermissionPageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
MerchantUserPermission:
:
getCreateTime
)));
IPage
<
MerchantUserPermissionQueryVo
>
iPage
=
merchantUserPermissionMapper
.
getMerchantUserPermissionPageList
(
page
,
merchantUserPermissionPageParam
);
...
...
common/src/main/java/com/jumeirah/common/service/impl/MerchantUserServiceImpl.java
View file @
5bd85c3e
package
com
.
jumeirah
.
common
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
...
...
@@ -7,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.jumeirah.common.convert.UserConvert
;
import
com.jumeirah.common.entity.MerchantPermission
;
import
com.jumeirah.common.entity.MerchantUser
;
import
com.jumeirah.common.entity.MerchantUserPermission
;
import
com.jumeirah.common.enums.StateEnum
;
import
com.jumeirah.common.mapper.MerchantUserMapper
;
import
com.jumeirah.common.param.MerchantLoginParam
;
...
...
@@ -149,6 +149,22 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper,
permissionCodes
.
add
(
merchantPermission
.
getCode
());
}
loginSysUserVo
.
setPermissionCodes
(
permissionCodes
);
// 查询全部权限
List
<
MerchantPermission
>
list
=
merchantPermissionService
.
list
();
// 删除该用户所有权限
merchantUserPermissionService
.
remove
(
new
QueryWrapper
<
MerchantUserPermission
>()
.
lambda
().
eq
(
MerchantUserPermission:
:
getUserId
,
merchantUser
.
getId
()));
// 给管理管设置全部权限
for
(
MerchantPermission
merchantPermission
:
list
)
{
MerchantUserPermission
merchantUserPermission
=
new
MerchantUserPermission
();
merchantUserPermission
.
setUserId
(
merchantUser
.
getId
());
merchantUserPermission
.
setPermissionId
(
merchantPermission
.
getId
());
merchantUserPermission
.
setState
(
0
);
merchantUserPermissionService
.
save
(
merchantUserPermission
);
}
}
else
{
Set
<
String
>
permissionCodes
=
merchantUserPermissionService
.
getPermissionCodesByUserId
(
merchantUser
.
getId
());
loginSysUserVo
.
setPermissionCodes
(
permissionCodes
);
...
...
@@ -187,6 +203,7 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper,
LoginMerUserTokenVo
loginSysUserTokenVo
=
new
LoginMerUserTokenVo
();
loginSysUserTokenVo
.
setToken
(
token
);
loginSysUserTokenVo
.
setLoginSysUserVo
(
loginSysUserVo
);
loginSysUserTokenVo
.
setIsAdmin
(
merchantUser
.
getIsAdmin
());
return
ApiResult
.
ok
(
loginSysUserTokenVo
);
}
...
...
@@ -250,8 +267,13 @@ public class MerchantUserServiceImpl extends BaseServiceImpl<MerchantUserMapper,
public
Paging
<
MerchantUserQueryVo
>
getMerchantUserPageList
(
MerchantUserPageParam
merchantUserPageParam
)
throws
Exception
{
Page
<
MerchantUserQueryVo
>
page
=
new
PageInfo
<>(
merchantUserPageParam
,
OrderItem
.
desc
(
getLambdaColumn
(
MerchantUser:
:
getCreateTime
)));
IPage
<
MerchantUserQueryVo
>
iPage
=
merchantUserMapper
.
getMerchantUserPageList
(
page
,
merchantUserPageParam
);
return
new
Paging
<
MerchantUserQueryVo
>(
iPage
);
return
new
Paging
<>(
iPage
);
}
@Override
public
List
<
MerchantUserQueryVo
>
getMerchantUserListByMcId
(
Long
mcId
)
throws
Exception
{
return
merchantUserMapper
.
getMerchantUserListByMcId
(
mcId
);
}
}
common/src/main/java/com/jumeirah/common/vo/LoginMerUserTokenVo.java
View file @
5bd85c3e
...
...
@@ -37,6 +37,9 @@ public class LoginMerUserTokenVo implements LoginToken {
@ApiModelProperty
(
"token"
)
private
String
token
;
@ApiModelProperty
(
"是否为管理员,0:普通,1:超级管理员"
)
private
Integer
isAdmin
;
/**
* 登录用户对象
*/
...
...
common/src/main/java/com/jumeirah/common/vo/MerchantUserQueryVo.java
View file @
5bd85c3e
...
...
@@ -27,53 +27,16 @@ public class MerchantUserQueryVo implements Serializable {
@ApiModelProperty
(
"用户名"
)
private
String
username
;
//
// @ApiModelProperty("密码")
// private String password;
@ApiModelProperty
(
"
昵称
"
)
private
String
nickname
;
@ApiModelProperty
(
"
职位
"
)
private
String
position
;
@ApiModelProperty
(
"航空公司名称"
)
private
String
airlineName
;
@ApiModelProperty
(
"密码"
)
private
String
password
;
@ApiModelProperty
(
"盐值"
)
private
String
salt
;
@ApiModelProperty
(
"手机号码"
)
private
String
phone
;
@ApiModelProperty
(
"手机区号"
)
private
String
phoneArea
;
@ApiModelProperty
(
"性别,0:女,1:男,默认1"
)
private
Integer
gender
;
@ApiModelProperty
(
"头像"
)
private
String
head
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"状态,0:禁用,1:启用,2:锁定"
)
private
Integer
state
;
@ApiModelProperty
(
"部门id"
)
private
Long
departmentId
;
@ApiModelProperty
(
"角色id"
)
private
Long
roleId
;
@ApiModelProperty
(
"逻辑删除,0:未删除,1:已删除"
)
private
Integer
deleted
;
@ApiModelProperty
(
"版本"
)
private
Integer
version
;
@ApiModelProperty
(
"是否为管理员,0:普通,1:超级管理员"
)
private
Integer
isAdmin
;
@ApiModelProperty
(
"创建时间"
)
private
Timestamp
createTime
;
@ApiModelProperty
(
"修改时间"
)
private
Timestamp
updateTime
;
}
\ No newline at end of file
common/src/main/resources/mapper/MerchantUserPermissionMapper.xml
View file @
5bd85c3e
...
...
@@ -3,20 +3,38 @@
<mapper
namespace=
"com.jumeirah.common.mapper.MerchantUserPermissionMapper"
>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id, user_id, permission_id, state, remark, position_name, version, create_time, update_time
id, user_id, permission_id, state, remark, version, create_time, update_time
</sql>
<select
id=
"getPermissionCodesByUserId"
resultType=
"java.lang.String"
>
SELECT
mp.CODE
FROM
merchant_user_permission mup
INNER JOIN merchant_permission mp ON mp.id = mup.permission_id
WHERE
mup.user_id = #{userId}
</select>
<select
id=
"getMerchantUserPermissionByUserId"
resultType=
"com.jumeirah.common.param.MerchantUserPermissionDetailVo"
>
SELECT
mp.id AS permissionId,
mp.name as permissionName,
mp.code as permissionCode,
CASE
WHEN ISNULL( mup.id ) THEN
0 ELSE 1
END AS isHasPermission
FROM
merchant_permission mp
LEFT JOIN ( SELECT mup.id, mup.permission_id FROM merchant_user_permission mup WHERE mup.user_id = #{userId} ) AS mup ON mup.permission_id = mp.id
SELECT
mp.CODE
FROM
merchant_user_permission mup
INNER JOIN merchant_permission mp ON mp.id = mup.permission_id
WHERE
mup.user_id = #{userId}
</select>
...
...
common/src/main/resources/mapper/merchant/MerchantUserMapper.xml
View file @
5bd85c3e
...
...
@@ -4,7 +4,7 @@
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id,mc_id,is_admin, username, nickname, password, salt, phone, phone_area, gender, head,
remark
, state, department_id, role_id, deleted, version, create_time, update_time
id,mc_id,is_admin, username, nickname, password, salt, phone, phone_area, gender, head,
position
, state, department_id, role_id, deleted, version, create_time, update_time
</sql>
<select
id=
"getMerchantUserById"
resultType=
"com.jumeirah.common.vo.MerchantUserQueryVo"
>
...
...
@@ -20,7 +20,14 @@
from merchant_user
</select>
<select
id=
"getMerchantUserListByMcId"
parameterType=
"com.jumeirah.common.param.MerchantUserPageParam"
resultType=
"com.jumeirah.common.vo.MerchantUserQueryVo"
>
select
id,mc_id,is_admin, username, nickname, phone, phone_area, gender, head, position, state, role_id, create_time, update_time
from merchant_user
where mc_id = #{id}
and deleted=0
</select>
</mapper>
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/jwt/JwtToken.java
View file @
5bd85c3e
...
...
@@ -43,7 +43,7 @@ public class JwtToken implements HostAuthenticationToken {
private
String
type
;
/**
* mcId
*
商家
mcId
*/
private
Long
mcId
;
...
...
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