fix
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package com.tailbet.service.impl;
|
||||
|
||||
import com.tailbet.entity.User;
|
||||
import com.tailbet.entity.DigitWhite;
|
||||
|
||||
import com.tailbet.mapper.UserMapper;
|
||||
import com.tailbet.mapper.DigitWhiteMapper;
|
||||
import com.tailbet.model.entity.DigitWhite;
|
||||
import com.tailbet.model.entity.User;
|
||||
import com.tailbet.openim.OpenIMClient;
|
||||
import com.tailbet.service.IPushService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -34,7 +35,7 @@ public class PushServiceImpl implements IPushService {
|
||||
for (DigitWhite white : whites) {
|
||||
User user = userMapper.selectById(white.getUserId());
|
||||
if (user != null) {
|
||||
PushService.PushMessage message = new PushService.PushMessage();
|
||||
IPushService.PushMessage message = new IPushService.PushMessage();
|
||||
message.setType(PUSH_TYPE_DIGIT_TRIAL);
|
||||
message.setTitle("尾数试算完成");
|
||||
message.setContent("可前往修改尾数");
|
||||
@@ -52,7 +53,7 @@ public class PushServiceImpl implements IPushService {
|
||||
*/
|
||||
@Override
|
||||
public void pushGameStart(Long groupId, String roundNo) {
|
||||
PushService.PushMessage message = new PushService.PushMessage();
|
||||
IPushService.PushMessage message = new IPushService.PushMessage();
|
||||
message.setType(PUSH_TYPE_GAME_START);
|
||||
message.setTitle("游戏开始");
|
||||
message.setContent(roundNo + "期已开始下注");
|
||||
@@ -68,7 +69,7 @@ public class PushServiceImpl implements IPushService {
|
||||
*/
|
||||
@Override
|
||||
public void pushGameResult(Long groupId, String roundNo, int digit, String playWins) {
|
||||
PushService.PushMessage message = new PushService.PushMessage();
|
||||
IPushService.PushMessage message = new IPushService.PushMessage();
|
||||
message.setType(PUSH_TYPE_RESULT);
|
||||
message.setTitle("开奖结果");
|
||||
message.setContent(roundNo + "期开奖\n尾数: " + digit + "\n中奖玩法: " + playWins);
|
||||
@@ -84,7 +85,7 @@ public class PushServiceImpl implements IPushService {
|
||||
* 发送单用户推送
|
||||
*/
|
||||
@Override
|
||||
public void sendPush(PushService.PushMessage message) {
|
||||
public void sendPush(IPushService.PushMessage message) {
|
||||
try {
|
||||
User user = userMapper.selectById(message.getUserId());
|
||||
if (user == null) {
|
||||
@@ -111,7 +112,7 @@ public class PushServiceImpl implements IPushService {
|
||||
* 广播推送消息给群成员
|
||||
*/
|
||||
@Override
|
||||
public void broadcastToGroup(Long groupId, PushService.PushMessage message) {
|
||||
public void broadcastToGroup(Long groupId, IPushService.PushMessage message) {
|
||||
try {
|
||||
// 通过OpenIM群消息发送
|
||||
openIMClient.sendGroupMessage(String.valueOf(groupId),
|
||||
@@ -122,4 +123,4 @@ public class PushServiceImpl implements IPushService {
|
||||
groupId, message.getType(), e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user