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);
|
}
|
}
|
}
|