whycxzp
2021-03-27 221c50af49652c305eac402339a4565c9c98b003
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.whyc.dto.Response;
import com.whyc.dto.DeviceTypeDTO;
import com.whyc.mapper.DeviceInfMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
@Slf4j
public class DeviceInfService {
 
    @Resource
    private DeviceInfMapper mapper;
 
    public Response<List<DeviceTypeDTO>> 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<DeviceTypeDTO> systemList = mapper.getAll();
        System.out.println(System.getProperty("user.timezone"));
        log.info("当前系统时区:{}",System.getProperty("user.timezone"));
 
        return new Response<List<DeviceTypeDTO>>().set(1,systemList);
    }
}