H.X
2 years ago
2 changed files with 58 additions and 0 deletions
@ -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); |
||||
|
||||
} |
@ -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…
Reference in new issue