master
Evan Chen 2022-01-09 00:49:36 +08:00
parent 1766bdad8a
commit ce56a78f52
1 changed files with 2 additions and 2 deletions

View File

@ -33,10 +33,10 @@ func ApiCalQuery(c *gin.Context) {
if grp_id == 0 {
panic(errors.ErrorNotFound)
}
result = db.Find(&cals, "`group_id` = ? ", grp_id)
result = db.Find(&cals, "group_id = ? ", grp_id)
} else if !auth.ACHas(c, auth.ADMIN, auth.SYSTEM) {
result = db.
Find(&cals, "`group_id` in (?) or group_id = 0",
Find(&cals, "group_id in (?) or group_id = 0",
db.Table("groups").Select("id").Where("name in ?", cl.Groups))
} else {
result = db.Find(&cals)