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
e28e43a0
Commit
e28e43a0
authored
May 24, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into feature-0524-home-change
parents
17137c74
f3f69e52
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
742 additions
and
46 deletions
+742
-46
NoticeMessageQDTO.java
...com/gic/haoban/manage/api/dto/qdto/NoticeMessageQDTO.java
+350
-0
NoticeMessageTypeEnum.java
...om/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
+0
-0
NoticeMessageApiService.java
...an/manage/api/service/notify/NoticeMessageApiService.java
+10
-0
pom.xml
haoban-manage3-service/pom.xml
+6
-0
MaterialReportContext.java
...ervice/pojo/bo/content/context/MaterialReportContext.java
+12
-4
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+5
-1
PotentialCustomerNotifyBuilder.java
...rvice/content/adaptor/PotentialCustomerNotifyBuilder.java
+26
-0
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+68
-0
PotentialCustomerServiceImpl.java
...ce/service/content/impl/PotentialCustomerServiceImpl.java
+7
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+0
-4
NoticeMessageHandler.java
.../manage/service/service/message/NoticeMessageHandler.java
+43
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+159
-4
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+6
-1
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+1
-1
HaobanQywxFeeApiServiceImpl.java
...ice/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
+19
-15
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+0
-5
ApolloUtils.java
.../java/com/gic/haoban/manage/service/util/ApolloUtils.java
+17
-0
TabHaobanExternalClerkRelatedMapper.xml
.../resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
+3
-1
GroupMessageServiceTest.java
...anage3-service/src/test/java/GroupMessageServiceTest.java
+2
-2
MaterialReportServiceTest.java
...age3-service/src/test/java/MaterialReportServiceTest.java
+1
-1
NotityTest.java
haoban-manage3-service/src/test/java/NotityTest.java
+3
-3
test.java
haoban-manage3-service/src/test/java/test.java
+1
-1
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+1
-1
GicOrderController.java
...aoban/manage/web/controller/order/GicOrderController.java
+2
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/NoticeMessageQDTO.java
0 → 100644
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 好办消息通知
*
* @author fdh
*/
public
class
NoticeMessageQDTO
implements
Serializable
{
/**
*
*/
private
Long
noticeMessageId
;
/**
* 企业id
*/
private
String
enterpriseId
;
/**
* 门店id
*/
private
String
storeId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 类别 0客户相关、1任务相关、2活动相关、3其他
*/
private
Integer
categoryType
;
/**
* 消息类型
*/
private
Integer
messageType
;
private
String
templateCode
;
/**
* 标题
*/
private
String
title
;
/**
* 描述
*/
private
String
description
;
/**
* 关联的具体业务消息id
*/
private
String
relationId
;
/**
* 消息带的参数信息
*/
private
String
messageContent
;
/**
* 0 未读 1已读
*/
private
Integer
readFlag
;
/**
* 状态 0删除 1正常
*/
private
Integer
deleteFlag
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
public
String
getTemplateCode
()
{
return
templateCode
;
}
public
void
setTemplateCode
(
String
templateCode
)
{
this
.
templateCode
=
templateCode
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.notice_message_id
*
* @return the value of tab_haoban_notice_message.notice_message_id
*/
public
Long
getNoticeMessageId
()
{
return
noticeMessageId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.notice_message_id
*
* @param noticeMessageId the value for tab_haoban_notice_message.notice_message_id
*/
public
void
setNoticeMessageId
(
Long
noticeMessageId
)
{
this
.
noticeMessageId
=
noticeMessageId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.enterprise_id
*
* @return the value of tab_haoban_notice_message.enterprise_id
*/
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.enterprise_id
*
* @param enterpriseId the value for tab_haoban_notice_message.enterprise_id
*/
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.store_id
*
* @return the value of tab_haoban_notice_message.store_id
*/
public
String
getStoreId
()
{
return
storeId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.store_id
*
* @param storeId the value for tab_haoban_notice_message.store_id
*/
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.clerk_id
*
* @return the value of tab_haoban_notice_message.clerk_id
*/
public
String
getClerkId
()
{
return
clerkId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.clerk_id
*
* @param clerkId the value for tab_haoban_notice_message.clerk_id
*/
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.category_type
*
* @return the value of tab_haoban_notice_message.category_type
*/
public
Integer
getCategoryType
()
{
return
categoryType
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.category_type
*
* @param categoryType the value for tab_haoban_notice_message.category_type
*/
public
void
setCategoryType
(
Integer
categoryType
)
{
this
.
categoryType
=
categoryType
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_type
*
* @return the value of tab_haoban_notice_message.message_type
*/
public
Integer
getMessageType
()
{
return
messageType
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_type
*
* @param messageType the value for tab_haoban_notice_message.message_type
*/
public
void
setMessageType
(
Integer
messageType
)
{
this
.
messageType
=
messageType
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.title
*
* @return the value of tab_haoban_notice_message.title
*/
public
String
getTitle
()
{
return
title
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.title
*
* @param title the value for tab_haoban_notice_message.title
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.description
*
* @return the value of tab_haoban_notice_message.description
*/
public
String
getDescription
()
{
return
description
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.description
*
* @param description the value for tab_haoban_notice_message.description
*/
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.relation_id
*
* @return the value of tab_haoban_notice_message.relation_id
*/
public
String
getRelationId
()
{
return
relationId
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.relation_id
*
* @param relationId the value for tab_haoban_notice_message.relation_id
*/
public
void
setRelationId
(
String
relationId
)
{
this
.
relationId
=
relationId
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_content
*
* @return the value of tab_haoban_notice_message.message_content
*/
public
String
getMessageContent
()
{
return
messageContent
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_content
*
* @param messageContent the value for tab_haoban_notice_message.message_content
*/
public
void
setMessageContent
(
String
messageContent
)
{
this
.
messageContent
=
messageContent
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.read_flag
*
* @return the value of tab_haoban_notice_message.read_flag
*/
public
Integer
getReadFlag
()
{
return
readFlag
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.read_flag
*
* @param readFlag the value for tab_haoban_notice_message.read_flag
*/
public
void
setReadFlag
(
Integer
readFlag
)
{
this
.
readFlag
=
readFlag
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.delete_flag
*
* @return the value of tab_haoban_notice_message.delete_flag
*/
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.delete_flag
*
* @param deleteFlag the value for tab_haoban_notice_message.delete_flag
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.create_time
*
* @return the value of tab_haoban_notice_message.create_time
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.create_time
*
* @param createTime the value for tab_haoban_notice_message.create_time
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.update_time
*
* @return the value of tab_haoban_notice_message.update_time
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.update_time
*
* @param updateTime the value for tab_haoban_notice_message.update_time
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/NoticeMessageTypeEnum.java
View file @
e28e43a0
This diff is collapsed.
Click to expand it.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/notify/NoticeMessageApiService.java
View file @
e28e43a0
...
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.notify.dto.NoticeMessageInfoDTO
;
import
com.gic.haoban.manage.api.dto.notify.qdto.NotifyMessageBatchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.NoticeMessageQDTO
;
import
java.util.List
;
...
...
@@ -82,4 +83,12 @@ public interface NoticeMessageApiService {
*/
public
ServiceResponse
<
Boolean
>
updateWriteFlagByClerkId
(
String
enterpriseId
,
String
clerkId
,
int
categoryType
);
/**
* 新增好办内部通知
*
* @param qdto
* @return
*/
public
ServiceResponse
<
Boolean
>
addOrCreateNoticeMessage
(
List
<
NoticeMessageQDTO
>
qdto
);
}
\ No newline at end of file
haoban-manage3-service/pom.xml
View file @
e28e43a0
...
...
@@ -196,6 +196,12 @@
<artifactId>
gic-order-api
</artifactId>
<version>
${gic-order-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-message-center-api
</artifactId>
<version>
${gic-message-center-api}
</version>
</dependency>
</dependencies>
<build>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/context/MaterialReportContext.java
View file @
e28e43a0
...
...
@@ -2,8 +2,10 @@ package com.gic.haoban.manage.service.pojo.bo.content.context;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
...
...
@@ -13,11 +15,11 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
com
.
gic
.
haoban
.
manage
.
api
.
enums
.
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
;
/**
* @Author MUSI
...
...
@@ -106,16 +108,22 @@ public class MaterialReportContext {
log
.
info
(
"成员{}为区经角色, 不发送小程序消息通知 "
,
this
.
staffId
);
return
Collections
.
emptyList
();
}
final
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
MaterialReportType
.
WEEK
.
getCode
().
equals
(
this
.
getReportType
())
?
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
:
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
)){
return
new
ArrayList
<>();
}
return
this
.
staffClerkRelations
.
stream
()
.
map
(
item
->
{
NoticeMessageBO
noticeMessageBO
=
new
NoticeMessageBO
();
noticeMessageBO
.
setCategoryType
(
MATERIAL_REPORT_NOTIFY
.
getCategory
());
noticeMessageBO
.
setMessageType
(
MATERIAL_REPORT_NOTIFY
.
getType
());
noticeMessageBO
.
setCategoryType
(
noticeMessageTypeEnum
.
getCategory
());
noticeMessageBO
.
setMessageType
(
noticeMessageTypeEnum
.
getType
());
noticeMessageBO
.
setClerkId
(
StringUtils
.
isNotBlank
(
item
.
getClerkId
())
?
item
.
getClerkId
()
:
"-1"
);
noticeMessageBO
.
setStoreId
(
StringUtils
.
isNotBlank
(
item
.
getStoreId
())
?
item
.
getStoreId
()
:
"-1"
);
noticeMessageBO
.
setTitle
(
this
.
getMessageTitle
());
noticeMessageBO
.
setTemplateCode
(
MATERIAL_REPORT_NOTIFY
.
getTemplateCode
());
noticeMessageBO
.
setTemplateCode
(
noticeMessageTypeEnum
.
getTemplateCode
());
noticeMessageBO
.
setDescription
(
this
.
getMessageDesc
());
noticeMessageBO
.
setEnterpriseId
(
this
.
enterpriseId
);
noticeMessageBO
.
setRelationId
(
this
.
clerkId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
...
@@ -22,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -198,7 +200,9 @@ public class MaterialReportBuilder {
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
String
extendParams
=
StringUtils
.
isNotBlank
(
context
.
getMainStoreId
())
?
context
.
getMainStoreId
()
:
context
.
getEnterpriseId
();
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
extendParams
)));
final
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
MaterialReportType
.
WEEK
.
getCode
().
equals
(
context
.
getReportType
())
?
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
:
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
noticeMessageTypeEnum
,
context
.
extendParams
(
extendParams
)));
articleInfo
.
setPicurl
(
context
.
getMaterialReportUrl
());
newsSendMessage
.
setArticleMessages
(
Collections
.
singletonList
(
articleInfo
));
return
newsSendMessage
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/PotentialCustomerNotifyBuilder.java
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
...
@@ -15,7 +16,10 @@ import com.gic.haoban.manage.service.pojo.bo.content.context.PotentialCustomerNo
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
...
@@ -28,6 +32,7 @@ import org.springframework.stereotype.Component;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -60,6 +65,8 @@ public class PotentialCustomerNotifyBuilder {
private
Config
config
;
@Autowired
private
StaffApiService
staffApiService
;
@Autowired
private
NoticeMessageHandler
noticeMessageHandler
;
/**
* 获取企业下所有导购id
...
...
@@ -189,10 +196,29 @@ public class PotentialCustomerNotifyBuilder {
log
.
info
(
"企业信息不存在 {}"
,
staffClerkRelation
.
getWxEnterpriseId
());
continue
;
}
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/* 消息中心修改此处*/
QywxXcxSendMessageDTO
messageDTO
=
this
.
buildApplicationMessage
(
staffClerkRelation
,
wxEnterpriseQwDTO
,
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
(),
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
()));
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
wxEnterpriseQwDTO
.
getThirdCorpid
(),
wxEnterpriseQwDTO
.
getSelf3thSecret
(),
messageDTO
,
wxEnterpriseQwDTO
.
isSelf
(),
wxEnterpriseQwDTO
.
getUrlHost
());
log
.
info
(
"发送销售线索应用消息结果 {}"
,
sendMessage
);
}
else
{
Map
<
String
,
String
>
variableMap
=
new
HashMap
<>();
variableMap
.
put
(
"memberNum"
,
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
().
toString
());
variableMap
.
put
(
"page"
,
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
,
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
())));
noticeMessageHandler
.
sendMessage
(
NoticeMessageForm
.
builder
()
.
messageCode
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
.
getMessageCode
())
.
mqRouterCode
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
.
getRouterCode
())
.
businessId
(
"-1"
)
.
createTime
(
new
Date
())
.
enterpriseId
(
context
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
userIdList
(
Collections
.
singletonList
(
staffClerkRelation
.
getClerkId
()))
.
variableMap
(
variableMap
).
build
());
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.pojo.bo.NoticeMessageBO
;
...
...
@@ -12,7 +18,11 @@ import com.gic.haoban.manage.service.service.StaffService;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialReportBuilder
;
import
com.gic.haoban.manage.service.service.message.NoticeMessageHandler
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.wechat.api.dto.qywx.QywxNewsArticleMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -21,7 +31,12 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author MUSI
...
...
@@ -49,6 +64,9 @@ public class MaterialReportServiceImpl implements MaterialReportService {
@Autowired
private
Config
config
;
@Autowired
private
NoticeMessageHandler
noticeMessageHandler
;
/**
* 素材周报/月报
...
...
@@ -87,13 +105,24 @@ public class MaterialReportServiceImpl implements MaterialReportService {
materialReportBuilder
.
buildMaterialReportData
(
context
);
// 保存小程序消息
List
<
NoticeMessageBO
>
noticeMessageBos
=
context
.
buildNotifyMessageBos
();
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
if
(
CollectionUtils
.
isNotEmpty
(
noticeMessageBos
))
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
}
}
if
(
StringUtils
.
isBlank
(
context
.
getClerkId
()))
{
log
.
info
(
"成员{}在企业{}中不存在主门店, 不推送企微应用消息"
,
staffId
,
enterpriseId
);
if
(
ApolloUtils
.
useMessageCenter
())
{
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBos
);
}
return
;
}
// 发送企微消息
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
staffInfo
.
getWxEnterpriseId
());
QywxNewsSendMessageDTO
newsSendMessageDTO
=
materialReportBuilder
.
buildQywxNewsMessage
(
context
,
qwDTO
);
...
...
@@ -102,7 +131,46 @@ public class MaterialReportServiceImpl implements MaterialReportService {
return
;
}
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
boolean
result
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(),
newsSendMessageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"成员{}发送素材企微使用报告结果 {}"
,
staffId
,
result
);
return
;
}
else
{
Map
<
String
,
String
>
variableMap
=
new
HashMap
<>();
QywxNewsArticleMessageDTO
qywxNewsArticleMessageDTO
=
newsSendMessageDTO
.
getArticleMessages
().
get
(
0
);
variableMap
.
put
(
"image"
,
qywxNewsArticleMessageDTO
.
getPicurl
());
variableMap
.
put
(
"page"
,
qywxNewsArticleMessageDTO
.
getPagepath
());
variableMap
.
put
(
"templateTitle"
,
qywxNewsArticleMessageDTO
.
getTitle
());
variableMap
.
put
(
"templateDescription"
,
qywxNewsArticleMessageDTO
.
getDescription
());
variableMap
.
put
(
"haobanNoticeMessageList"
,
JSONObject
.
toJSONString
(
noticeMessageBos
));
NoticeMessageTypeEnum
noticeMessageTypeEnum
=
null
;
if
(
MaterialReportType
.
WEEK
.
getCode
().
equals
(
context
.
getReportType
()))
{
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_WEEK
;
}
else
if
(
MaterialReportType
.
MONTH
.
getCode
().
equals
(
context
.
getReportType
()))
{
noticeMessageTypeEnum
=
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY_MONTH
;
}
if
(
ObjectUtil
.
isNull
(
noticeMessageTypeEnum
)){
log
.
info
(
"枚举不存在 context:{}"
,
JSONObject
.
toJSONString
(
context
));
return
;
}
noticeMessageHandler
.
sendMessage
(
NoticeMessageForm
.
builder
()
.
messageCode
(
noticeMessageTypeEnum
.
getMessageCode
())
.
mqRouterCode
(
noticeMessageTypeEnum
.
getRouterCode
())
.
businessId
(
"-1"
)
.
createTime
(
new
Date
())
.
enterpriseId
(
context
.
getEnterpriseId
())
.
uniqueKey
(
UniqueIdUtils
.
uniqueLongHex
())
.
userIdList
(
context
.
getClerkId
()
==
null
?
new
ArrayList
<>()
:
Collections
.
singletonList
(
context
.
getClerkId
()))
.
variableMap
(
variableMap
).
build
());
}
/*boolean result = qywxSuiteApiService.sendMessage(qwDTO.getThirdCorpid(), qwDTO.getSelf3thSecret(), newsSendMessageDTO,qwDTO.isSelf(),qwDTO.getUrlHost());
log.info("成员{}发送素材企微使用报告结果 {}", staffId, result);*/
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/PotentialCustomerServiceImpl.java
View file @
e28e43a0
...
...
@@ -21,6 +21,7 @@ import com.gic.haoban.manage.service.service.content.InteractRecordService;
import
com.gic.haoban.manage.service.service.content.PotentialCustomerService
;
import
com.gic.haoban.manage.service.service.content.adaptor.InteractRecordMessageBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.PotentialCustomerNotifyBuilder
;
import
com.gic.haoban.manage.service.util.ApolloUtils
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.service.MemberOutApiService
;
import
com.gic.search.engine.api.constant.MemberDataEnum
;
...
...
@@ -263,7 +264,13 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
// 区经 忽略
potentialCustomerNotifyBuilder
.
filterAreaManage
(
context
);
// 构建应用内消息
/*消息中心修改此处*/
if
(!
ApolloUtils
.
useMessageCenter
()){
log
.
info
(
"消息中心-走老版消息通知"
);
/*消息中心修改此处*/
potentialCustomerNotifyBuilder
.
sendHaoBanNotifyMessage
(
context
);
}
// 如果该导购id是成员在主门店时的导购id 发送应用消息
// 如果本批数据中无成员主门店数据 则不发送
potentialCustomerNotifyBuilder
.
sendApplicationMessage
(
context
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
e28e43a0
...
...
@@ -296,9 +296,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
this
.
clerkMainStoreRelatedService
.
reflushExternal
(
wxEnterpriseId
,
staffId
);
}
//有活码权限的企业
boolean
flag
=
rightService
.
hasRightForAdmin
(
enterpriseId
,
"hb_m0206"
);
if
(
flag
)
{
// 绑定自动创建活码
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
hmQrcodeQDTO
.
setHmType
(
1
);
hmQrcodeQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
...
...
@@ -310,7 +307,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
hmQrcodeQDTO
.
setInvokingType
(
channelCode
);
hmQrcodeApiService
.
add
(
hmQrcodeQDTO
);
}
}
//推入日志
staffClerkBindLogService
.
pushToMq
(
staffId
,
optStaffId
,
BindTypeEnum
.
BIND
.
getVal
(),
channelCode
,
staffClerkRelationId
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/message/NoticeMessageHandler.java
0 → 100644
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
message
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.manage.service.service.notify.out.NoticeMessageApiServiceImpl
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
org.slf4j.Logger
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* @description: 企业微信通知消息发送处理类
* @author: 巴弗
* @createDate: 2023/4/21 14:03
*/
@Service
public
class
NoticeMessageHandler
{
private
static
final
Logger
logger
=
getLogger
(
NoticeMessageHandler
.
class
);
/**
* 发送小程序消息
*/
public
void
sendMessage
(
NoticeMessageForm
noticeMessageForm
){
logger
.
info
(
"消息中心发送消息实体:{}"
,
JSONObject
.
toJSONString
(
noticeMessageForm
));
if
(
ObjectUtil
.
isEmpty
(
noticeMessageForm
.
getMessageCode
())
||
ObjectUtil
.
isEmpty
(
noticeMessageForm
.
getMqRouterCode
()))
{
logger
.
info
(
"消息中心发送消息实体 messageCode 或 mqRouterCode 不存在"
);
}
GicMQClient
client
=
GICMQClientUtil
.
getClientInstance
();
try
{
client
.
sendMessage
(
noticeMessageForm
.
getMqRouterCode
(),
JSONObject
.
toJSONString
(
noticeMessageForm
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"消息中心发送消息实体发送异常 "
,
e
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
e28e43a0
This diff is collapsed.
Click to expand it.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
e28e43a0
...
...
@@ -574,6 +574,7 @@ public class MessageApiServiceImpl implements MessageApiService {
}
@Override
@Deprecated
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Void
>
sendPreMessage
(
String
enterpriseId
,
String
storeId
,
String
message
)
{
log
.
info
(
"线下预约通知,storeId={}"
,
storeId
);
...
...
@@ -680,7 +681,11 @@ public class MessageApiServiceImpl implements MessageApiService {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
valueList
))
{
for
(
int
i
=
0
;
i
<
valueList
.
size
();
i
++)
{
map
.
put
(
""
+
(
i
+
1
),
valueList
.
get
(
i
));
String
key
=
""
+
(
i
+
1
);
map
.
put
(
key
,
valueList
.
get
(
i
));
if
(
key
.
equals
(
"1"
))
{
map
.
put
(
"goodsName"
,
valueList
.
get
(
i
));
}
}
}
MemberDataDTO
member
=
this
.
findMember
(
enterpriseId
,
memberId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
e28e43a0
...
...
@@ -213,7 +213,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
,
NoticeMessageTypeEnum
.
CLERK_DEL_AGREE
.
getType
(),
null
,
params
,
jsonObject
);
}
else
{
NoticeMessageUtil
.
sendNoticeMessage
(
tab
.
getEnterpriseId
(),
tab
.
getClerkId
()
,
NoticeMessageTypeEnum
.
CLERK_DEL_
AGRE
E
.
getType
(),
null
,
params
,
jsonObject
);
,
NoticeMessageTypeEnum
.
CLERK_DEL_
REFUS
E
.
getType
(),
null
,
params
,
jsonObject
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/fee/HaobanQywxFeeApiServiceImpl.java
View file @
e28e43a0
...
...
@@ -25,7 +25,6 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.manage.api.constants.Manage3Constants
;
import
com.gic.haoban.manage.api.dto.AlertMessageDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeAccountInterceptLogDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDTO
;
import
com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO
;
...
...
@@ -90,15 +89,23 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
@Override
public
void
run
(
String
param
)
{
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
if
(
"-1"
.
equals
(
param
))
{
List
<
TabHaobanWxEnterprise
>
tabHaobanWxEnterprises
=
wxEnterpriseService
.
listAll
();
for
(
TabHaobanWxEnterprise
wxEnterprise
:
tabHaobanWxEnterprises
)
{
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
instance
.
sendMessage
(
"qywxAddFeeMq"
,
wxEnterprise
.
getWxEnterpriseId
());
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送消息处理异常:{}"
,
e
.
getMessage
(),
e
);
}
}
}
else
{
try
{
instance
.
sendMessage
(
"qywxAddFeeMq"
,
param
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送消息处理异常:{}"
,
e
.
getMessage
(),
e
);
}
}
}
private
List
<
String
>
listOrderId
(
String
corpid
)
{
...
...
@@ -162,8 +169,8 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
}
String
serviceCorpid
=
config
.
getCorpid
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
.
getWxSecurityType
()
<=
0
)
{
logger
.
info
(
"WxSecurityType=0,wxEnterpriseId={}"
,
wxEnterpriseId
);
if
(
wxEnterpriseDTO
.
getWxSecurityType
()
<=
0
||
wxEnterpriseDTO
.
getWxSecurityType
()
==
5
)
{
logger
.
info
(
"WxSecurityType=0
/5
,wxEnterpriseId={}"
,
wxEnterpriseId
);
return
;
}
String
corpid
=
wxEnterpriseDTO
.
getOpenCorpid
();
...
...
@@ -227,11 +234,7 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
// 成员的激活码信息
this
.
staffService
.
activedAccountTimer
(
wxEnterpriseId
);
// 更新企业的激活数量统计
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(!
qwDTO
.
isSelf
())
{
this
.
wxEnterpriseActiveDataService
.
saveOrUpdate
(
wxEnterpriseId
);
}
// 统计 haobanQywxFeeDetailDTO 30天内最新过期的时间和人数
HaobanQywxFeeDetailDTO
haobanQywxFeeDetailDTO
=
haobanQywxFeeAccountStaffService
.
feeIntercept
(
wxEnterpriseId
);
...
...
@@ -254,8 +257,9 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
tabHaobanQywxFee
.
setInterceptFlag
(
0
);
haobanQywxFeeService
.
insert
(
tabHaobanQywxFee
);
// 判断今天是否是本月最后一天
if
(
DateUtil
.
isSameDay
(
DateUtil
.
endOfMonth
(
new
Date
()),
new
Date
())
||
"ca66a01b79474c40b3e7c7f93daf1a3b"
.
equals
(
wxEnterpriseId
))
{
int
monthWillInterceptNum
=
haobanQywxFeeDetailDTO
.
getInterceptUserNum
()
;
if
(
DateUtil
.
isSameDay
(
DateUtil
.
endOfMonth
(
new
Date
()),
new
Date
())
||
"ca66a01b79474c40b3e7c7f93daf1a3b"
.
equals
(
wxEnterpriseId
))
{
int
monthWillInterceptNum
=
haobanQywxFeeDetailDTO
.
getInterceptUserNum
();
String
content
=
"30天将有"
+
monthWillInterceptNum
+
"个接口许可证即将过期,您总共还剩余"
+
permissionUserNum
+
"个可用的接口许可证,请保证数量充足,如需增加请及时联系相关人员续费,避免影响使用"
;
messageAlert
(
wxEnterpriseId
,
corpName
,
corpid
,
AlertTypeEnum
.
FEE_ALARM
.
getName
(),
content
);
...
...
@@ -300,13 +304,13 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
TabHaobanQywxFeeOrderAccount
activeAccount
=
new
TabHaobanQywxFeeOrderAccount
();
// 查询激活码的详情
List
<
List
<
String
>>
list
=
Lists
.
partition
(
codeList
,
1000
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
List
<
String
>
subCodeList
=
list
.
get
(
i
);
List
<
ActiveInfoCodeResponseDTO
>
respList
=
qywxUserApiService
.
getActiveInfoByCodeList
(
corpid
,
serviceCorpid
,
c
odeList
);
subC
odeList
);
if
(
CollectionUtils
.
isNotEmpty
(
respList
))
{
List
<
List
<
ActiveInfoCodeResponseDTO
>>
list
=
Lists
.
partition
(
respList
,
800
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
List
<
ActiveInfoCodeResponseDTO
>
subList
=
list
.
get
(
i
);
for
(
ActiveInfoCodeResponseDTO
activeDetail
:
subList
)
{
for
(
ActiveInfoCodeResponseDTO
activeDetail
:
respList
)
{
String
userid
=
activeDetail
.
getUserid
();
String
activeCode
=
activeDetail
.
getActiveCode
();
activeAccount
.
setWxUserId
(
userid
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
e28e43a0
...
...
@@ -787,11 +787,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
String
enterpriseId
=
wxEnterpriseDTO
.
getEnterpriseId
();
//查询出所有正常的导购
String
wxEnterpriseId
=
wxEnterpriseDTO
.
getWxEnterpriseId
();
boolean
flag
=
rightService
.
hasRightForAdmin
(
enterpriseId
,
"hb_m0206"
);
if
(!
flag
)
{
logger
.
info
(
"该企业未与gic关联,无需开启:enterpriseId:{},wxEnterpriseId:{}"
,
enterpriseId
,
wxEnterpriseId
);
continue
;
}
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
jsonObject
.
put
(
"enterpriseId"
,
enterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ApolloUtils.java
0 → 100644
View file @
e28e43a0
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
public
class
ApolloUtils
{
/**
* 旧的调用发送,是否采用新的消息中心开关1:是 0:否
* @return
*/
public
static
boolean
useMessageCenter
()
{
Config
config
=
ConfigService
.
getConfig
(
"COMMON.gic-properties"
);
String
messageCenterSwitch
=
config
.
getProperty
(
"messageCenterSwitch"
,
"0"
);
return
"1"
.
equals
(
messageCenterSwitch
);
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
View file @
e28e43a0
...
...
@@ -460,7 +460,9 @@
</foreach>
and wx_enterprise_id = #{wxEnterpriseId}
and enterprise_id = #{enterpriseId}
and status_flag = 1 and external_status = 1 group by member_id
and status_flag = 1 and external_status = 1
and external_user_id is not null
group by member_id
</select>
<select
id=
"getLastByExTernalUseridAndWxUserIdNoStatus"
resultMap=
"BaseResultMap"
>
...
...
haoban-manage3-service/src/test/java/GroupMessageServiceTest.java
View file @
e28e43a0
...
...
@@ -116,8 +116,8 @@ public class GroupMessageServiceTest {
qywxMomentInfoQDTO
.
setEndTime
(
1681906519L
);
qywxMomentInfoQDTO
.
setCreatorId
(
"wo59NLDQAAbjSBA575NouC1pUYQgCOtw"
);
qywxMomentInfoQDTO
.
setPageSize
(
20
);
ServiceResponse
<
QywxMomentRespDTO
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxMomentList
(
qywxMomentInfoQDTO
);
System
.
out
.
println
(
JSON
.
toJSONString
(
serviceResponse
));
//
ServiceResponse<QywxMomentRespDTO> serviceResponse = qywxSuiteApiService.queryQywxMomentList(qywxMomentInfoQDTO);
//
System.out.println(JSON.toJSONString(serviceResponse));
}
@Test
...
...
haoban-manage3-service/src/test/java/MaterialReportServiceTest.java
View file @
e28e43a0
...
...
@@ -103,7 +103,7 @@ public class MaterialReportServiceTest {
// params.put("t", 1);
// params.put("d", "04");
String
s
=
params
.
toJSONString
();
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
s
);
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
_MONTH
,
s
);
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
.
length
());
...
...
haoban-manage3-service/src/test/java/NotityTest.java
View file @
e28e43a0
...
...
@@ -124,8 +124,8 @@ public class NotityTest {
articleInfo
.
setPicurl
(
"https://platform-1251519181.cos.ap-shanghai.myqcloud.com/image/newdmwltest/enterprise_common-e1e8b3d46fdb4486ad545aae6cba67a1.png"
);
messageDTO
.
setArticleMessages
(
Arrays
.
asList
(
articleInfo
));
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpid
,
config
.
getWxSuiteid
(),
messageDTO
);
System
.
out
.
println
(
b
);
/*
boolean b = qywxSuiteApiService.sendMessage(corpid, config.getWxSuiteid(), messageDTO);
System.out.println(b);
*/
}
@Test
...
...
@@ -138,7 +138,7 @@ public class NotityTest {
search
.
setSuiteid
(
config
.
getWxSuiteid
());
search
.
setChatType
(
"single"
);
Date
date
=
DateUtils
.
addDays
(
new
Date
(),
-
1
);
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
qywxSuiteApiService
.
queryQywxGroupMessageList
(
search
);
//
ServiceResponse<QywxGroupMsgResp> serviceResponse = qywxSuiteApiService.queryQywxGroupMessageList(search);
}
...
...
haoban-manage3-service/src/test/java/test.java
View file @
e28e43a0
...
...
@@ -69,7 +69,7 @@ public class test {
// params.put("t", 1);
// params.put("d", "04");
String
s
=
params
.
toJSONString
();
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
s
);
String
s1
=
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
_MONTH
,
s
);
System
.
out
.
println
(
"/pages/route/index?pageType=hbapp_material_report&data="
.
length
());
System
.
out
.
println
(
s1
);
System
.
out
.
println
(
s1
.
length
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
e28e43a0
...
...
@@ -164,7 +164,7 @@ public class WxEnterpriseController extends WebBaseController {
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseApiService
.
getQwInfo
(
wxEnterpriseId
)
;
if
(
qwDTO
.
isSelf
())
{
return
this
.
fail
(
"
自建应用不能刷新"
);
return
this
.
fail
(
"
已刷新"
);
}
QywxCorpInfoDTO
dto
=
qywxTokenManageService
.
getCorpInfo
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
if
(
dto
==
null
)
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/order/GicOrderController.java
View file @
e28e43a0
...
...
@@ -491,10 +491,10 @@ public class GicOrderController {
response
.
setErrorCode
(
checkVO
.
getCode
());
response
.
setResult
(
checkVO
.
getId
());
response
.
setDetailError
(
""
);
return
RestResponse
.
successResult
(
checkVO
);
return
RestResponse
.
failure
(
"9999"
,
checkVO
.
getMessage
());
}
return
RestResponse
.
successResult
(
checkVO
)
;
}
return
null
;
}
// 核销数量
...
...
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