分区前端页面修改

This commit is contained in:
SjS 2025-05-20 13:31:55 +08:00
parent d79d9fdebe
commit 47e879bd19
4 changed files with 14 additions and 1 deletions

View File

@ -12,4 +12,7 @@ public class PartQuery extends PartVO {
@ApiModelProperty("分区ID列表")
private List<Long> ids;
@ApiModelProperty("父分区ID列表")
private List<Long> parentIds;
}

View File

@ -74,5 +74,5 @@ public interface PartMapper
public List<Long> selectIdByQuery(@Param("query") PartQuery query);
List<PartVO> selectChildren(PartVO partVO);
List<PartVO> selectChildren(List<Long> ids);
}

View File

@ -44,6 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.picture != null and query.picture != ''"> and picture = #{query.picture}</if>
<if test="query.storeName != null and query.storeName != ''"> and bs.store_name like concat('%', #{query.storeName}, '%') </if>
<if test="query.parentName != null and query.parentName != ''"> and bp_parent.part_name like concat('%', #{query.parentName}, '%') </if>
<if test="query.parentIds != null and query.parentIds.size() > 0">
and bp.parent_id in
<foreach collection="query.parentIds" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</if>
${@com.ruoyi.framework.util.DataScopeUtil@create(query.scope)
.userSetAlias("bs.user_id")
.storeAlias("bp.store_id",query.storePermissions)

View File

@ -114,6 +114,10 @@ public class PartServiceImpl implements PartService
@Override
public int deletePartByPartIds(List<Long> partIds)
{
PartQuery query = new PartQuery();
query.setParentIds(partIds);
List<PartVO> list = partMapper.selectPartList(query);
ServiceUtil.assertion(!list.isEmpty(),"当前区域有子分区,不允许删除");
return partMapper.deletePartByPartIds(partIds);
}