增加了队列消费端处理
This commit is contained in:
@@ -106,3 +106,12 @@ func (r *CouponDao) GetCoupon(maps interface{}) (m *model.Coupon, err error) {
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// GetCouponListByValidTime 获取列表-今天开始时间/过期时间
|
||||
func (r *CouponDao) GetCouponListByValidTime(maps interface{}, startTime, endTime string) (m []*model.Coupon, err error) {
|
||||
err = global.Db.Where(maps).Where("valid_end_time BETWEEN ? AND ?", startTime, endTime).Find(&m).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
@@ -200,3 +200,12 @@ func (r *UserCouponDao) GetUserCouponPageSearch(req requests.GetUserCouponPage,
|
||||
}
|
||||
return m, totalRecords, nil
|
||||
}
|
||||
|
||||
// GetUserCouponListByValidTime 获取列表-今天开始时间/过期时间
|
||||
func (r *UserCouponDao) GetUserCouponListByValidTime(maps interface{}, startTime, endTime string) (m []*model.UserCoupon, err error) {
|
||||
err = global.Db.Where(maps).Where("valid_end_time BETWEEN ? AND ?", startTime, endTime).Find(&m).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user