diff --git a/model/gmodel/fs_address_logic.go b/model/gmodel/fs_address_logic.go index 4f87ec4e..1ce577dc 100755 --- a/model/gmodel/fs_address_logic.go +++ b/model/gmodel/fs_address_logic.go @@ -7,7 +7,7 @@ import ( ) func (a *FsAddressModel) GetOne(ctx context.Context, id int64, userId int64) (resp *FsAddress, err error) { - err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`id` = ? and `user_id` = ? and `status` = ? ", id, userId, 1).Take(resp).Error + err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`id` = ? and `user_id` = ? and `status` = ? ", id, userId, 1).Take(&resp).Error return resp, err } diff --git a/model/gmodel/fs_canteen_type_logic.go b/model/gmodel/fs_canteen_type_logic.go index 2e81cdc7..fb37e364 100644 --- a/model/gmodel/fs_canteen_type_logic.go +++ b/model/gmodel/fs_canteen_type_logic.go @@ -20,6 +20,6 @@ func (c *FsCanteenTypeModel) FindAllGetType(ctx context.Context) (resp []*FsGetT return resp, nil } func (c *FsCanteenTypeModel) FindOne(ctx context.Context, id int64) (resp *FsCanteenType, err error) { - err = c.db.WithContext(ctx).Model(&FsCanteenType{}).Where("`id` = ?", id).First(resp).Error + err = c.db.WithContext(ctx).Model(&FsCanteenType{}).Where("`id` = ?", id).First(&resp).Error return resp, err } diff --git a/model/gmodel/fs_cart_logic.go b/model/gmodel/fs_cart_logic.go index acd7ef77..618a8d9b 100755 --- a/model/gmodel/fs_cart_logic.go +++ b/model/gmodel/fs_cart_logic.go @@ -17,7 +17,7 @@ type FindOneCartByParamsReq struct { } func (c *FsCartModel) FindOne(ctx context.Context, id int64) (resp *FsCart, err error) { - err = c.db.WithContext(ctx).Model(&FsCart{}).Where("`id` = ?", id).First(resp).Error + err = c.db.WithContext(ctx).Model(&FsCart{}).Where("`id` = ?", id).First(&resp).Error return resp, err } func (c *FsCartModel) FindOneCartByParams(ctx context.Context, req FindOneCartByParamsReq) (resp *FsCart, err error) { diff --git a/model/gmodel/fs_gerent_logic.go b/model/gmodel/fs_gerent_logic.go index 143bc1d5..6cc588de 100644 --- a/model/gmodel/fs_gerent_logic.go +++ b/model/gmodel/fs_gerent_logic.go @@ -4,7 +4,7 @@ import "context" // TODO: 使用model的属性做你想做的 -func (g *FsGerentModel) Find(ctx context.Context, authKey string) (resp FsGerent, err error) { +func (g *FsGerentModel) Find(ctx context.Context, authKey string) (resp *FsGerent, err error) { err = g.db.WithContext(ctx).Model(&FsGerent{}).Where("`auth_key` = ?", authKey).Take(&resp).Error return resp, err } diff --git a/model/gmodel/fs_order_logic.go b/model/gmodel/fs_order_logic.go index 316de054..9e83d596 100755 --- a/model/gmodel/fs_order_logic.go +++ b/model/gmodel/fs_order_logic.go @@ -5,12 +5,12 @@ import ( ) func (o *FsOrderModel) FindOneBySn(ctx context.Context, userId int64, sn string) (resp *FsOrder, err error) { - err = o.db.WithContext(ctx).Model(&FsOrder{}).Where(" `user_id` = ? and `sn` = ? ", userId, sn).Take(resp).Error + err = o.db.WithContext(ctx).Model(&FsOrder{}).Where(" `user_id` = ? and `sn` = ? ", userId, sn).Take(&resp).Error return resp, err } func (o *FsOrderModel) FindOne(ctx context.Context, userId int64, OrderId int64) (order *FsOrder, err error) { - err = o.db.WithContext(ctx).Model(&order).Where("`user_id` = ? and `id` = ?", userId, OrderId).Take(order).Error + err = o.db.WithContext(ctx).Model(&order).Where("`user_id` = ? and `id` = ?", userId, OrderId).Take(&order).Error if err != nil { return nil, err } diff --git a/server/product-templatev2/etc/product-templatev2.yaml b/server/product-templatev2/etc/product-templatev2.yaml index f2e296cd..16a15785 100644 --- a/server/product-templatev2/etc/product-templatev2.yaml +++ b/server/product-templatev2/etc/product-templatev2.yaml @@ -1,6 +1,6 @@ Name: product-templatev2 Host: 0.0.0.0 -Port: 8895 +Port: 8896 SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest Auth: AccessSecret: fusen2023