|
@@ -231,7 +231,7 @@ func (e *Entry) UpdateEstrusIsPeak(pastureId int64, xToday time.Time) {
|
|
|
neckRingEstrusList := make([]*model.NeckRingEstrus, 0)
|
|
|
if err := e.DB.Model(new(model.NeckRingEstrus)).
|
|
|
Where("first_time != ?", "").
|
|
|
- Where("is_peak == ?", pasturePb.IsShow_Ok).
|
|
|
+ Where("is_peak = ?", pasturePb.IsShow_Ok).
|
|
|
Where("is_show = ?", pasturePb.IsShow_Ok).
|
|
|
Where("pasture_id = ?", pastureId).
|
|
|
Find(&neckRingEstrusList).Error; err != nil {
|