Commit 89cfb632 by 吴迪

Merge remote-tracking branch 'origin/master'

parents dad59c2b 277eef5c
...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.TopicnewsEntity; import io.office.modules.manage.entity.TopicnewsEntity;
import io.office.modules.manage.entity.dto.NewsParams; import io.office.modules.manage.entity.dto.NewsParams;
...@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author rkl * @author rkl
...@@ -111,4 +113,21 @@ public class HotFollowController extends AbstractController { ...@@ -111,4 +113,21 @@ public class HotFollowController extends AbstractController {
return R.error(e.getMessage()); return R.error(e.getMessage());
} }
} }
/**
* 资讯中心查看
*/
@Login
@GetMapping("/api/hotFollowList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R getDetail(@RequestParam Map<String,Object> params) {
// newsParams.setClassId(435);
// Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams,
// new Page(newsParams.getPage(),newsParams.getLimit()));
// PageUtils pageUtils = new PageUtils(page);
// return R.ok().put("page", pageUtils);
return null;
}
} }
...@@ -52,6 +52,8 @@ public class NewsController extends AbstractController { ...@@ -52,6 +52,8 @@ public class NewsController extends AbstractController {
// @RequiresPermissions("manage:news:info") // @RequiresPermissions("manage:news:info")
public R info(@PathVariable("id") Integer id) { public R info(@PathVariable("id") Integer id) {
NewsEntity news = newsService.getById(id); NewsEntity news = newsService.getById(id);
String name = this.newsService.selectClassName(news.getClassid());
news.setClassName(name);
return R.ok().put("news", news); return R.ok().put("news", news);
} }
...@@ -139,17 +141,14 @@ public class NewsController extends AbstractController { ...@@ -139,17 +141,14 @@ public class NewsController extends AbstractController {
/** /**
* 资讯中心 * 资讯中心
*/ */
@Login @Login
@PostMapping("/api/realTimeInfo") @PostMapping("/api/realTimeInfo")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("manage:news:list")
public R realTimeInfo(@RequestParam Map<String, Object> params) { public R realTimeInfo(@RequestBody NewsParams newsParams) {
try { Page<NewsEntity> page = this.newsService.selectRealTimeInfo(newsParams,
return R.ok().put("data", newsService.selectRealTimeInfo(params)); new Page(newsParams.getPage(), newsParams.getLimit()));
} catch (Exception e) { PageUtils pageUtils = new PageUtils(page);
log.error("realTimeInfo error:", e); return R.ok().put("page", pageUtils);
return R.error(e.getMessage());
}
} }
/** /**
......
...@@ -72,7 +72,7 @@ public class NewtopicController extends AbstractController { ...@@ -72,7 +72,7 @@ public class NewtopicController extends AbstractController {
// @RequiresPermissions("manage:newtopic:save") // @RequiresPermissions("manage:newtopic:save")
public R save(@RequestBody NewtopicEntityVo newtopicVo) { public R save(@RequestBody NewtopicEntityVo newtopicVo) {
newtopicService.insert(newtopicVo, getUser()); newtopicService.insert(newtopicVo, getUser());
return R.ok(); return R.ok("新增成功");
} }
/** /**
...@@ -124,7 +124,7 @@ public class NewtopicController extends AbstractController { ...@@ -124,7 +124,7 @@ public class NewtopicController extends AbstractController {
QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<NewtopicEntity> newtopicEntityQueryWrapper = new QueryWrapper<>();
newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid()); newtopicEntityQueryWrapper.eq("classid",newtopicEntity.getClassid());
newtopicService.update(newtopicEntity,newtopicEntityQueryWrapper); newtopicService.update(newtopicEntity,newtopicEntityQueryWrapper);
return R.ok(); return R.ok("审核通过!");
} }
......
...@@ -5,13 +5,17 @@ import java.util.List; ...@@ -5,13 +5,17 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.IndexCarouselManageEntity; import io.office.modules.manage.entity.IndexCarouselManageEntity;
import io.office.modules.manage.entity.MedicalEntity;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PictureParams; import io.office.modules.manage.entity.dto.PictureParams;
import io.office.modules.manage.service.PictureService; import io.office.modules.manage.service.PictureService;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
...@@ -145,18 +149,12 @@ public class PictureController extends AbstractController { ...@@ -145,18 +149,12 @@ public class PictureController extends AbstractController {
@Login @Login
@PostMapping("/api/pictureList") @PostMapping("/api/pictureList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R pictureList() { public R pictureList(@RequestBody NewsParams params) {
try { try {
QueryWrapper<PictureEntity> newsEntityQueryWrapper = new QueryWrapper<>(); Page<PictureEntity> page = this.pictureService.selectPictureNewList(params,
newsEntityQueryWrapper.eq("status","1"); new Page(params.getPage(),params.getLimit()));
newsEntityQueryWrapper.gt("PicLevel","0"); PageUtils pageUtils = new PageUtils(page);
newsEntityQueryWrapper.orderByDesc("PicLevel"); return R.ok().put("page", pageUtils);
newsEntityQueryWrapper.orderByDesc("showtime");
newsEntityQueryWrapper.orderByDesc("inputDate");
newsEntityQueryWrapper.orderByDesc("pictureID");
List<PictureEntity> list = pictureService.list(newsEntityQueryWrapper);
return R.ok().put("data", list);
} catch (Exception e) { } catch (Exception e) {
log.error("pictureList error:", e); log.error("pictureList error:", e);
return R.error(e.getMessage()); return R.error(e.getMessage());
......
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.util.Arrays; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -10,6 +9,7 @@ import io.office.common.utils.R; ...@@ -10,6 +9,7 @@ import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.PolicyEntity; import io.office.modules.manage.entity.PolicyEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PolicyParams; import io.office.modules.manage.entity.dto.PolicyParams;
import io.office.modules.manage.service.PolicyService; import io.office.modules.manage.service.PolicyService;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
...@@ -139,20 +139,28 @@ public class PolicyController extends AbstractController { ...@@ -139,20 +139,28 @@ public class PolicyController extends AbstractController {
@Login @Login
@PostMapping("/api/policyList") @PostMapping("/api/policyList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList") // @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R policyList() { public R policyList(@RequestBody NewsParams params) {
try { // try {
QueryWrapper<PolicyEntity> policyEntityQueryWrapper = new QueryWrapper<>(); // QueryWrapper<PolicyEntity> policyEntityQueryWrapper = new QueryWrapper<>();
policyEntityQueryWrapper.eq("class","法律法规"); // policyEntityQueryWrapper.eq("class","法律法规");
policyEntityQueryWrapper.gt("levels","0"); // policyEntityQueryWrapper.gt("levels","0");
policyEntityQueryWrapper.eq("status ","1"); // policyEntityQueryWrapper.eq("status ","1");
policyEntityQueryWrapper.orderByDesc("levels"); // policyEntityQueryWrapper.orderByDesc("levels");
policyEntityQueryWrapper.orderByDesc("releasedate "); // policyEntityQueryWrapper.orderByDesc("releasedate ");
policyEntityQueryWrapper.orderByDesc("id"); // policyEntityQueryWrapper.orderByDesc("id");
return R.ok().put("data",policyService.list(policyEntityQueryWrapper)); // List<PolicyEntity> list = policyService.policyListN(policyEntityQueryWrapper);
} catch (Exception e) { // Page<PolicyEntity> page = new Page(params.getPage(),params.getLimit());
log.error("policyList error: {}", e); // page.setRecords(list);
return R.error(e.getMessage()); // PageUtils pageUtils = new PageUtils(page);
} // return R.ok().put("data",pageUtils);
// } catch (Exception e) {
// log.error("policyList error: {}", e);
// return R.error(e.getMessage());
// }
Page<PolicyEntity> page = this.policyService.selectPolicyNewList(params,
new Page(params.getPage(),params.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils);
} }
@Login @Login
......
...@@ -37,6 +37,7 @@ public class TopicnewsController extends AbstractController { ...@@ -37,6 +37,7 @@ public class TopicnewsController extends AbstractController {
@RequestMapping("/list") @RequestMapping("/list")
// @RequiresPermissions("generator:topicnews:list") // @RequiresPermissions("generator:topicnews:list")
public R list(@RequestBody NewsParams newsParams){ public R list(@RequestBody NewsParams newsParams){
newsParams.setClassId(428);
Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams, Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams,
new Page(newsParams.getPage(),newsParams.getLimit())); new Page(newsParams.getPage(),newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -62,6 +63,7 @@ public class TopicnewsController extends AbstractController { ...@@ -62,6 +63,7 @@ public class TopicnewsController extends AbstractController {
// @RequiresPermissions("generator:topicnews:save") // @RequiresPermissions("generator:topicnews:save")
public R save(@RequestBody NewsEntity news){ public R save(@RequestBody NewsEntity news){
try { try {
news.setClassid(428);
R r = this.topicnewsService.insertHdbd(news, getUser()); R r = this.topicnewsService.insertHdbd(news, getUser());
return r; return r;
} catch (Exception e) { } catch (Exception e) {
...@@ -128,5 +130,15 @@ public class TopicnewsController extends AbstractController { ...@@ -128,5 +130,15 @@ public class TopicnewsController extends AbstractController {
} }
} }
@Login
@PostMapping("/api/getHdbdList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R getHdbdList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams,
new Page(newsParams.getPage(),newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils);
}
} }
...@@ -30,5 +30,9 @@ public interface NewsDao extends BaseMapper<NewsEntity> { ...@@ -30,5 +30,9 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
*/ */
List<NewsEntity> selectNewsListCondition(@Param("newsEntity") NewsEntity newsEntity); List<NewsEntity> selectNewsListCondition(@Param("newsEntity") NewsEntity newsEntity);
List<NewsEntity> selectRealTimeInfo(Map<String, Object> params); List<NewsEntity> selectRealTimeInfo(@Param("newsParams")NewsParams newsParams, Page page);
List<NewsEntity> getHdbdList(@Param("newsParams")NewsParams newsParams, Page page);
String selectClassName(Integer classid);
} }
...@@ -3,6 +3,7 @@ package io.office.modules.manage.dao; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PictureParams; import io.office.modules.manage.entity.dto.PictureParams;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -20,4 +21,6 @@ import java.util.List; ...@@ -20,4 +21,6 @@ import java.util.List;
public interface PictureDao extends BaseMapper<PictureEntity> { public interface PictureDao extends BaseMapper<PictureEntity> {
List<PictureEntity> selectPictureList(@Param("params") PictureParams params, Page page); List<PictureEntity> selectPictureList(@Param("params") PictureParams params, Page page);
List<PictureEntity> selectPictureNewList(@Param("params")NewsParams params, Page page);
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PolicyEntity; import io.office.modules.manage.entity.PolicyEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PolicyParams; import io.office.modules.manage.entity.dto.PolicyParams;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -21,4 +22,6 @@ import java.util.List; ...@@ -21,4 +22,6 @@ import java.util.List;
public interface PolicyDao extends BaseMapper<PolicyEntity> { public interface PolicyDao extends BaseMapper<PolicyEntity> {
List<NewsEntity> selectPolicyList(@Param("newsParams") PolicyParams params, Page page); List<NewsEntity> selectPolicyList(@Param("newsParams") PolicyParams params, Page page);
List<PolicyEntity> selectPolicyNewList(@Param("newsParams")NewsParams params, Page page);
} }
...@@ -129,5 +129,7 @@ public class NewsEntity implements Serializable { ...@@ -129,5 +129,7 @@ public class NewsEntity implements Serializable {
* $column.comments * $column.comments
*/ */
private Date checkdate; private Date checkdate;
@TableField(exist = false)
private String className;
} }
...@@ -33,6 +33,8 @@ public interface NewsService extends IService<NewsEntity> { ...@@ -33,6 +33,8 @@ public interface NewsService extends IService<NewsEntity> {
List<NewsEntity> selectNewsListCondition(NewsEntity newsEntity); List<NewsEntity> selectNewsListCondition(NewsEntity newsEntity);
List<NewsEntity> selectRealTimeInfo(Map<String, Object> params); Page<NewsEntity> selectRealTimeInfo(NewsParams newsParams, Page page);
String selectClassName(Integer classid);
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PictureParams; import io.office.modules.manage.entity.dto.PictureParams;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
...@@ -31,5 +32,7 @@ public interface PictureService extends IService<PictureEntity> { ...@@ -31,5 +32,7 @@ public interface PictureService extends IService<PictureEntity> {
R verifyPicture(PictureEntity picture, SysUserEntity user); R verifyPicture(PictureEntity picture, SysUserEntity user);
Page<PictureEntity> selectPictureList(PictureParams params, Page page); Page<PictureEntity> selectPictureList(PictureParams params, Page page);
Page<PictureEntity> selectPictureNewList(NewsParams params, Page page);
} }
...@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils; ...@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils;
import io.office.common.utils.R; import io.office.common.utils.R;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.PolicyEntity; import io.office.modules.manage.entity.PolicyEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PolicyParams; import io.office.modules.manage.entity.dto.PolicyParams;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
...@@ -31,5 +32,7 @@ public interface PolicyService extends IService<PolicyEntity> { ...@@ -31,5 +32,7 @@ public interface PolicyService extends IService<PolicyEntity> {
R verifyTopic(PolicyEntity policyEntity, SysUserEntity user); R verifyTopic(PolicyEntity policyEntity, SysUserEntity user);
Page<PictureEntity> selectPolicyList(PolicyParams params, Page page); Page<PictureEntity> selectPolicyList(PolicyParams params, Page page);
Page<PolicyEntity> selectPolicyNewList(NewsParams params, Page page);
} }
...@@ -38,5 +38,6 @@ public interface TopicnewsService extends IService<TopicnewsEntity> { ...@@ -38,5 +38,6 @@ public interface TopicnewsService extends IService<TopicnewsEntity> {
List<TopicNewsPartyVo>getTopicNewsByCondition(TopicNewsPartyRequestVo topicNewsPartyRequestVo); List<TopicNewsPartyVo>getTopicNewsByCondition(TopicNewsPartyRequestVo topicNewsPartyRequestVo);
Page<NewsEntity> getHdbdList(NewsParams newsParams, Page page);
} }
...@@ -114,8 +114,17 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements ...@@ -114,8 +114,17 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
} }
@Override @Override
public List<NewsEntity> selectRealTimeInfo(Map<String, Object> params) { public Page<NewsEntity> selectRealTimeInfo(NewsParams newsParams, Page page) {
return newsDao.selectRealTimeInfo(params); List<NewsEntity> newsList = this.newsDao.selectRealTimeInfo(newsParams, page);
page.setRecords(newsList);
return page;
}
@Override
public String selectClassName(Integer classid) {
String name = this.newsDao.selectClassName(classid);
return name;
} }
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ import io.office.common.utils.R; ...@@ -7,6 +7,7 @@ import io.office.common.utils.R;
import io.office.modules.manage.dao.PictureDao; import io.office.modules.manage.dao.PictureDao;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PictureParams; import io.office.modules.manage.entity.dto.PictureParams;
import io.office.modules.manage.service.PictureService; import io.office.modules.manage.service.PictureService;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
...@@ -107,4 +108,11 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i ...@@ -107,4 +108,11 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i
return page; return page;
} }
@Override
public Page<PictureEntity> selectPictureNewList(NewsParams params, Page page) {
List<PictureEntity> newsList = this.pictureDao.selectPictureNewList(params, page);
page.setRecords(newsList);
return page;
}
} }
\ No newline at end of file
...@@ -9,6 +9,7 @@ import io.office.modules.manage.dao.PolicyDao; ...@@ -9,6 +9,7 @@ import io.office.modules.manage.dao.PolicyDao;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PictureEntity; import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.PolicyEntity; import io.office.modules.manage.entity.PolicyEntity;
import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.entity.dto.PolicyParams; import io.office.modules.manage.entity.dto.PolicyParams;
import io.office.modules.manage.service.PolicyService; import io.office.modules.manage.service.PolicyService;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
...@@ -104,4 +105,11 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyDao, PolicyEntity> impl ...@@ -104,4 +105,11 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyDao, PolicyEntity> impl
return page; return page;
} }
@Override
public Page<PolicyEntity> selectPolicyNewList(NewsParams params, Page page) {
List<PolicyEntity> newsList = this.policyDao.selectPolicyNewList(params, page);
page.setRecords(newsList);
return page;
}
} }
\ No newline at end of file
...@@ -111,4 +111,11 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt ...@@ -111,4 +111,11 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
return topicnewsDao.getTopicNewsByCondition(topicNewsPartyRequestVo); return topicnewsDao.getTopicNewsByCondition(topicNewsPartyRequestVo);
} }
@Override
public Page<NewsEntity> getHdbdList(NewsParams newsParams, Page page) {
List<NewsEntity> list = this.newsDao.getHdbdList(newsParams,page);
page.setRecords(list);
return page;
}
} }
\ No newline at end of file
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
<if test="indexCarouselManage.classnum !=null and indexCarouselManage.classnum !=''"> <if test="indexCarouselManage.classnum !=null and indexCarouselManage.classnum !=''">
and t.classnum = #{indexCarouselManage.classnum} and t.classnum = #{indexCarouselManage.classnum}
</if> </if>
<if test="indexCarouselManage.startTime !=null and indexCarouselManage.endTime !=null">
and starttime_index BETWEEN #{indexCarouselManage.startTime} AND #{indexCarouselManage.endTime}
</if>
<choose> <choose>
<when test="indexCarouselManage.levels != 0"> <when test="indexCarouselManage.levels != 0">
AND t.levels = #{indexCarouselManage.levels} AND t.levels = #{indexCarouselManage.levels}
......
...@@ -199,11 +199,40 @@ ...@@ -199,11 +199,40 @@
t1.name t1.name
from news t from news t
LEFT JOIN newsClass t1 LEFT JOIN newsClass t1
on t.classid = t1.columnid on t.classid = t1.id
where t1.name is not null where t1.name is not null
and t.classid = #{classid} and t.classid = #{newsParams.classId}
and t.levels > 0 and t.levels > 0
and t.status = '1' and t.status = '1'
order by t.levels desc,t.showtime desc ,t.id desc order by t.levels desc,t.showtime desc ,t.id desc
</select> </select>
<select id="getHdbdList" resultMap="newsMap">
SELECT t.id,
t.title,
t.author,
t.showtime,
t.startdate,
t.keyword,
t.editor,
t.lasteditor,
t.auditor,
t.status,
t1.classid,
t.levels,
t.releasedate,
t.updatedate
FROM TopIcNews t1
LEFT JOIN
news t
ON t1.NewsId = t.id
and t.levels > 0
and t.status = '1'
and t1.classid = #{newsParams.classId}
order by t.levels desc,t.showtime desc ,t.id desc
</select>
<select id="selectClassName" resultType="java.lang.String">
SELECT name FROM newsClass t where id = #{classid}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
<if test="params.pictureType !='' and params.pictureType !=null"> <if test="params.pictureType !='' and params.pictureType !=null">
and t.Picture_type =#{params.pictureType} and t.Picture_type =#{params.pictureType}
</if> </if>
<if test="params.inputDateStart !=null and params.inputDateEnd !=null">
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if>
<choose> <choose>
<when test="params.pictureLevel != 0"> <when test="params.pictureLevel != 0">
AND PicLevel = #{params.pictureLevel} AND PicLevel = #{params.pictureLevel}
...@@ -65,4 +68,24 @@ ...@@ -65,4 +68,24 @@
ORDER BY ORDER BY
pictureID DESC pictureID DESC
</select> </select>
<select id="selectPictureNewList" resultMap="pictureMap" parameterType="io.office.modules.manage.entity.dto.PictureParams">
SELECT
t.pictureID,
t.title,
t.Picture_type,
t.showtime,
t.inputDate,
t.keyword,
t.Editor,
t.lasteditor,
t.auditor,
t.Status,
t.PicLevel
FROM
picture t
where 1=1
and t.PicLevel > 0
and t.status = '1'
order by t.PicLevel desc,t.showtime desc ,t.inputDate desc,t.pictureID desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -49,5 +49,12 @@ ...@@ -49,5 +49,12 @@
id DESC id DESC
</select> </select>
<select id="selectPolicyNewList" resultMap="policyMap" parameterType="io.office.modules.manage.entity.dto.PolicyParams">
select id,class,title,editor,lasteditor,releasedate,updatedate,auditor,status,levels from Policy
where 1=1
and levels > 0
and status = '1'
order by levels desc,releasedate desc ,id desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
<select id="selectTopicList" resultType="io.office.modules.manage.entity.NewsEntity"> <select id="selectTopicList" resultType="io.office.modules.manage.entity.NewsEntity">
SELECT SELECT
a.classid, a.classid,
a.newsid id, a.newsid id,
b.title, b.title,
b.author, b.author,
b.showtime, b.showtime,
b.startdate, b.startdate,
b.keyword, b.keyword,
b.editor, b.editor,
b.lasteditor, b.lasteditor,
b.auditor, b.auditor,
b.status, b.status,
b.levels, b.levels,
b.releasedate, b.releasedate,
b.updatedate b.updatedate
FROM FROM
TopIcNews AS a (select classid,newsid FROM TopIcNews group BY classid,newsid) AS a
LEFT JOIN news AS b ON a.newsid = b.id LEFT JOIN news AS b ON a.newsid = b.id
WHERE WHERE
a.classid = #{newsParams.classId} a.classid = #{newsParams.classId}
<if test="newsParams.releaseTimeStart !=null and newsParams.releaseTimeEnd !=null"> <if test="newsParams.releaseTimeStart !=null and newsParams.releaseTimeEnd !=null">
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
</otherwise> </otherwise>
</choose> </choose>
ORDER BY ORDER BY
b.levels DESC, a.newsid DESC
b.releasedate DESC
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment