|
@@ -108,7 +108,7 @@ func (m *DataPermissionMessage) GetItemById(id int) (item *DataPermissionMessage
|
|
|
|
|
|
func (m *DataPermissionMessage) GetCountByCondition(condition string, pars []interface{}) (count int, err error) {
|
|
func (m *DataPermissionMessage) GetCountByCondition(condition string, pars []interface{}) (count int, err error) {
|
|
sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
|
|
sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
|
|
- err = global.DmSQL["data"].Raw(sql, pars).Scan(&count).Error
|
|
+ err = global.DmSQL["data"].Raw(sql, pars...).Scan(&count).Error
|
|
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|