支付方式接口修改

This commit is contained in:
张松 2025-03-04 16:38:53 +08:00
parent 2397cc633d
commit 46ce36421d
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ public class ShopStorageGoodServiceImpl extends ServiceImpl<ShopStorageGoodMappe
public Boolean saveInfo(Long shopId, ShopStorageGoodDTO shopStorageGoodDTO) {
ShopStorageGood shopStorageGood = BeanUtil.copyProperties(shopStorageGoodDTO, ShopStorageGood.class);
if (shopStorageGoodDTO.getSource() == 1) {
if (shopStorageGoodDTO.getProdId() == null) {
throw new ApiNotPrintException("商品id不为空");
}
Product product = productService.getOne(new QueryWrapper().eq(Product::getShopId, shopId).eq(Product::getId, shopStorageGoodDTO.getProdId()));
if (product == null) {
throw new ApiNotPrintException("商品不存在");