Compare commits

..

No commits in common. "e390702eed930d37762907c463688621ec845346" and "493c346d9bd5eb601111df84d834d96285bd9082" have entirely different histories.

15 changed files with 123 additions and 137 deletions

View File

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.adId != null and query.adId != ''"> and bad.ad_id = #{query.adId}</if> <if test="query.adId != null and query.adId != ''"> and bad.ad_id = #{query.adId}</if>
<if test="query.type != null and query.type != ''"> and bad.type = #{query.type}</if> <if test="query.type != null and query.type != ''"> and bad.type = #{query.type}</if>
<if test="query.picture != null and query.picture != ''"> and bad.picture = #{query.picture}</if> <if test="query.picture != null and query.picture != ''"> and bad.picture = #{query.picture}</if>
<if test="query.url != null and query.url != ''"> and bad.url like concat('%',#{query.url},'%') </if> <if test="query.url != null and query.url != ''"> and bad.url = #{query.url}</if>
<if test="query.deleted != null "> and bad.deleted = #{query.deleted}</if> <if test="query.deleted != null "> and bad.deleted = #{query.deleted}</if>
<if test="query.urlType != null and query.urlType != ''"> and bad.url_type = #{query.urlType}</if> <if test="query.urlType != null and query.urlType != ''"> and bad.url_type = #{query.urlType}</if>
${query.params.dataScope} ${query.params.dataScope}

View File

@ -32,16 +32,8 @@ public class Article extends BaseEntity
@ApiModelProperty("标题") @ApiModelProperty("标题")
private String title; private String title;
@Excel(name = "简介")
@ApiModelProperty("简介")
private String brief;
@Excel(name = "内容详情") @Excel(name = "内容详情")
@ApiModelProperty("内容详情") @ApiModelProperty("内容详情")
private String content; private String content;
@Excel(name = "文章类型")
@ApiModelProperty(value = "文章类型")
private String code;
} }

View File

@ -1,9 +1,4 @@
package com.ruoyi.bst.article.domain; package com.ruoyi.bst.article.domain;
import lombok.Data;
@Data
public class ArticleQuery extends Article{ public class ArticleQuery extends Article{
} }

View File

@ -1,13 +1,7 @@
package com.ruoyi.bst.article.domain; package com.ruoyi.bst.article.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
public class ArticleVO extends Article { public class ArticleVO extends Article {
@ApiModelProperty(value = "分类名称")
private String articleCategoryName;
} }

View File

