Skip to content

Commit

Permalink
fix: createProduct添加object参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx committed Feb 12, 2024
1 parent 640c570 commit cece610
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions biz/application/service/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ func (s *ProductService) GetProducts(ctx context.Context, req *gencontent.GetPro

func (s *ProductService) CreateProduct(ctx context.Context, req *gencontent.CreateProductReq) (resp *gencontent.CreateProductResp, err error) {
resp = new(gencontent.CreateProductResp)
oid, _ := primitive.ObjectIDFromHex(req.ObjectId)
if resp.ProductId, err = s.ProductMongoMapper.Insert(ctx, &productmapper.Product{
ID: oid,
UserId: req.UserId,
Name: req.Name,
Status: req.Status,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/CloudStriver/go-pkg v0.0.0-20231229114943-910edcb8788d
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240211102054-e091e312444a
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240212104255-b4e84c911157
github.com/bytedance/sonic v1.10.2
github.com/cloudwego/kitex v0.8.0
github.com/elastic/go-elasticsearch/v8 v8.11.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.com/CloudStriver/service-idl-gen-go v0.0.0-20240211095735-6297dd4f7912 h1
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240211095735-6297dd4f7912/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240211102054-e091e312444a h1:tzTIsj2uK3va1lLLwTC1fQ0r0lL4KmmC80JnNTk72kc=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240211102054-e091e312444a/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240212104255-b4e84c911157 h1:FsKE7z7855NMnOlSzfEibKP2v3iHdpjPObIGjzc4jiY=
github.com/CloudStriver/service-idl-gen-go v0.0.0-20240212104255-b4e84c911157/go.mod h1:chtR82RvfrjUujTGWROSCNAwF9Lh/U959k34bXIDvBI=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
Expand Down

0 comments on commit cece610

Please sign in to comment.