Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
0ff3c5be
Commit
0ff3c5be
authored
Jun 03, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secret接口更改
parent
c95a7ec2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
0 deletions
+87
-0
PayController.java
...a/com/gic/haoban/manage/web/controller/PayController.java
+87
-0
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/PayController.java
0 → 100644
View file @
0ff3c5be
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* Created 2020/6/3.
*
* @author hua
*/
@RestController
@RequestMapping
(
"/pay"
)
public
class
PayController
extends
WebBaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
PayController
.
class
);
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
WxEnterpriseApiService
wxEnterpriseApiService
;
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
/**
* 微信成员列表
* @param userId
* @param corpId
* @return
*/
@RequestMapping
(
"/wx-user-list"
)
public
HaobanResponse
enterpriseList
(
String
userId
,
String
corpId
)
{
if
(
StringUtils
.
isAnyBlank
(
userId
,
corpId
))
{
logger
.
info
(
"参数异常"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
corpId
);
if
(
enterpriseDTO
==
null
)
{
logger
.
info
(
"不存在商户"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_20001
);
}
StaffDTO
staffDTO
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
userId
,
enterpriseDTO
.
getWxEnterpriseId
());
if
(
staffDTO
==
null
)
{
logger
.
info
(
"不存在成员"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
}
List
<
StaffClerkInfoDTO
>
list
=
staffClerkRelationApiService
.
listBindDetailByStaffId
(
staffDTO
.
getStaffId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
/**
* 微信成员列表
* @param storeId
* @return
*/
@RequestMapping
(
"/store-list"
)
public
HaobanResponse
enterpriseList
(
String
storeId
)
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseApiService
.
getEnterpriseBycorpId
(
corpId
);
if
(
enterpriseDTO
==
null
)
{
logger
.
info
(
"不存在商户"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_20001
);
}
StaffDTO
staffDTO
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
userId
,
enterpriseDTO
.
getWxEnterpriseId
());
if
(
staffDTO
==
null
)
{
logger
.
info
(
"不存在成员"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_6
);
}
List
<
StaffClerkInfoDTO
>
list
=
staffClerkRelationApiService
.
listBindDetailByStaffId
(
staffDTO
.
getStaffId
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
}
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