package com.usky.iot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.common.mybatis.core.AbstractCrudService;
import com.usky.iot.domain.DmpSoftwareInfo;
import com.usky.iot.mapper.DmpSoftwareInfoMapper;
import com.usky.iot.service.DmpSoftwareInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 软件信息表 服务实现类
 * </p>
 *
 * @author ya
 * @since 2022-10-11
 */
@Service
public class DmpSoftwareInfoServiceImpl extends AbstractCrudService<DmpSoftwareInfoMapper, DmpSoftwareInfo> implements DmpSoftwareInfoService {


    @Override
    public List<DmpSoftwareInfo> list(String name) {
        LambdaQueryWrapper<DmpSoftwareInfo> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.like(StringUtils.isNotBlank(name),DmpSoftwareInfo::getSoftwareName,name);
        return this.list(queryWrapper);
    }
}
