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
1
Merge Requests
1
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
ad38d709
Commit
ad38d709
authored
Jul 21, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询有单人码的导购
parent
d0a5b5cf
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
16 deletions
+52
-16
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+2
-0
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+12
-0
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+4
-0
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+5
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+5
-0
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+9
-0
HmStoreController.java
...ic/haoban/manage/web/controller/hm/HmStoreController.java
+15
-16
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
ad38d709
...
@@ -219,5 +219,7 @@ public interface HmQrcodeApiService {
...
@@ -219,5 +219,7 @@ public interface HmQrcodeApiService {
* @throws
* @throws
*/
*/
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
;
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
;
ServiceResponse
<
List
<
String
>>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
ad38d709
...
@@ -206,5 +206,17 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -206,5 +206,17 @@ public interface TabHaobanHmQrcodeMapper {
List
<
String
>
getHmStoreForWxa
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
getHmStoreForWxa
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
/**
*
* @Title: listHasQrcodeClerk
* @Description: 返回已有单人活码的clerkId
* @author xugh
* @param enterpriseId
* @param clerkId
* @return
* @throws
*/
List
<
String
>
listHasQrcodeClerk
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkIdList"
)
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
ad38d709
...
@@ -9,6 +9,8 @@ import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
...
@@ -9,6 +9,8 @@ import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 活码(TabHaobanHmQrcode)表服务接口
* 活码(TabHaobanHmQrcode)表服务接口
...
@@ -184,4 +186,6 @@ public interface HmQrcodeService {
...
@@ -184,4 +186,6 @@ public interface HmQrcodeService {
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
);
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
ad38d709
...
@@ -179,5 +179,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -179,5 +179,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
)
;
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
)
;
}
}
@Override
public
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
{
return
this
.
tabHaobanHmQrcodeMapper
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
ad38d709
...
@@ -780,4 +780,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -780,4 +780,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
}
}
@Override
public
ServiceResponse
<
List
<
String
>>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
{
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
));
}
}
}
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
ad38d709
...
@@ -441,6 +441,15 @@
...
@@ -441,6 +441,15 @@
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.wx_enterprise_id = #{wxEnterpriseId}
and b.hm_id is null
and b.hm_id is null
</sql>
</sql>
<select
id=
"listHasQrcodeClerk"
resultType=
"String"
>
select clerk_id from tab_haoban_hm_qrcode where enterprise_id=#{enterpriseId}
and clerk_id in
<foreach
collection=
"clerkIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
and hm_type = 1 and status_flag in (1,3)
</select>
</mapper>
</mapper>
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmStoreController.java
View file @
ad38d709
...
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkStoreListDTO
;
import
com.gic.clerk.api.dto.ClerkStoreListDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
...
@@ -31,7 +32,6 @@ import com.gic.enterprise.api.service.StoreService;
...
@@ -31,7 +32,6 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeListDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
...
@@ -72,6 +72,7 @@ public class HmStoreController {
...
@@ -72,6 +72,7 @@ public class HmStoreController {
@ResponseBody
@ResponseBody
public
RestResponse
<
Object
>
listStoreClerk
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
listStoreClerk
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
// 分组id
// 分组id
String
storeGroupId
=
request
.
getParameter
(
"storeGroupId"
);
String
storeGroupId
=
request
.
getParameter
(
"storeGroupId"
);
...
@@ -80,7 +81,7 @@ public class HmStoreController {
...
@@ -80,7 +81,7 @@ public class HmStoreController {
// 导购参数
// 导购参数
String
clerkSearchParams
=
request
.
getParameter
(
"clerkSearchParams"
);
String
clerkSearchParams
=
request
.
getParameter
(
"clerkSearchParams"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"enterpriseId"
,
loginUser
.
getEnterpriseId
()
);
params
.
put
(
"enterpriseId"
,
enterpriseId
);
// 2线上
// 2线上
params
.
put
(
"status"
,
2
);
params
.
put
(
"status"
,
2
);
params
.
put
(
"storeGroupId"
,
storeGroupId
);
params
.
put
(
"storeGroupId"
,
storeGroupId
);
...
@@ -117,12 +118,12 @@ public class HmStoreController {
...
@@ -117,12 +118,12 @@ public class HmStoreController {
retPage
.
setTotalPage
(
page
.
getTotalPage
());
retPage
.
setTotalPage
(
page
.
getTotalPage
());
List
<
ClerkStoreListVO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
ClerkStoreListVO
.
class
,
page
.
getResult
());
List
<
ClerkStoreListVO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
ClerkStoreListVO
.
class
,
page
.
getResult
());
// 好办状态
// 好办状态
this
.
haobanStatus
(
result
,
wxEnterpriseId
);
this
.
haobanStatus
(
result
,
wxEnterpriseId
,
enterpriseId
);
retPage
.
setResult
(
result
);
retPage
.
setResult
(
result
);
return
RestResponse
.
successResult
(
retPage
);
return
RestResponse
.
successResult
(
retPage
);
}
}
private
void
haobanStatus
(
List
<
ClerkStoreListVO
>
list
,
String
wxEnterpriseId
)
{
private
void
haobanStatus
(
List
<
ClerkStoreListVO
>
list
,
String
wxEnterpriseId
,
String
enterpriseId
)
{
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
return
;
...
@@ -156,21 +157,19 @@ public class HmStoreController {
...
@@ -156,21 +157,19 @@ public class HmStoreController {
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
statusList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
statusList
))
{
List
<
HmQrcodeListDTO
>
hmList
=
new
ArrayList
<>();
ServiceResponse
<
List
<
String
>>
hmClerkResp
=
this
.
hmQrcodeApiService
.
listHasQrcodeClerk
(
enterpriseId
,
if
(
CollectionUtils
.
isNotEmpty
(
hmList
))
{
statusList
);
status2List
.
addAll
(
hmList
.
stream
().
filter
(
dto
->
dto
.
getStatusFlag
()
==
3
).
map
(
dto
->
dto
.
getClerkId
())
if
(!
hmClerkResp
.
isSuccess
())
{
.
collect
(
Collectors
.
toList
()));
status3List
.
addAll
(
hmList
.
stream
().
filter
(
dto
->
dto
.
getStatusFlag
()
==
1
).
map
(
dto
->
dto
.
getClerkId
())
}
.
collect
(
Collectors
.
toList
()));
if
(
CollectionUtils
.
isNotEmpty
(
hmClerkResp
.
getResult
()))
{
status3List
.
addAll
(
hmClerkResp
.
getResult
());
}
}
status4List
status4List
.
addAll
(
statusList
.
stream
().
filter
(
id
->
(!
status2List
.
contains
(
id
)
&&
!
status3List
.
contains
(
id
)))
.
addAll
(
statusList
.
stream
().
filter
(
id
->
(!
status2List
.
contains
(
id
)
&&
!
status3List
.
contains
(
id
)))
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
}
}
logger
.
info
(
"导购列表未开启客户联系的={} , 已有单人活码的={}, 可以创建单人活码的={}"
,
status2List
,
status3List
,
status4List
);
logger
.
info
(
"导购列表={}"
,
status2List
);
logger
.
info
(
"导购列表={}"
,
status3List
);
logger
.
info
(
"导购列表={}"
,
status4List
);
list
.
stream
().
forEach
(
item
->
{
list
.
stream
().
forEach
(
item
->
{
for
(
ClerkListVO
clerk
:
item
.
getClerkList
())
{
for
(
ClerkListVO
clerk
:
item
.
getClerkList
())
{
if
(
status2List
.
contains
(
clerk
.
getClerkId
()))
{
if
(
status2List
.
contains
(
clerk
.
getClerkId
()))
{
...
@@ -201,7 +200,7 @@ public class HmStoreController {
...
@@ -201,7 +200,7 @@ public class HmStoreController {
@ResponseBody
@ResponseBody
public
RestResponse
<
Object
>
listStore
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
listStore
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
clerkId
=
loginUser
.
getClerkId
();
String
clerkId
=
loginUser
.
getClerkId
();
// 如果有权限控制,进行管辖门店过0滤
// 如果有权限控制,进行管辖门店过0滤
...
@@ -240,7 +239,7 @@ public class HmStoreController {
...
@@ -240,7 +239,7 @@ public class HmStoreController {
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
)
;
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
page
.
setParams
(
params
);
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
...
...
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