|
|
@@ -477,7 +477,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
@Override
|
|
|
public Result selectAllShop(Integer page, Integer limit, String shopName, String region, Integer isActivity, String vipPromotion) {
|
|
|
Page<GoodsShop> pages = new Page<>(page, limit);
|
|
|
- PageUtils pageUtils = new PageUtils(goodsShopDao.selectAllShop(pages, shopName, region, isActivity,vipPromotion));
|
|
|
+ PageUtils pageUtils = new PageUtils(goodsShopDao.selectAllShop(pages, shopName, region, isActivity, vipPromotion));
|
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
|
|
|
|
@@ -605,6 +605,16 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
errandTime = Double.parseDouble(one2.getValue());
|
|
|
}
|
|
|
goodsShop.setErrandTime(errandTime);
|
|
|
+
|
|
|
+
|
|
|
+// 判断该店铺是否为一食堂11和二食堂25店铺类型,是的话显示明厨亮灶:是 1 否 2
|
|
|
+ String shopTypeId = goodsShop.getShopTypeId();
|
|
|
+ if (shopTypeId.contains("11") || shopTypeId.contains("25")) {
|
|
|
+ goodsShop.setIsMclz(1);
|
|
|
+ }else {
|
|
|
+ goodsShop.setIsMclz(2);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -934,10 +944,10 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
|
|
|
@Override
|
|
|
@DataSource("dynamic")
|
|
|
- public Result goodsCoverList(Integer page,Integer limit,String name) {
|
|
|
+ public Result goodsCoverList(Integer page, Integer limit, String name) {
|
|
|
Page<Goods> pages = new Page<>(page, limit);
|
|
|
- Integer total=(page-1)*limit;
|
|
|
- IPage<Goods> goodsIPage = goodsDao.goodsCoverList(pages, name,total);
|
|
|
+ Integer total = (page - 1) * limit;
|
|
|
+ IPage<Goods> goodsIPage = goodsDao.goodsCoverList(pages, name, total);
|
|
|
PageUtils pageUtils = new PageUtils(goodsIPage);
|
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
|
@@ -946,8 +956,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
@DataSource("dynamic")
|
|
|
public Result goodsPictureList(Integer page, Integer limit, String name) {
|
|
|
Page<Goods> pages = new Page<>(page, limit);
|
|
|
- Integer total=(page-1)*limit;
|
|
|
- IPage<Goods> goodsIPage = goodsDao.goodsPictureList(pages, name,total);
|
|
|
+ Integer total = (page - 1) * limit;
|
|
|
+ IPage<Goods> goodsIPage = goodsDao.goodsPictureList(pages, name, total);
|
|
|
PageUtils pageUtils = new PageUtils(goodsIPage);
|
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
|
@@ -956,8 +966,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
@DataSource("dynamic")
|
|
|
public Result goodsParticularsPictureList(Integer page, Integer limit, String name) {
|
|
|
Page<Goods> pages = new Page<>(page, limit);
|
|
|
- Integer total=(page-1)*limit;
|
|
|
- IPage<Goods> goodsIPage = goodsDao.goodsParticularsPictureList(pages, name,total);
|
|
|
+ Integer total = (page - 1) * limit;
|
|
|
+ IPage<Goods> goodsIPage = goodsDao.goodsParticularsPictureList(pages, name, total);
|
|
|
PageUtils pageUtils = new PageUtils(goodsIPage);
|
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
|
@@ -989,7 +999,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
@DataSource("dynamic")
|
|
|
public Result selectSupermarketGoodsList(Long shopId, Integer classifyId, Integer page, Integer limit) {
|
|
|
Page<Goods> pages = new Page<>(page, limit);
|
|
|
- IPage<Goods> goodsIPage = goodsDao.selectSupermarketGoodsList(pages,shopId, classifyId);
|
|
|
+ IPage<Goods> goodsIPage = goodsDao.selectSupermarketGoodsList(pages, shopId, classifyId);
|
|
|
return Result.success().put("data", goodsIPage);
|
|
|
}
|
|
|
|
|
|
@@ -1005,7 +1015,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
public void updateVipPromotion(Long goodsId, String vipPromotion) {
|
|
|
Goods goods = new Goods();
|
|
|
goods.setGoodsId(goodsId);
|
|
|
- goods.setVipPromotion(StrUtil.equals(vipPromotion,"1") ? "1" : "0");
|
|
|
+ goods.setVipPromotion(StrUtil.equals(vipPromotion, "1") ? "1" : "0");
|
|
|
baseMapper.updateById(goods);
|
|
|
}
|
|
|
}
|