whycxzp
2023-03-28 aaa2e601eb2a6806e761d4424fcaaf43a95fdcfd
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.dto.Response;
import com.whyc.mapper.BattDischargePlanLogMapper;
import com.whyc.pojo.BattDischargePlanLog;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class BattDischargePlanLogService {
 
    @Resource
    private BattDischargePlanLogMapper mapper;
 
    public void addList(List<BattDischargePlanLog> logList) {
        mapper.insertBatchSomeColumn(logList);
    }
 
    public Response getLogListByPlanId(int num) {
        QueryWrapper<BattDischargePlanLog> query = Wrappers.query();
        query.eq("plan_id",num);
        List<BattDischargePlanLog> logList = mapper.selectList(query);
        return new Response().set(1,logList);
    }
}