package com.newfiber.modules.inspection.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.newfiber.modules.inspection.dao.InspectionUserEquDao; import com.newfiber.modules.inspection.entity.InspectionUserEqu; import com.newfiber.modules.inspection.enums.EBoolean; import com.newfiber.modules.inspection.service.InspectionUserEquService; import java.util.List; import org.springframework.stereotype.Service; /** * 用户巡检设备ServiceImpl * * @author : xiongk * @since : 2020-12-02 18:05 */ @Service public class InspectionUserEquServiceImpl extends ServiceImpl<InspectionUserEquDao, InspectionUserEqu> implements InspectionUserEquService { @Override public void refreshScanFlag(Integer id) { InspectionUserEqu inspectionUserEqu = new InspectionUserEqu(); inspectionUserEqu.setId(id); inspectionUserEqu.setScanFlag(EBoolean.YES.getKey()); this.updateById(inspectionUserEqu); } @Override public List<InspectionUserEqu> listByInspectionNo(String inspectionNo) { QueryWrapper<InspectionUserEqu> queryWrapper = new QueryWrapper<InspectionUserEqu>().eq("inspection_no",inspectionNo); return this.list(queryWrapper); } @Override public InspectionUserEqu getByInspectionEqu(String inspectionNo, String equNo) { QueryWrapper<InspectionUserEqu> queryWrapper = new QueryWrapper<InspectionUserEqu>(). eq("inspection_no",inspectionNo). eq("equ_no", equNo); return this.getOne(queryWrapper); } }