联动 上下架
This commit is contained in:
@@ -6,7 +6,6 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.excel.write.handler.SheetWriteHandler;
|
||||
import com.alibaba.excel.write.merge.OnceAbsoluteMergeStrategy;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONWriter;
|
||||
@@ -49,7 +48,6 @@ import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.TextStyle;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.czg.constant.CacheConstant.ADMIN_CLIENT_PRODUCT_LIST;
|
||||
@@ -730,15 +728,20 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
.eq(ProdSku::getIsGrounding, SystemConstants.OneZero.ZERO)
|
||||
.eq(ProdSku::getIsDel, SystemConstants.OneZero.ZERO)
|
||||
);
|
||||
if (normalCount == 0) {
|
||||
Product product = mapper.selectOneById(prodId);
|
||||
if (normalCount == 0 && product.getIsSale() == SystemConstants.OneZero.ONE) {
|
||||
UpdateChain.of(Product.class)
|
||||
.set(Product::getIsSale, isSale)
|
||||
.set(Product::getIsSale, SystemConstants.OneZero.ZERO)
|
||||
.eq(Product::getId, prodSku.getProductId())
|
||||
.eq(Product::getShopId, shopId)
|
||||
.update();
|
||||
}else if(normalCount > 0 && product.getIsSale() == SystemConstants.OneZero.ZERO) {
|
||||
UpdateChain.of(Product.class)
|
||||
.set(Product::getIsSale, SystemConstants.OneZero.ONE)
|
||||
.eq(Product::getId, prodSku.getProductId())
|
||||
.eq(Product::getShopId, shopId)
|
||||
.update();
|
||||
}
|
||||
Long productId = prodSku.getProductId();
|
||||
Product product = mapper.selectOneById(productId);
|
||||
sensitiveOperation = sensitiveOperation + "商品:" + product.getName() + " 规格:" + prodSku.getSpecInfo();
|
||||
} else if (ProductIsSaleTypeEnum.PRODUCT.value().equals(type)) {
|
||||
if("sale".equals(param.getOptType())){
|
||||
|
||||
Reference in New Issue
Block a user