增加接口
This commit is contained in:
@@ -12,5 +12,5 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface WarehouseInfoService {
|
public interface WarehouseInfoService {
|
||||||
|
|
||||||
List<WarehouseInfoDO> getAllAndActive(String keyword);
|
List<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.cool.store.service.impl;
|
|||||||
import com.cool.store.entity.WarehouseInfoDO;
|
import com.cool.store.entity.WarehouseInfoDO;
|
||||||
import com.cool.store.mapper.WarehouseInfoMapper;
|
import com.cool.store.mapper.WarehouseInfoMapper;
|
||||||
import com.cool.store.service.WarehouseInfoService;
|
import com.cool.store.service.WarehouseInfoService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.lowagie.text.PageSize;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -21,7 +23,8 @@ public class WarehouseInfoServiceImpl implements WarehouseInfoService {
|
|||||||
@Resource
|
@Resource
|
||||||
private WarehouseInfoMapper warehouseInfoMapper;
|
private WarehouseInfoMapper warehouseInfoMapper;
|
||||||
@Override
|
@Override
|
||||||
public List<WarehouseInfoDO> getAllAndActive(String keyword) {
|
public List<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize) {
|
||||||
|
PageHelper.startPage(pageNum,pageSize);
|
||||||
return warehouseInfoMapper.getAllAndActive(keyword);
|
return warehouseInfoMapper.getAllAndActive(keyword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ public class PCWarehouseInfoController {
|
|||||||
|
|
||||||
@GetMapping("/getAllAndActive")
|
@GetMapping("/getAllAndActive")
|
||||||
@ApiOperation(value = "获取正新鸡排仓库配置")
|
@ApiOperation(value = "获取正新鸡排仓库配置")
|
||||||
public ResponseResult<List<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ) {
|
public ResponseResult<List<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ,
|
||||||
return ResponseResult.success(warehouseInfoService.getAllAndActive(keyword));
|
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
|
||||||
|
return ResponseResult.success(warehouseInfoService.getAllAndActive(keyword,pageNum,pageSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user