diff --git a/hiver-core/src/main/java/cc/hiver/core/shopprint/controller/ShopPrintController.java b/hiver-core/src/main/java/cc/hiver/core/shopprint/controller/ShopPrintController.java
index 17895fd8..02978caa 100644
--- a/hiver-core/src/main/java/cc/hiver/core/shopprint/controller/ShopPrintController.java
+++ b/hiver-core/src/main/java/cc/hiver/core/shopprint/controller/ShopPrintController.java
@@ -66,19 +66,12 @@ public class ShopPrintController {
}
}
- /**
- * 鍒犻櫎鐗╂祦绾胯矾
- *
- * @param id
- * @return Result
- * @author 鐜嬪瘜搴
- * @date 2024/8/24
- */
- @PostMapping(value = "/delete")
+
+ @GetMapping(value = "/delete", produces = "application/json")
@ApiOperation("鍒犻櫎搴楅摵鎵撳嵃鍐呭")
- public Result deleteLogisticsRoute(String id) {
+ public Result deleteShopPrint(String id) {
if (StringUtils.isEmpty(id)) {
- return ResultUtil.error("绾胯矾id涓嶈兘涓虹┖锛");
+ return ResultUtil.error("id涓嶈兘涓虹┖锛");
}
final boolean b = shopPrintService.removeById(id);
if (b) {
@@ -88,14 +81,7 @@ public class ShopPrintController {
}
}
- /**
- * 鍒嗛〉鏌ヨ鐗╂祦绾胯矾
- *
- * @param logisticsRouteQueryVo
- * @return Result
>
- * @author 鐜嬪瘜搴
- * @date 2024/8/24
- */
+
@RequestMapping(value = "/getList", method = RequestMethod.POST)
@ApiOperation(value = "鏌ヨ鎵撳嵃鍐呭")
public Result> getLogisticsRoutePageList(@RequestBody(required = false) ShopPrintQueryVo shopPrintQueryVo) {
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java
index 1f7ce840..8198632e 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java
@@ -378,4 +378,19 @@ public class ProductController {
return ResultUtil.success("鏈煡鍒板搴斿晢鍝佷俊鎭!");
}
}
+
+ @RequestMapping(value = "/getByUserIdAndProductIds", method = RequestMethod.POST)
+ @ApiOperation("鎵归噺鑾峰彇瀹㈡埛鏈杩戣喘涔扮殑鍟嗗搧浠锋牸鍙婃暟閲")
+ public Result getByUserIdAndProductIds(String userId, String productIds) {
+ String[] ids = {};
+ if(StringUtils.isNotEmpty(productIds)){
+ ids = productIds.split(",");
+ }
+ final List byProductSn = productService.getByUserIdAndProductIds(userId, ids);
+ if (byProductSn != null) {
+ return new ResultUtil>().setData(byProductSn);
+ } else {
+ return ResultUtil.success("鏈煡鍒板搴斿晢鍝佷俊鎭!");
+ }
+ }
}
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java
index f91fb371..9c1c8484 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java
@@ -47,6 +47,8 @@ public interface ProductMapper extends BaseMapper {
ProductLastBuyVo getByUserIdAndProductId(@Param("userId") String userId, @Param("productId") String productId);
+ List getByUserIdAndProductIds(@Param("userId") String userId, @Param("array") String[] productIds);
+
Product getByIdOrBrcode(String id);
List getByBarcode(@Param("barcode") String barcode, @Param("shopId") String shopId);
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java
index ea282740..51642c8a 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java
@@ -34,6 +34,8 @@ public interface ProductService extends IService {
ProductLastBuyVo getByUserIdAndProductId(String userId, String productId);
+ List getByUserIdAndProductIds(String userId, String[] productId);
+
Product getByIdOrBrcode(String id,String customerId);
List getByBarcode(String barcode, String customerId);
diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
index 2bceae5c..bff8557a 100644
--- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
+++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java
@@ -182,6 +182,12 @@ public class ProductServiceImpl extends ServiceImpl impl
return baseMapper.getByUserIdAndProductId(userId, productId);
}
+
+ @Override
+ public List getByUserIdAndProductIds(String userId, String[] productIds) {
+ return baseMapper.getByUserIdAndProductIds(userId, productIds);
+ }
+
@Override
public Product getByIdOrBrcode(String id, String customerId) {
final Product byIdOrBrcode = baseMapper.getByIdOrBrcode(id);
diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml
index 78fbdb2f..af774cac 100644
--- a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml
+++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml
@@ -746,6 +746,28 @@
limit 1
+
+
+