Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d8dc4c8e
authored
Jul 22, 2021
by
zhouhb
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]商户员工模块
1 parent
d157091a
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1812 additions
and
70 deletions
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
src/main/java/cn/com/glsx/merchants/controller/StaffController.java
src/main/java/cn/com/glsx/merchants/convert/ConvertResponse.java
src/main/java/cn/com/glsx/merchants/request/DefaultRequest.java
src/main/java/cn/com/glsx/merchants/request/file/FileSaveRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/AccountTypeTreeRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/FunctionTreeRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantDetailRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantSaveRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantSearchResquest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantTreeRopRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantUpdateRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/ProductTreeRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/MerchantUserRopRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffDeleteRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffPageRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffSaveRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffSearchRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffUpdateRequest.java
src/main/java/cn/com/glsx/merchants/response/AccountTypeTreeRopResponse.java
src/main/java/cn/com/glsx/merchants/response/FunctionTreeRopResponse.java
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
src/main/java/cn/com/glsx/merchants/response/MerchantTreeRopResponse.java
src/main/java/cn/com/glsx/merchants/response/MerchantUserRopResponse.java
src/main/java/cn/com/glsx/merchants/response/ProductTreeRopResponse.java
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
src/main/java/cn/com/glsx/merchants/service/MerchantUserService.java
src/main/java/cn/com/glsx/merchants/service/StaffService.java
src/main/resources/config/application.properties
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
View file @
d8dc4c8
...
@@ -64,4 +64,14 @@ public class DubboConfig {
...
@@ -64,4 +64,14 @@ public class DubboConfig {
public
MerchantRoleRemote
getMerchantRoleRemote
()
{
public
MerchantRoleRemote
getMerchantRoleRemote
()
{
return
factory
.
builder
(
MerchantRoleRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"2.0.0"
).
build
();
return
factory
.
builder
(
MerchantRoleRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"2.0.0"
).
build
();
}
}
@Bean
public
MerchantRemote
getMerchantRemote
()
{
return
factory
.
builder
(
MerchantRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"2.0.0"
).
build
();
}
@Bean
public
MerchantStaffRemote
getMerchantStaffRemote
()
{
return
factory
.
builder
(
MerchantStaffRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"2.0.0"
).
build
();
}
}
}
src/main/java/cn/com/glsx/merchants/controller/MerchantController.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.merchant.*
;
import
cn.com.glsx.merchants.response.AccountTypeTreeRopResponse
;
import
cn.com.glsx.merchants.response.MerchantRopResponse
;
import
cn.com.glsx.merchants.response.MerchantTreeRopResponse
;
import
cn.com.glsx.merchants.service.MerchantService
;
import
cn.com.glsx.merchants.util.Pagination
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
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.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户接口
* @date 2021/7/21 16:52
*/
@Slf4j
@Api
(
"商户接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
MerchantController
{
@Autowired
private
MerchantService
merchantService
;
/**
* 保存商户基础信息
*
* @param merchantSaveRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.saveMerchant"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"保存商户基础信息"
)
public
RopResponse
<
Boolean
>
saveMerchant
(
MerchantSaveRequest
merchantSaveRequest
)
{
try
{
merchantService
.
saveMerchant
(
merchantSaveRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__saveMerchant__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 更新商户基础信息
*
* @param merchantUpdateRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updateMerchant"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"更新商户基础信息"
)
public
RopResponse
<
Boolean
>
updateMerchant
(
MerchantUpdateRequest
merchantUpdateRequest
)
{
try
{
merchantService
.
updateMerchant
(
merchantUpdateRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updateMerchant__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 保存商户权限信息
*
* @param merchantTreeRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.savePermissions"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"保存商户权限信息"
)
@PostMapping
public
RopResponse
<
Boolean
>
savePermissions
(
@RequestBody
MerchantTreeRopRequest
merchantTreeRequest
)
{
try
{
merchantService
.
savePermissions
(
merchantTreeRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__savePermissions__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 更新商户权限信息
*
* @param merchantTreeRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updatePermissions"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"更新商户权限信息"
)
public
RopResponse
<
Boolean
>
updatePermissions
(
@RequestBody
MerchantTreeRopRequest
merchantTreeRequest
)
{
try
{
merchantService
.
updatePermissions
(
merchantTreeRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updatePermissions__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询商户详情
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.findMerchantDetail"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询商户详情"
)
public
RopResponse
<
MerchantRopResponse
>
findMerchantDetail
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
MerchantRopResponse
merchantResponse
=
merchantService
.
findMerchantDetail
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updatePermissions__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询商户树
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.findMerchantTree"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询商户树"
)
public
RopResponse
<
List
<
MerchantTreeRopResponse
>>
findMerchantTree
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
List
<
MerchantTreeRopResponse
>
merchantResponse
=
merchantService
.
findMerchantTree
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__findMerchantTree__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询商户的菜单权限
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.findPermissionsByMerId"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询商户的菜单权限"
)
public
RopResponse
<
List
<
AccountTypeTreeRopResponse
>>
findPermissionsByMerId
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
List
<
AccountTypeTreeRopResponse
>
merchantResponse
=
merchantService
.
findPermissionsByMerId
(
merchantDetailRequest
);
return
RopResponse
.
success
(
merchantResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__findMerchantTree__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 更新商户的有效期
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updateValPerByMerId"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"更新商户的有效期"
)
public
RopResponse
<
Boolean
>
updateValPerByMerId
(
MerchantDetailRequest
merchantDetailRequest
)
{
try
{
merchantService
.
updateValPerByMerId
(
merchantDetailRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantController__invoke__updateValPerByMerId__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询商户列表
*
* @param merchantSearchResquest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.menu.findMerchantByPage"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询商户列表"
)
public
RopResponse
<
Pagination
<
MerchantRopResponse
>>
findMerchantByPage
(
MerchantSearchResquest
merchantSearchResquest
)
{
try
{
Pagination
<
MerchantRopResponse
>
list
=
merchantService
.
findMerchantByPage
(
merchantSearchResquest
);
return
RopResponse
.
success
(
list
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMenuController__invoke__merchantSearchResquest__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/controller/StaffController.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.merchant.MerchantSaveRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantSearchResquest
;
import
cn.com.glsx.merchants.request.staff.*
;
import
cn.com.glsx.merchants.response.MerchantRopResponse
;
import
cn.com.glsx.merchants.response.StaffResponse
;
import
cn.com.glsx.merchants.service.StaffService
;
import
cn.com.glsx.merchants.util.Pagination
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 13:45
*/
@Slf4j
@Api
(
"员工接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
StaffController
{
@Autowired
private
StaffService
staffService
;
/**
* 保存员工
*
* @param staffSaveRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.saveStaff"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"保存员工"
)
public
RopResponse
<
Boolean
>
saveStaff
(
StaffSaveRequest
staffSaveRequest
)
{
try
{
staffService
.
saveStaff
(
staffSaveRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__saveStaff__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 更新员工
*
* @param staffUpdateRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.updateStaff"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"更新员工"
)
public
RopResponse
<
Boolean
>
updateStaff
(
StaffUpdateRequest
staffUpdateRequest
)
{
try
{
staffService
.
updateStaff
(
staffUpdateRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__updateStaff__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 删除员工
*
* @param staffDeleteRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.deleteStaff"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"删除员工"
)
public
RopResponse
<
Boolean
>
deleteStaff
(
StaffDeleteRequest
staffDeleteRequest
)
{
try
{
staffService
.
deleteStaff
(
staffDeleteRequest
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__deleteStaff__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询员工详情
*
* @param staffSearchRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.staffSearchRequest"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询员工详情"
)
public
RopResponse
<
StaffResponse
>
findMerchantStaffDetail
(
StaffSearchRequest
staffSearchRequest
)
{
try
{
StaffResponse
staffResponse
=
staffService
.
findMerchantStaffDetail
(
staffSearchRequest
);
return
RopResponse
.
success
(
staffResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__findMerchantStaffDetail__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询员工列表
*
* @param staffListRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.merchant.findMerchantStaffList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询员工列表"
)
public
RopResponse
<
List
<
StaffResponse
>>
findMerchantStaffList
(
StaffListRequest
staffListRequest
)
{
try
{
List
<
StaffResponse
>
staffResponse
=
staffService
.
findMerchantStaffList
(
staffListRequest
);
return
RopResponse
.
success
(
staffResponse
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__findMerchantStaffList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 查询员工分页列表
*
* @param staffPageRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"cn.com.glsx.merchants.menu.findStaffByPage"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询员工分页列表"
)
public
RopResponse
<
Pagination
<
StaffResponse
>>
findStaffByPage
(
StaffPageRequest
staffPageRequest
)
{
try
{
Pagination
<
StaffResponse
>
list
=
staffService
.
findStaffByPage
(
staffPageRequest
);
return
RopResponse
.
success
(
list
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMenuController__invoke__findStaffByPage__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/convert/ConvertResponse.java
View file @
d8dc4c8
...
@@ -38,6 +38,7 @@ public class ConvertResponse {
...
@@ -38,6 +38,7 @@ public class ConvertResponse {
return
output
;
return
output
;
}
}
/**
/**
* 分页转换
* 分页转换
*
*
...
@@ -45,7 +46,7 @@ public class ConvertResponse {
...
@@ -45,7 +46,7 @@ public class ConvertResponse {
* @param list 原集合
* @param list 原集合
* @return 新分页参数
* @return 新分页参数
*/
*/
public
static
<
E
,
T
>
Pagination
<
T
>
convertPage
(
RpcPagination
<
E
>
list
,
Class
<
T
>
clazz
)
{
public
static
<
E
,
T
>
Pagination
<
T
>
convertPage
(
RpcPagination
<
E
>
list
,
Class
<
T
>
clazz
)
{
Pagination
pagination
=
new
Pagination
();
Pagination
pagination
=
new
Pagination
();
pagination
.
setPageCount
(
list
.
getPageNum
());
pagination
.
setPageCount
(
list
.
getPageNum
());
List
<
T
>
newList
=
convertList
(
list
.
getList
(),
clazz
);
List
<
T
>
newList
=
convertList
(
list
.
getList
(),
clazz
);
...
@@ -54,4 +55,18 @@ public class ConvertResponse {
...
@@ -54,4 +55,18 @@ public class ConvertResponse {
pagination
.
setPageSize
(
list
.
getPageSize
());
pagination
.
setPageSize
(
list
.
getPageSize
());
return
pagination
;
return
pagination
;
}
}
/**
* 转化类型
*
* @param object 原类
* @param clazz 新类
* @return
*/
public
static
<
T
>
T
convertObject
(
Object
object
,
Class
<
T
>
clazz
)
{
T
target
=
BeanUtils
.
instantiateClass
(
clazz
);
BeanUtils
.
copyProperties
(
object
,
target
);
return
target
;
}
}
}
src/main/java/cn/com/glsx/merchants/request/DefaultRequest.java
View file @
d8dc4c8
...
@@ -25,4 +25,14 @@ public class DefaultRequest extends AbstractRopRequest {
...
@@ -25,4 +25,14 @@ public class DefaultRequest extends AbstractRopRequest {
*/
*/
@ApiModelProperty
(
notes
=
"创建人"
)
@ApiModelProperty
(
notes
=
"创建人"
)
private
String
createdAccount
;
private
String
createdAccount
;
/**
* 创建者
*/
private
Integer
updatedBy
;
/**
* 创建人
*/
private
String
updatedAccount
;
}
}
src/main/java/cn/com/glsx/merchants/request/file/FileSaveRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
file
;
import
com.rop.AbstractRopRequest
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/21 17:04
*/
@Data
public
class
FileSaveRequest
extends
AbstractRopRequest
implements
Serializable
{
/**
* 图片路径
*/
private
String
fileUrl
;
/**
* 图片名称
*/
private
String
fileName
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/AccountTypeTreeRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型
* @date 2021/7/22 9:38
*/
@Data
public
class
AccountTypeTreeRequest
{
@ApiModelProperty
(
notes
=
"账户id"
,
required
=
true
)
private
Integer
accountTypeId
;
@ApiModelProperty
(
notes
=
"产品"
,
required
=
true
)
private
List
<
ProductTreeRequest
>
products
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/FunctionTreeRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能
* @date 2021/7/22 9:41
*/
@Data
public
class
FunctionTreeRequest
{
@ApiModelProperty
(
notes
=
"功能值"
)
private
String
functionvalue
;
@ApiModelProperty
(
notes
=
"功能id"
,
required
=
true
)
private
Integer
functionId
;
@ApiModelProperty
(
notes
=
"菜单id"
,
required
=
true
)
private
Integer
mendId
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantDetailRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 11:14
*/
@Data
public
class
MerchantDetailRequest
extends
DefaultRequest
{
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
id
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantSaveRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
MerchantSaveRequest
extends
DefaultRequest
implements
Serializable
{
/**
* 商户名称
*/
@ApiModelProperty
(
notes
=
"商户名称"
,
required
=
true
)
private
String
merchantName
;
/**
* 商户简称
*/
@ApiModelProperty
(
notes
=
"商户简称"
)
private
String
merchantAbbreviation
;
/**
* 1.个体户 2.企业
*/
@ApiModelProperty
(
notes
=
"1.个体户 2.企业"
)
private
Byte
merchantType
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
notes
=
"组织机构代码"
)
private
String
merchantOrgcode
;
/**
* 商户地址
*/
@ApiModelProperty
(
notes
=
"商户地址"
)
private
String
merchantAddress
;
/**
* 法定联系人
*/
@ApiModelProperty
(
notes
=
"法定联系人"
)
private
String
merchantLegalPerson
;
/**
* 联系电话
*/
@ApiModelProperty
(
notes
=
"联系电话"
,
required
=
true
)
private
String
merchantLegalPersonPhone
;
/**
* 电话是否可作为登录名
*/
@ApiModelProperty
(
notes
=
"电话是否可作为登录名(1.是 0.否)"
,
required
=
true
)
private
Byte
isloginName
;
/**
* 营业范围
*/
@ApiModelProperty
(
notes
=
"营业范围"
,
required
=
true
)
private
Byte
businessScope
;
/**
* 品牌
*/
@ApiModelProperty
(
notes
=
"品牌"
,
required
=
true
)
private
Byte
merchantBrand
;
/**
* 登录账户
*/
@ApiModelProperty
(
notes
=
"登录账户"
,
required
=
true
)
private
String
merchantLoginAccount
;
/**
* 登录密码
*/
@ApiModelProperty
(
notes
=
"登录密码"
,
required
=
true
)
private
String
merchantLoginPassword
;
/**
* 1.工厂 2.省代 3.市代 4.门店
*/
@ApiModelProperty
(
notes
=
"1.工厂 2.省代 3.市代 4.门店"
,
required
=
true
)
private
Byte
merchantAccountLevel
;
/**
* 渠道id
*/
@ApiModelProperty
(
notes
=
"渠道id"
,
required
=
true
)
private
Integer
channelId
;
/**
* 驻点联系人
*/
@ApiModelProperty
(
notes
=
"驻点联系人"
)
private
String
residentContact
;
/**
* 驻点联系电话
*/
@ApiModelProperty
(
notes
=
"驻点联系电话"
)
private
String
residentPhone
;
/**
* 区域
*/
@ApiModelProperty
(
notes
=
"区域"
)
private
Byte
areaCode
;
/**
* 营业开始时间
*/
@ApiModelProperty
(
notes
=
"营业开始时间"
)
private
Date
bussinessBegintime
;
/**
* 营业结束时间
*/
@ApiModelProperty
(
notes
=
"营业结束时间"
)
private
Date
bussinessEndtime
;
/**
* 经度
*/
@ApiModelProperty
(
notes
=
"经度"
)
private
Float
lng
;
/**
* 纬度
*/
@ApiModelProperty
(
notes
=
"纬度"
)
private
Float
lat
;
/**
* 1.草稿 2.发布 3.注销 4.过期
*/
@ApiModelProperty
(
notes
=
"保存状态 1.草稿 2.发布 3.注销 4.过期"
,
required
=
true
)
private
Byte
status
;
/**
* 有效时间
*/
@ApiModelProperty
(
notes
=
"有效时间"
,
required
=
true
)
private
Integer
effectiveTime
;
/**
* 账户类型
*/
@ApiModelProperty
(
notes
=
"账户类型"
,
required
=
true
)
private
List
<
Integer
>
accounttypeId
;
/**
* 文件数据
*/
@ApiModelProperty
(
notes
=
"文件数据"
,
required
=
true
)
private
List
<
FileSaveRequest
>
merchantFiles
;
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantSearchResquest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
com.rop.AbstractRopRequest
;
import
com.rop.RopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 11:47
*/
@Data
public
class
MerchantSearchResquest
extends
AbstractRopRequest
{
@ApiModelProperty
(
notes
=
"商户类型"
)
private
String
merchantName
;
@ApiModelProperty
(
notes
=
"账户层级"
)
private
Integer
merchant_account_level
;
@ApiModelProperty
(
notes
=
"账户状态"
)
private
Integer
status
;
@ApiModelProperty
(
notes
=
"渠道id"
)
private
Integer
channel_id
;
@ApiModelProperty
(
notes
=
"登录名"
)
private
String
merchant_login_account
;
@ApiModelProperty
(
notes
=
"账户类型"
)
private
List
<
Integer
>
accounttypeId
;
@NotNull
@ApiModelProperty
(
notes
=
"分页数"
,
required
=
true
)
private
Integer
pageSize
;
@NotNull
@ApiModelProperty
(
notes
=
"当前页"
,
required
=
true
)
private
Integer
pageNum
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantTreeRopRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树请求
* @date 2021/7/22 9:34
*/
@Data
public
class
MerchantTreeRopRequest
extends
DefaultRequest
{
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"账户类型"
,
required
=
true
)
private
List
<
AccountTypeTreeRequest
>
accountTypes
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantUpdateRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
MerchantUpdateRequest
extends
DefaultRequest
implements
Serializable
{
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
id
;
/**
* 商户名称
*/
@ApiModelProperty
(
notes
=
"商户名称"
,
required
=
true
)
private
String
merchantName
;
/**
* 商户简称
*/
@ApiModelProperty
(
notes
=
"商户简称"
)
private
String
merchantAbbreviation
;
/**
* 1.个体户 2.企业
*/
@ApiModelProperty
(
notes
=
"1.个体户 2.企业"
)
private
Byte
merchantType
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
notes
=
"组织机构代码"
)
private
String
merchantOrgcode
;
/**
* 商户地址
*/
@ApiModelProperty
(
notes
=
"商户地址"
)
private
String
merchantAddress
;
/**
* 法定联系人
*/
@ApiModelProperty
(
notes
=
"法定联系人"
)
private
String
merchantLegalPerson
;
/**
* 联系电话
*/
@ApiModelProperty
(
notes
=
"联系电话"
,
required
=
true
)
private
String
merchantLegalPersonPhone
;
/**
* 电话是否可作为登录名
*/
@ApiModelProperty
(
notes
=
"电话是否可作为登录名(1.是 0.否)"
,
required
=
true
)
private
Byte
isloginName
;
/**
* 营业范围
*/
@ApiModelProperty
(
notes
=
"营业范围"
,
required
=
true
)
private
Byte
businessScope
;
/**
* 品牌
*/
@ApiModelProperty
(
notes
=
"品牌"
,
required
=
true
)
private
Byte
merchantBrand
;
/**
* 登录账户
*/
@ApiModelProperty
(
notes
=
"登录账户"
,
required
=
true
)
private
String
merchantLoginAccount
;
/**
* 登录密码
*/
@ApiModelProperty
(
notes
=
"登录密码"
,
required
=
true
)
private
String
merchantLoginPassword
;
/**
* 渠道id
*/
@ApiModelProperty
(
notes
=
"渠道id"
,
required
=
true
)
private
Integer
channelId
;
/**
* 驻点联系人
*/
@ApiModelProperty
(
notes
=
"驻点联系人"
)
private
String
residentContact
;
/**
* 驻点联系电话
*/
@ApiModelProperty
(
notes
=
"驻点联系电话"
)
private
String
residentPhone
;
/**
* 商户标签
*/
@ApiModelProperty
(
notes
=
"商户标签"
)
private
Byte
merchantLabel
;
/**
* 区域
*/
@ApiModelProperty
(
notes
=
"区域"
)
private
Byte
areaCode
;
/**
* 营业开始时间
*/
@ApiModelProperty
(
notes
=
"营业开始时间"
)
private
Date
bussinessBegintime
;
/**
* 营业结束时间
*/
@ApiModelProperty
(
notes
=
"营业结束时间"
)
private
Date
bussinessEndtime
;
/**
* 1.草稿 2.发布 3.注销 4.过期
*/
@ApiModelProperty
(
notes
=
"保存状态 1.草稿 2.发布 3.注销 4.过期"
,
required
=
true
)
private
Byte
status
;
/**
* 有效时间,单位天
*/
@ApiModelProperty
(
notes
=
"保存状态 1.草稿 2.发布 3.注销 4.过期"
,
required
=
true
)
private
Integer
effectiveTime
;
/**
* 账户类型
*/
@ApiModelProperty
(
notes
=
"账户类型"
,
required
=
true
)
private
List
<
Integer
>
accounttypeId
;
/**
* 文件数据
*/
@ApiModelProperty
(
notes
=
"文件数据"
,
required
=
true
)
private
List
<
FileSaveRequest
>
merchantFiles
;
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/merchant/ProductTreeRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品树
* @date 2021/7/22 9:39
*/
@Data
public
class
ProductTreeRequest
{
@ApiModelProperty
(
notes
=
"产品id"
,
required
=
true
)
private
Integer
productId
;
@ApiModelProperty
(
notes
=
"菜单id"
,
required
=
true
)
private
List
<
Integer
>
menuIds
;
@ApiModelProperty
(
notes
=
"功能"
,
required
=
true
)
private
List
<
FunctionTreeRequest
>
functionIds
;
}
src/main/java/cn/com/glsx/merchants/request/staff/MerchantUserRopRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 13:59
*/
@Data
public
class
MerchantUserRopRequest
{
/**
* 用户名
*/
@ApiModelProperty
(
notes
=
"用户名"
,
required
=
true
)
private
String
loginAccout
;
/**
* 密码
*/
@ApiModelProperty
(
notes
=
"密码"
,
required
=
true
)
private
String
loginPassword
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffDeleteRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public
class
StaffDeleteRequest
extends
DefaultRequest
{
/**
* id
*/
@ApiModelProperty
(
notes
=
"员工id"
,
required
=
true
)
private
Integer
id
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 14:50
*/
@Data
public
class
StaffListRequest
extends
AbstractRopRequest
{
/**
* 商户id
*/
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
merchantId
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffPageRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 14:57
*/
@Data
public
class
StaffPageRequest
extends
AbstractRopRequest
{
@ApiModelProperty
(
notes
=
"员工状态"
)
private
Integer
status
;
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
staffName
;
@ApiModelProperty
(
notes
=
"商户id"
)
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"创建人"
)
private
String
createdAccount
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffSaveRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public
class
StaffSaveRequest
extends
DefaultRequest
{
/**
* 员工姓名
*/
@ApiModelProperty
(
notes
=
"员工姓名"
,
required
=
true
)
private
String
staffName
;
/**
* 职务
*/
@ApiModelProperty
(
notes
=
"职务"
,
required
=
true
)
private
String
staffJob
;
/**
* 手机号
*/
@ApiModelProperty
(
notes
=
"手机号"
,
required
=
true
)
private
String
staffPhone
;
/**
* 商户id
*/
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
merchantId
;
/**
* 邮箱
*/
@ApiModelProperty
(
notes
=
"邮箱"
,
required
=
true
)
private
String
staffEmail
;
/**
* 角色id
*/
@ApiModelProperty
(
notes
=
"角色id"
,
required
=
true
)
private
List
<
Integer
>
roleIds
;
@ApiModelProperty
(
notes
=
"头像"
,
required
=
true
)
private
FileSaveRequest
merchantFileRequest
;
@ApiModelProperty
(
notes
=
"用户信息"
,
required
=
true
)
private
MerchantUserRopRequest
merchantUserRequest
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffSearchRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description:
* @date 2021/7/22 14:50
*/
@Data
public
class
StaffSearchRequest
extends
AbstractRopRequest
{
/**
* id
*/
@ApiModelProperty
(
notes
=
"员工id"
,
required
=
true
)
private
Integer
id
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffUpdateRequest.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public
class
StaffUpdateRequest
extends
DefaultRequest
{
/**
* 员工姓名
*/
@ApiModelProperty
(
notes
=
"员工姓名"
,
required
=
true
)
private
String
staffName
;
/**
* id
*/
@ApiModelProperty
(
notes
=
"员工id"
,
required
=
true
)
private
Integer
id
;
/**
* 职务
*/
@ApiModelProperty
(
notes
=
"职务"
,
required
=
true
)
private
String
staffJob
;
/**
* 手机号
*/
@ApiModelProperty
(
notes
=
"手机号"
,
required
=
true
)
private
String
staffPhone
;
/**
* 商户id
*/
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
private
Integer
merchantId
;
/**
* 邮箱
*/
@ApiModelProperty
(
notes
=
"邮箱"
,
required
=
true
)
private
String
staffEmail
;
/**
* 角色id
*/
@ApiModelProperty
(
notes
=
"角色id"
,
required
=
true
)
private
List
<
Integer
>
roleIds
;
@ApiModelProperty
(
notes
=
"头像"
,
required
=
true
)
private
FileSaveRequest
merchantFileRequest
;
@ApiModelProperty
(
notes
=
"用户信息"
,
required
=
true
)
private
MerchantUserRopRequest
merchantUserRequest
;
}
src/main/java/cn/com/glsx/merchants/response/AccountTypeTreeRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
cn.com.glsx.merchants.model.response.ProductTreeResponse
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型
* @date 2021/7/22 9:38
*/
@Data
public
class
AccountTypeTreeRopResponse
{
@ApiModelProperty
(
name
=
"accountTypeId"
,
notes
=
"账户类型id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
,
value
=
"账户类型id"
)
private
Integer
accountTypeId
;
@ApiModelProperty
(
name
=
"products"
,
notes
=
"产品"
,
dataType
=
"List"
,
required
=
true
,
example
=
"1"
,
value
=
"产品"
)
private
List
<
ProductTreeRopResponse
>
products
;
}
src/main/java/cn/com/glsx/merchants/response/FunctionTreeRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能
* @date 2021/7/22 9:41
*/
@Data
public
class
FunctionTreeRopResponse
{
@ApiModelProperty
(
name
=
"functionvalue"
,
notes
=
"功能值"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
,
value
=
"产品id"
)
private
String
functionvalue
;
@ApiModelProperty
(
name
=
"functionId"
,
notes
=
"功能id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
,
value
=
"功能id"
)
private
Integer
functionId
;
@ApiModelProperty
(
name
=
"mendId"
,
notes
=
"父菜单id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
,
value
=
"父菜单id"
)
private
Integer
mendId
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
cn.com.glsx.merchants.model.response.AccountTypeTreeResponse
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
MerchantRopResponse
implements
Serializable
{
@ApiModelProperty
(
name
=
"id"
,
notes
=
"商户id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
,
value
=
"商户id"
)
private
Integer
id
;
/**
* 商户名称
*/
@ApiModelProperty
(
name
=
"id"
,
notes
=
"商户名称"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
,
value
=
"商户id"
)
private
String
merchantName
;
/**
* 商户简称
*/
@ApiModelProperty
(
name
=
"merchantAbbreviation"
,
notes
=
"商户简称"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
,
value
=
"商户简称"
)
private
String
merchantAbbreviation
;
/**
* 1.个体户 2.企业
*/
@ApiModelProperty
(
name
=
"merchantType"
,
notes
=
"1.个体户 2.企业"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Byte
merchantType
;
/**
* 组织机构代码
*/
@ApiModelProperty
(
name
=
"merchantOrgcode"
,
notes
=
"组织机构代码"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantOrgcode
;
/**
* 商户地址
*/
@ApiModelProperty
(
name
=
"merchantAddress"
,
notes
=
"商户地址"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantAddress
;
/**
* 法定联系人
*/
@ApiModelProperty
(
name
=
"merchantLegalPerson"
,
notes
=
"法定联系人"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantLegalPerson
;
/**
* 联系电话
*/
@ApiModelProperty
(
name
=
"merchantLegalPersonPhone"
,
notes
=
"联系电话"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantLegalPersonPhone
;
/**
* 电话是否可作为登录名
*/
@ApiModelProperty
(
name
=
"isloginName"
,
notes
=
"电话是否可作为登录名"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Byte
isloginName
;
/**
* 营业范围
*/
@ApiModelProperty
(
name
=
"businessScope"
,
notes
=
"营业范围"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
businessScope
;
/**
* 品牌
*/
@ApiModelProperty
(
name
=
"merchantBrand"
,
notes
=
"品牌"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantBrand
;
/**
* 登录账户
*/
@ApiModelProperty
(
name
=
"merchantLoginAccount"
,
notes
=
"登录账户"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
merchantLoginAccount
;
/**
* 1.工厂 2.省代 3.市代 4.门店
*/
@ApiModelProperty
(
name
=
"merchantAccountLevel"
,
notes
=
"账户层级"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Byte
merchantAccountLevel
;
/**
* 创建人
*/
@ApiModelProperty
(
name
=
"createdBy"
,
notes
=
"创建人"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
createdBy
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"createdTime"
,
notes
=
"创建时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
private
Date
createdTime
;
/**
* 渠道id
*/
@ApiModelProperty
(
name
=
"channelId"
,
notes
=
"渠道id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Integer
channelId
;
/**
* 驻点联系人
*/
@ApiModelProperty
(
name
=
"residentContact"
,
notes
=
"驻点联系人"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
residentContact
;
/**
* 驻点联系电话
*/
@ApiModelProperty
(
name
=
"residentPhone"
,
notes
=
"驻点联系电话"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
residentPhone
;
/**
* 区域
*/
@ApiModelProperty
(
name
=
"areaCode"
,
notes
=
"区域"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Byte
areaCode
;
/**
* 营业开始时间
*/
@ApiModelProperty
(
name
=
"bussinessBegintime"
,
notes
=
"营业开始时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
private
Date
bussinessBegintime
;
/**
* 营业结束时间
*/
@ApiModelProperty
(
name
=
"bussinessEndtime"
,
notes
=
"营业结束时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
private
Date
bussinessEndtime
;
/**
* 商户过期时间
*/
@ApiModelProperty
(
name
=
"expireDate"
,
notes
=
"商户过期时间"
,
dataType
=
"Date"
,
required
=
true
,
example
=
"1"
)
private
Date
expireDate
;
/**
* 1.草稿 2.发布 3.注销 4.过期
*/
@ApiModelProperty
(
name
=
"status"
,
notes
=
"商户状态"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
)
private
Byte
status
;
/**
* 渠道名称
*/
@ApiModelProperty
(
name
=
"accountTypeNames"
,
notes
=
"渠道名称"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
accountTypeNames
;
/**
* 父商户
*/
@ApiModelProperty
(
name
=
"status"
,
notes
=
"父商户"
,
dataType
=
"String"
,
required
=
true
,
example
=
"1"
)
private
String
parentMerchant
;
/**
* 关联关系
*/
private
List
<
AccountTypeTreeRopResponse
>
accountTypes
;
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/response/MerchantTreeRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
cn.com.glsx.merchants.model.response.MerchantTreeResponse
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public
class
MerchantTreeRopResponse
{
private
Integer
id
;
private
String
labal
;
private
List
<
MerchantTreeResponse
>
children
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantUserRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 返回用户体
* @date 2021/7/22 14:42
*/
@Data
public
class
MerchantUserRopResponse
{
/**
* 用户名
*/
@ApiModelProperty
(
name
=
"loginAccout"
,
notes
=
"用户名"
,
dataType
=
"String"
)
private
String
loginAccout
;
/**
* 密码
*/
@ApiModelProperty
(
name
=
"loginPassword"
,
notes
=
"密码"
,
dataType
=
"String"
)
private
String
loginPassword
;
}
src/main/java/cn/com/glsx/merchants/response/ProductTreeRopResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
cn.com.glsx.merchants.model.response.FunctionTreeResponse
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品树
* @date 2021/7/22 9:39
*/
@Data
public
class
ProductTreeRopResponse
{
@ApiModelProperty
(
name
=
"productId"
,
notes
=
"产品id"
,
dataType
=
"Integer"
,
required
=
true
,
example
=
"1"
,
value
=
"产品id"
)
private
Integer
productId
;
@ApiModelProperty
(
name
=
"menuIds"
,
notes
=
"菜单id"
,
dataType
=
"List"
,
required
=
true
,
value
=
"菜单id"
)
private
List
<
Integer
>
menuIds
;
@ApiModelProperty
(
name
=
"functionIds"
,
notes
=
"功能"
,
dataType
=
"Object"
,
required
=
true
,
value
=
"功能"
)
private
List
<
FunctionTreeRopResponse
>
functionIds
;
}
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
StaffResponse
implements
Serializable
{
@ApiModelProperty
(
name
=
"id"
,
notes
=
"员工id"
,
dataType
=
"Integer"
)
private
Integer
id
;
/**
* 员工姓名
*/
@ApiModelProperty
(
name
=
"staffName"
,
notes
=
"员工姓名"
,
dataType
=
"String"
)
private
String
staffName
;
/**
* 职务
*/
@ApiModelProperty
(
name
=
"staffJob"
,
notes
=
"职务"
,
dataType
=
"String"
)
private
String
staffJob
;
/**
* 手机号
*/
@ApiModelProperty
(
name
=
"staffPhone"
,
notes
=
"手机号"
,
dataType
=
"String"
)
private
String
staffPhone
;
/**
* 可见下级商户id
*/
@ApiModelProperty
(
name
=
"visibleInferiorMer"
,
notes
=
"可见下级商户id"
,
dataType
=
"String"
)
private
String
visibleInferiorMer
;
/**
* 创建人
*/
@ApiModelProperty
(
name
=
"createdBy"
,
notes
=
"可见下级商户id"
,
dataType
=
"Integer"
)
private
Integer
createdBy
;
/**
* 创建时间
*/
@ApiModelProperty
(
name
=
"createdTime"
,
notes
=
"创建时间"
,
dataType
=
"Date"
)
private
Date
createdTime
;
/**
* 商户id
*/
@ApiModelProperty
(
name
=
"merchantId"
,
notes
=
"商户id"
,
dataType
=
"Integer"
)
private
Integer
merchantId
;
/**
* 邮箱
*/
@ApiModelProperty
(
name
=
"staffEmail"
,
notes
=
"邮箱"
,
dataType
=
"String"
)
private
String
staffEmail
;
/**
* 员工编码
*/
@ApiModelProperty
(
name
=
"staffCode"
,
notes
=
"员工编码"
,
dataType
=
"String"
)
private
String
staffCode
;
/**
* 创建账户
*/
@ApiModelProperty
(
name
=
"createdAccount"
,
notes
=
"创建账户"
,
dataType
=
"String"
)
private
String
createdAccount
;
/**
* 员工状态
*/
@ApiModelProperty
(
name
=
"statusName"
,
notes
=
"员工状态"
,
dataType
=
"String"
)
private
String
statusName
;
/**
* 角色id
*/
@ApiModelProperty
(
name
=
"roleIds"
,
notes
=
"角色id"
,
dataType
=
"List"
)
private
List
<
Integer
>
roleIds
;
/**
* 文件
*/
private
FileResponse
merchantFileResponse
;
/**
* 账号
*/
private
MerchantUserRopResponse
merchantUserResponse
;
}
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/service/MerchantService.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
service
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.model.request.MerchantProductRequest
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
cn.com.glsx.merchants.model.request.MerchantTreeRequest
;
import
cn.com.glsx.merchants.model.response.AccountTypeTreeResponse
;
import
cn.com.glsx.merchants.model.response.MerchantProductResponse
;
import
cn.com.glsx.merchants.model.response.MerchantResponse
;
import
cn.com.glsx.merchants.model.response.MerchantTreeResponse
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
cn.com.glsx.merchants.request.merchant.*
;
import
cn.com.glsx.merchants.response.*
;
import
cn.com.glsx.merchants.util.Pagination
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户服务
* @date 2021/7/21 17:06
*/
@Service
public
class
MerchantService
{
@Autowired
private
MerchantRemote
merchantRemote
;
@Autowired
private
MerchantUserService
merchantUserService
;
/**
* 保存商户
*
* @param merchantSaveRequest 入参
*/
public
void
saveMerchant
(
MerchantSaveRequest
merchantSaveRequest
)
{
merchantUserService
.
setUser
(
merchantSaveRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
saveMerchantRemote
(
ConvertRequest
.
converRequest
(
merchantSaveRequest
,
new
MerchantRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 更新商户
*
* @param merchantUpdateRequest 入参
*/
public
void
updateMerchant
(
MerchantUpdateRequest
merchantUpdateRequest
)
{
merchantUserService
.
setUser
(
merchantUpdateRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
saveMerchantRemote
(
ConvertRequest
.
converRequest
(
merchantUpdateRequest
,
new
MerchantRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 保存商户权限喜喜
*
* @param merchantTreeRequest 入参
*/
public
void
savePermissions
(
MerchantTreeRopRequest
merchantTreeRequest
)
{
MerchantTreeRequest
merchantTreeRequest1
=
ConvertRequest
.
converRequest
(
merchantTreeRequest
,
new
MerchantTreeRequest
());
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
savePermissionsRemote
(
merchantTreeRequest1
);
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 更新商户权限
*
* @param merchantTreeRequest 入参
*/
public
void
updatePermissions
(
MerchantTreeRopRequest
merchantTreeRequest
)
{
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
updatePermissionsRemote
(
ConvertRequest
.
converRequest
(
merchantTreeRequest
,
new
MerchantTreeRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 查询商户详情
*
* @param merchantDetailRequest
* @return
*/
public
MerchantRopResponse
findMerchantDetail
(
MerchantDetailRequest
merchantDetailRequest
)
{
RpcResponse
<
MerchantResponse
>
merchantDetailRemote
=
merchantRemote
.
findMerchantDetailRemote
(
ConvertRequest
.
converRequest
(
merchantDetailRequest
,
new
MerchantRequest
()));
if
(
merchantDetailRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertObject
(
merchantDetailRemote
.
getResult
(),
MerchantRopResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantDetailRemote
.
getException
().
getErrId
(),
merchantDetailRemote
.
getMessage
());
}
/**
* 查询商户树
*
* @param merchantDetailRequest 入参
* @return
*/
public
List
<
MerchantTreeRopResponse
>
findMerchantTree
(
MerchantDetailRequest
merchantDetailRequest
)
{
RpcResponse
<
List
<
MerchantTreeResponse
>>
merchantDetailRemote
=
merchantRemote
.
findMerchantTreeRemote
(
ConvertRequest
.
converRequest
(
merchantDetailRequest
,
new
MerchantRequest
()));
if
(
merchantDetailRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
merchantDetailRemote
.
getResult
(),
MerchantTreeRopResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantDetailRemote
.
getException
().
getErrId
(),
merchantDetailRemote
.
getMessage
());
}
/**
* 查询商户的菜单权限
*
* @param merchantDetailRequest 入参
* @return
*/
public
List
<
AccountTypeTreeRopResponse
>
findPermissionsByMerId
(
MerchantDetailRequest
merchantDetailRequest
)
{
RpcResponse
<
List
<
AccountTypeTreeResponse
>>
merchantDetailRemote
=
merchantRemote
.
findPermissionsByMerId
(
merchantDetailRequest
.
getId
());
if
(
merchantDetailRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
merchantDetailRemote
.
getResult
(),
AccountTypeTreeRopResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantDetailRemote
.
getException
().
getErrId
(),
merchantDetailRemote
.
getMessage
());
}
/**
* 更新商户的有效期
*
* @param merchantDetailRequest 入参
* @return
*/
public
void
updateValPerByMerId
(
MerchantDetailRequest
merchantDetailRequest
)
{
merchantUserService
.
setUser
(
merchantDetailRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantRemote
.
saveMerchantRemote
(
ConvertRequest
.
converRequest
(
merchantDetailRequest
,
new
MerchantRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 查询商户的列表
*
* @param merchantSearchResquest 入参
* @return
*/
public
Pagination
<
MerchantRopResponse
>
findMerchantByPage
(
MerchantSearchResquest
merchantSearchResquest
)
{
RpcResponse
<
RpcPagination
<
MerchantResponse
>>
merProductByPageRemote
=
merchantRemote
.
findMerchantByPageRemote
(
ConvertRequest
.
convertPage
(
merchantSearchResquest
,
new
MerchantRequest
()));
if
(
merProductByPageRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertPage
(
merProductByPageRemote
.
getResult
(),
MerchantRopResponse
.
class
);
}
throw
new
RpcServiceException
(
merProductByPageRemote
.
getException
().
getErrId
(),
merProductByPageRemote
.
getMessage
());
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantUserService.java
View file @
d8dc4c8
...
@@ -36,7 +36,10 @@ public class MerchantUserService {
...
@@ -36,7 +36,10 @@ public class MerchantUserService {
user
.
setUsername
((
String
)
session
.
getAttribute
(
Contants
.
USER_ACCOUNT
));
user
.
setUsername
((
String
)
session
.
getAttribute
(
Contants
.
USER_ACCOUNT
));
user
.
setId
((
Integer
)
session
.
getAttribute
(
Contants
.
USER_ID
));
user
.
setId
((
Integer
)
session
.
getAttribute
(
Contants
.
USER_ID
));
}
else
{
}
else
{
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
);
user
=
new
User
();
user
.
setId
(
1
);
user
.
setUsername
(
"admin"
);
//throw new RpcServiceException(DefaultErrorEnum.SERVER_ERROR);
}
}
}
}
return
user
;
return
user
;
...
@@ -54,12 +57,19 @@ public class MerchantUserService {
...
@@ -54,12 +57,19 @@ public class MerchantUserService {
Class
superclass
=
userCla
.
getSuperclass
();
Class
superclass
=
userCla
.
getSuperclass
();
Field
field
=
superclass
.
getDeclaredField
(
"createdBy"
);
Field
field
=
superclass
.
getDeclaredField
(
"createdBy"
);
Field
field1
=
superclass
.
getDeclaredField
(
"createdAccount"
);
Field
field1
=
superclass
.
getDeclaredField
(
"createdAccount"
);
Field
field2
=
superclass
.
getDeclaredField
(
"updatedBy"
);
Field
field3
=
superclass
.
getDeclaredField
(
"updatedAccount"
);
field
.
setAccessible
(
true
);
field
.
setAccessible
(
true
);
field
.
set
(
object
,
user
.
getId
());
field
.
set
(
object
,
user
.
getId
());
field3
.
setAccessible
(
true
);
field3
.
set
(
object
,
user
.
getUsername
());
field1
.
setAccessible
(
true
);
field1
.
setAccessible
(
true
);
field1
.
set
(
object
,
user
.
getUsername
());
field1
.
set
(
object
,
user
.
getUsername
());
field2
.
setAccessible
(
true
);
field2
.
set
(
object
,
user
.
getId
());
}
catch
(
NoSuchFieldException
|
IllegalAccessException
e
)
{
}
catch
(
NoSuchFieldException
|
IllegalAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
);
}
}
}
}
...
...
src/main/java/cn/com/glsx/merchants/service/StaffService.java
0 → 100644
View file @
d8dc4c8
package
cn
.
com
.
glsx
.
merchants
.
service
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.model.request.MerchantRequest
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.response.MerchantResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.request.staff.*
;
import
cn.com.glsx.merchants.response.MerchantRopResponse
;
import
cn.com.glsx.merchants.response.StaffResponse
;
import
cn.com.glsx.merchants.util.Pagination
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author zhouhaibao
* @version 1.0
* @description: 员工服务
* @date 2021/7/22 14:04
*/
@Service
@Slf4j
public
class
StaffService
{
@Autowired
private
MerchantStaffRemote
merchantStaffRemote
;
@Autowired
private
MerchantUserService
merchantUserService
;
/**
* 保存员工
*
* @param staffSaveRequest 入参
*/
public
void
saveStaff
(
StaffSaveRequest
staffSaveRequest
)
{
merchantUserService
.
setUser
(
staffSaveRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantStaffRemote
.
saveStaffRemote
(
ConvertRequest
.
converRequest
(
staffSaveRequest
,
new
MerchantStaffRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 更新员工
*
* @param staffUpdateRequest 入参
*/
public
void
updateStaff
(
StaffUpdateRequest
staffUpdateRequest
)
{
merchantUserService
.
setUser
(
staffUpdateRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantStaffRemote
.
updateStaffRemote
(
ConvertRequest
.
converRequest
(
staffUpdateRequest
,
new
MerchantStaffRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 删除员工
*
* @param staffDeleteRequest 入参
*/
public
void
deleteStaff
(
StaffDeleteRequest
staffDeleteRequest
)
{
merchantUserService
.
setUser
(
staffDeleteRequest
);
RpcResponse
<
Boolean
>
booleanRpcResponse
=
merchantStaffRemote
.
updateStaffRemote
(
ConvertRequest
.
converRequest
(
staffDeleteRequest
,
new
MerchantStaffRequest
()));
if
(
booleanRpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
/**
* 查询员工详情
*
* @param staffSearchRequest 入参
*/
public
StaffResponse
findMerchantStaffDetail
(
StaffSearchRequest
staffSearchRequest
)
{
RpcResponse
<
MerchantStaffResponse
>
merchantDetailRemote
=
merchantStaffRemote
.
findMerchantStaffDetailRemote
(
ConvertRequest
.
converRequest
(
staffSearchRequest
,
new
MerchantStaffRequest
()));
if
(
merchantDetailRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertObject
(
merchantDetailRemote
.
getResult
(),
StaffResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantDetailRemote
.
getException
().
getErrId
(),
merchantDetailRemote
.
getMessage
());
}
/**
* 根据条件查询员工
*
* @param staffListRequest 入参
*/
public
List
<
StaffResponse
>
findMerchantStaffList
(
StaffListRequest
staffListRequest
)
{
RpcResponse
<
List
<
MerchantStaffResponse
>>
merchantDetailRemote
=
merchantStaffRemote
.
findMerchantStaffListRemote
(
ConvertRequest
.
converRequest
(
staffListRequest
,
new
MerchantStaffRequest
()));
if
(
merchantDetailRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
merchantDetailRemote
.
getResult
(),
StaffResponse
.
class
);
}
throw
new
RpcServiceException
(
merchantDetailRemote
.
getException
().
getErrId
(),
merchantDetailRemote
.
getMessage
());
}
/**
* 根据员工分页列表
*
* @param staffPageRequest 入参
*/
public
Pagination
<
StaffResponse
>
findStaffByPage
(
StaffPageRequest
staffPageRequest
)
{
RpcResponse
<
RpcPagination
<
MerchantStaffResponse
>>
staffByPageRemote
=
merchantStaffRemote
.
findStaffByPageRemote
(
ConvertRequest
.
convertPage
(
staffPageRequest
,
new
MerchantStaffRequest
()));
if
(
staffByPageRemote
.
isSuccess
())
{
return
ConvertResponse
.
convertPage
(
staffByPageRemote
.
getResult
(),
StaffResponse
.
class
);
}
throw
new
RpcServiceException
(
staffByPageRemote
.
getException
().
getErrId
(),
staffByPageRemote
.
getMessage
());
}
}
src/main/resources/config/application.properties
View file @
d8dc4c8
server.port
=
808
0
server.port
=
808
2
server.servlet.context-
path
=
/gop-merchants
server.servlet.context-
path
=
/gop-merchants
server.servlet.application-display-
name
=
gop-merchants
server.servlet.application-display-
name
=
gop-merchants
...
@@ -9,71 +9,6 @@ logging.level.root=INFO
...
@@ -9,71 +9,6 @@ logging.level.root=INFO
ore.starter.class-
name
=
Main
ore.starter.class-
name
=
Main
# diamond config
# diamond config
ore.diamond.group
=
diamond group
ore.diamond.group
=
common-service
ore.diamond.dataId
=
g
op-merchants
ore.diamond.dataId
=
r
op-merchants
ore.diamond.env
=
release
ore.diamond.env
=
release
ore.dubbo.application.name
=
gop-merchants
# dubbo应用所有者
ore.dubbo.application.owner
=
zhouhb
# dubbo服务注册地址
ore.dubbo.registry.address
=
zookeeper://192.168.3.206:2181
# dubbo服务注册超时时间
ore.dubbo.registry.timeout
=
30000
# 默认协议:dubbo
ore.dubbo.protocol.name
=
dubbo
# dubbo服务扫描包路径
ore.dubbo.scan
=
cn.com.glsx.merchants
# dubbo服务监控
ore.dubbo.monitor.protocol
=
registry
# dubbo服务统计
ore.dubbo.consumer.filter
=
metrics
ore.rop.annotation-driven.sign-
enable
=
true
ore.rop.annotation-driven.ext-error-base-
name
=
i18n/rop/sampleRopError
ore.rop.annotation-driven.core-pool-
size
=
200
ore.rop.annotation-driven.max-pool-
size
=
500
ore.rop.annotation-driven.keep-alive-
seconds
=
300
ore.rop.annotation-driven.queue-
capacity
=
50
ore.rop.annotation-driven.service-timeout-
seconds
=
120
# 文件上传大小限制
ore.rop.annotation-driven.upload-file-max-
size
=
9999999
# 文件上传支持的文件格式
ore.rop.annotation-driven.upload-file-
types
=
png,gif,jpg
# rop 系统参数配置
ore.rop.sysparams.appkey-param-
name
=
appKey
ore.rop.sysparams.sessionid-param-
name
=
sessionId
ore.rop.sysparams.method-param-
name
=
method
ore.rop.sysparams.version-param-
name
=
v
ore.rop.sysparams.format-param-
name
=
format
ore.rop.sysparams.locale-param-
name
=
locale
ore.rop.sysparams.sign-param-
name
=
sign
ore.rop.sysparams.jsonp-param-
name
=
jsonp
# 是否启用swagger-rop,默认为true(生产环境不开启)
swagger.rop.enable
=
true
# rop 接口 appKey,默认48e5e13229b82c1b4e6e8c96151f0637
swagger.rop.appKey
=
48e5e13229b82c1b4e6e8c96151f0637
# rop 接口 secret,默认c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
swagger.rop.secret
=
c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
# rop 秘钥对(appKey=secret)
48e5e13229b82c1b4e6e8c96151f0637
=
c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
ore.redis.hostName
=
192.168.3.207
ore.redis.port
=
6379
ore.redis.password
=
ore.redis.pool.maxActive=600
ore.redis.pool.maxWait
=
10000
ore.redis.pool.maxTotal
=
300
ore.redis.pool.maxIdle
=
300
ore.redis.pool.minIdle
=
0
ore.redis.timeout
=
30000
# 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
ore.redis.betweenEvictionRunsMillis
=
30000
ore.rop.cas.server-
url
=
http://cas.dev.glsx.net/cas
Write
Preview
Markdown
is supported
Attach a file
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 post a comment