diff --git a/business/model/user.go b/business/model/user.go index 360e26662..65583d4d2 100644 --- a/business/model/user.go +++ b/business/model/user.go @@ -123,6 +123,7 @@ type UserDeliveryAddress struct { Remark string `orm:"type(text)" json:"remark"` IsDefault int8 `json:"isDefault"` + Type int `json:"type"` //1为寄件人,2为取件人(收货人) } func (*UserDeliveryAddress) TableUnique() [][]string { diff --git a/controllers/user2_controller.go b/controllers/user2_controller.go index ba2e94c32..6d5074418 100644 --- a/controllers/user2_controller.go +++ b/controllers/user2_controller.go @@ -95,6 +95,7 @@ func (c *User2Controller) GetUsers() { // @Param tag formData string false "标签" // @Param remark formData string false "备注" // @Param isDefault formData int false "是否是默认" +// @Param type formData int false "1为寄件人,2为取件人(收货人)" // @Success 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult // @router /AddMyDeliveryAddress [post] @@ -114,6 +115,7 @@ func (c *User2Controller) AddMyDeliveryAddress() { Tag: params.Tag, Remark: params.Remark, IsDefault: int8(params.IsDefault), + Type: params.Type, } retVal, err = cms.AddMyDeliveryAddress(params.Ctx, address) return retVal, "", err