|
@@ -8,6 +8,8 @@ import (
|
8
|
8
|
"spaceofcheng/services/models/model"
|
9
|
9
|
"spaceofcheng/services/service/flashbuy"
|
10
|
10
|
"spaceofcheng/services/utils"
|
|
11
|
+
|
|
12
|
+ "github.com/astaxie/beego"
|
11
|
13
|
)
|
12
|
14
|
|
13
|
15
|
// CaseController 信息
|
|
@@ -75,7 +77,21 @@ func (c *FlashBuyController) GetFlashBuyById() {
|
75
|
77
|
if err != nil {
|
76
|
78
|
c.ResponseError(err)
|
77
|
79
|
}
|
78
|
|
- c.ResponseJSON(flashBuy)
|
|
80
|
+ userRaw := c.Context.Get("customer")
|
|
81
|
+ if userRaw == nil {
|
|
82
|
+ c.ResponseError(errors.New("系统内部错误"), http.StatusInternalServerError)
|
|
83
|
+ }
|
|
84
|
+
|
|
85
|
+ user := userRaw.(model.TaCustomer)
|
|
86
|
+ userinfo, err := c.dao.GetCustomerFlashBuyId(flashBuyId, user.CustomerId)
|
|
87
|
+ if err != nil {
|
|
88
|
+ c.ResponseError(err)
|
|
89
|
+ }
|
|
90
|
+ beego.Error(userinfo)
|
|
91
|
+ c.ResponseJSON(map[string]interface{}{
|
|
92
|
+ "flashBuy": flashBuy,
|
|
93
|
+ "userInfo": userinfo,
|
|
94
|
+ })
|
79
|
95
|
}
|
80
|
96
|
|
81
|
97
|
func (c *FlashBuyController) GetCustomerFlashBuyId() {
|