Commit b0c3b872 authored by hujiebin's avatar hujiebin

Update groupPower.go

parent c3dceed8
...@@ -359,7 +359,7 @@ func GetGroupPowerNames(db *gorm.DB, ids []mysql.ID) (map[mysql.ID]string, map[m ...@@ -359,7 +359,7 @@ func GetGroupPowerNames(db *gorm.DB, ids []mysql.ID) (map[mysql.ID]string, map[m
result := make(map[mysql.ID]string, 0) result := make(map[mysql.ID]string, 0)
result2 := make(map[mysql.ID]string, 0) result2 := make(map[mysql.ID]string, 0)
if len(ids) > 0 { if len(ids) > 0 {
if err := db.Model(&GroupPower{}).Select("p.id, i.name,i.nameplate"). if err := db.Model(&GroupPower{}).Select("p.id, i.name,p.nameplate").
Joins("AS p INNER JOIN group_info AS i ON p.group_uid = i.im_group_id"). Joins("AS p INNER JOIN group_info AS i ON p.group_uid = i.im_group_id").
Where("p.id IN ?", ids).Find(&rows).Error; err != nil { Where("p.id IN ?", ids).Find(&rows).Error; err != nil {
return result, result2, err return result, result2, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment