根据海洋会定制会议管理系统, 包括后台管理,前台报名等

MeetingImagesServiceImpl.java 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package io.renren.modules.admin.service.impl;
  2. import org.apache.commons.lang.StringUtils;
  3. import org.springframework.stereotype.Service;
  4. import java.util.HashMap;
  5. import java.util.List;
  6. import java.util.Map;
  7. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  8. import com.baomidou.mybatisplus.core.metadata.IPage;
  9. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  10. import io.renren.common.utils.PageUtils;
  11. import io.renren.common.utils.Query;
  12. import io.renren.modules.admin.dao.MeetingImagesDao;
  13. import io.renren.modules.admin.entity.MeetingImagesEntity;
  14. import io.renren.modules.admin.service.MeetingImagesService;
  15. @Service("meetingImagesService")
  16. public class MeetingImagesServiceImpl extends ServiceImpl<MeetingImagesDao, MeetingImagesEntity>
  17. implements MeetingImagesService {
  18. @Override
  19. public PageUtils queryPage(Map<String, Object> params) {
  20. Long meetingId = Long.valueOf((String) params.get("meetingId"));
  21. String key = params.containsKey("key") ? (String) params.get("key") : null;
  22. IPage<MeetingImagesEntity> page = this.page(new Query<MeetingImagesEntity>().getPage(params),
  23. new QueryWrapper<MeetingImagesEntity>().eq("meeting_id", meetingId).like(StringUtils.isNotBlank(key),
  24. "title", key));
  25. return new PageUtils(page);
  26. }
  27. @Override
  28. public PageUtils listImages(Map<String, Object> params) {
  29. Long meetingId = Long.valueOf((String) params.get("meetingId"));
  30. IPage<MeetingImagesEntity> page = this.page(new Query<MeetingImagesEntity>().getPage(params),
  31. new QueryWrapper<MeetingImagesEntity>().eq("meeting_id", meetingId).orderByDesc("sort").orderByAsc("id"));
  32. return new PageUtils(page);
  33. }
  34. }