whycxzp
2021-01-05 762e2388f7f788630abb59259371d921a2639d45
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
package com.whyc.service;
 
import com.whyc.dto.Response;
import com.whyc.mapper.UPSMapper;
import com.whyc.pojo.UPS;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
/**
 * UPS状态
 */
@Service
public class UPSService {
 
    @Resource
    private UPSMapper mapper;
 
    public Response getStauts() {
        try {
            UPS ups = mapper.selectOne(null);
            return new Response().set(1,ups);
        } catch (Exception e) {
            e.printStackTrace();
            return new Response().setCode(0);
        }
    }
}