12345678910111213141516171819202122 |
- package service
- import (
- "iot_manager_service/app/device/dao"
- )
- var UtilService = new(utilService)
- type utilService struct{}
- func (s *utilService) Get(modeType, deviceType int) (*dao.DeviceVendor, error) {
- // 创建查询实例
- device := &dao.DeviceVendor{
- VendorType: modeType,
- DeviceType: deviceType,
- }
- err := device.GetByType()
- if err != nil {
- return nil, err
- }
- return device, nil
- }
|