Commit 8e01cafd by rongkailun

【修改】bug处理

parent 59455424
......@@ -52,6 +52,8 @@ public class NewsController extends AbstractController {
// @RequiresPermissions("manage:news:info")
public R info(@PathVariable("id") Integer id) {
NewsEntity news = newsService.getById(id);
String name = this.newsService.selectClassName(news.getClassid());
news.setClassName(name);
return R.ok().put("news", news);
}
......
......@@ -33,4 +33,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsEntity> selectRealTimeInfo(@Param("newsParams")NewsParams newsParams, Page page);
List<NewsEntity> getHdbdList(@Param("newsParams")NewsParams newsParams, Page page);
String selectClassName(Integer classid);
}
......@@ -129,5 +129,7 @@ public class NewsEntity implements Serializable {
* $column.comments
*/
private Date checkdate;
@TableField(exist = false)
private String className;
}
......@@ -34,5 +34,7 @@ public interface NewsService extends IService<NewsEntity> {
List<NewsEntity> selectNewsListCondition(NewsEntity newsEntity);
Page<NewsEntity> selectRealTimeInfo(NewsParams newsParams, Page page);
String selectClassName(Integer classid);
}
......@@ -120,5 +120,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return page;
}
@Override
public String selectClassName(Integer classid) {
String name = this.newsDao.selectClassName(classid);
return name;
}
}
\ No newline at end of file
......@@ -49,6 +49,9 @@
<if test="indexCarouselManage.classnum !=null and indexCarouselManage.classnum !=''">
and t.classnum = #{indexCarouselManage.classnum}
</if>
<if test="indexCarouselManage.startTime !=null and indexCarouselManage.endTime !=null">
and starttime_index BETWEEN #{indexCarouselManage.startTime} AND #{indexCarouselManage.endTime}
</if>
<choose>
<when test="indexCarouselManage.levels != 0">
AND t.levels = #{indexCarouselManage.levels}
......
......@@ -231,4 +231,8 @@
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>
\ No newline at end of file
......@@ -54,6 +54,9 @@
<if test="params.pictureType !='' and params.pictureType !=null">
and t.Picture_type =#{params.pictureType}
</if>
<if test="params.inputDateStart !=null and params.inputDateEnd !=null">
and inputDate BETWEEN #{params.inputDateStart} AND #{params.inputDateEnd}
</if>
<choose>
<when test="params.pictureLevel != 0">
AND PicLevel = #{params.pictureLevel}
......
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