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
f28ad3d2
Commit
f28ad3d2
authored
Aug 09, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:活码定时任务修改
parent
f8bf5610
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
2 deletions
+36
-2
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+12
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+8
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+2
-1
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+14
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
f28ad3d2
...
...
@@ -204,6 +204,18 @@ public interface TabHaobanStaffClerkRelationMapper {
List
<
String
>
listWxUserIdByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 根据导购查询wxopenuserid
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-08-09 00:42:31
*/
List
<
String
>
listWxOpenUserIdByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 通过userId 查询id
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
f28ad3d2
...
...
@@ -8,6 +8,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.enums.BindTypeEnum
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
...
...
@@ -57,6 +58,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
private
StaffService
staffService
;
@Autowired
private
HmClerkRelationApiService
hmClerkRelationApiService
;
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
...
...
@@ -322,6 +325,11 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
null
;
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
String
corpid
=
wxEnterpriseDTO
.
getCorpid
();
if
(
corpid
.
length
()
>
20
)
{
return
mapper
.
listWxOpenUserIdByClerkIds
(
clerkList
,
wxEnterpriseId
);
}
return
mapper
.
listWxUserIdByClerkIds
(
clerkList
,
wxEnterpriseId
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
f28ad3d2
...
...
@@ -142,13 +142,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO
.
setRemark
(
hmQrcodeQDTO
.
getName
());
qywxExternalcontactDTO
.
setSkipVerify
(
hmQrcodeQDTO
.
getPassFlag
()
==
1
);
qywxExternalcontactDTO
.
setState
(
"HM"
+
hmId
);
String
corpid
=
wxEnterpriseDTO
.
getCorpid
();
List
<
String
>
userIds
=
staffClerkRelationService
.
listWxUserIdByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
userIds
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
wxEnterpriseDTO
.
getCorpid
()
,
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
corpid
,
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
qywxExternalcontactResultDTO
.
getErrcode
()
!=
0
)
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建活码失败:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
}
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
f28ad3d2
...
...
@@ -466,8 +466,21 @@
<select
id=
"listWxUserIdByClerkIds"
resultType=
"string"
>
select
a.wx_user_id wxUserI
d
DISTINCT b.wx_user_i
d
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on a.staff_id = b.staff_id
where a.status_flag=1 and a.wx_enterprise_id = #{wxEnterpriseId}
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<select
id=
"listWxOpenUserIdByClerkIds"
resultType=
"string"
>
select
DISTINCT b.wx_open_user_id
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on a.staff_id = b.staff_id
where a.status_flag=1 and a.wx_enterprise_id = #{wxEnterpriseId}
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
...
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