|
|
@@ -1,14 +1,18 @@ |
|
|
|
package com.tuoheng.api.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.tuoheng.api.entity.domain.ThWestreamMessage; |
|
|
|
import com.tuoheng.api.entity.domain.WestreamActivity; |
|
|
|
import com.tuoheng.api.entity.request.WestreamMessageQuery; |
|
|
|
import com.tuoheng.api.mapper.ThWestreamMessageMapper; |
|
|
|
import com.tuoheng.api.service.IWestreamMessageService; |
|
|
|
import com.tuoheng.common.common.BaseEntity; |
|
|
|
import com.tuoheng.common.utils.JsonResult; |
|
|
|
import com.tuoheng.common.utils.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
@@ -22,6 +26,9 @@ import java.util.List; |
|
|
|
public class ThWestreamMessageServiceImpl extends ServiceImpl<ThWestreamMessageMapper, ThWestreamMessage> |
|
|
|
implements IWestreamMessageService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ThWestreamMessageMapper westreamMessageMapper; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 查询用户对应消息记录通知 |
|
|
@@ -36,10 +43,13 @@ public class ThWestreamMessageServiceImpl extends ServiceImpl<ThWestreamMessageM |
|
|
|
if (StringUtils.isNull(query.getTenantId())) { |
|
|
|
return JsonResult.error("TenantId为空"); |
|
|
|
} |
|
|
|
List<ThWestreamMessage> list = this.list(Wrappers.<ThWestreamMessage>lambdaQuery() |
|
|
|
query.checkParam(); |
|
|
|
IPage<ThWestreamMessage> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
|
|
|
|
IPage<ThWestreamMessage> pageDate = westreamMessageMapper.selectPage(page, Wrappers.<ThWestreamMessage>lambdaQuery() |
|
|
|
.eq(ThWestreamMessage::getOpenid, query.getOpenId()).eq(ThWestreamMessage::getTenantId, query.getTenantId()).eq(BaseEntity::getMark, 1)); |
|
|
|
|
|
|
|
return JsonResult.success(list); |
|
|
|
return JsonResult.success(pageDate); |
|
|
|
} |
|
|
|
|
|
|
|
/** |