|
@@ -25,7 +25,7 @@ type IntelligentLight struct {
|
|
|
}
|
|
|
|
|
|
func (IntelligentLight) TableName() string {
|
|
|
- return "t_strategy_intelligent_light"
|
|
|
+ return "strategy_intelligent_light"
|
|
|
}
|
|
|
|
|
|
func (c *IntelligentLight) BatchGet(ids []int) ([]IntelligentLight, error) {
|
|
@@ -55,10 +55,10 @@ func (c *IntelligentLight) GetByGroup(searchValue string, current, size,
|
|
|
whereStr += " and (con.sn like '%?%' or con.name like '%?%')"
|
|
|
whereValue = append(whereValue, searchValue, searchValue)
|
|
|
}
|
|
|
- err := Db.Debug().Table("t_strategy_intelligent_light lig").Select(selectStr).
|
|
|
- Joins("left join t_dev_light_control con ON lig.rid = con.id").
|
|
|
- Joins("left join t_strategy_light b ON b.id = lig.light_id").
|
|
|
- Joins("left join t_strategy_time_condition t ON t.light_id = lig.light_id").
|
|
|
+ err := Db.Debug().Table("strategy_intelligent_light lig").Select(selectStr).
|
|
|
+ Joins("left join device_light_control con ON lig.rid = con.id").
|
|
|
+ Joins("left join strategy_light b ON b.id = lig.light_id").
|
|
|
+ Joins("left join strategy_time_condition t ON t.light_id = lig.light_id").
|
|
|
Where(whereStr, whereValue...).Offset(current).Limit(size).
|
|
|
Order("lig.create_time desc").Scan(&groupRelations).Error
|
|
|
return groupRelations, err
|