@ -73,7 +73,7 @@ public interface ArticleMapper
*/ */
public int deleteArticleByIds(Long[] ids); public int deleteArticleByIds(Long[] ids);
public List<ArticleVO> selectChildrenById(Long id); public ArticleVO selectChildrenById(Long id);
ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery); ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery);
} }

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="ArticleVO" id="ArticleResult" autoMapping="true"> <resultMap type="ArticleVO" id="ArticleResult" autoMapping="true">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="categoryId" column="category_id" /> <result property="categoryId" column="category_id" />
<result property="areaId" column="area_id" />
<result property="title" column="title" /> <result property="title" column="title" />
<result property="content" column="content" /> <result property="content" column="content" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -15,25 +16,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectArticleVo"> <sql id="selectArticleVo">
select select
bart.id, id,
bart.category_id, category_id,
bart.title, area_id,
bart.content, title,
bart.create_time, content,
bart.brief, create_time,
bart.code, update_time
bart.update_time, from bst_article
bac.category_name as article_category_name
from bst_article bart
left join bst_article_category bac on bart.category_id = bac.id
</sql> </sql>
<sql id="searchCondition"> <sql id="searchCondition">
<if test="query.id != null "> and bart.id = #{query.id}</if> <if test="query.id != null "> and id = #{query.id}</if>
<if test="query.categoryId != null "> and bart.category_id = #{query.categoryId}</if> <if test="query.categoryId != null "> and category_id = #{query.categoryId}</if>
<if test="query.brief != null "> and bart.brief = #{query.brief}</if> <if test="query.areaId != null "> and area_id = #{query.areaId}</if>
<if test="query.title != null and query.title != ''"> and bart.title like concat ('',#{query.title},'') </if> <if test="query.title != null and query.title != ''"> and title = #{query.title}</if>
<if test="query.content != null and query.content != ''"> and bart.content = #{query.content}</if> <if test="query.content != null and query.content != ''"> and content = #{query.content}</if>
${query.params.dataScope} ${query.params.dataScope}
</sql> </sql>
@ -46,12 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectArticleById" parameterType="Long" resultMap="ArticleResult"> <select id="selectArticleById" parameterType="Long" resultMap="ArticleResult">
<include refid="selectArticleVo"/> <include refid="selectArticleVo"/>
where bart.id = #{id} where id = #{id}
</select> </select>
<select id="selectChildrenById" resultType="com.ruoyi.bst.article.domain.ArticleVO"> <select id="selectChildrenById" resultType="com.ruoyi.bst.article.domain.ArticleVO">
<include refid="selectArticleVo"/> <include refid="selectArticleVo"/>
where category_id = #{categoryId} where id = #{categoryId}
</select> </select>
<select id="selectArticleByCode" resultType="com.ruoyi.bst.article.domain.ArticleVO"> <select id="selectArticleByCode" resultType="com.ruoyi.bst.article.domain.ArticleVO">
@ -63,17 +61,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into bst_article insert into bst_article
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="categoryId != null">category_id,</if> <if test="categoryId != null">category_id,</if>
<if test="areaId != null">area_id,</if>
<if test="title != null and title != ''">title,</if> <if test="title != null and title != ''">title,</if>
<if test="content != null">content,</if> <if test="content != null">content,</if>
<if test="brief != null">brief,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="categoryId != null">#{categoryId},</if> <if test="categoryId != null">#{categoryId},</if>
<if test="areaId != null">#{areaId},</if>
<if test="title != null and title != ''">#{title},</if> <if test="title != null and title != ''">#{title},</if>
<if test="content != null">#{content},</if> <if test="content != null">#{content},</if>
<if test="brief != null">#{brief},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
@ -83,8 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into bst_article insert into bst_article
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
category_id, category_id,
area_id,
title, title,
brief,
content, content,
create_time, create_time,
update_time, update_time,
@ -121,6 +119,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</otherwise> </otherwise>
</choose> </choose>
</foreach> </foreach>
<foreach open="area_id = CASE id" collection="list" item="item" close="END,">
<choose>
<when test="item.areaId != null ">
WHEN #{item.id} THEN #{item.areaId}
</when>
<otherwise>
WHEN #{item.id} THEN `area_id`
</otherwise>
</choose>
</foreach>
<foreach open="title = CASE id" collection="list" item="item" close="END,"> <foreach open="title = CASE id" collection="list" item="item" close="END,">
<choose> <choose>
<when test="item.title != null and item.title != ''"> <when test="item.title != null and item.title != ''">
@ -169,15 +177,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<update id="updateArticle" parameterType="Article"> <update id="updateArticle" parameterType="Article">
update bst_article bart update bst_article
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<include refid="updateColumns"/> <include refid="updateColumns"/>
</trim> </trim>
where bart.id = #{data.id} where id = #{data.id}
</update> </update>
<sql id="updateColumns"> <sql id="updateColumns">
<if test="data.categoryId != null">category_id = #{data.categoryId},</if> <if test="data.categoryId != null">category_id = #{data.categoryId},</if>
<if test="data.areaId != null">area_id = #{data.areaId},</if>
<if test="data.title != null and data.title != ''">title = #{data.title},</if> <if test="data.title != null and data.title != ''">title = #{data.title},</if>
<if test="data.content != null">content = #{data.content},</if> <if test="data.content != null">content = #{data.content},</if>
<if test="data.createTime != null">create_time = #{data.createTime},</if> <if test="data.createTime != null">create_time = #{data.createTime},</if>

View File

@ -62,8 +62,9 @@ public interface ArticleService
*/ */
public int deleteArticleById(Long id); public int deleteArticleById(Long id);
ArticleVO selectChildrenByCategoryId(Long id);
ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery); ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery);
List<ArticleVO> selectArticleByCategoryId(Long categoryId); ArticleVO selectArticleByCategoryId(Long id);
} }

View File

