快捷接口 问题

This commit is contained in:
2024-09-27 14:17:15 +08:00
parent 5be1876d3d
commit ba06410d44
2 changed files with 4 additions and 3 deletions

View File

@@ -207,6 +207,6 @@ public interface TbProductSkuRepository extends JpaRepository<TbProductSku, Inte
void updateGrounding(Integer skuId,int isGrounding); void updateGrounding(Integer skuId,int isGrounding);
@Modifying @Modifying
@Query("update TbProductSku set salePrice = :salePrice where productId=:productId") @Query("update TbProductSku set salePrice = :salePrice where productId= :productId")
void upSalePrice(@Param("productId") Integer productId, @Param("lowPrice") BigDecimal salePrice); void upSalePrice(@Param("productId") String productId, @Param("lowPrice") BigDecimal salePrice);
} }

View File

@@ -414,13 +414,14 @@ public class StockServiceImpl implements StockService {
detail.setType("盘点入库"); detail.setType("盘点入库");
} }
detail.setCreatedAt(System.currentTimeMillis()); detail.setCreatedAt(System.currentTimeMillis());
detail.setUpdatedAt(System.currentTimeMillis());
tbProductStockDetailRepository.save(detail); tbProductStockDetailRepository.save(detail);
break; break;
case "salePrice"://价格 case "salePrice"://价格
description.append("修改价格为" + updateValueVO.getValue()); description.append("修改价格为" + updateValueVO.getValue());
sqlQuery.append(" set low_price = ").append(updateValueVO.getValue()); sqlQuery.append(" set low_price = ").append(updateValueVO.getValue());
tbProductRepository.upLowPrice(product.getId(),new BigDecimal(updateValueVO.getValue())); tbProductRepository.upLowPrice(product.getId(),new BigDecimal(updateValueVO.getValue()));
tbProductSkuRepository.upSalePrice(product.getId(),new BigDecimal(updateValueVO.getValue())); tbProductSkuRepository.upSalePrice(product.getId().toString(),new BigDecimal(updateValueVO.getValue()));
break; break;
case "refundStock"://商品 暂停销售 case "refundStock"://商品 暂停销售
if (!"0".equals(updateValueVO.getValue()) && !"1".equals(updateValueVO.getValue())) { if (!"0".equals(updateValueVO.getValue()) && !"1".equals(updateValueVO.getValue())) {