|
@@ -49,14 +49,14 @@ func (item *EnglishReportEmail) Update(cols []string) (err error) {
|
|
|
}
|
|
|
|
|
|
func GetEndEnglishReportEmailListByDate(endDate string) (items []*EnglishReportEmail, err error) {
|
|
|
- o := orm.NewOrm()
|
|
|
+ o := orm.NewOrmUsingDB("rddp")
|
|
|
sql := `SELECT * FROM english_report_email WHERE register_time < '`+endDate+`' `
|
|
|
_, err = o.Raw(sql).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
func UpdateEnglishReportEmailTermination(disableIds []int) (err error) {
|
|
|
- o := orm.NewOrm()
|
|
|
+ o := orm.NewOrmUsingDB("rddp")
|
|
|
sql := `UPDATE english_report_email SET status = 3 WHERE id IN (` + utils.GetOrmInReplace(len(disableIds)) + `) `
|
|
|
_, err = o.Raw(sql, disableIds, ).Exec()
|
|
|
return
|