lxw
2022-08-17 43ded7d2ae74356ff8a53a7805d20b7dbfa6a729
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.mapper.ComponentProductApprovingMapper;
import com.whyc.pojo.ComponentProductApproving;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class ComponentProductApprovingService {
 
    @Resource
    private ComponentProductApprovingMapper mapper;
 
    public void insert(List<ComponentProductApproving> approvingList) {
        mapper.insertBatchSomeColumn(approvingList);
    }
 
    public List<ComponentProductApproving> getListByMainId(Integer mainId) {
        QueryWrapper<ComponentProductApproving> query = Wrappers.query();
        query.eq("main_id",mainId);
        return mapper.selectList(query);
    }
 
    public List<ComponentProductApproving> getLatestExistListByComponentId(Integer componentId) {
        return mapper.getLatestExistListByComponentId(componentId);
    }
}