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
4282a081
Commit
4282a081
authored
Jun 12, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企微托管
parent
27c3d832
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
6 deletions
+42
-6
OpenStaffApiService.java
...om/gic/haoban/manage/api/service/OpenStaffApiService.java
+2
-0
NoticeMessageApiService.java
...an/manage/api/service/notify/NoticeMessageApiService.java
+5
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+23
-5
OpenStaffApiServiceImpl.java
...age/service/service/out/impl/OpenStaffApiServiceImpl.java
+10
-0
QywxOpenController.java
...oban/manage/web/controller/haoban/QywxOpenController.java
+2
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/OpenStaffApiService.java
View file @
4282a081
...
@@ -25,6 +25,8 @@ public interface OpenStaffApiService {
...
@@ -25,6 +25,8 @@ public interface OpenStaffApiService {
*/
*/
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getById
(
Long
openStaffId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getByStaffId
(
String
staffId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getByQwUserId
(
Long
qwUserId
)
;
public
ServiceResponse
<
OpenStaffDTO
>
getByQwUserId
(
Long
qwUserId
)
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/notify/NoticeMessageApiService.java
View file @
4282a081
...
@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO;
...
@@ -8,6 +8,7 @@ import com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO;
import
com.gic.haoban.manage.api.dto.qdto.NoticeMessageQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.NoticeMessageQDTO
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created 2021/12/17.
* Created 2021/12/17.
...
@@ -91,4 +92,7 @@ public interface NoticeMessageApiService {
...
@@ -91,4 +92,7 @@ public interface NoticeMessageApiService {
*/
*/
public
ServiceResponse
<
Boolean
>
addOrCreateNoticeMessage
(
List
<
NoticeMessageQDTO
>
qdto
);
public
ServiceResponse
<
Boolean
>
addOrCreateNoticeMessage
(
List
<
NoticeMessageQDTO
>
qdto
);
public
void
sendMessageForOpenStaff
(
String
enterpriseId
,
Map
<
String
,
String
>
map
)
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
4282a081
...
@@ -13,9 +13,7 @@ import cn.hutool.core.util.ObjectUtil;
...
@@ -13,9 +13,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
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.*
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NotifyMessageMQDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NotifyMessageMQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
...
@@ -28,6 +26,7 @@ import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
...
@@ -28,6 +26,7 @@ import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.wechat.api.dto.qywx.QywxTemplateCardSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTemplateCardSendMessageDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
...
@@ -41,7 +40,6 @@ import com.gic.api.base.commons.BasePageInfo;
...
@@ -41,7 +40,6 @@ import com.gic.api.base.commons.BasePageInfo;
import
com.gic.api.base.commons.Constant
;
import
com.gic.api.base.commons.Constant
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NoticeMessageInfoDTO
;
import
com.gic.haoban.manage.api.dto.notify.dto.NoticeMessageInfoDTO
;
...
@@ -545,7 +543,7 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -545,7 +543,7 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
* 发送消息
* 发送消息
*
*
* @param contentList
* @param contentList
* @param
wxUserId
* @param
* @param messageTypeEnum
* @param messageTypeEnum
*/
*/
private
void
sendMessage
(
List
<
TemplateContentBO
>
contentList
,
String
wxEnterpriseId
,
String
staffId
,
NoticeMessageTypeEnum
messageTypeEnum
,
String
data
,
String
title
)
{
private
void
sendMessage
(
List
<
TemplateContentBO
>
contentList
,
String
wxEnterpriseId
,
String
staffId
,
NoticeMessageTypeEnum
messageTypeEnum
,
String
data
,
String
title
)
{
...
@@ -589,4 +587,24 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -589,4 +587,24 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
messageDTO
.
setItems
(
items
);
messageDTO
.
setItems
(
items
);
qywxSuiteApiService
.
sendMessage
(
corpid
,
qwDTO
.
getSelf3thSecret
(),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
sendMessage
(
corpid
,
qwDTO
.
getSelf3thSecret
(),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
}
public
void
sendMessageForOpenStaff
(
String
enterpriseId
,
Map
<
String
,
String
>
map
)
{
String
mqName
=
"haobanNotice"
;
NoticeMessageForm
noticeMessageForm
=
new
NoticeMessageForm
();
noticeMessageForm
.
setMessageCode
(
"haobanOpenStaffNotice"
);
noticeMessageForm
.
setMqRouterCode
(
mqName
);
noticeMessageForm
.
setEnterpriseId
(
enterpriseId
);
noticeMessageForm
.
setBusinessId
(
ToolUtil
.
randomUUID
());
noticeMessageForm
.
setUniqueKey
(
UniqueIdUtils
.
uniqueLongHex
());
noticeMessageForm
.
setUserIdList
(
null
);
noticeMessageForm
.
setCreateTime
(
new
Date
());
noticeMessageForm
.
setVariableMap
(
map
);
try
{
GicMQClient
client
=
GICMQClientUtil
.
getClientInstance
();
client
.
sendMessage
(
mqName
,
JSON
.
toJSONString
(
noticeMessageForm
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"路由规则名称:"
+
mqName
+
",message:"
+
JSON
.
toJSONString
(
noticeMessageForm
),
e
);
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffApiServiceImpl.java
View file @
4282a081
...
@@ -219,4 +219,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
...
@@ -219,4 +219,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
public
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
page
(
OpenStaffPageQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
ServiceResponse
<
Page
<
OpenStaffListDTO
>>
page
(
OpenStaffPageQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
return
this
.
openStaffService
.
page
(
qdto
,
basePageInfo
);
return
this
.
openStaffService
.
page
(
qdto
,
basePageInfo
);
}
}
@Override
public
ServiceResponse
<
OpenStaffDTO
>
getByStaffId
(
String
staffId
)
{
TabOpenStaff
tab
=
this
.
openStaffMapper
.
getByStaffId
(
staffId
)
;
if
(
null
==
tab
)
{
return
ServiceResponse
.
failure
(
"9999"
,
"已删除"
)
;
}
OpenStaffDTO
dto
=
EntityUtil
.
changeEntityByJSON
(
OpenStaffDTO
.
class
,
tab
)
;
return
ServiceResponse
.
success
(
dto
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/haoban/QywxOpenController.java
View file @
4282a081
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* 企微托管
* 企微托管
-好办小程序
*/
*/
@RestController
@RestController
@RequestMapping
(
"/qw-open"
)
@RequestMapping
(
"/qw-open"
)
...
@@ -30,6 +30,7 @@ public class QywxOpenController {
...
@@ -30,6 +30,7 @@ public class QywxOpenController {
/**
/**
* 获取详情
* 获取详情
* @param staffId
* @param staffId
* @param authFlag 1授权 0查询
* @return
* @return
*/
*/
@RequestMapping
(
"get-open-staff"
)
@RequestMapping
(
"get-open-staff"
)
...
...
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