|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.sqx.common.exception.SqxException;
|
|
import com.sqx.common.exception.SqxException;
|
|
@@ -811,4 +812,28 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
return Result.success().put("data", pageUtils);
|
|
return Result.success().put("data", pageUtils);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Result selectGoodShop(Long shopId) {
|
|
|
|
|
+ GoodsShop goodsShop = goodsShopDao.selectById(shopId);
|
|
|
|
|
+
|
|
|
|
|
+ return Result.success().put("data",goodsShop);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Result updateGoodShop(GoodsShop goodsShop) {
|
|
|
|
|
+ Long shopId = goodsShop.getShopId();
|
|
|
|
|
+ Integer messageConfiguration = goodsShop.getMessageConfiguration();
|
|
|
|
|
+
|
|
|
|
|
+ GoodsShop goodsShop1 = goodsShopDao.selectById(shopId);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(goodsShop1)) {
|
|
|
|
|
+ return Result.error("不存在该店铺");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ goodsShop1.setMessageConfiguration(messageConfiguration);
|
|
|
|
|
+
|
|
|
|
|
+ goodsShopDao.updateById(goodsShop1);
|
|
|
|
|
+
|
|
|
|
|
+ return Result.success();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|