| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | |
|
| | | /**
|
| | | * 设备消息阅读状态服务
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface MsgDeviceReadStateService {
|
| | |
|
| | | /**
|
| | | * 查询对象
|
| | | * |
| | | * @param type
|
| | | * @param device
|
| | | * @param platform
|
| | | * @return
|
| | | */
|
| | | public MsgDeviceReadState getByDeviceAndPlatformAndType(String type, String device, int platform);
|
| | |
|
| | | /**
|
| | | * 设置设备消息已读
|
| | | * |
| | | * @param type
|
| | | * @param device
|
| | | * @param platform
|
| | | */
|
| | | public void setDeviceMsgRead(String type, String device, int platform);
|
| | |
|
| | | /**
|
| | | * 添加设备未读消息
|
| | | * |
| | | * @param type
|
| | | * @param device
|
| | | * @param platform
|
| | | * @param msgCount
|
| | | */
|
| | | public void addUnreadDeviceMsg(String type, String device, int platform, int msgCount, String msg);
|
| | |
|
| | | /**
|
| | | * 设置所有消息已读
|
| | | * |
| | | * @param device
|
| | | * @param platform
|
| | | */
|
| | | public void setAllMsgRead(String device, int platform);
|
| | |
|
| | | /**
|
| | | * 初始化读取状态
|
| | | * |
| | | * @param device
|
| | | * @param platform
|
| | | */
|
| | | public void initReadState(String device, int platform, String type);
|
| | |
|
| | | /**
|
| | | * 获取设备未读消息数量
|
| | | * |
| | | * @param device
|
| | | * @param platform
|
| | | * @return
|
| | | */
|
| | | public int getUnReadCount(String device, int platform);
|
| | |
|
| | | /**
|
| | | * 获取设备未读消息数量(根据类型)
|
| | | * @param device
|
| | | * @param platform
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public int getUnReadCount(String device, int platform, String type);
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.inter.msg; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState; |
| | | |
| | | /** |
| | | * 设备消息阅读状态服务 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | public interface MsgDeviceReadStateService { |
| | | |
| | | /** |
| | | * 查询对象 |
| | | * |
| | | * @param type |
| | | * @param device |
| | | * @param platform |
| | | * @return |
| | | */ |
| | | public MsgDeviceReadState getByDeviceAndPlatformAndType(String type, String device, int platform); |
| | | |
| | | /** |
| | | * 设置设备消息已读 |
| | | * |
| | | * @param type |
| | | * @param device |
| | | * @param platform |
| | | */ |
| | | public void setDeviceMsgRead(String type, String device, int platform); |
| | | |
| | | |
| | | /** |
| | | * 添加设备未读消息 |
| | | * @param type |
| | | * @param device |
| | | * @param platform |
| | | * @param msgCount |
| | | * @param msg |
| | | * @param msgTime -消息发生时间 |
| | | */ |
| | | public void addUnreadDeviceMsg(String type, String device, int platform, int msgCount, String msg,Date msgTime); |
| | | |
| | | /** |
| | | * 设置所有消息已读 |
| | | * |
| | | * @param device |
| | | * @param platform |
| | | */ |
| | | public void setAllMsgRead(String device, int platform); |
| | | |
| | | /** |
| | | * 初始化读取状态 |
| | | * |
| | | * @param device |
| | | * @param platform |
| | | */ |
| | | public void initReadState(String device, int platform, String type); |
| | | |
| | | /** |
| | | * 获取设备未读消息数量 |
| | | * |
| | | * @param device |
| | | * @param platform |
| | | * @return |
| | | */ |
| | | public int getUnReadCount(String device, int platform); |
| | | |
| | | /** |
| | | * 获取设备未读消息数量(根据类型) |
| | | * @param device |
| | | * @param platform |
| | | * @param type |
| | | * @return |
| | | */ |
| | | public int getUnReadCount(String device, int platform, String type); |
| | | |
| | | } |