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
4b210e59
Commit
4b210e59
authored
Dec 21, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:加好友bug修改
parent
9573e6e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+13
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+13
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+3
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
4b210e59
...
...
@@ -77,4 +77,17 @@ public interface StaffService {
*/
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
);
/**
* 选择通过corpid和用户id和企业id
*
* @param corpid corpid
* @param userId 用户id
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2021-12-21 22:54:25
*/
TabHaobanStaff
selectByCorpidAndUserIdAndEnterpriseId
(
String
corpid
,
String
userId
,
String
wxEnterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
4b210e59
...
...
@@ -11,6 +11,8 @@ import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.github.pagehelper.Page
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -20,10 +22,10 @@ import java.util.Set;
@Service
public
class
StaffServiceImpl
implements
StaffService
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
StaffServiceImpl
.
class
);
@Autowired
private
StaffMapper
mapper
;
@Autowired
private
MemberUnionRelatedService
memberUnionRelatedService
;
@Autowired
...
...
@@ -71,6 +73,7 @@ public class StaffServiceImpl implements StaffService {
return
null
;
}
String
corpid
=
tabHaobanWxEnterprise
.
getCorpid
();
log
.
info
(
"corpid:{}"
,
corpid
);
if
(
corpid
.
length
()
>
20
)
{
return
mapper
.
selectByOpenUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
else
{
...
...
@@ -127,4 +130,13 @@ public class StaffServiceImpl implements StaffService {
public
int
updateOpenUserIdsByUserId
(
String
wxEnterpriseId
,
String
wxUserId
,
String
wxOpenUseId
)
{
return
mapper
.
updateOpenUserIdsByUserId
(
wxEnterpriseId
,
wxUserId
,
wxOpenUseId
);
}
@Override
public
TabHaobanStaff
selectByCorpidAndUserIdAndEnterpriseId
(
String
corpid
,
String
userId
,
String
wxEnterpriseId
)
{
if
(
corpid
.
length
()
>
20
)
{
return
mapper
.
selectByOpenUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
else
{
return
mapper
.
selectByUserIdAndEnterpriseId
(
userId
,
wxEnterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
4b210e59
...
...
@@ -364,6 +364,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
*/
private
void
insertExternalClerkRelatedNew
(
MemberUnionidRelatedDTO
dto
)
{
log
.
info
(
"新增外部联系人,创建关联关系:{}"
,
JSON
.
toJSONString
(
dto
));
String
corpid
=
dto
.
getCorpid
();
String
wxUserId
=
dto
.
getWxUserId
();
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
String
name
=
dto
.
getExternalName
();
...
...
@@ -374,7 +375,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
checkQywxSettingApiService
.
saveFriendCallback
(
wxEnterpriseId
,
null
,
dto
);
return
;
}
TabHaobanStaff
staff
=
staffService
.
selectByUserIdAndEnterpriseId
(
wxUserId
,
wxEnterpriseId
);
TabHaobanStaff
staff
=
staffService
.
selectByCorpidAndUserIdAndEnterpriseId
(
corpid
,
wxUserId
,
wxEnterpriseId
);
if
(
staff
==
null
)
{
log
.
info
(
"staff不存在:{},{}"
,
dto
.
getUnionid
(),
dto
.
getWxUserId
());
return
;
...
...
@@ -400,7 +402,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log
.
info
(
"未查询到企业:wxEnterpriseId:{}"
,
wxEnterpriseId
);
return
;
}
String
corpid
=
wxEnterpriseDTO
.
getCorpid
();
if
(
corpid
.
length
()
<
20
)
{
Integer
agreeExternalUseridFlag
=
wxEnterpriseDTO
.
getAgreeExternalUseridFlag
();
log
.
info
(
"加好友判断新旧的逻辑,corpid:{},agreeExternalUseridFlag:{}"
,
agreeExternalUseridFlag
,
corpid
);
...
...
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