分区卡座合并

This commit is contained in:
SjS 2025-05-21 17:17:07 +08:00
parent af992b181b
commit bd64b0f69d
6 changed files with 14 additions and 2 deletions

View File

@ -91,7 +91,7 @@ public class DataScopeUtil {
}
// 全部数据范围
if (DataScopeConstants.DATA_SCOPE_ALL.equals(dataScope)) {
sqlString = new StringBuilder();
sqlString = new StringBuilder(" OR 1=1 ");
conditions.add(dataScope);
break;
}

View File

@ -15,4 +15,7 @@ public class BoothQuery extends BoothVO {
@ApiModelProperty("当前时间")
private LocalDateTime time;
@ApiModelProperty("父分区ID")
private Long partParentId;
}

View File

@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.picture != null and query.picture != ''"> and bb.picture = #{query.picture}</if>
<if test="query.partName != null and query.partName != ''"> and bp.part_name like concat('%', #{query.partName}, '%') </if>
<if test="query.time != null"> and bb.expired_time &gt;= #{query.time} </if>
<if test="query.partParentId != null"> and bp_parent.part_id = #{query.partParentId} OR bp.part_id = #{query.partParentId} </if>
<if test="query.storeName != null and query.storeName != ''"> and bs.store_name like concat('%', #{query.storeName}, '%') </if>
${@com.ruoyi.framework.util.DataScopeUtil@create(query.scope)
.userSetAlias("bs.user_id")

View File

@ -97,4 +97,6 @@ public interface BoothService
int unbindUser(BoothVO booth);
int userChangeBind(Long usingBoothId ,Long changeBoothId,Long userId);
List<Long> selectChildrenIds(BoothQuery query);
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.bst.booth.service.impl;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@ -261,6 +262,11 @@ public class BoothServiceImpl implements BoothService {
}
}
@Override
public List<Long> selectChildrenIds(BoothQuery query) {
return Collections.emptyList();
}
@Override
public DeviceIotVO lighting(BoothVO booth, Long userId, boolean requiredIot) {

View File

@ -61,7 +61,7 @@ public class BoothController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('bst:booth:list')")
@GetMapping("/list")
public TableDataInfo list(BoothQuery query) {
public TableDataInfo list(BoothQuery query,boolean needChildren) {
startPage();
startOrderBy();
query.setScope(true);