Skip to content

Commit

Permalink
fix: field错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Cbgogogog committed Nov 6, 2023
1 parent 2ff0e22 commit c3c5965
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions biz/infrastructure/consts/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ const (
InitiatorId = "initiatorId"
PlanId = "planId"
FishNum = "fishNum"
NowFish = "nowFish"
)
2 changes: 1 addition & 1 deletion biz/infrastructure/mapper/plan/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (m *MongoMapper) Delete(ctx context.Context, id string) error {
func (m *MongoMapper) Add(ctx context.Context, id string, add int64) error {
key := prefixPlanCacheKey + id
filter := bson.M{consts.ID: id}
update := bson.M{"$inc": bson.M{consts.FishNum: add}, "$set": bson.M{consts.UpdateAt: time.Now()}}
update := bson.M{"$inc": bson.M{consts.NowFish: add}, "$set": bson.M{consts.UpdateAt: time.Now()}}
_, err := m.conn.UpdateOne(ctx, key, filter, update)
return err
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/kitex-contrib/obs-opentelemetry v0.2.3
github.com/mitchellh/mapstructure v1.1.2
github.com/xh-polaris/gopkg v0.0.0-20230915071845-b0ecd425cb58
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231030160700-9f0bb8f39e9b
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231101061413-e1759adaa141
github.com/zeromicro/go-zero v1.5.4
go.mongodb.org/mongo-driver v1.12.0
google.golang.org/grpc v1.56.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/xh-polaris/gopkg v0.0.0-20230915071845-b0ecd425cb58 h1:Abqs8kG9hXr+SExatusfXgT42QX6dOB4StEmMppUtXg=
github.com/xh-polaris/gopkg v0.0.0-20230915071845-b0ecd425cb58/go.mod h1:eFkuwj6uq1k4hbDa66TijCWGL4PrNeWaNmAnxfWDeU0=
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231030160700-9f0bb8f39e9b h1:psoS2R2L/0nLt5H3hI/UkyR+zeVd/4c8Auq4lO8esR8=
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231030160700-9f0bb8f39e9b/go.mod h1:KjBt4ZOfugCsdAbFlrniKMDrpJAJobm8KEezTvKVnJM=
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231101061413-e1759adaa141 h1:as3Qo5RYIezn4/u+LuCOXYmn+3R3/Kj+oJHo5vhZ8to=
github.com/xh-polaris/service-idl-gen-go v0.0.0-20231101061413-e1759adaa141/go.mod h1:KjBt4ZOfugCsdAbFlrniKMDrpJAJobm8KEezTvKVnJM=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit c3c5965

Please sign in to comment.