【message】接口开发

pull/3/head
liuhanqing 2021-01-02 23:02:03 +08:00
parent 076e0e97ef
commit 77a0779bf9
29 changed files with 221 additions and 18 deletions

View File

@ -1,14 +0,0 @@
package cn.stylefeng.roses.kernel.message.api;
/**
*
* <p>
*
*
* @author liuhanqing
* @date 2021/1/1 20:21
*/
public interface MessageApi {
}

View File

@ -0,0 +1,87 @@
package cn.stylefeng.roses.kernel.message.api;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageResponse;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageSendParam;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageParam;
import java.util.List;
/**
*
* <p>
*
*
* @author liuhanqing
* @date 2021/1/2 21:21
*/
public interface MessageApi {
/**
*
*
* @param messageSendParam
* @author liuhanqing
* @date 2021/1/2 21:21
*/
void sendMessage(MessageSendParam messageSendParam);
/**
*
*
* @param messageParam
* @author liuhanqing
* @date 2021/1/2 22:15
*/
void updateReadFlag(MessageParam messageParam);
/**
*
*
* @param messageId id
* @author liuhanqing
* @date 2021/1/2 21:21
*/
void deleteByMessageId(Long messageId);
/**
*
*
* @param messageIds id
* @author liuhanqing
* @date 2021/1/2 21:21
*/
void batchDeleteByMessageId(String messageIds);
/**
*
*
* @param messageParam
* @return
* @author liuhanqing
* @date 2021/1/2 21:21
*/
MessageResponse messageDetail(MessageParam messageParam);
/**
*
*
* @param messageParam
* @return
* @author liuhanqing
* @date 2021/1/2 21:21
*/
PageResult<MessageResponse> queryMessagePage(MessageParam messageParam);
/**
*
*
* @param messageParam
* @return
* @author liuhanqing
* @date 2021/1/2 21:21
*/
List<MessageResponse> queryMessageList(MessageParam messageParam);
}

View File

@ -1,4 +1,4 @@
package cn.stylefeng.roses.kernel.message.api.pojo.manage;
package cn.stylefeng.roses.kernel.message.api.pojo;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import lombok.Data;

View File

@ -0,0 +1,67 @@
package cn.stylefeng.roses.kernel.message.api.pojo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
*
* @author liuhanqing
* @date 2021/1/2 21:23
*/
@Data
public class MessageResponse implements Serializable {
/**
* id
*/
private Long messageId;
/**
* id
*/
private Long receiveUserId;
/**
* id
*/
private Long sendUserId;
/**
*
*/
private String messageTitle;
/**
*
*/
private String messageContent;
/**
*
*/
private String messageType;
/**
*
*/
private Date messageSendTime;
/**
* id
*/
private Long businessId;
/**
*
*/
private String businessType;
/**
* 0-1-
*/
private Integer readFlag;
}

View File

@ -1,4 +1,4 @@
package cn.stylefeng.roses.kernel.message.api.pojo.manage;
package cn.stylefeng.roses.kernel.message.api.pojo;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import lombok.Data;

View File

@ -0,0 +1,63 @@
package cn.stylefeng.roses.kernel.message.db;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.message.api.MessageApi;
import cn.stylefeng.roses.kernel.message.api.constants.MessageConstants;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageParam;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageResponse;
import cn.stylefeng.roses.kernel.message.api.pojo.MessageSendParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
*
* @author liuhanqing
* @date 2021/1/2 22:00
*/
@Slf4j
@Service
public class MessageDbServiceImpl implements MessageApi {
@Override
public void sendMessage(MessageSendParam messageSendParam) {
String receiveUserIds = messageSendParam.getReceiveUserIds();
// 发送所有人判断
if (MessageConstants.RECEIVE_ALL_USER_FLAG.equals(receiveUserIds)) {
}
}
@Override
public void updateReadFlag(MessageParam messageParam) {
}
@Override
public void deleteByMessageId(Long messageId) {
}
@Override
public void batchDeleteByMessageId(String messageIds) {
}
@Override
public MessageResponse messageDetail(MessageParam messageParam) {
return null;
}
@Override
public PageResult<MessageResponse> queryMessagePage(MessageParam messageParam) {
return null;
}
@Override
public List<MessageResponse> queryMessageList(MessageParam messageParam) {
return null;
}
}

View File

@ -11,7 +11,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>kernel-d-message</artifactId>
<artifactId>kernel-s-message</artifactId>
<packaging>pom</packaging>

View File

@ -74,7 +74,7 @@
<module>kernel-s-dict</module>
<!--系统消息模块-->
<module>kernel-d-message</module>
<module>kernel-s-message</module>
<!--系统管理基础业务-->
<module>kernel-s-system</module>