|
@@ -150,7 +150,7 @@ func GetEdbInspectionMessageByAdminId(adminId int) (items []*EdbInspectionMessag
|
|
|
|
|
|
func GetEdbInspectionMessageCountByAdminId(adminId int) (count int, err error) {
|
|
func GetEdbInspectionMessageCountByAdminId(adminId int) (count int, err error) {
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
- sql := "SELECT COUNT(*) FROM edb_inspection_message WHERE admin_id =?, is_read = 0 ORDER BY is_read ASC, create_time DESC"
|
|
|
|
|
|
+ sql := "SELECT COUNT(*) FROM edb_inspection_message WHERE admin_id =? AND is_read = 0 ORDER BY is_read ASC, create_time DESC"
|
|
err = o.Raw(sql, adminId).Scan(&count).Error
|
|
err = o.Raw(sql, adminId).Scan(&count).Error
|
|
return
|
|
return
|
|
}
|
|
}
|