| | |
| | | // 增加对应库存 |
| | | one.setTotal(one.getTotal()-frameWarehousingDetail.getTotal()); |
| | | list1.add(one); |
| | | }else { |
| | | return ApiResult.failed("商品不存在"); |
| | | |
| | | } |
| | | } |
| | | if (!list1.isEmpty())frameGoodsService.updateBatchById(list1); |
| | |
| | | .eq(TLensGoods::getBallMirror, frameWarehousingDetail.getBallMirror()) |
| | | .eq(TLensGoods::getColumnMirror, frameWarehousingDetail.getColumnMirror()) |
| | | .eq(TLensGoods::getStoreId, dto.getStoreId()) |
| | | |
| | | .one(); |
| | | if (one!=null){ |
| | | if (one.getTotal()-frameWarehousingDetail.getTotal()<0){ |
| | |
| | | // 减少对应库存 |
| | | one.setTotal(one.getTotal()-frameWarehousingDetail.getTotal()); |
| | | list1.add(one); |
| | | }else { |
| | | return ApiResult.failed("商品不存在"); |
| | | |
| | | } |
| | | } |
| | | if (!list1.isEmpty())lensGoodsService.updateBatchById(list1); |