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
941436ef
Commit
941436ef
authored
Mar 17, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增是否能查询客户详情接口
parent
48f6e5a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
2 deletions
+61
-2
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+61
-2
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
941436ef
...
@@ -11,7 +11,8 @@ import com.gic.dict.api.service.ManagerDictService;
...
@@ -11,7 +11,8 @@ import com.gic.dict.api.service.ManagerDictService;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.app.customer.dto.StaffOpenRelatedDTO
;
import
com.gic.haoban.app.customer.dto.*
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.app.customer.service.api.service.StaffMemberRelationApiService
;
import
com.gic.haoban.app.customer.service.api.service.StaffMemberRelationApiService
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
...
@@ -91,6 +92,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -91,6 +92,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
private
WxApplicationApiService
wxApplicationApiService
;
private
WxApplicationApiService
wxApplicationApiService
;
@Autowired
@Autowired
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
@Autowired
private
CustomerApiService
customerApiService
;
/**
/**
...
@@ -382,6 +385,62 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -382,6 +385,62 @@ public class WxEnterpriseInfoController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
result
);
}
}
/**
* 是否能打开客户详情权限
* @param clerkId
* @param memberId
* @param storeId
* @param enterpriseId
* @return
*/
@RequestMapping
(
"get-member-clerk-flag"
)
public
HaobanResponse
getMemberFlag
(
String
clerkId
,
String
memberId
,
String
storeId
,
String
enterpriseId
)
{
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
memberId
,
storeId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
CustomerDTO
params
=
new
CustomerDTO
();
params
.
setClerkType
(
"0"
);
params
.
setStoreId
(
storeId
);
params
.
setClerkId
(
clerkId
);
params
.
setEnterpriseId
(
enterpriseId
);
params
.
setStoreManagerFlag
(
isManager
(
clerkId
));
MemberInfoListParamsDTO
memberInfoListParamsDTO
=
new
MemberInfoListParamsDTO
();
memberInfoListParamsDTO
.
setMemberId
(
memberId
);
FilterListDTO
filterListDTO
=
new
FilterListDTO
();
filterListDTO
.
setFilterType
(
"4"
);
ChildDTO
childDTO
=
new
ChildDTO
();
childDTO
.
setId
(
""
);
filterListDTO
.
setChild
(
childDTO
);
List
<
FilterListDTO
>
filterList
=
new
ArrayList
<>();
filterList
.
add
(
filterListDTO
);
memberInfoListParamsDTO
.
setFilterList
(
filterList
);
boolean
flag
=
customerApiService
.
checkMemberRangeByMemberId
(
params
,
memberInfoListParamsDTO
);
if
(
flag
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
true
);
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
false
);
}
}
/**
* 是否店长
*
* @param clerkId
* @return
*/
private
boolean
isManager
(
String
clerkId
)
{
ClerkDTO
clerkDTO
=
clerkService
.
getclerkById
(
clerkId
);
if
(
clerkDTO
!=
null
)
{
Integer
isManager
=
clerkDTO
.
getClerkType
();
return
isManager
!=
null
&&
isManager
==
1
&&
clerkDTO
.
getStatus
()
==
1
;
}
return
false
;
}
@RequestMapping
(
"get-staff-info"
)
@RequestMapping
(
"get-staff-info"
)
public
HaobanResponse
getStaffInfo
(
String
phoneNumber
)
{
public
HaobanResponse
getStaffInfo
(
String
phoneNumber
)
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
if
(
StringUtils
.
isBlank
(
phoneNumber
))
{
...
@@ -424,7 +483,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
...
@@ -424,7 +483,7 @@ public class WxEnterpriseInfoController extends WebBaseController {
logger
.
info
(
"企业不存在没有绑定,wxEnterpriseId:{}"
,
wxEnterpriseId
);
logger
.
info
(
"企业不存在没有绑定,wxEnterpriseId:{}"
,
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
return
resultResponse
(
HaoBanErrCode
.
ERR_400002
);
}
}
StaffDTO
staffDTO
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
wxUserId
,
wxEnterpriseId
);
StaffDTO
staffDTO
=
staffApiService
.
selectByUserIdAndEnterpriseId
(
wxUserId
,
wxEnterpriseId
);
if
(
staffDTO
==
null
)
{
if
(
staffDTO
==
null
)
{
logger
.
info
(
"查询到该员工,wxUserId:{}"
,
wxUserId
);
logger
.
info
(
"查询到该员工,wxUserId:{}"
,
wxUserId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_400017
);
return
resultResponse
(
HaoBanErrCode
.
ERR_400017
);
...
...
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