| | |
| | | package com.qianwen.smartman.modules.dnc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.dnc.convert.DncArtProductConvert; |
| | | import com.qianwen.smartman.modules.dnc.entity.DncArtProduct; |
| | | import com.qianwen.smartman.modules.dnc.mapper.DncArtProductMapper; |
| | | import com.qianwen.smartman.modules.dnc.service.IDncArtProductService; |
| | | import com.qianwen.smartman.modules.dnc.vo.DncArtProductVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/dnc/service/impl/DncArtProductServiceImpl.class */ |
| | | public class DncArtProductServiceImpl extends BaseServiceImpl<DncArtProductMapper, DncArtProduct> implements IDncArtProductService { |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -1061435468: |
| | | if (implMethodName.equals("getProductId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case -41256946: |
| | | if (implMethodName.equals("getProductTypeId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 812940310: |
| | | if (implMethodName.equals("getArtBagId")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | switch (z) { |
| | | case false: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncArtProduct") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getArtBagId(); |
| | | }; |
| | | } |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncArtProduct") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getArtBagId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncArtProduct") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getProductTypeId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/dnc/entity/DncArtProduct") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getProductId(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncArtProductService |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public List<DncArtProductVO> addDncArtProduct(List<DncArtProductVO> artProductVOList) { |
| | |
| | | |
| | | @Override // org.springblade.modules.dnc.service.IDncArtProductService |
| | | public List<DncArtProductVO> relatedProducts(String artBagId) { |
| | | List<DncArtProduct> list = list(Wrappers.<DncArtProduct>lambdaQuery().eq(DncArtProduct::getArtBagId, artBagId)); |
| | | /* |
| | | List<DncArtProduct> list = list((Wrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getArtBagId(); |
| | | }, artBagId)); |
| | | }, artBagId));*/ |
| | | if (Func.isNotEmpty(list)) { |
| | | return DncArtProductConvert.INSTANCE.convert(list); |
| | | } |
| | | return new ArrayList(); |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | private boolean checkRepetition(Long artBagId, Long productTypeId, Long productId) { |
| | | DncArtProduct one = (DncArtProduct) getOne((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getArtBagId(); |
| | | }, artBagId)).eq((v0) -> { |
| | | return v0.getProductTypeId(); |
| | | }, productTypeId)).eq((v0) -> { |
| | | return v0.getProductId(); |
| | | }, productId)); |
| | | DncArtProduct one = getOne(Wrappers.<DncArtProduct>lambdaQuery().eq(DncArtProduct::getArtBagId, artBagId) |
| | | .eq(DncArtProduct::getProductTypeId, productTypeId) |
| | | .eq(DncArtProduct::getProductId, productId)); |
| | | return one != null; |
| | | } |
| | | } |