商品添加规格问题下修复
This commit is contained in:
parent
e541ce76c4
commit
d0bcd66019
@ -9,6 +9,7 @@ import com.suisung.mall.common.modules.product.ShopProductItem;
|
||||
import com.suisung.mall.common.modules.product.ShopProductSpecItem;
|
||||
import com.suisung.mall.common.service.impl.BaseControllerImpl;
|
||||
import com.suisung.mall.common.utils.CheckUtil;
|
||||
import com.suisung.mall.common.utils.ContextUtil;
|
||||
import com.suisung.mall.shop.product.mapper.ShopProductItemMapper;
|
||||
import com.suisung.mall.shop.product.service.ShopProductItemService;
|
||||
import com.suisung.mall.shop.product.service.ShopProductSpecItemService;
|
||||
@ -65,9 +66,8 @@ public class ShopProductSpecItemController extends BaseControllerImpl {
|
||||
@RequestMapping(value = "/specItems", method = RequestMethod.GET)
|
||||
public CommonResult specItems(ShopProductSpecItem shopProductSpecItem) {
|
||||
|
||||
UserDto user = getCurrentUser();
|
||||
//Integer store_id = Convert.toInt(user.getStore_id());
|
||||
Integer store_id = 1;
|
||||
UserDto user = ContextUtil.getCurrentUser();
|
||||
Integer store_id = Convert.toInt(user.getStore_id());
|
||||
QueryWrapper<ShopProductSpecItem> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
Integer spec_id = shopProductSpecItem.getSpec_id();
|
||||
@ -86,9 +86,8 @@ public class ShopProductSpecItemController extends BaseControllerImpl {
|
||||
@ApiOperation(value = "商品规格值表-编辑", notes = "商品规格值表-编辑")
|
||||
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
||||
public CommonResult edit(ShopProductSpecItem shopProductSpecItem) {
|
||||
UserDto user = getCurrentUser();
|
||||
// shopProductSpecItem.setStore_id(Integer.valueOf(user.getStore_id()));
|
||||
shopProductSpecItem.setStore_id(1);
|
||||
UserDto user = ContextUtil.getCurrentUser();
|
||||
shopProductSpecItem.setStore_id(Integer.valueOf(user.getStore_id()));
|
||||
return CommonResult.success(shopProductSpecItemService.saveOrUpdate(shopProductSpecItem));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user