123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package io.renren.modules.admin.service.impl;
- import org.apache.commons.lang.StringUtils;
- import org.springframework.stereotype.Service;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
- import com.baomidou.mybatisplus.core.metadata.IPage;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import io.renren.common.utils.PageUtils;
- import io.renren.common.utils.Query;
- import io.renren.modules.admin.dao.MeetingImagesDao;
- import io.renren.modules.admin.entity.MeetingImagesEntity;
- import io.renren.modules.admin.service.MeetingImagesService;
- @Service("meetingImagesService")
- public class MeetingImagesServiceImpl extends ServiceImpl<MeetingImagesDao, MeetingImagesEntity>
- implements MeetingImagesService {
- @Override
- public PageUtils queryPage(Map<String, Object> params) {
- Long meetingId = Long.valueOf((String) params.get("meetingId"));
- String key = params.containsKey("key") ? (String) params.get("key") : null;
- IPage<MeetingImagesEntity> page = this.page(new Query<MeetingImagesEntity>().getPage(params),
- new QueryWrapper<MeetingImagesEntity>().eq("meeting_id", meetingId).like(StringUtils.isNotBlank(key),
- "title", key));
- return new PageUtils(page);
- }
- @Override
- public PageUtils listImages(Map<String, Object> params) {
- Long meetingId = Long.valueOf((String) params.get("meetingId"));
- IPage<MeetingImagesEntity> page = this.page(new Query<MeetingImagesEntity>().getPage(params),
- new QueryWrapper<MeetingImagesEntity>().eq("meeting_id", meetingId).orderByDesc("sort").orderByAsc("id"));
- return new PageUtils(page);
- }
- }
|