sensor etc added
This commit is contained in:
parent
aefe450b95
commit
674c5dcedb
@ -30,9 +30,7 @@ func (ss *SensorService) Create(s *Sensor) (string, error) {
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
func (ss *SensorService)List(t *target.Target) (string, error) {
|
||||
|
||||
func (ss *SensorService) List(t *target.Target) (string, error) {
|
||||
|
||||
out, err := utils.InvokeDBByModel("sensor", "findAllByTargetId", t, "com.loafle.overflow.target.model.Target")
|
||||
|
||||
@ -40,7 +38,6 @@ func (ss *SensorService)List(t *target.Target) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
|
||||
return out, nil;
|
||||
return out, nil
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,11 @@ package sensorItem
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"git.loafle.net/overflow/crawler_go"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/sensorItemCategory"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/target"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy/utils"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
)
|
||||
|
||||
type SensorItem struct {
|
||||
@ -20,14 +20,13 @@ type SensorItem struct {
|
||||
}
|
||||
|
||||
type SensorItemService struct {
|
||||
|
||||
}
|
||||
|
||||
func NewSensorItemService() (*SensorItemService) {
|
||||
func NewSensorItemService() *SensorItemService {
|
||||
return &SensorItemService{}
|
||||
}
|
||||
|
||||
func (sis *SensorItemService) Create(si *SensorItem) (string, error){
|
||||
func (sis *SensorItemService) Create(si *SensorItem) (string, error) {
|
||||
out, err := utils.InvokeDB("sensorItem", "create", si)
|
||||
|
||||
if err != nil {
|
||||
@ -36,9 +35,7 @@ func (sis *SensorItemService) Create(si *SensorItem) (string, error){
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
func (ss *SensorItemService)List(cr *crawler.Crawler) (string, error) {
|
||||
|
||||
func (ss *SensorItemService) List(cr *crawler.Crawler) (string, error) {
|
||||
|
||||
out, err := utils.InvokeDBByModel("sensorItem", "findAllByCrawlerId", cr, "com.loafle.overflow.crawler.model.Crawler")
|
||||
|
||||
@ -46,7 +43,6 @@ func (ss *SensorItemService)List(cr *crawler.Crawler) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
|
||||
return out, nil;
|
||||
return out, nil
|
||||
|
||||
}
|
@ -14,15 +14,13 @@ type SensorItemCategory struct {
|
||||
}
|
||||
|
||||
type SensorItemCategoryService struct {
|
||||
|
||||
}
|
||||
|
||||
func NewSensorItemCategoryService () (*SensorItemCategoryService ) {
|
||||
func NewSensorItemCategoryService() *SensorItemCategoryService {
|
||||
return &SensorItemCategoryService{}
|
||||
}
|
||||
|
||||
|
||||
func (sics *SensorItemCategoryService) Create(sic *SensorItemCategory) (string, error){
|
||||
func (sics *SensorItemCategoryService) Create(sic *SensorItemCategory) (string, error) {
|
||||
out, err := utils.InvokeDB("sensorItemCategory", "create", sic)
|
||||
|
||||
if err != nil {
|
||||
|
@ -16,10 +16,9 @@ type SensorItemMapping struct {
|
||||
}
|
||||
|
||||
type SensorItemMappingService struct {
|
||||
|
||||
}
|
||||
|
||||
func NewSensorItemMappingService() (*SensorItemMappingService) {
|
||||
func NewSensorItemMappingService() *SensorItemMappingService {
|
||||
return &SensorItemMappingService{}
|
||||
}
|
||||
|
||||
@ -32,9 +31,7 @@ func (sims *SensorItemMappingService) Create(sim *SensorItemMapping) (string, er
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
||||
func (ss *SensorItemMappingService)List(s *sensor.Sensor) (string, error) {
|
||||
|
||||
func (ss *SensorItemMappingService) List(s *sensor.Sensor) (string, error) {
|
||||
|
||||
out, err := utils.InvokeDBByModel("sensorItemMapping", "findAllBySensorId", s, "com.loafle.overflow.sensor.model.Sensor")
|
||||
|
||||
@ -42,7 +39,6 @@ func (ss *SensorItemMappingService)List(s *sensor.Sensor) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
|
||||
return out, nil;
|
||||
return out, nil
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user