分页 排序 拆分
This commit is contained in:
@@ -69,7 +69,7 @@ public class PageUtil {
|
|||||||
*
|
*
|
||||||
* @return QueryWrapper
|
* @return QueryWrapper
|
||||||
*/
|
*/
|
||||||
public QueryWrapper buildPageQueryWrapper() {
|
public QueryWrapper buildSortQueryWrapper() {
|
||||||
QueryWrapper queryWrapper = QueryWrapper.create();
|
QueryWrapper queryWrapper = QueryWrapper.create();
|
||||||
String orderBy = ServletUtil.getRequest().getParameter(ORDER_BY);
|
String orderBy = ServletUtil.getRequest().getParameter(ORDER_BY);
|
||||||
if (StrUtil.isNotEmpty(orderBy)) {
|
if (StrUtil.isNotEmpty(orderBy)) {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.util.List;
|
|||||||
public class ShopProdUnitServiceImpl extends ServiceImpl<ShopProdUnitMapper, ShopProdUnit> implements ShopProdUnitService {
|
public class ShopProdUnitServiceImpl extends ServiceImpl<ShopProdUnitMapper, ShopProdUnit> implements ShopProdUnitService {
|
||||||
|
|
||||||
private QueryWrapper buildQueryWrapper(ShopProdUnitDTO param) {
|
private QueryWrapper buildQueryWrapper(ShopProdUnitDTO param) {
|
||||||
QueryWrapper queryWrapper = PageUtil.buildPageQueryWrapper();
|
QueryWrapper queryWrapper = PageUtil.buildSortQueryWrapper();
|
||||||
if (StrUtil.isNotEmpty(param.getName())) {
|
if (StrUtil.isNotEmpty(param.getName())) {
|
||||||
queryWrapper.like(ShopProdUnit::getName, param.getName());
|
queryWrapper.like(ShopProdUnit::getName, param.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import java.util.List;
|
|||||||
public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements OperationLogService {
|
public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements OperationLogService {
|
||||||
|
|
||||||
private QueryWrapper buildQueryWrapper(OperationLogDTO param) {
|
private QueryWrapper buildQueryWrapper(OperationLogDTO param) {
|
||||||
QueryWrapper queryWrapper = PageUtil.buildPageQueryWrapper();
|
QueryWrapper queryWrapper = PageUtil.buildSortQueryWrapper();
|
||||||
if (StrUtil.isNotEmpty(param.getOperation())) {
|
if (StrUtil.isNotEmpty(param.getOperation())) {
|
||||||
queryWrapper.like(OperationLog::getOperation, param.getOperation());
|
queryWrapper.like(OperationLog::getOperation, param.getOperation());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user