品牌列表

dev798
wxy 2024-03-10 16:05:46 +08:00
parent 10341472e9
commit 80ebeb8360
1 changed files with 41 additions and 0 deletions

View File

@ -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 ServiceImpl<BrandInfoMapper, BrandInfo>implements BrandInfoService {
/*
*
* */
@Override
public List<BrandInfo> list(BrandInfo brandInfo) {
LambdaQueryWrapper<BrandInfo> 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);
}
}