增加了队列消费端处理

This commit is contained in:
2024-07-31 15:11:52 +08:00
parent 95f283ec6b
commit 1e1ce24939
24 changed files with 738 additions and 38 deletions
+9
View File
@@ -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
}
+9
View File
@@ -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
}