记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
aca96511
Commit
aca96511
authored
Feb 23, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化发送订阅消息接口;演出时间状态判断提出来;演出数据参数提出来;
parent
d23e8361
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
66 deletions
+86
-66
ISweetAppletSubMsgService.java
...dnet/service/sweet/service/ISweetAppletSubMsgService.java
+2
-2
SweetAppletSubMsg.java
...com/liquidnet/service/sweet/entity/SweetAppletSubMsg.java
+13
-3
SweetAppletSubMsgController.java
...service/sweet/controller/SweetAppletSubMsgController.java
+14
-5
SweetAppletSubMsgServiceImpl.java
...vice/sweet/service/impl/SweetAppletSubMsgServiceImpl.java
+57
-56
No files found.
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetAppletSubMsgService.java
View file @
aca96511
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.entity.SweetAppletSubMsg
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
...
...
@@ -16,7 +16,7 @@ public interface ISweetAppletSubMsgService extends IService<SweetAppletSubMsg> {
ResponseDto
sendMsg
(
Integer
type
,
String
targetId
);
ResponseDto
sendOfMid
(
Integer
type
,
String
midList
,
String
targetId
);
ResponseDto
sendOfMid
(
String
midList
,
String
targetId
,
Integer
timeType
);
ResponseDto
<
Boolean
>
create
(
String
openId
,
String
templateId
,
String
targetId
,
Integer
appletType
,
Integer
activityType
);
...
...
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetAppletSubMsg.java
View file @
aca96511
...
...
@@ -2,11 +2,12 @@ package com.liquidnet.service.sweet.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 小程序订阅消息记录表
...
...
@@ -17,7 +18,7 @@ import lombok.EqualsAndHashCode;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetAppletSubMsg
implements
Serializable
{
public
class
SweetAppletSubMsg
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -69,5 +70,14 @@ public class SweetAppletSubMsg implements Serializable {
*/
private
LocalDateTime
updatedAt
;
private
static
final
SweetAppletSubMsg
obj
=
new
SweetAppletSubMsg
();
public
static
SweetAppletSubMsg
getNew
()
{
try
{
return
(
SweetAppletSubMsg
)
obj
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
return
new
SweetAppletSubMsg
();
}
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetAppletSubMsgController.java
View file @
aca96511
...
...
@@ -31,7 +31,11 @@ public class SweetAppletSubMsgController {
private
SweetAppletSubMsgServiceImpl
subMsgService
;
@GetMapping
(
"send"
)
@ApiOperation
(
"发送模版消息"
)
@ApiOperation
(
"发送模版消息 定时任务使用"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"活动类型"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"targetId"
,
value
=
"演出ID"
,
required
=
true
),
})
public
ResponseDto
send
(
@RequestParam
Integer
type
,
@RequestParam
String
targetId
...
...
@@ -40,13 +44,18 @@ public class SweetAppletSubMsgController {
}
@PostMapping
(
"sendOfMid"
)
@ApiOperation
(
"发送模版消息OfMid"
)
@ApiOperation
(
"发送模版消息OfMid, 特殊情况手动调用使用"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"midList"
,
value
=
"mid列表逗号分割"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"String"
,
name
=
"targetId"
,
value
=
"演出ID"
),
@ApiImplicitParam
(
type
=
"form"
,
dataType
=
"Integer"
,
name
=
"timeType"
,
value
=
"是否判断演出时间 1判断 2不判断"
),
})
public
ResponseDto
sendOfMid
(
@RequestParam
Integer
type
,
@RequestParam
String
midList
,
@RequestParam
String
targetId
@RequestParam
(
defaultValue
=
""
)
String
targetId
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
timeType
)
{
return
subMsgService
.
sendOfMid
(
type
,
midList
,
targetId
);
return
subMsgService
.
sendOfMid
(
midList
,
targetId
,
timeType
);
}
// 一次订阅 可以多次发 直到用户取消订阅 所以正规做法应该是记录订阅模版 不关联任何推送数据 等推送的时候查是否订阅某模版
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetAppletSubMsgServiceImpl.java
View file @
aca96511
This diff is collapsed.
Click to expand it.
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