whycxzp
2021-03-27 6b0b66f359b1991ecfd7cbccc01cdf8370763bb9
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.whyc.dto.Response;
import com.whyc.mapper.DeviceTypeMapper;
import com.whyc.pojo.DeviceType;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class DeviceTypeService {
 
    @Resource
    private DeviceTypeMapper mapper;
 
    public Response<List<DeviceType>> getAll() {
        List<DeviceType> deviceTypes = mapper.selectList(null);
        return new Response<List<DeviceType>>().set(1,deviceTypes);
    }
 
    public Response update(DeviceType deviceType) {
        mapper.updateById(deviceType);
        return new Response().setMsg(1,"修改成功");
    }
}