whyclxw
2025-01-16 60eefffd2a9a32d870d554a3790bd68c5546cdf3
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.whyc.mapper.LockReportMapper;
import com.whyc.pojo.db_lock_ram.LockReport;
import com.whyc.util.ActionUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class LockReportService {
    @Autowired(required = false)
    private LockReportMapper mapper;
 
    //获取锁的频次
    public List<LockReport> getReport(List<Integer> lockIds) {
        int nowYear=ActionUtil.getNowYear();
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.in("lock_id",lockIds);
        wrapper.eq("record_year",nowYear);
        List<LockReport> list=mapper.selectList(wrapper);
        return list;
    }
}