Commit 8fc82739 by guoxuejian

feat: add drone model key to WaylineSearchParam and update WaylineFileServiceImpl for filtering

parent 5409ec9b
...@@ -18,6 +18,9 @@ public class WaylineSearchParam { ...@@ -18,6 +18,9 @@ public class WaylineSearchParam {
@JsonProperty("order_by") @JsonProperty("order_by")
private String orderBy; private String orderBy;
@JsonProperty("drone_model_key")
private String droneModelKey;
private Boolean favorited; private Boolean favorited;
} }
...@@ -749,6 +749,8 @@ public class WaylineFileServiceImpl extends ServiceImpl<IWaylineFileMapper, Wayl ...@@ -749,6 +749,8 @@ public class WaylineFileServiceImpl extends ServiceImpl<IWaylineFileMapper, Wayl
// 名字 // 名字
waylineFileQueryWrapper.like(Objects.nonNull(param.getName()), WaylineFileEntity::getName, param.getName()); waylineFileQueryWrapper.like(Objects.nonNull(param.getName()), WaylineFileEntity::getName, param.getName());
waylineFileQueryWrapper.like(Objects.nonNull(request.getKey()), WaylineFileEntity::getName, request.getKey()); waylineFileQueryWrapper.like(Objects.nonNull(request.getKey()), WaylineFileEntity::getName, request.getKey());
// 设备型号
waylineFileQueryWrapper.eq(Objects.nonNull(param.getDroneModelKey()), WaylineFileEntity::getDroneModelKey, param.getDroneModelKey());
// There is a risk of SQL injection // There is a risk of SQL injection
waylineFileQueryWrapper.last(Objects.nonNull(request.getOrderBy()), " order by " + request.getOrderBy().toString()); waylineFileQueryWrapper.last(Objects.nonNull(request.getOrderBy()), " order by " + request.getOrderBy().toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment