Skip to content

Commit

Permalink
feat: 移除没用的代码
Browse files Browse the repository at this point in the history
  • Loading branch information
KouShenhai committed Jul 7, 2024
1 parent c709430 commit f2c6ba4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 87 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@
import lombok.extern.slf4j.Slf4j;
import org.laokou.admin.convertor.MessageConvertor;
import org.laokou.admin.domain.gateway.MessageGateway;
import org.laokou.admin.domain.message.MessageDetail;
import org.laokou.admin.dto.message.MessageReadCmd;
import org.laokou.admin.dto.message.clientobject.MessageCO;
import org.laokou.admin.gatewayimpl.database.MessageMapper;
import org.laokou.common.i18n.dto.Result;
import org.springframework.stereotype.Component;

import static org.laokou.common.i18n.common.DSConstant.TENANT;
import static org.laokou.common.i18n.common.Read.YES;

/**
* 读取消息执行器.
Expand All @@ -56,7 +54,7 @@ public class MessageReadCmdExe {
@DS(TENANT)
public Result<MessageCO> execute(MessageReadCmd cmd) {
Long detailId = cmd.getDetailId();
messageGateway.read(new MessageDetail(detailId, YES.ordinal()));
// messageGateway.read(new MessageDetail(detailId, YES.ordinal()));
return Result.ok(messageConvertor.convertClientObj(messageMapper.selectByDetailId(detailId)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,17 @@
import org.laokou.admin.gatewayimpl.database.dataobject.MessageDO;
import org.laokou.admin.gatewayimpl.database.dataobject.MessageDetailDO;
import org.laokou.common.core.utils.IdGenerator;
import org.laokou.common.i18n.common.TypeEnum;
import org.laokou.common.i18n.common.exception.SystemException;
import org.laokou.common.i18n.utils.DateUtil;
import org.laokou.common.i18n.utils.LogUtil;
import org.laokou.common.mybatisplus.utils.MybatisUtil;
import org.laokou.common.mybatisplus.utils.TransactionalUtil;
import org.laokou.common.rocketmq.template.RocketMqTemplate;
import org.laokou.common.security.utils.UserUtil;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Set;

import static org.laokou.common.i18n.common.RocketMqConstant.LAOKOU_NOTICE_MESSAGE_TAG;
import static org.laokou.common.i18n.common.RocketMqConstant.LAOKOU_REMIND_MESSAGE_TAG;

/**
* 消息管理.
*
Expand All @@ -57,8 +52,6 @@ public class MessageGatewayImpl implements MessageGateway {

private final MessageMapper messageMapper;

private final RocketMqTemplate rocketMqTemplate;

private final TransactionalUtil transactionalUtil;

private final MessageConvertor messageConvertor;
Expand Down Expand Up @@ -134,15 +127,6 @@ private void createMessageDetail(Long messageId, Set<String> receiver) {
MessageDetailMapper::insertOne);
}

/**
* 查看消息标签.
* @param type 消息类型
* @return 消息标签
*/
private String getMessageTag(Integer type) {
return type == TypeEnum.NOTICE.ordinal() ? LAOKOU_NOTICE_MESSAGE_TAG : LAOKOU_REMIND_MESSAGE_TAG;
}

private MessageDetailDO convert(MessageDetail messageDetail) {
MessageDetailDO messageDetailDO = new MessageDetailDO();
messageDetailDO.setReadFlag(messageDetail.getReadFlag());
Expand Down

0 comments on commit f2c6ba4

Please sign in to comment.