|
|
@@ -26,3 +26,14 @@ func (v VideoTotalDb) GetVideoTotal(uid, date string) (m *model.VideoTotal, err |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
func (v VideoTotalDb) GetVideoTotalSess(sess *xorm.Session, uid, date string) (m *model.VideoTotal, err error) { |
|
|
|
m = new(model.VideoTotal) |
|
|
|
has, err := sess.Where("uid=? and date=?", uid, date).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |