Browse Source

河湖新增区划查询

master
牧羊人 4 years ago
parent
commit
db129f8b6c
2 changed files with 14 additions and 0 deletions
  1. +7
    -0
      src/main/java/com/taauav/admin/query/TauvDriverQuery.java
  2. +7
    -0
      src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java

+ 7
- 0
src/main/java/com/taauav/admin/query/TauvDriverQuery.java View File

import com.taauav.common.core.mps.BaseQuery; import com.taauav.common.core.mps.BaseQuery;
import lombok.Data; import lombok.Data;


import java.math.BigInteger;

/** /**
* 河道查询条件 * 河道查询条件
*/ */
*/ */
private Integer level; private Integer level;


/**
* 区划ID
*/
private BigInteger driverArea;

} }

+ 7
- 0
src/main/java/com/taauav/admin/service/impl/TauvDriverServiceImpl.java View File

if (query.getLevel() != null && query.getLevel() > 0) { if (query.getLevel() != null && query.getLevel() > 0) {
queryWrapper.eq("level", query.getLevel()); queryWrapper.eq("level", query.getLevel());
} }
// 区划ID
if (query.getDriverArea() != null) {
List<BigInteger> cityIds = lsCityService.getChildCityIds(query.getDriverArea());
// 加入当前选中的区划
cityIds.add(query.getDriverArea());
queryWrapper.in("driver_area", cityIds);
}
queryWrapper.eq("mark", 1); queryWrapper.eq("mark", 1);
queryWrapper.orderByDesc("id"); queryWrapper.orderByDesc("id");
IPage<TauvDriver> page = new Page<>(query.getPage(), query.getPageSize()); IPage<TauvDriver> page = new Page<>(query.getPage(), query.getPageSize());

Loading…
Cancel
Save