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

import cn.com.ty.lift.business.capital.dao.entity.CapitalRepairImage;
import cn.com.ty.lift.business.capital.dao.mapper.CapitalRepairImageMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bieao
 * @date 2020/4/28
 * @description 大修项目图片业务层
 */
@Service
public class CapitalRepairImageService extends ServiceImpl<CapitalRepairImageMapper, CapitalRepairImage> {


    /**
     * @param id          大修项目id
     * @param mtCompanyId 公司ID
     * @return 大修项目竣工单列表
     * @description 获取大修项目竣工单地址
     * @date 2020/4/29 9:21 上午
     */
    public List<CapitalRepairImage> imageUrlList(Long id, Long mtCompanyId) {
        LambdaQueryWrapper<CapitalRepairImage> lambdaQueryWrapper = new QueryWrapper<CapitalRepairImage>().lambda();
        lambdaQueryWrapper.eq(CapitalRepairImage::getProjectId, id);
        lambdaQueryWrapper.eq(CapitalRepairImage::getMtCompanyId, mtCompanyId);
        return list(lambdaQueryWrapper);
    }
}
