|
|
|
@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.events.service.impl; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
@ -151,8 +152,20 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<EpdcEventsCommentsDTO> listOfEventsCommentSByEventId(String eventId) { |
|
|
|
return baseDao.selectListOfCommentsByEventId(eventId); |
|
|
|
public PageData<EpdcEventsCommentsDTO> listOfEventsCommentSByEventId(String eventId, Map<String, Object> params) { |
|
|
|
//分页参数
|
|
|
|
long pageIndex = 1; |
|
|
|
long pageSize = 10; |
|
|
|
if (params.get(Constant.PAGE) != null) { |
|
|
|
pageIndex = Long.parseLong((String) params.get(Constant.PAGE)); |
|
|
|
} |
|
|
|
if (params.get(Constant.LIMIT) != null) { |
|
|
|
pageSize = Long.parseLong((String) params.get(Constant.LIMIT)); |
|
|
|
} |
|
|
|
pageIndex = (pageIndex - 1)*pageSize; |
|
|
|
List<EpdcEventsCommentsDTO> list = baseDao.selectListOfCommentsByEventId(eventId, pageIndex, pageSize); |
|
|
|
long total = baseDao.selectCountOfComments(eventId); |
|
|
|
return new PageData<>(list, total); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|