fg电池监控平台的达梦数据库版本
whycxzp
2024-11-11 0f5f5e435cbc4c60ffad2bb84cfe8cc57ea32ddc
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.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.mapper.AvoidPlanMapper;
import com.whyc.pojo.AvoidPlan;
import com.whyc.util.ActionUtil;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class AvoidPlanService {
 
    @Resource
    private AvoidPlanMapper mapper;
 
    //查询规避时间
    public Response searchAll() {
        List list= mapper.selectList((Wrapper<AvoidPlan>) ActionUtil.objeNull);
        PageInfo pageInfo=new PageInfo(list);
        return new Response().set(1,pageInfo);
    }
    //添加规避时间
    public Response addPro(List<AvoidPlan> list) {
        int flag=mapper.addPro(list);
        return new Response().set(flag>0?1:0);
    }
    //删除规避时间
    public Response delPro(List<Integer> nums) {
        int flag=mapper.delPro(nums);
        return new Response().set(flag>0?1:0);
    }
}