| | |
| | | String code = strArrays.substring(0, strArrays.length() - 1); |
| | | return R.status(articleService.upcomment(code, type)); |
| | | } |
| | | |
| | | /** |
| | | * 查询个人资讯 |
| | | * |
| | | * @param response |
| | | * @param article |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectArticleG") |
| | | public R<IPage<Article>> selectArticleG(HttpServletResponse response, ArticleVo article, Query query) { |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials", "true"); |
| | | return R.data(articleService.selectArticleG(Condition.getPage(query), article)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField("words_content") |
| | | private String wordsContent; |
| | | /** |
| | | * 是否是个人 |
| | | */ |
| | | private int type; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<Article> selectArticlePage(IPage<Article> page, @Param("article") ArticleVo article); |
| | | List<Article> selectArticleG(IPage<Article> page, @Param("article") ArticleVo article); |
| | | /** |
| | | * 查询资讯分页信息(角色权限) |
| | | * @param page |
| | |
| | | update sys_article set iscomment = #{type} |
| | | where id in(${ids}) |
| | | </update> |
| | | |
| | | <!--个人资讯--> |
| | | <select id="selectArticleG" resultType="org.springblade.modules.article.entity.Article"> |
| | | select * from sys_article |
| | | where 1=1 |
| | | <if test="article.title!=null and article.title!=''"> |
| | | and title like concat('%',#{article.title},'%') |
| | | </if> |
| | | <if test="article.sourceName!=null and article.sourceName!=''"> |
| | | and source_name like concat('%',#{article.sourceName},'%') |
| | | </if> |
| | | <if test="article.startTime!=null and article.startTime!=''"> |
| | | and create_time>=#{article.startTime} |
| | | </if> |
| | | <if test="article.endTime!=null and article.endTime!=''"> |
| | | and create_time<=#{article.endTime} |
| | | </if> |
| | | <if test="article.articleType!=null and article.articleType!=''"> |
| | | and article_type = #{article.articleType} |
| | | </if> |
| | | <if test="article.keyword!=null and article.keyword!=''"> |
| | | AND CONCAT(title,source_name) |
| | | LIKE CONCAT ('%', #{article.keyword},'%') |
| | | </if> |
| | | and iswords = "0" and type!=1 |
| | | order by create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.article.entity.Article; |
| | | import org.springblade.modules.article.vo.ArticleVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | * @return |
| | | */ |
| | | IPage<Article> selectArticlePage(IPage<Article> page, ArticleVo article); |
| | | IPage<Article> selectArticleG(IPage<Article> page, ArticleVo article); |
| | | |
| | | /** |
| | | * 查询资讯分页信息(角色权限) |
| | |
| | | import org.springblade.modules.article.vo.ArticleVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | | * @title 资讯服务实现层 |
| | |
| | | return page.setRecords(baseMapper.selectArticlePage(page,article)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<Article> selectArticleG(IPage<Article> page, ArticleVo article) { |
| | | return page.setRecords(baseMapper.selectArticleG(page,article)); |
| | | } |
| | | |
| | | /** |
| | | * 查询资讯分页信息(角色权限) |
| | | * @param page |