Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
c787af15
Commit
c787af15
authored
Nov 10, 2021
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1005883] 小睿消息优化
parent
b46dd8e9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
75 additions
and
8 deletions
+75
-8
TemplateConsr.java
.../java/com/pcloud/book/consumer/message/TemplateConsr.java
+2
-2
ReaderConsr.java
...ain/java/com/pcloud/book/consumer/reader/ReaderConsr.java
+14
-0
CultivateNotifyBizImpl.java
...cloud/book/cultivate/biz/impl/CultivateNotifyBizImpl.java
+0
-0
CultivateRaysBizImpl.java
.../pcloud/book/cultivate/biz/impl/CultivateRaysBizImpl.java
+2
-1
CultivateNotifyItemDao.java
...com/pcloud/book/cultivate/dao/CultivateNotifyItemDao.java
+4
-0
CultivateNotifyItemDaoImpl.java
...d/book/cultivate/dao/impl/CultivateNotifyItemDaoImpl.java
+12
-0
CultivateNotifyDTO.java
...ava/com/pcloud/book/cultivate/dto/CultivateNotifyDTO.java
+7
-0
CultivateNotifyPageDTO.java
...com/pcloud/book/cultivate/dto/CultivateNotifyPageDTO.java
+6
-0
CultivateNotify.java
...ava/com/pcloud/book/cultivate/entity/CultivateNotify.java
+3
-0
CultivateNotify.xml
...k/src/main/resources/mapper/cultivate/CultivateNotify.xml
+6
-3
CultivateNotifyItem.xml
...c/main/resources/mapper/cultivate/CultivateNotifyItem.xml
+17
-1
CultivateNotifySend.xml
...c/main/resources/mapper/cultivate/CultivateNotifySend.xml
+2
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/message/TemplateConsr.java
View file @
c787af15
...
@@ -107,11 +107,11 @@ public class TemplateConsr {
...
@@ -107,11 +107,11 @@ public class TemplateConsr {
}
}
}
}
public
void
sendTempletMessage4Project
(
String
keyword1
,
String
keyword2
,
Long
wechatUserId
,
String
pagepath
)
{
public
void
sendTempletMessage4Project
(
String
keyword1
,
String
keyword2
,
Long
wechatUserId
,
String
pagepath
,
String
first
)
{
LOGGER
.
info
(
"小睿宠物发送模板消息业务进度提醒keyword1:{},keyword2:{}, wechatUserId:{},pagepath:{},"
,
LOGGER
.
info
(
"小睿宠物发送模板消息业务进度提醒keyword1:{},keyword2:{}, wechatUserId:{},pagepath:{},"
,
keyword1
,
keyword2
,
wechatUserId
,
pagepath
);
keyword1
,
keyword2
,
wechatUserId
,
pagepath
);
Map
<
String
,
String
>
temParam
=
new
HashMap
<>();
Map
<
String
,
String
>
temParam
=
new
HashMap
<>();
temParam
.
put
(
"first"
,
"主人召回提醒"
);
temParam
.
put
(
"first"
,
first
);
temParam
.
put
(
"keyword1"
,
keyword1
);
temParam
.
put
(
"keyword1"
,
keyword1
);
temParam
.
put
(
"keyword2"
,
keyword2
);
temParam
.
put
(
"keyword2"
,
keyword2
);
temParam
.
put
(
"remark"
,
"点击查看详情"
);
temParam
.
put
(
"remark"
,
"点击查看详情"
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/reader/ReaderConsr.java
View file @
c787af15
...
@@ -539,6 +539,20 @@ public class ReaderConsr {
...
@@ -539,6 +539,20 @@ public class ReaderConsr {
}
}
return
userGradeLabelIdDTO
;
return
userGradeLabelIdDTO
;
}
}
public
List
<
Long
>
getAllRelateUnionUsers
(
List
<
Long
>
subList
,
Long
operateOfficalId
)
{
LOGGER
.
info
(
"【获取指定用户的关联公众号用户id ,<START>.[subList]"
);
List
<
Long
>
wechatUserIds
=
new
ArrayList
<>();
try
{
wechatUserIds
=
ResponseHandleUtil
.
parseList
(
raysUnionUserService
.
getAllRelateUnionUsers
(
subList
,
operateOfficalId
),
Long
.
class
);
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
"raysUnionUserService.getAllRelateUnionUsers"
+
e
.
getMessage
(),
e
);
}
return
wechatUserIds
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/biz/impl/CultivateNotifyBizImpl.java
View file @
c787af15
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/biz/impl/CultivateRaysBizImpl.java
View file @
c787af15
...
@@ -242,6 +242,7 @@ public class CultivateRaysBizImpl implements CultivateRaysBiz {
...
@@ -242,6 +242,7 @@ public class CultivateRaysBizImpl implements CultivateRaysBiz {
Map
<
String
,
String
>
tempMap
=
new
HashMap
<>();
Map
<
String
,
String
>
tempMap
=
new
HashMap
<>();
String
text1
=
"主人~我快要饿晕了"
;
String
text1
=
"主人~我快要饿晕了"
;
String
text2
=
"快来,还可以抢救下!"
;
String
text2
=
"快来,还可以抢救下!"
;
String
first
=
"主人召回提醒"
;
if
(
"pro"
.
equals
(
BookProps
.
getSystemEnv
()))
{
if
(
"pro"
.
equals
(
BookProps
.
getSystemEnv
()))
{
tempMap
.
put
(
"thing3"
,
text1
);
tempMap
.
put
(
"thing3"
,
text1
);
tempMap
.
put
(
"thing2"
,
text2
);
tempMap
.
put
(
"thing2"
,
text2
);
...
@@ -253,7 +254,7 @@ public class CultivateRaysBizImpl implements CultivateRaysBiz {
...
@@ -253,7 +254,7 @@ public class CultivateRaysBizImpl implements CultivateRaysBiz {
//发送小程序服务消息
//发送小程序服务消息
templateConsr
.
sendAppletMessageQueue
(
appletTemplateMessage
);
templateConsr
.
sendAppletMessageQueue
(
appletTemplateMessage
);
//发送公众号模板消息
//发送公众号模板消息
templateConsr
.
sendTempletMessage4Project
(
text1
,
text2
,
wechatUserId
,
appletTemplateMessage
.
getPage
());
templateConsr
.
sendTempletMessage4Project
(
text1
,
text2
,
wechatUserId
,
appletTemplateMessage
.
getPage
()
,
first
);
}
}
/**
/**
...
...
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dao/CultivateNotifyItemDao.java
View file @
c787af15
...
@@ -12,4 +12,8 @@ public interface CultivateNotifyItemDao extends BaseDao<CultivateNotifyItem> {
...
@@ -12,4 +12,8 @@ public interface CultivateNotifyItemDao extends BaseDao<CultivateNotifyItem> {
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageId
(
Long
messageId
);
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageId
(
Long
messageId
);
List
<
CultivateNotifyItem
>
getByMessageIds
(
List
<
Long
>
messageIds
);
List
<
CultivateNotifyItem
>
getByMessageIds
(
List
<
Long
>
messageIds
);
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageId4Jump
(
Long
messageId
);
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageIds4Jump
(
List
<
Long
>
messageIds
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dao/impl/CultivateNotifyItemDaoImpl.java
View file @
c787af15
...
@@ -24,4 +24,15 @@ public class CultivateNotifyItemDaoImpl extends BaseDaoImpl<CultivateNotifyItem>
...
@@ -24,4 +24,15 @@ public class CultivateNotifyItemDaoImpl extends BaseDaoImpl<CultivateNotifyItem>
map
.
put
(
"messageIds"
,
messageIds
);
map
.
put
(
"messageIds"
,
messageIds
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getByMessageIds"
),
map
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getByMessageIds"
),
map
);
}
}
@Override
public
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageId4Jump
(
Long
messageId
)
{
return
super
.
getSessionTemplate
().
selectList
(
getStatement
(
"getNotifyItemsByMessageId4Jump"
),
messageId
);
}
@Override
public
List
<
CultivateNotifyItem
>
getNotifyItemsByMessageIds4Jump
(
List
<
Long
>
messageIds
)
{
return
super
.
getSessionTemplate
().
selectList
(
getStatement
(
"getNotifyItemsByMessageIds4Jump"
),
messageIds
);
}
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dto/CultivateNotifyDTO.java
View file @
c787af15
...
@@ -43,6 +43,10 @@ public class CultivateNotifyDTO {
...
@@ -43,6 +43,10 @@ public class CultivateNotifyDTO {
@ApiModelProperty
(
"发送内容"
)
@ApiModelProperty
(
"发送内容"
)
private
List
<
CultivateNotifyItem
>
cultivateNotifyItems
;
private
List
<
CultivateNotifyItem
>
cultivateNotifyItems
;
@ApiModelProperty
(
"跳转选择的应用作品"
)
private
List
<
CultivateNotifyItem
>
jumpNotifyItems
;
@ApiModelProperty
(
"用户id"
)
@ApiModelProperty
(
"用户id"
)
private
List
<
WechatUserDTO
>
wechatUserDTOS
;
private
List
<
WechatUserDTO
>
wechatUserDTOS
;
...
@@ -64,4 +68,7 @@ public class CultivateNotifyDTO {
...
@@ -64,4 +68,7 @@ public class CultivateNotifyDTO {
@ApiModelProperty
(
"是否首页弹窗"
)
@ApiModelProperty
(
"是否首页弹窗"
)
private
Integer
showHome
;
private
Integer
showHome
;
@ApiModelProperty
(
"首页推图"
)
private
String
squareImg
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dto/CultivateNotifyPageDTO.java
View file @
c787af15
...
@@ -26,6 +26,10 @@ public class CultivateNotifyPageDTO {
...
@@ -26,6 +26,10 @@ public class CultivateNotifyPageDTO {
@ApiModelProperty
(
"发送内容"
)
@ApiModelProperty
(
"发送内容"
)
private
List
<
CultivateNotifyItem
>
cultivateNotifyItems
;
private
List
<
CultivateNotifyItem
>
cultivateNotifyItems
;
@ApiModelProperty
(
"跳转选择的应用作品"
)
private
List
<
CultivateNotifyItem
>
jumpNotifyItems
;
@ApiModelProperty
(
"发送时间"
)
@ApiModelProperty
(
"发送时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
sendTime
;
private
Date
sendTime
;
...
@@ -33,4 +37,6 @@ public class CultivateNotifyPageDTO {
...
@@ -33,4 +37,6 @@ public class CultivateNotifyPageDTO {
@ApiModelProperty
(
"是否首页弹窗"
)
@ApiModelProperty
(
"是否首页弹窗"
)
private
Integer
showHome
;
private
Integer
showHome
;
private
String
squareImg
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/entity/CultivateNotify.java
View file @
c787af15
...
@@ -27,4 +27,7 @@ public class CultivateNotify extends BaseEntity {
...
@@ -27,4 +27,7 @@ public class CultivateNotify extends BaseEntity {
@ApiModelProperty
(
"是否首页弹窗"
)
@ApiModelProperty
(
"是否首页弹窗"
)
private
Integer
showHome
;
private
Integer
showHome
;
@ApiModelProperty
(
"首页推图"
)
private
String
squareImg
;
}
}
pcloud-service-book/src/main/resources/mapper/cultivate/CultivateNotify.xml
View file @
c787af15
...
@@ -10,10 +10,11 @@
...
@@ -10,10 +10,11 @@
<result
column=
"send_type"
property=
"sendType"
jdbcType=
"INTEGER"
/>
<result
column=
"send_type"
property=
"sendType"
jdbcType=
"INTEGER"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"agent_id"
property=
"agentId"
jdbcType=
"BIGINT"
/>
<result
column=
"show_home"
property=
"showHome"
jdbcType=
"TINYINT"
/>
<result
column=
"show_home"
property=
"showHome"
jdbcType=
"TINYINT"
/>
<result
column=
"square_img"
property=
"squareImg"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
message_id, message_type, title, create_time,update_time,send_type,agent_id, show_home
message_id, message_type, title, create_time,update_time,send_type,agent_id, show_home
,square_img
</sql>
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.cultivate.entity.CultivateNotify"
useGeneratedKeys=
"true"
keyProperty=
"messageId"
>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.cultivate.entity.CultivateNotify"
useGeneratedKeys=
"true"
keyProperty=
"messageId"
>
...
@@ -25,7 +26,8 @@
...
@@ -25,7 +26,8 @@
update_time,
update_time,
send_type,
send_type,
agent_id,
agent_id,
show_home
show_home,
square_img
)
)
values (
values (
#{messageType},
#{messageType},
...
@@ -34,7 +36,8 @@
...
@@ -34,7 +36,8 @@
NOW(),
NOW(),
#{sendType},
#{sendType},
#{agentId},
#{agentId},
#{showHome}
#{showHome},
#{squareImg}
)
)
</insert>
</insert>
...
...
pcloud-service-book/src/main/resources/mapper/cultivate/CultivateNotifyItem.xml
View file @
c787af15
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</insert>
</insert>
<select
id=
"getNotifyItemsByMessageId"
resultMap=
"BaseResultMap"
>
<select
id=
"getNotifyItemsByMessageId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from cultivate_notify_item where message_id=#{messageId}
select
<include
refid=
"Base_Column_List"
/>
from cultivate_notify_item where message_id=#{messageId}
and jump_type is null
</select>
</select>
<select
id=
"getByMessageIds"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<select
id=
"getByMessageIds"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
...
@@ -77,6 +77,21 @@
...
@@ -77,6 +77,21 @@
<foreach
collection=
"messageIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
<foreach
collection=
"messageIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
#{item}
</foreach>
</foreach>
and content_type
<
4
</select>
<select
id=
"getNotifyItemsByMessageId4Jump"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from cultivate_notify_item where message_id=#{messageId} and jump_type is not null
</select>
<select
id=
"getNotifyItemsByMessageIds4Jump"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from cultivate_notify_item
where
message_id in
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and jump_type is not null
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/cultivate/CultivateNotifySend.xml
View file @
c787af15
...
@@ -143,7 +143,8 @@
...
@@ -143,7 +143,8 @@
a.message_id messageId,
a.message_id messageId,
a.create_time sendTime,
a.create_time sendTime,
a.title title,
a.title title,
a.show_home showHome
a.show_home showHome,
a.square_img squareImg
from cultivate_notify a
from cultivate_notify a
<if
test=
"keyword !=null"
>
<if
test=
"keyword !=null"
>
LEFT JOIN cultivate_notify_item b on a.message_id=b.message_id
LEFT JOIN cultivate_notify_item b on a.message_id=b.message_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