XiaoRuby
2023-08-30 730443b70de88d328ffa275f51f69280fda979e4
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
package com.yuanchu.limslaboratory.service.impl;
 
import com.yuanchu.limslaboratory.pojo.LinkDetection;
import com.yuanchu.limslaboratory.mapper.LinkDetectionMapper;
import com.yuanchu.limslaboratory.service.LinkDetectionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2023-08-03
 */
@Service
public class LinkDetectionServiceImpl extends ServiceImpl<LinkDetectionMapper, LinkDetection> implements LinkDetectionService {
 
    @Resource
    private LinkDetectionMapper linkDetectionMapper;
 
    // 批量添加
    @Override
    public void insertListData(Integer id, List<LinkDetection> linkDetectionList) {
        for (LinkDetection linkDetection:linkDetectionList){
            linkDetection.setInspectionStatus(1);
            linkDetection.setLinkBasicId(id);
            linkDetection.setState(1);
        }
        linkDetectionMapper.insertBatchSomeColumn(linkDetectionList);
    }
}