diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceimpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceimpl.java new file mode 100644 index 0000000..c456ae5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceimpl.java @@ -0,0 +1,41 @@ +package com.muyu.product.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.muyu.common.core.utils.uuid.ObjUtils; +import com.muyu.product.domain.BrandInfo; +import com.muyu.product.mapper.BrandInfoMapper; +import com.muyu.product.service.BrandInfoService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.io.Serializable; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +@Slf4j +@Service +public class BrandInfoServiceimpl extends ServiceImplimplements BrandInfoService { + /* + * 品牌 + * */ + @Override + public List list(BrandInfo brandInfo) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + if(ObjUtils.notNull(brandInfo.getName())){ + queryWrapper.like(BrandInfo::getName,brandInfo.getName()); + } + if(ObjUtils.notNull(brandInfo.getLogo())){ + queryWrapper.eq(BrandInfo::getLogo,brandInfo.getLogo()); + } + if(ObjUtils.notNull(brandInfo.getStart())){ + queryWrapper.eq(BrandInfo::getStart,brandInfo.getStart()); + } + if(ObjUtils.notNull(brandInfo.getIntroduction())){ + queryWrapper.eq(BrandInfo::getIntroduction,brandInfo.getIntroduction()); + } + return list(queryWrapper); + } +}