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
QianQiXiang
haoban-manage3.0
Commits
a22639d5
Commit
a22639d5
authored
Jun 01, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索成员账号
parent
e19520c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
22 deletions
+84
-22
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+36
-22
ClerkInfoVo.java
...c/main/java/com/gic/haoban/manage/web/vo/ClerkInfoVo.java
+47
-0
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+1
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
a22639d5
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.Cookie
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.service.*
;
import
org.apache.commons.collections.CollectionUtils
;
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
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkNewService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.web.auth.AuthRequestUtil
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.StaffEditJsonQO
;
import
com.gic.haoban.manage.web.vo.ClerkInfoVo
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
import
com.gic.haoban.manage.web.vo.StaffVO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
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.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@RestController
...
...
@@ -55,6 +54,9 @@ public class StaffController extends WebBaseController{
private
WxApplicationApiService
wxApplicationApiService
;
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
ClerkNewService
clerkNewService
;
@Autowired
private
StoreService
storeService
;
...
...
@@ -298,12 +300,24 @@ public class StaffController extends WebBaseController{
if
(
CollectionUtil
.
isEmpty
(
list
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
}
List
<
String
>
enterpriseIds
=
list
.
stream
().
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
List
<
ClerkDTO
>
clerkDTOList
=
clerkNewService
.
listClerkByEnterpriseIdAndSearch
(
enterpriseIds
,
search
);
List
<
ClerkInfoVo
>
retList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkInfoVo
.
class
,
clerkDTOList
);
if
(
CollectionUtils
.
isNotEmpty
(
retList
))
{
List
<
String
>
clerkIds
=
retList
.
stream
().
map
(
ClerkInfoVo:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
StaffClerkRelationDTO
>
dtos
=
staffClerkRelationApiService
.
listByClerkIds
(
clerkIds
);
if
(
CollectionUtils
.
isNotEmpty
(
dtos
))
{
List
<
String
>
hasRelationClerkIds
=
dtos
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
retList
.
forEach
(
clerkInfoVo
->
{
if
(
hasRelationClerkIds
.
contains
(
clerkInfoVo
.
getClerkId
()))
{
clerkInfoVo
.
setRelationStatus
(
1
);
}
});
}
List
<
String
>
phoneList
=
clerkService
.
queryClerkEnterpriseByPhoneNumber
(
search
);
if
(
CollectionUtils
.
isNotEmpty
(
phoneList
))
{
// clerkService.
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
retList
);
//todo 还没好
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/ClerkInfoVo.java
0 → 100644
View file @
a22639d5
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
/**
* Created 2020/6/1.
*
* @author hua
*/
public
class
ClerkInfoVo
implements
Serializable
{
private
String
clerkName
;
private
String
clerkCode
;
private
String
clerkId
;
private
Integer
relationStatus
=
0
;
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getClerkCode
()
{
return
clerkCode
;
}
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
Integer
getRelationStatus
()
{
return
relationStatus
;
}
public
void
setRelationStatus
(
Integer
relationStatus
)
{
this
.
relationStatus
=
relationStatus
;
}
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
a22639d5
...
...
@@ -37,6 +37,7 @@
timeout=
"20000"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.ClerkService"
id=
"clerkService"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.ClerkNewService"
id=
"clerkNewService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
id=
"staffDepartmentRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxCorpApiService"
id=
"qywxCorpApiService"
/>
...
...
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