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
9e724003
Commit
9e724003
authored
Oct 09, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购任务-消息
parent
31035919
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
0 deletions
+50
-0
pom.xml
haoban-manage3-wx/pom.xml
+5
-0
ContentCreativeController.java
...age/web/controller/content/ContentCreativeController.java
+45
-0
No files found.
haoban-manage3-wx/pom.xml
View file @
9e724003
...
...
@@ -262,6 +262,11 @@
<artifactId>
gic-webapp-common
</artifactId>
<version>
${gic-webapp-common}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-message-center-api
</artifactId>
<version>
${gic-message-center-api}
</version>
</dependency>
</dependencies>
<build>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentCreativeController.java
View file @
9e724003
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Constant
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.material.ContentMaterialDTO
;
import
com.gic.content.api.dto.setting.ContentSettingDTO
;
import
com.gic.content.api.enums.*
;
import
com.gic.content.api.qdto.material.ContentMaterialPageQDTO
;
import
com.gic.content.api.qdto.material.ContentMaterialQDTO
;
import
com.gic.content.api.qdto.producer.ContentProducerClerkRandomQDTO
;
import
com.gic.content.api.service.ContentMaterialApiService
;
import
com.gic.content.api.service.ContentSettingApiService
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.web.controller.content.adaptor.ClerkStoreAdaptor
;
...
...
@@ -25,6 +31,8 @@ import com.gic.haoban.manage.web.vo.content.creative.ContentMaterialDataVO;
import
com.gic.haoban.manage.web.vo.content.creative.ContentMaterialVO
;
import
com.gic.marketing.pro.api.dto.clerktask.ClerkTaskContentLogDTO
;
import
com.gic.marketing.pro.api.service.clerktask.ClerkTaskApiService
;
import
com.gic.message.center.api.subscribe.model.NoticeMessageForm
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -37,6 +45,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -60,6 +70,8 @@ public class ContentCreativeController {
private
MaterialDataAdaptor
materialDataAdaptor
;
@Autowired
private
ClerkTaskApiService
clerkTaskApiService
;
@Autowired
private
ContentSettingApiService
contentSettingApiService
;
/**
* 创建素材
...
...
@@ -114,10 +126,43 @@ public class ContentCreativeController {
dto
.
setStatusFlag
(
0
);
dto
.
setClerkId
(
clerkId
);
this
.
clerkTaskApiService
.
saveContent
(
dto
)
;
}
else
{
// 发送审批消息
// 不是私域,且未开启自动审核
ServiceResponse
<
ContentSettingDTO
>
resp
=
this
.
contentSettingApiService
.
queryContentSettingInfo
(
saveQO
.
getEnterpriseId
())
;
if
(
resp
.
getResult
().
getCommunityUserSetting
().
getClerkMaterialAudit
()==
null
||
resp
.
getResult
().
getCommunityUserSetting
().
getClerkMaterialAudit
()==
0
)
{
this
.
sendAudit
(
saveQO
.
getEnterpriseId
(),
saveQO
.
getClerkId
())
;
}
}
return
RestResponse
.
successResult
(
response
.
getResult
());
}
private
void
sendAudit
(
String
enterpriseId
,
String
clerkName
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"clerkName"
,
clerkName
);
this
.
send
(
enterpriseId
,
map
,
"clerkCreateContent"
);
}
private
void
send
(
String
enterpriseId
,
Map
<
String
,
String
>
map
,
String
msgCode
)
{
log
.
info
(
"发送消息={}"
,
msgCode
);
String
mqName
=
"haobanNotice"
;
NoticeMessageForm
noticeMessageForm
=
new
NoticeMessageForm
();
noticeMessageForm
.
setMessageCode
(
msgCode
);
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
)
{
log
.
info
(
"异常"
,
e
);
}
}
/**
* 删除素材
* @param enterpriseId 企业id
...
...
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