RemoteFeignStayPointService.java
977 Bytes
package cn.com.glsx.admin.modules.remote;
import cn.com.glsx.devicemonitor.api.dto.request.StayPointRequest;
import cn.com.glsx.devicemonitor.api.dto.response.StayPointRecordDTO;
import cn.com.glsx.devicemonitor.api.feign.StayPointFeignService;
import com.glsx.plat.core.web.R;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author xiangyanlin
* @date 2022/5/7
*/
@Slf4j
@Service
public class RemoteFeignStayPointService {
@Autowired
private StayPointFeignService stayPointFeignService;
public List<StayPointRecordDTO> getStayPointRecord(StayPointRequest stayPointRequest) {
R<List<StayPointRecordDTO>> result = stayPointFeignService.getStayPointRecord(stayPointRequest);
return result.getDataList(new TypeToken<List<StayPointRecordDTO>>() {
}.getType());
}
}