whycxzp
2021-01-07 ea9d744e092f7a6297f5af763a4daafeb01d7160
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.UPSCommMapper;
import com.whyc.pojo.UPSComm;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
/**
 * UPS通讯
 */
@Service
public class UPSCommService {
 
    @Resource
    private UPSCommMapper mapper;
 
    public Response getStauts() {
        try {
            UPSComm ups = mapper.selectOne(null);
            return new Response().set(1,ups);
        } catch (Exception e) {
            e.printStackTrace();
            return new Response().setCode(0);
        }
    }
}