Commit 6d5a09e9 by xiaoyj

设备列表去除分頁

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21981 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent a30372ce
......@@ -39,19 +39,13 @@ public class DeviceCtroller {
* @return
*/
@RequestMapping(value = "/indentDevices", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject indentDevices(HttpServletRequest request,@RequestParam(defaultValue = "1") int pageIndex,
@RequestParam(defaultValue = "10") int pageSize, String indentNo) {
public ResultObject indentDevices(HttpServletRequest request,String indentNo) {
if (org.springframework.util.StringUtils.isEmpty(indentNo)) {
return new ResultObject(ResultCodeEnum.PARAM_ERROR.getCode(), ResultCodeEnum.PARAM_ERROR.getMsg());
}
Map<String, Object> result = new HashMap<String, Object>();
Page page = new Page(pageIndex, pageSize);
List<SysDevice> list=deviceService.catIndentDevices(indentNo,page);
com.github.pagehelper.Page<SysDevice> pages = (com.github.pagehelper.Page<SysDevice>) list;
page.setTotalCount((int) pages.getTotal());
result.put("page", page);
result.put("items", list);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(),ResultCodeEnum.SUCCESS.getMsg(),result);
List<SysDevice> list=deviceService.catIndentDevices(indentNo);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(),ResultCodeEnum.SUCCESS.getMsg(),list);
}
/**
......
......@@ -9,7 +9,7 @@ import java.util.List;
public interface DeviceService {
List<SysDevice> catIndentDevices(String indentNo, Page page);
List<SysDevice> catIndentDevices(String indentNo);
void updateDeviceNo(Integer id, String deviceNo);
......
......@@ -22,10 +22,7 @@ public class DeviceServiceImpl implements DeviceService{
private SysDeviceMapper sysDeviceMapper;
@Override
public List<SysDevice> catIndentDevices(String indentNo, Page page) {
if (page != null) {
PageHelper.startPage(page.getPageIndex(), page.getPageSize(), true);
}
public List<SysDevice> catIndentDevices(String indentNo) {
List<SysDevice> list=sysDeviceMapper.catIndentDevices(indentNo);
return list;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!