|
@@ -173,7 +173,7 @@ func GetReportListCountV1(condition string, pars []interface{}) (count int, err
|
|
|
sql += condition
|
|
|
}
|
|
|
//err = o.Raw(sql, pars).QueryRow(&count)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -242,7 +242,7 @@ func GetReportListCountByGrant(condition string, pars []interface{}) (count int,
|
|
|
|
|
|
sql = `SELECT COUNT(1) AS count FROM (` + sql + `) d`
|
|
|
//err = o.Raw(sql, pars).QueryRow(&count)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -279,7 +279,7 @@ func GetReportListCount(condition string, pars []interface{}) (count int, err er
|
|
|
sql += condition
|
|
|
}
|
|
|
//err = oRddp.Raw(sql, pars).QueryRow(&count)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1116,7 +1116,7 @@ func GetCommentReportTotalByReportId(condition string, pars []interface{}) (tota
|
|
|
sql += condition
|
|
|
}
|
|
|
//err = o.Raw(sql, pars).QueryRow(&total)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&total).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&total).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1235,7 +1235,7 @@ func GetPageReportList(condition string, pars []interface{}, startSize, pageSize
|
|
|
sql += ` ORDER BY modify_time DESC`
|
|
|
totalSql := `SELECT COUNT(1) total FROM (` + sql + `) z `
|
|
|
//err = o.Raw(totalSql, pars).QueryRow(&total)
|
|
|
- err = global.DmSQL["rddp"].Raw(totalSql, pars).Scan(&total).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(totalSql, pars...).Scan(&total).Error
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
@@ -1353,7 +1353,7 @@ func ModifyReportAuthor(condition string, pars []interface{}, authorName string)
|
|
|
sql += condition
|
|
|
}
|
|
|
//err = oRddp.Raw(sql, authorName, pars).QueryRow(&count)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, authorName, pars).Scan(&count).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, utils.ForwardPars(pars, authorName)).Scan(&count).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1426,7 +1426,7 @@ func GetReportByCondition(condition string, pars []interface{}, fieldArr []strin
|
|
|
err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
|
|
|
} else {
|
|
|
//_, err = o.Raw(sql, pars).QueryRows(&items)
|
|
|
- err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
|
|
|
+ err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
|
|
|
}
|
|
|
return
|
|
|
}
|