通用文件新项目

This commit is contained in:
wuchunlei
2024-03-25 17:46:34 +08:00
parent 92a582bee0
commit 21a8309563
23 changed files with 858 additions and 22 deletions

View File

@@ -1,7 +1,6 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
@@ -267,28 +266,20 @@ public class BookLabelAndMarketController {
}
@RequestMapping(path = "/delToLable")
public R delToLable(String lableIds) {
if (!StringUtils.isEmpty(lableIds)) {
String[] ids = lableIds.split(",");
if (ids.length>0) {
for (String id : ids) {
toLabelService.removeById(id);
}
}
}
public R delToLable(String lableId,String productId) {
LambdaQueryWrapper<ShopProductToBookLabel> wrapper = new LambdaQueryWrapper();
wrapper.eq(ShopProductToBookLabel::getBookLabelId,lableId);
wrapper.eq(ShopProductToBookLabel::getProductId,productId);
toLabelService.remove(wrapper);
return R.ok();
}
@RequestMapping(path = "/delToMarket")
public R delToMarket(String marketds) {
if (!StringUtils.isEmpty(marketds)) {
String[] ids = marketds.split(",");
if (ids.length>0) {
for (String id : ids) {
toMarketService.removeById(id);
}
}
}
public R delToMarket(String marketId,String productId) {
LambdaQueryWrapper<ShopProductToBookMarket> wrapper = new LambdaQueryWrapper();
wrapper.eq(ShopProductToBookMarket::getBookMarketId,marketId);
wrapper.eq(ShopProductToBookMarket::getProductId,productId);
toMarketService.remove(wrapper);
return R.ok();
}