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
6645a10b
Commit
6645a10b
authored
Sep 07, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into feature-content4
parents
83380e85
3386c8db
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
5 deletions
+48
-5
MessageApiService.java
.../com/gic/haoban/manage/api/service/MessageApiService.java
+16
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+2
-0
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+20
-3
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+5
-0
QywxDeptSyncOperation.java
...gic/haoban/manage/service/task/QywxDeptSyncOperation.java
+0
-1
ChatTest.java
haoban-manage3-service/src/test/java/ChatTest.java
+5
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MessageApiService.java
View file @
6645a10b
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.QywxCallBackDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
java.util.List
;
...
...
@@ -64,4 +65,19 @@ public interface MessageApiService {
ServiceResponse
<
Void
>
sendOrderMessage
(
String
enterpriseId
,
NoticeMessageTypeEnum
noticeType
,
String
relationId
,
String
refundStoreId
,
String
clerkId
,
String
memberId
,
List
<
String
>
valueList
);
/**
* 通过通讯录-鸿星尔克
* @param wxEnterpriseId
* @param staffName
* @param qwDTO
* @param qwUserId
* @param mainDeptId
* @param position
* @param gender
* @param mobile
* @param nationcode
*/
public
void
updateForSyncStaff
(
String
wxEnterpriseId
,
String
staffName
,
WxEnterpriseQwDTO
qwDTO
,
String
qwUserId
,
String
mainDeptId
,
String
position
,
Integer
gender
,
String
mobile
,
String
nationcode
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
6645a10b
...
...
@@ -545,6 +545,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
return
"没有数据同步或权限没设置全部"
;
}
logger
.
info
(
"企微部门数={}"
,
list
.
size
());
syncTaskService
.
updateTaskStatus
(
taskId
,
SyncTaskStatusEnum
.
group_sync
.
getVal
());
List
<
TabHaobanPreDealLog
>
dealLogList
=
list
.
stream
().
map
(
dto
->
{
TabHaobanPreDealLog
dealLog
=
new
TabHaobanPreDealLog
();
dealLog
.
setDataId
(
dto
.
getId
().
toString
());
...
...
@@ -915,6 +916,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
return
false
;
}
if
(
type
==
0
)
{
this
.
syncTaskService
.
updateTaskStatus
(
taskId
,
4
)
;
logger
.
info
(
"部门成功,开始同步成员:{}"
,
taskId
);
String
key
=
"haoban_sync_department_task_"
+
taskId
;
RedisUtil
.
lock
(
key
,
3L
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
6645a10b
...
...
@@ -206,9 +206,9 @@ public class MessageApiServiceImpl implements MessageApiService {
// 鸿星尔克
"e034e2bd5d0b44d3bf553c9f8204094c"
,
// 润臣测试环境
"
ca66a01b79474c40b3e7c7f93daf1a3b
"
,
"
b18ffdc9d0644912865a248859914d80
"
,
// 尊兴
"
c0c2186a947440aa8c0afbdd869ec043
"
,
"
fb40256db41142a196b21ccf03e58507
"
,
// 金华悦行
"ac451a350eed4a96958dd5c7377f8bd9"
);
return
wxSet
.
contains
(
wxEnterpriseId
);
...
...
@@ -222,11 +222,12 @@ public class MessageApiServiceImpl implements MessageApiService {
* @param secret
*/
private
void
dealClerkUser
(
QywxCallBackDTO
dto
,
String
enterpriseId
,
String
secret
,
String
staffName
,
WxEnterpriseQwDTO
qwDTO
)
{
log
.
info
(
"鸿星尔克={}"
,
JSONObject
.
toJSONString
(
dto
));
ClerkQwDTO
clerkQwDTO
=
new
ClerkQwDTO
();
clerkQwDTO
.
setEnterpriseId
(
enterpriseId
);
String
mainDeptId
=
dto
.
getMainDepartment
();
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
departments
=
qywxDepartmentApiService
.
listSelfDepartment
(
dto
.
getAuthCorpI
d
(),
secret
,
Integer
.
valueOf
(
mainDeptId
),
qwDTO
.
getUrlHost
());
.
listSelfDepartment
(
qwDTO
.
getDkCorpi
d
(),
secret
,
Integer
.
valueOf
(
mainDeptId
),
qwDTO
.
getUrlHost
());
if
(
CollectionUtils
.
isEmpty
(
departments
))
{
log
.
info
(
"通过主部门查询部门列表为空 mainDeptId:{}"
,
mainDeptId
);
return
;
...
...
@@ -515,6 +516,22 @@ public class MessageApiServiceImpl implements MessageApiService {
log
.
info
(
"处理部门end:{}"
,
JSON
.
toJSONString
(
qywxCallBackDTO
));
}
public
void
updateForSyncStaff
(
String
wxEnterpriseId
,
String
staffName
,
WxEnterpriseQwDTO
qwDTO
,
String
qwUserId
,
String
mainDeptId
,
String
position
,
Integer
gender
,
String
mobile
,
String
nationcode
)
{
boolean
suitWxEnterpriseIid
=
checkSuitEnterpriseId
(
wxEnterpriseId
);
if
(
suitWxEnterpriseIid
)
{
QywxCallBackDTO
qwUser
=
new
QywxCallBackDTO
()
;
qwUser
.
setUserid
(
qwUserId
);
qwUser
.
setChangeType
(
"create_user"
);
qwUser
.
setMainDepartment
(
mainDeptId
);
qwUser
.
setPosition
(
position
);
qwUser
.
setGender
(
gender
);
qwUser
.
setMobile
(
mobile
);
qwUser
.
setTelephone
(
nationcode
);
// 鸿星尔克定制
dealErKe
(
qwUser
,
wxEnterpriseId
,
staffName
,
qwDTO
);
}
}
/**
* 处理鸿星尔克定制需求
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
6645a10b
...
...
@@ -32,6 +32,7 @@ import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SyncTaskTypeEnum
;
import
com.gic.haoban.manage.api.service.DealSyncOperationApiService
;
import
com.gic.haoban.manage.api.service.MessageApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
...
...
@@ -131,6 +132,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private
HaobanQywxFeeOrderAccountService
haobanQywxFeeOrderAccountService
;
@Autowired
private
HaobanQywxFeeOrderService
haobanQywxFeeOrderService
;
@Autowired
private
MessageApiService
messageApiService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -355,6 +358,8 @@ public class StaffApiServiceImpl implements StaffApiService {
staff
.
setActiveFlag
(
0
);
staff
.
setCreateTime
(
new
Date
());
staffService
.
add
(
staff
);
this
.
messageApiService
.
updateForSyncStaff
(
wxEnterpriseId
,
staff
.
getStaffName
(),
qwDTO
,
staff
.
getWxUserId
(),
user
.
getMain_department
(),
user
.
getPosition
(),
staff
.
getSex
(),
user
.
getMobile
(),
staff
.
getNationCode
());
}
else
{
staffService
.
updateByPrimaryKey
(
staff
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/QywxDeptSyncOperation.java
View file @
6645a10b
...
...
@@ -203,7 +203,6 @@ public class QywxDeptSyncOperation implements BaseSyncOperation {
return
dealLog
;
}).
collect
(
Collectors
.
toList
());
this
.
preDealService
.
insert
(
preDealLogList
);
this
.
syncTaskService
.
updateTaskStatus
(
taskId
,
4
)
;
}
return
null
;
}
...
...
haoban-manage3-service/src/test/java/ChatTest.java
View file @
6645a10b
...
...
@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.service.HandoverOperationApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.notify.NoticeMessageApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
...
...
@@ -35,10 +36,13 @@ public class ChatTest {
@Autowired
private
HandoverOperationApiService
handoverOperationApiService
;
@Autowired
private
StaffApiService
staffApiService
;
@Test
public
void
test
()
{
this
.
handoverOperationApiService
.
dealQywxEnterpriseHandoverMq
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
)
;
this
.
staffApiService
.
updateStaffHead
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
,
"d7c29cb654b543d1966181c2ec2186ea"
,
"https://pic01-10001430.image.myqcloud.com/04564abc-5e82-4ba7-9ef3-39803438bb2c"
)
;
// this.handoverOperationApiService.dealQywxEnterpriseHandoverMq("ca66a01b79474c40b3e7c7f93daf1a3b") ;
}
@Test
...
...
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