@ -31,7 +31,9 @@ public class ArticleServiceImpl implements ArticleService
@Autowired @Autowired
private ArticleCategoryService articleCategoryService; private ArticleCategoryService articleCategoryService;
@Autowired
private AreaService areaService;
/** /**
* 查询文章 * 查询文章
* *
@ -69,6 +71,11 @@ public class ArticleServiceImpl implements ArticleService
if(articleCategoryService.selectArticleCategoryById(article.getCategoryId()) ==null){ if(articleCategoryService.selectArticleCategoryById(article.getCategoryId()) ==null){
throw new ServiceException("当前分类不存在"); throw new ServiceException("当前分类不存在");
} }
//所属区域必须存在
if (areaService.selectAreaById(article.getAreaId()) == null){
throw new ServiceException("所属区域不存在");
}
article.setCreateTime(DateUtils.getNowDate()); article.setCreateTime(DateUtils.getNowDate());
return articleMapper.insertArticle(article); return articleMapper.insertArticle(article);
@ -88,6 +95,11 @@ public class ArticleServiceImpl implements ArticleService
throw new ServiceException("当前分类不存在"); throw new ServiceException("当前分类不存在");
} }
//所属区域必须存在
if (areaService.selectAreaById(article.getAreaId()) == null){
throw new ServiceException("所属区域不存在");
}
article.setUpdateTime(DateUtils.getNowDate()); article.setUpdateTime(DateUtils.getNowDate());
return articleMapper.updateArticle(article); return articleMapper.updateArticle(article);
} }
@ -116,6 +128,10 @@ public class ArticleServiceImpl implements ArticleService
return articleMapper.deleteArticleById(id); return articleMapper.deleteArticleById(id);
} }
@Override
public ArticleVO selectChildrenByCategoryId(Long id) {
return articleMapper.selectChildrenById(id);
}
@Override @Override
public ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery) { public ArticleVO selectArticleByCode(ArticleCategoryQuery articleCategoryQuery) {
@ -123,7 +139,7 @@ public class ArticleServiceImpl implements ArticleService
} }
@Override @Override
public List<ArticleVO> selectArticleByCategoryId(Long categoryId) { public ArticleVO selectArticleByCategoryId(Long id) {
return articleMapper.selectChildrenById(categoryId); return articleMapper.selectChildrenById(id);
} }
} }

View File

@ -79,7 +79,7 @@ public interface ArticleCategoryMapper
* @param id * @param id
* @return * @return
*/ */
List<ArticleCategoryVO> selectChildrenCategory(Long id); List<Long> selectChildren(Long id);
/** /**
@ -89,10 +89,5 @@ public interface ArticleCategoryMapper
* @return 结果 * @return 结果
*/ */
public void deleteArticleCategoryByIds(List<Long> childrenIds); void deleteArticleCategoryByIds(List<Long> childrenIds);
public int updateArticleCategorySortAndStatusOnly(ArticleCategory articleCategory);
} }

View File

