[1078] 设备列表增加搜索和状态筛选

This commit is contained in:
lin
2025-07-15 18:21:11 +08:00
parent 44ed06bcbe
commit d40bc5a034
5 changed files with 41 additions and 7 deletions

View File

@@ -38,9 +38,9 @@ public interface JTTerminalMapper {
"WHERE " +
"1=1" +
" <if test='query != null'> AND (" +
"jd.phone_number LIKE concat('%',#{query},'%') " +
"jd.terminal_id LIKE concat('%',#{query},'%') " +
"jd.province_id LIKE concat('%',#{query},'%') " +
" jd.phone_number LIKE concat('%',#{query},'%') " +
"OR jd.terminal_id LIKE concat('%',#{query},'%') " +
"OR jd.province_id LIKE concat('%',#{query},'%') " +
"OR jd.city_id LIKE concat('%',#{query},'%') " +
"OR jd.maker_id LIKE concat('%',#{query},'%') " +
"OR jd.model LIKE concat('%',#{query},'%') " +

View File

@@ -28,6 +28,7 @@ public abstract class Re {
session.register(header.getPhoneNumber(), (int) header.getVersion(), header);
}
Rs rs = decode0(buf, header, session);
buf.release();
Rs rsHand = handler(header, session, service);
if (rs == null && rsHand != null) {
rs = rsHand;

View File

@@ -131,6 +131,11 @@ public class jt1078ServiceImpl implements Ijt1078Service {
@Override
public PageInfo<JTDevice> getDeviceList(int page, int count, String query, Boolean online) {
PageHelper.startPage(page, count);
if (query != null) {
query = query.replaceAll("/", "//")
.replaceAll("%", "/%")
.replaceAll("_", "/_");
}
List<JTDevice> all = jtDeviceMapper.getDeviceList(query, online);
return new PageInfo<>(all);
}