whyclxw
2025-05-08 35bd0babece513b6ee4285265f3379cbcb050e59
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.dto.Response;
import com.whyc.mapper.PwrappDcinfMapper;
import com.whyc.pojo.PwrappDcinf;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
@Service
public class PwrappDcinfService {
    @Resource
    private PwrappDcinfMapper mapper;
 
    //读取电源dc设备设置
    public Response getPowerDCConfigById(int powerDeviceId) {
        PwrappDcinf dcinf=mapper.getPowerDCConfigById(powerDeviceId);
        return new Response().set(1,dcinf);
    }
    //更新电源dc设备设置
    public Response updatePowerDCConfigById(PwrappDcinf dcinf) {
        boolean bl=mapper.updatePowerDCConfigById(dcinf);
        return new Response().set(1,bl,bl==true?"更新成功!":"更新失败!");
    }
}