Browse Source

# 消息模块缺失代码补充(二)

zhongwei
H.X 2 years ago
parent
commit
99430ae469
  1. 22
      hzims-service/message/src/main/java/com/hnac/hzims/message/service/IPushMessageService.java
  2. 36
      hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessagesServiceImpl.java

22
hzims-service/message/src/main/java/com/hnac/hzims/message/service/IPushMessageService.java

@ -0,0 +1,22 @@
package com.hnac.hzims.message.service;
import com.hnac.hzims.message.dto.PushMessageDTO;
import com.hnac.hzims.message.entity.PushMessageEntity;
import com.hnac.hzims.message.entity.config.SmsConfigEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* @author hx
*/
public interface IPushMessageService extends BaseService<PushMessageEntity> {
/**
* 获取短信推送列表
* @param pushMessageDTO 推送消息筛选条件
* @return
*/
List<PushMessageEntity> list(PushMessageDTO pushMessageDTO);
}

36
hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessagesServiceImpl.java

@ -0,0 +1,36 @@
package com.hnac.hzims.message.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.common.utils.DateUtil;
import com.hnac.hzims.message.dto.PushMessageDTO;
import com.hnac.hzims.message.entity.PushMessageEntity;
import com.hnac.hzims.message.mapper.PushMessageMapper;
import com.hnac.hzims.message.service.IPushMessageService;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author hx
*/
@Slf4j
@Service
public class PushMessagesServiceImpl extends BaseServiceImpl<PushMessageMapper, PushMessageEntity> implements IPushMessageService {
@Override
public List<PushMessageEntity> list(PushMessageDTO pushMessageDTO) {
LambdaQueryWrapper<PushMessageEntity> queryWrapper = Condition.getQueryWrapper(new PushMessageEntity(), pushMessageDTO);
if(Func.isNotEmpty(pushMessageDTO.getStartTime())) {
queryWrapper.ge(PushMessageEntity::getPushTime,pushMessageDTO.getStartTime());
}
if(Func.isNotEmpty(pushMessageDTO.getEndTime())) {
queryWrapper.le(PushMessageEntity::getPushTime,pushMessageDTO.getEndTime());
}
return this.list(queryWrapper);
}
}
Loading…
Cancel
Save