|
|
|
@ -23,9 +23,10 @@ import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type createShoppingTrolleyOrderParam struct {
|
|
|
|
|
UserID uint `json:"userId" validate:"min=1"`
|
|
|
|
|
IDs []uint `json:"ids" validate:"required"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
UserID uint `json:"userId" validate:"min=1"`
|
|
|
|
|
IDs []uint `json:"ids" validate:"required"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
InvitationNo string `json:"invite"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreatePreviewShoppingTrolleyOrder 从购物车创建订单预览。
|
|
|
|
@ -46,6 +47,12 @@ func CreatePreviewShoppingTrolleyOrder(c *gin.Context) {
|
|
|
|
|
ancestorID = myInfo.AncestorID
|
|
|
|
|
parentId := myInfo.ParentID
|
|
|
|
|
shareID := myInfo.ID
|
|
|
|
|
if p.InvitationNo != "" {
|
|
|
|
|
var shareUser user.Information
|
|
|
|
|
dbc.DB.First(&shareUser, "invitation_no=?", p.InvitationNo)
|
|
|
|
|
// sharerId = uint(baseCode.Decode(p.InvitationNo))
|
|
|
|
|
shareID = shareUser.ID
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trolleyInfoList := make([]*shopping_trolley.Information, 0, 0)
|
|
|
|
|
for _, id := range p.IDs {
|
|
|
|
|