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
e3253862
Commit
e3253862
authored
Aug 09, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
25400521
cb424cb1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
6 deletions
+61
-6
ExternalUserDTO.java
...n/java/com/gic/haoban/manage/api/dto/ExternalUserDTO.java
+9
-3
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+12
-0
ExternalUserPojo.java
.../com/gic/haoban/manage/service/pojo/ExternalUserPojo.java
+9
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+8
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+6
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+2
-1
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+1
-1
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+14
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/ExternalUserDTO.java
View file @
e3253862
...
...
@@ -35,6 +35,8 @@ public class ExternalUserDTO implements Serializable{
*/
private
Integer
friendType
;
private
String
state
;
public
Integer
getFriendType
()
{
return
friendType
;
}
...
...
@@ -146,8 +148,12 @@ public class ExternalUserDTO implements Serializable{
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
e3253862
...
...
@@ -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/pojo/ExternalUserPojo.java
View file @
e3253862
...
...
@@ -22,6 +22,7 @@ public class ExternalUserPojo implements Serializable{
* 1表示该外部联系人是微信用户,2表示该外部联系人是企业微信用户
*/
private
Integer
friendType
;
private
String
state
;
public
Integer
getFriendType
()
{
return
friendType
;
...
...
@@ -86,4 +87,12 @@ public class ExternalUserPojo implements Serializable{
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
e3253862
...
...
@@ -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/MemberUnionidRelatedApiServiceImpl.java
View file @
e3253862
...
...
@@ -985,6 +985,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
avatar
=
""
;
String
relaName
=
""
;
String
externalUserId
=
""
;
String
state
=
""
;
if
(
StringUtils
.
isNotBlank
(
unionIdJson
))
{
JSONObject
jo
=
JSON
.
parseObject
(
unionIdJson
);
String
external_contact
=
jo
.
getString
(
"external_contact"
);
...
...
@@ -1006,6 +1007,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
followJson
=
JSON
.
toJSONString
(
object
);
JSONObject
follow
=
JSON
.
parseObject
(
followJson
);
userId
=
follow
.
getString
(
"userid"
);
state
=
follow
.
getString
(
"state"
);
if
(
userId
.
equals
(
userId1
))
{
createTime
=
follow
.
getString
(
"createtime"
);
}
...
...
@@ -1018,6 +1020,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
pojo
.
setUnionId
(
unionId
);
pojo
.
setExternalUserId
(
externalUserId
);
pojo
.
setWxEnterpriseId
(
wxEnterpriseId
);
pojo
.
setState
(
state
);
return
pojo
;
}
...
...
@@ -1704,6 +1707,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
createTime
=
""
;
String
avatar
=
""
;
Integer
friendType
=
1
;
String
state
=
""
;
if
(
StringUtils
.
isNotBlank
(
uJ
))
{
JSONObject
jo
=
JSON
.
parseObject
(
uJ
);
String
external_contact
=
jo
.
getString
(
"external_contact"
);
...
...
@@ -1725,6 +1729,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
followJson
=
JSON
.
toJSONString
(
object
);
JSONObject
follow
=
JSON
.
parseObject
(
followJson
);
uj_userId
=
follow
.
getString
(
"userid"
);
state
=
follow
.
getString
(
"state"
);
//第三方返回的是加密的,多做一层判断
if
(
uj_userId
.
equals
(
wxUserId
)
||
uj_userId
.
equals
(
wxOpenUseId
))
{
if
(
jt
!=
null
)
{
...
...
@@ -1743,6 +1748,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
pojo
.
setWxEnterpriseId
(
wxEnterpriseId
);
pojo
.
setAvatar
(
avatar
);
pojo
.
setFriendType
(
friendType
);
pojo
.
setState
(
state
);
return
EntityUtil
.
changeEntityByJSON
(
ExternalUserDTO
.
class
,
pojo
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
e3253862
...
...
@@ -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/StaffMapper.xml
View file @
e3253862
...
...
@@ -253,7 +253,7 @@
wx_open_id = #{wxOpenId},
</if>
<if
test=
"qrCode != null"
>
qr_code = #{qrCode}
qr_code = #{qrCode}
,
</if>
<if
test=
"addNum != null"
>
add_num = #{addNum}
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
e3253862
...
...
@@ -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