whyczh
2021-03-25 da9bb5ab7c3efac4e0cb65fe6aebe7b5cc4cfbf4
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.dto.SystemInfDTO;
import com.whyc.mapper.DeviceInfMapper;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class DeviceInfService {
 
    @Resource
    private DeviceInfMapper mapper;
 
    public Response<List<SystemInfDTO>> getAll() {
        /*QueryWrapper<DeviceInf> query = Wrappers.query();
        query.select("system_id","system_name","GROUP_concat(device_id,\"-\",device_name) as deviceName").groupBy("system_id");
        List<DeviceInf> deviceInfs = mapper.selectList(query);*/
        List<SystemInfDTO> systemList = mapper.getAll();
        System.out.println(System.getProperty("user.timezone"));
 
        return new Response<List<SystemInfDTO>>().set(1,systemList);
    }
}