fix
Helius
2021-08-17 b9d39ade7d516d714cd8df7956bf34cf3a3fb8b9
zq-erp/src/main/java/com/matrix/system/hive/action/ShoppingGoodsController.java
@@ -98,7 +98,7 @@
        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);
@@ -190,13 +190,37 @@
            }
        }
        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) {