1234567891011121314151617181920 |
- package service
- import (
- "iot_manager_service/app/device/dao"
- "iot_manager_service/util"
- )
- // 中间件管理服务
- var WorkbenchService = new(workbenchService)
- type workbenchService struct{}
- func (s *workbenchService) CountDevice(tenantId string) ([]dao.CountDevice, *util.Errors) {
- // 创建查询实例
- counts, err := dao.GetDeviceCount(tenantId)
- if err != nil {
- return nil, util.FailResponse(err.Error(), nil)
- }
- return counts, nil
- }
|