wuyouming666
2024-07-10 867c818b7660373ab7ca410a923c47e4b6602e2e
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
46
47
48
49
package com.mes.rawusage.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.rawusage.mapper.RawUsageMapper;
import com.mes.rawusage.entity.RawUsage;
import com.mes.rawusage.service.RawUsageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
 
/**
 * @author system
 * @since 2024-07-09 14:51:27
 */
@Service
public class RawUsageServiceImpl extends ServiceImpl<RawUsageMapper, RawUsage> implements RawUsageService {
 
    @Autowired
    private RawUsageMapper rawUsageMapper;
 
    @Override
    public List<RawUsage> findList(RawUsage params){
        LambdaQueryWrapper<RawUsage> query = Wrappers.lambdaQuery(RawUsage.class);
        return rawUsageMapper.selectList(query);
    }
 
    @Override
    public RawUsage findById(Long id) {
        return rawUsageMapper.selectById(id);
    }
 
    @Override
    public boolean insert(RawUsage rawUsage) {
        return save(rawUsage);
    }
 
    @Override
    public boolean update(RawUsage rawUsage) {
        return updateById(rawUsage);
    }
 
    @Override
    public int delete(Long id) {
        return rawUsageMapper.deleteById(id);
    }
 
}