3 天以前 3be684af887afe4c0e45f281cc53adfef6f12b78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package cn.iocoder.yudao.module.mes.dal.mysql.dv.checkplan;
 
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.mes.dal.dataobject.dv.checkplan.MesDvCheckPlanMachineryDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.List;
 
/**
 * MES 点检保养方案设备 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface MesDvCheckPlanMachineryMapper extends BaseMapperX<MesDvCheckPlanMachineryDO> {
 
    default List<MesDvCheckPlanMachineryDO> selectListByPlanId(Long planId) {
        return selectList(MesDvCheckPlanMachineryDO::getPlanId, planId);
    }
 
    default Long selectCountByPlanId(Long planId) {
        return selectCount(MesDvCheckPlanMachineryDO::getPlanId, planId);
    }
 
    default void deleteByPlanId(Long planId) {
        delete(new LambdaQueryWrapperX<MesDvCheckPlanMachineryDO>()
                .eq(MesDvCheckPlanMachineryDO::getPlanId, planId));
    }
 
    default Long selectCountByMachineryId(Long machineryId) {
        return selectCount(MesDvCheckPlanMachineryDO::getMachineryId, machineryId);
    }
 
    default List<MesDvCheckPlanMachineryDO> selectListByMachineryId(Long machineryId) {
        return selectList(MesDvCheckPlanMachineryDO::getMachineryId, machineryId);
    }
 
    default MesDvCheckPlanMachineryDO selectByPlanIdAndMachineryId(Long planId, Long machineryId) {
        return selectOne(new LambdaQueryWrapperX<MesDvCheckPlanMachineryDO>()
                .eq(MesDvCheckPlanMachineryDO::getPlanId, planId)
                .eq(MesDvCheckPlanMachineryDO::getMachineryId, machineryId));
    }
 
}