@ -25,11 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<sql id="searchCondition"> <sql id="searchCondition">
<if test="query.id != null "> and bac.id = #{query.id}</if> <if test="query.id != null "> and id = #{query.id}</if>
<if test="query.categoryName != null and query.categoryName != ''"> and bac.category_name like concat('%', #{query.categoryName}, '%')</if> <if test="query.categoryName != null and query.categoryName != ''"> and category_name like concat('%', #{query.categoryName}, '%')</if>
<if test="query.parentId != null "> and bac.parent_id = #{query.parentId}</if> <if test="query.parentId != null "> and parent_id = #{query.parentId}</if>
<if test="query.categoryStatus != null "> and bac.category_status = #{query.categoryStatus}</if> <if test="query.categoryStatus != null "> and category_status = #{query.categoryStatus}</if>
<if test="query.sort != null "> and bac.sort = #{query.sort}</if> <if test="query.sort != null "> and sort = #{query.sort}</if>
${query.params.dataScope} ${query.params.dataScope}
</sql> </sql>
@ -53,10 +53,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </select>
<select id="selectChildrenCategory" resultType="ArticleCategoryVO"> <select id="selectChildren" resultType="java.lang.Long">
<include refid="selectArticleCategoryVo"/> select bac.id from bst_article_category bac
<where> <where>
bac.parent_id = #{id} bac.parent_id IN
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</where> </where>
</select> </select>
@ -171,23 +174,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<include refid="updateColumns"/> <include refid="updateColumns"/>
</trim> </trim>
where id = #{id} where id = #{data.id}
</update>
<!--updateArticleCategorySortOnly-->
<update id="updateArticleCategorySortAndStatusOnly" parameterType="ArticleCategory">
update bst_article_category set
<if test="categoryStatus != null">category_status = #{categoryStatus},</if>
<if test="sort != null">sort = #{sort}</if>
where id = #{id}
</update> </update>
<sql id="updateColumns"> <sql id="updateColumns">
<if test="categoryName != null and categoryName != ''">category_name = #{data.categoryName},</if> <if test="data.categoryName != null and data.categoryName != ''">category_name = #{data.categoryName},</if>
<if test="parentId != null">parent_id = #{data.parentId},</if> <if test="data.parentId != null">parent_id = #{data.parentId},</if>
<if test="categoryStatus != null">category_status = #{data.categoryStatus},</if> <if test="data.categoryStatus != null">category_status = #{data.categoryStatus},</if>
<if test="sort != null">sort = #{data.sort},</if> <if test="data.sort != null">sort = #{data.sort},</if>
<if test="createTime != null">create_time = #{data.createTime},</if> <if test="data.createTime != null">create_time = #{data.createTime},</if>
</sql> </sql>
<delete id="deleteArticleCategoryById" parameterType="Long"> <delete id="deleteArticleCategoryById" parameterType="Long">

View File

@ -47,6 +47,13 @@ public interface ArticleCategoryService
*/ */
public int updateArticleCategory(ArticleCategory articleCategory); public int updateArticleCategory(ArticleCategory articleCategory);
/**
* 批量删除文章分类
*
* @param ids 需要删除的文章分类主键集合
* @return 结果
*/
public int deleteArticleCategoryByIds(Long[] ids);
/** /**
* 删除文章分类信息 * 删除文章分类信息

View File

@ -6,9 +6,7 @@ import com.github.pagehelper.PageHelper;
import com.ruoyi.bst.area.domain.AreaQuery; import com.ruoyi.bst.area.domain.AreaQuery;
import com.ruoyi.bst.area.domain.AreaVO; import com.ruoyi.bst.area.domain.AreaVO;
import com.ruoyi.bst.article.domain.ArticleVO; import com.ruoyi.bst.article.domain.ArticleVO;
import com.ruoyi.bst.article.mapper.ArticleMapper;
import com.ruoyi.bst.article.service.ArticleService; import com.ruoyi.bst.article.service.ArticleService;
import com.ruoyi.bst.articleCategory.domain.enums.ArticleCategoryStatus;
import com.ruoyi.bst.device.utils.DeviceUtil; import com.ruoyi.bst.device.utils.DeviceUtil;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
@ -38,8 +36,6 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
@Autowired @Autowired
private ArticleService articleService; private ArticleService articleService;
@Autowired
private ArticleMapper articleMapper;
/** /**
* 查询文章分类 * 查询文章分类
@ -89,15 +85,10 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
if (flag){ if (flag){
ServiceUtil.assertion(true,"不允许插入重复分类"); ServiceUtil.assertion(true,"不允许插入重复分类");
} }
//只允许两次分类
if(articleCategory.getParentId()!= null) { if(articleCategory.getParentId()!= null) {
ArticleCategoryVO vo = articleCategoryMapper.selectArticleCategoryById(articleCategory.getParentId()); Boolean hasParent = hasParent(articleCategory.getParentId());
ServiceUtil.assertion(vo==null,"当前分类不存在"); ServiceUtil.assertion(hasParent,"该分类下不允许再次分类");
// 只允许两次分类
if (vo.getParentId()!=0) {
Boolean hasParent = hasParent(articleCategory.getParentId());
ServiceUtil.assertion(hasParent,"该分类下不允许再次分类");
}
} }
articleCategory.setCreateTime(DateUtils.getNowDate()); articleCategory.setCreateTime(DateUtils.getNowDate());
return articleCategoryMapper.insertArticleCategory(articleCategory); return articleCategoryMapper.insertArticleCategory(articleCategory);
@ -112,25 +103,6 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
@Override @Override
public int updateArticleCategory(ArticleCategory articleCategory) public int updateArticleCategory(ArticleCategory articleCategory)
{ {
ArticleCategoryVO vo = articleCategoryMapper.selectArticleCategoryById(articleCategory.getId());
//检查是否仅修改排序或状态字段
if (vo != null && vo.getParentId().equals(articleCategory.getParentId())&&vo.getCategoryName().equals(articleCategory.getCategoryName())) {
if (vo.getCategoryStatus()!=null) {
if (vo.getParentId() != null) {
ArticleCategoryVO parentVO = articleCategoryMapper.selectArticleCategoryById(vo.getParentId());
ServiceUtil.assertion(parentVO.getCategoryStatus().equals(ArticleCategoryStatus.DISABLED.getCode()),"该分类所属分类已禁用,无法启用该分类");
}
// 判断当前分类下是否有启用的分类
List<ArticleCategoryVO> childrenCategoryList = articleCategoryMapper.selectChildrenCategory(articleCategory.getId());
childrenCategoryList.forEach(child -> {
if (Objects.equals(child.getCategoryStatus(), ArticleCategoryStatus.ENABLED.getCode())) {
ServiceUtil.assertion(!childrenCategoryList.isEmpty(),"当前分类下有启用的分类,不可禁用");
}
});
}
return articleCategoryMapper.updateArticleCategorySortAndStatusOnly(articleCategory);
}
//目标分类不允许子分类重名 //目标分类不允许子分类重名
Boolean flag = articleCategoryMapper.checkByNameAndParetId(articleCategory); Boolean flag = articleCategoryMapper.checkByNameAndParetId(articleCategory);
if (flag){ if (flag){
@ -144,18 +116,31 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
return articleCategoryMapper.updateArticleCategory(articleCategory); return articleCategoryMapper.updateArticleCategory(articleCategory);
} }
@Override
public int deleteArticleCategoryByIds(Long[] ids) {
return 0;
}
private Boolean hasParent(Long id){ private Boolean hasParent(Long id){
if (id == 0){
return false;
}
Long parentId = selectArticleCategoryById(id).getParentId(); Long parentId = selectArticleCategoryById(id).getParentId();
if (parentId != null){ if (parentId != null){
return true; return true;
} }
return false; return false;
} }
/**
* 批量删除文章分类
*
* @param ids 需要删除的文章分类主键
* @return 结果
*/
// @Override
// @Transactional
// public int deleteArticleCategoryByIds(List<Long> ids)
// {
//
// return articleCategoryMapper.deleteArticleCategoryByIds(ids);
// }
/** /**
* 删除文章分类信息 * 删除文章分类信息
@ -166,12 +151,14 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService
@Override @Override
public int deleteArticleCategoryById(Long categoryId) public int deleteArticleCategoryById(Long categoryId)
{ {
// 如果当前分类有子分类先删除子分类 List<Long> childrenIds = articleCategoryMapper.selectChildren(categoryId);
List<ArticleCategoryVO> childrenCategoryList = articleCategoryMapper.selectChildrenCategory(categoryId); if (childrenIds != null){
ServiceUtil.assertion(!childrenCategoryList.isEmpty(),"请先删除当前分类下的子分类"); articleCategoryMapper.deleteArticleCategoryByIds(childrenIds);
// 如果当前分类下有文章先删除文章 }
List<ArticleVO> articleList = articleService.selectArticleByCategoryId(categoryId); ArticleVO articleVO = articleService.selectArticleByCategoryId(categoryId);
ServiceUtil.assertion(!articleList.isEmpty(),"当前分类下存在文章,请先删除分类下的文章"); if (articleVO != null){
return 0;
}
return articleCategoryMapper.deleteArticleCategoryById(categoryId); return articleCategoryMapper.deleteArticleCategoryById(categoryId);
} }
} }

View File

@ -16,26 +16,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectComplaintVo"> <sql id="selectComplaintVo">
select select
bc.id, id,
bc.user_id, user_id,
bc.create_time, create_time,
bc.content, content,
bc.type, type,
bc.picture, picture,
bc.contact, contact
su.user_name from bst_complaint
from bst_complaint bc
left join sys_user su
on bc.user_id = su.user_id
</sql> </sql>
<sql id="searchCondition"> <sql id="searchCondition">
<if test="query.id != null "> and bc.id = #{query.id}</if> <if test="query.id != null "> and id = #{query.id}</if>
<if test="query.userId != null "> and bc.user_id = #{query.userId}</if> <if test="query.userId != null "> and user_id = #{query.userId}</if>
<if test="query.content != null and query.content != ''"> and bc.content = #{query.content}</if> <if test="query.content != null and query.content != ''"> and content = #{query.content}</if>
<if test="query.type != null and query.type != ''"> and bc.type = #{query.type}</if> <if test="query.type != null and query.type != ''"> and type = #{query.type}</if>
<if test="query.picture != null and query.picture != ''"> and bc.picture = #{query.picture}</if> <if test="query.picture != null and query.picture != ''"> and picture = #{query.picture}</if>
<if test="query.contact != null and query.contact != ''"> and bc.contact like concat('%',#{query.contact},'%') </if> <if test="query.contact != null and query.contact != ''"> and contact = #{query.contact}</if>
${query.params.dataScope} ${query.params.dataScope}
</sql> </sql>

View File

@ -36,7 +36,6 @@ public class ArticleCategoryController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(ArticleCategoryQuery articleCategoryQuery) public AjaxResult list(ArticleCategoryQuery articleCategoryQuery)
{ {
articleCategoryQuery.setScope(true);
List<ArticleCategoryVO> list = articleCategoryService.selectArticleCategoryList(articleCategoryQuery); List<ArticleCategoryVO> list = articleCategoryService.selectArticleCategoryList(articleCategoryQuery);
return success(list); return success(list);
} }

View File

@ -40,7 +40,6 @@ public class ArticleController extends BaseController
{ {
startPage(); startPage();
startOrderBy(); startOrderBy();
query.setScope(true);
List<ArticleVO> list = articleService.selectArticleList(query); List<ArticleVO> list = articleService.selectArticleList(query);
return getDataTable(list); return getDataTable(list);
} }