feat(operation-record): 添加机构ID过滤功能
- 在OperationRecordParam中新增organizationIds字段用于机构ID集合查询 - 修改OperationRecordMapper.xml添加机构ID条件判断和IN查询逻辑 - 支持多机构ID的批量筛选操作记录 - 完善参数校验和查询条件构建机制
This commit is contained in:
@@ -16,6 +16,12 @@
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.organizationIds != null and param.organizationIds.size() > 0">
|
||||
AND b.organization_id IN
|
||||
<foreach collection="param.organizationIds" item="item" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.module != null">
|
||||
AND a.module LIKE CONCAT('%', #{param.module}, '%')
|
||||
</if>
|
||||
|
||||
@@ -10,6 +10,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 操作日志参数
|
||||
*
|
||||
@@ -31,6 +33,10 @@ public class OperationRecordParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "机构id合集")
|
||||
@TableField(exist = false)
|
||||
private Set<Integer> organizationIds;
|
||||
|
||||
@Schema(description = "操作模块")
|
||||
private String module;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user