| | |
| | | ShoppingGoods shoppingGoods = new ShoppingGoods(); |
| | | QueryUtil.setQueryLimit(shoppingGoods); |
| | | shoppingGoods.setName(keyword); |
| | | // shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);// 只查询上架的商品 |
| | | shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP);// 只查询上架的商品 |
| | | shoppingGoods.setSalePlatform(Dictionary.SHOPPING_GOODS_SALE_PLATFORM_XX);//只查询线下的商品 |
| | | shoppingGoods.setGoodType(type); |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | |
| | | } |
| | | } |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | | // shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP); |
| | | shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods)); |
| | | return result; |
| | | |
| | | } |
| | | |
| | | @RequestMapping(value = "/showAllList") |
| | | @ResponseBody |
| | | public AjaxResult showAllList(ShoppingGoods shoppingGoods, PaginationVO pageVo) { |
| | | QueryUtil.setQueryLimit(shoppingGoods); |
| | | if(StringUtils.isBlank(pageVo.getSort())){ |
| | | pageVo.setOrder("desc"); |
| | | pageVo.setSort("createTime"); |
| | | } |
| | | |
| | | //2表示查询总部产品 |
| | | if (shoppingGoods.getHeadquarters()!=null && 2==shoppingGoods.getHeadquarters()) { |
| | | //仅查询本店产品 |
| | | SysShopInfo zbShop = shopInfoDao.selectZbShop(getMe().getCompanyId()); |
| | | //如果是总部自己查询自己的库存则不需加入这个调价 |
| | | if (getMe().getShopId().equals(zbShop.getId())){ |
| | | shoppingGoods.setHeadquarters(1); |
| | | } |
| | | } |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods)); |
| | | return result; |
| | | } |
| | | |
| | | @RequestMapping(value = "/showListShopId") |
| | | @ResponseBody |
| | | public AjaxResult showListShopId(ShoppingGoods shoppingGoods, PaginationVO pageVo) { |