浏览代码

event: transferGroup 转群事件调整提交时间

Yi 2 周之前
父节点
当前提交
0749457fa0
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 1 1
      go.mod
  2. 2 0
      go.sum
  3. 2 2
      model/event_transfer_group.go

+ 1 - 1
go.mod

@@ -3,7 +3,7 @@ module kpt-pasture
 go 1.17
 
 require (
-	gitee.com/xuyiping_admin/go_proto v0.0.0-20250806065630-af563d4b2726
+	gitee.com/xuyiping_admin/go_proto v0.0.0-20250812064516-17d87a02cad2
 	gitee.com/xuyiping_admin/pkg v0.0.0-20250613101634-36c36a2d27d0
 	github.com/dgrijalva/jwt-go v3.2.0+incompatible
 	github.com/eclipse/paho.mqtt.golang v1.4.3

+ 2 - 0
go.sum

@@ -1331,6 +1331,8 @@ gitee.com/xuyiping_admin/go_proto v0.0.0-20250731013344-bd687f491881 h1:JCa0Y3Ny
 gitee.com/xuyiping_admin/go_proto v0.0.0-20250731013344-bd687f491881/go.mod h1:BKrFW6YLDectlQcQk3FYKBeXvjEiodAKJ5rq7O/QiPE=
 gitee.com/xuyiping_admin/go_proto v0.0.0-20250806065630-af563d4b2726 h1:Nw5SlOLC+TXc2oGVQRTTVsxpXe4XlHF16zl2E2LxLzk=
 gitee.com/xuyiping_admin/go_proto v0.0.0-20250806065630-af563d4b2726/go.mod h1:BKrFW6YLDectlQcQk3FYKBeXvjEiodAKJ5rq7O/QiPE=
+gitee.com/xuyiping_admin/go_proto v0.0.0-20250812064516-17d87a02cad2 h1:vnNX8F32UB9Tsx/aMFxf1QLeaA3Dtf4HOXWJEQ63OPo=
+gitee.com/xuyiping_admin/go_proto v0.0.0-20250812064516-17d87a02cad2/go.mod h1:BKrFW6YLDectlQcQk3FYKBeXvjEiodAKJ5rq7O/QiPE=
 gitee.com/xuyiping_admin/pkg v0.0.0-20250613101634-36c36a2d27d0 h1:ZCOqEAnGm6+DTAhACigzWKbwMKtleb8/7OzP2xfHG7g=
 gitee.com/xuyiping_admin/pkg v0.0.0-20250613101634-36c36a2d27d0/go.mod h1:8tF25X6pE9WkFCczlNAC0K2mrjwKvhhp02I7o0HtDxY=
 github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=

+ 2 - 2
model/event_transfer_group.go

@@ -14,7 +14,7 @@ type EventTransferGroup struct {
 	PenOutId           int32  `json:"penOutId"`
 	DayAge             int32  `json:"dayAge"`
 	Lact               int32  `json:"lact"`
-	TransferDate       string `json:"transferDate"`
+	TransferDate       int64  `json:"transferDate"`
 	TransferReasonId   int64  `json:"transferReasonId"`
 	TransferReasonName string `json:"TransferReasonName"`
 	Remarks            string `json:"remarks"`
@@ -38,7 +38,7 @@ func NewEventTransferGroup(pastureId int64, cow *Cow, req *pasturePb.TransferGro
 		PenOutId:           cow.PenId,
 		Lact:               cow.Lact,
 		DayAge:             cow.GetEventDayAge(eventAt),
-		TransferDate:       req.TransferDate,
+		TransferDate:       eventAt,
 		TransferReasonId:   int64(req.TransferReasonId),
 		TransferReasonName: transferPenMap[req.TransferReasonId],
 		Remarks:            req.Remarks,