package cn.com.ty.lift.business.maintenance.service;

import cn.com.ty.lift.business.maintenance.dao.entity.MtRecordImg;
import cn.com.ty.lift.business.maintenance.dao.mapper.MtRecordImgMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 维保记录图片 服务实现类
 * </p>
 *
 * @author wcz
 * @since 2020-01-18
 */
@Service
public class MtRecordImgService extends ServiceImpl<MtRecordImgMapper, MtRecordImg> {

    /**
     * 根据维保记录id查询维保图片
     * @param recordId 维保记录id
     * @return List<MtRecordImg>
     */
    public List<MtRecordImg> listByRecord(Long recordId){
        LambdaQueryWrapper<MtRecordImg> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(MtRecordImg::getMtRecordId,recordId);
        return list(lambdaQueryWrapper);
    }
}
