Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
ms
soss
Commits
49f1e40e
Commit
49f1e40e
authored
May 16, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
65c71962
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
57 deletions
+56
-57
soss-system/src/main/java/com/soss/system/domain/vo/PushBean.java
+51
-51
soss-system/src/main/java/com/soss/system/push/impl/PushServiceImpl.java
+5
-6
No files found.
soss-system/src/main/java/com/soss/system/domain/vo/PushBean.java
View file @
49f1e40e
package
com
.
soss
.
system
.
domain
.
vo
;
//package com.soss.system.domain.vo;
//
//
import
com.alibaba.fastjson.JSONObject
;
//import com.alibaba.fastjson.JSONObject;
//
import
java.util.Map
;
//import java.util.Map;
//
public
class
PushBean
{
//public class PushBean {
// 必填, 通知内容, 内容可以为空字符串,则表示不展示到通知栏。
// // 必填, 通知内容, 内容可以为空字符串,则表示不展示到通知栏。
private
String
alert
;
// private String alert;
// 可选, 附加信息, 供业务使用。
// // 可选, 附加信息, 供业务使用。
private
Map
<
String
,
String
>
extras
;
// private Map<String, String> extras;
//android专用// 可选, 通知标题,如果指定了,则通知里原来展示 App名称的地方,将展示成这个字段。
// //android专用// 可选, 通知标题,如果指定了,则通知里原来展示 App名称的地方,将展示成这个字段。
private
String
title
;
// private String title;
//
public
JSONObject
getMessageCount
()
{
// public JSONObject getMessageCount() {
return
messageCount
;
// return messageCount;
}
// }
//
public
void
setMessageCount
(
JSONObject
messageCount
)
{
// public void setMessageCount(JSONObject messageCount) {
this
.
messageCount
=
messageCount
;
// this.messageCount = messageCount;
}
// }
//
private
JSONObject
messageCount
;
// private JSONObject messageCount;
//
//
public
String
getAlert
()
{
// public String getAlert() {
return
alert
;
// return alert;
}
// }
//
public
void
setAlert
(
String
alert
)
{
// public void setAlert(String alert) {
this
.
alert
=
alert
;
// this.alert = alert;
}
// }
//
public
Map
<
String
,
String
>
getExtras
()
{
// public Map<String, String> getExtras() {
return
extras
;
// return extras;
}
// }
//
public
void
setExtras
(
Map
<
String
,
String
>
extras
)
{
// public void setExtras(Map<String, String> extras) {
this
.
extras
=
extras
;
// this.extras = extras;
}
// }
//
public
String
getTitle
()
{
// public String getTitle() {
return
title
;
// return title;
}
// }
//
public
void
setTitle
(
String
title
)
{
// public void setTitle(String title) {
this
.
title
=
title
;
// this.title = title;
}
// }
}
//}
\ No newline at end of file
\ No newline at end of file
soss-system/src/main/java/com/soss/system/push/impl/PushServiceImpl.java
View file @
49f1e40e
package
com
.
soss
.
system
.
push
.
impl
;
package
com
.
soss
.
system
.
push
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.soss.system.push.PushService
;
import
com.soss.system.push.PushService
;
import
com.soss.system.service.impl.MachineApiServiceImpl
;
import
com.soss.system.service.impl.MachineApiServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -48,11 +47,11 @@ public class PushServiceImpl implements PushService {
...
@@ -48,11 +47,11 @@ public class PushServiceImpl implements PushService {
@Override
@Override
public
boolean
sendPush
(
String
machineCode
,
Integer
screenNo
,
String
message
)
{
public
boolean
sendPush
(
String
machineCode
,
Integer
screenNo
,
String
message
)
{
JSONObject
requestBody
=
new
JSONObject
();
//
JSONObject requestBody = new JSONObject();
requestBody
.
put
(
"machineCode"
,
machineCode
);
//
requestBody.put("machineCode", machineCode);
requestBody
.
put
(
"screenNo"
,
screenNo
);
//
requestBody.put("screenNo", screenNo);
requestBody
.
put
(
"message"
,
message
);
//
requestBody.put("message", message);
machineApiService
.
sendRequest
(
requestBody
.
toJSONString
(),
"/v1/push"
);
//
machineApiService.sendRequest(requestBody.toJSONString(), "/v1/push");
return
true
;
return
true
;
}
}
}
}
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