Browse Source

neckRing: 脖环解绑更新

Yi 1 week ago
parent
commit
b7053f4f6e
1 changed files with 8 additions and 4 deletions
  1. 8 4
      module/backend/goods.go

+ 8 - 4
module/backend/goods.go

@@ -204,10 +204,14 @@ func (s *StoreEntry) NeckRingCreateOrUpdate(ctx context.Context, req *pasturePb.
 				if err = tx.Model(new(model.NeckRing)).
 					Where("id = ?", neckRing.Id).
 					Updates(map[string]interface{}{
-						"cow_id":     0,
-						"ear_number": "",
-						"wear_at":    0,
-						"is_bind":    pasturePb.NeckRingIsBind_Unbind,
+						"cow_id":       0,
+						"ear_number":   "",
+						"wear_at":      0,
+						"status":       pasturePb.IsShow_Ok,
+						"is_bind":      pasturePb.NeckRingIsBind_Unbind,
+						"error_kind":   pasturePb.NeckRingNumberError_Invalid,
+						"error_reason": "",
+						"describe":     "",
 					}).Error; err != nil {
 					return xerr.WithStack(err)
 				}