From 80ebeb8360fa4869d11c6a5092a02388f8c86748 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 10 Mar 2024 16:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=81=E7=89=8C=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BrandInfoServiceimpl.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceimpl.java 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); + } +}