Update License
This commit is contained in:
parent
904a64d3aa
commit
cbc2a842dd
@ -106,7 +106,8 @@ func (r *LicenseRepository) FindByPartnerIDMaxEndDate(ctx context.Context, partn
|
||||
|
||||
if err := r.db.WithContext(ctx).
|
||||
Where("partner_id = ?", partnerID).
|
||||
Where("start_date >= ?", today).
|
||||
Where("start_date <= ?", today).
|
||||
Where("end_date >= ?", today).
|
||||
Order("end_date DESC").
|
||||
First(&licenseDB).Error; err != nil {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user