This commit is contained in:
wangjinlei
2024-05-08 16:59:49 +08:00
parent 9ff79cede2
commit 4db86fadde
3 changed files with 79 additions and 0 deletions

View File

@@ -52,6 +52,35 @@ public class ShopProductController {
return R.ok();
}
@RequestMapping("/bindProductAndBookLabel")
public R bindProductAndBookLabel(@RequestBody Map<String,String> map){
String[] productIds = map.get("productId").split(",");
Integer labelId = Integer.valueOf(map.get("labelId"));
shopProductService.bindProductAndBookLabel(productIds,labelId);
return R.ok();
}
@RequestMapping("/unbindProductAndBookLabel")
public R unbindProductAndBookLabel(@RequestBody Map<String,Integer> map){
shopProductService.unbindProductAndBookLabel(map.get("productId"),map.get("labelId"));
return R.ok();
}
@RequestMapping("/bindProductAndBookMarket")
public R bindProductAndBookMarket(@RequestBody Map<String,String> map){
String[] productIds = map.get("productId").split(",");
Integer marketId = Integer.valueOf(map.get("marketId"));
shopProductService.bindProductAndBookMarket(productIds,marketId);
return R.ok();
}
@RequestMapping("/unbindProductAndBookMarket")
public R unbindProductAndBookMarket(@RequestBody Map<String,Integer> map){
shopProductService.unbindProductAndBookMarket(map.get("productId"),map.get("marketId"));
return R.ok();
}
@RequestMapping("/getProductToLabel")
public R getProductToLabel(@RequestBody Map<String,Integer> map){
Map<String, Object> productId = shopProductService.getProductToLabel(map.get("productId"));