|
@@ -8,8 +8,6 @@ import (
|
8
|
8
|
"spaceofcheng/services/models/model"
|
9
|
9
|
"spaceofcheng/services/service/flashbuy"
|
10
|
10
|
"spaceofcheng/services/utils"
|
11
|
|
-
|
12
|
|
- "github.com/astaxie/beego"
|
13
|
11
|
)
|
14
|
12
|
|
15
|
13
|
// CaseController 信息
|
|
@@ -77,17 +75,10 @@ func (c *FlashBuyController) GetFlashBuyById() {
|
77
|
75
|
if err != nil {
|
78
|
76
|
c.ResponseError(err)
|
79
|
77
|
}
|
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)
|
|
78
|
+ userinfo, err := c.dao.GetFlashByUser(flashBuyId)
|
87
|
79
|
if err != nil {
|
88
|
80
|
c.ResponseError(err)
|
89
|
81
|
}
|
90
|
|
- beego.Error(userinfo)
|
91
|
82
|
c.ResponseJSON(map[string]interface{}{
|
92
|
83
|
"flashBuy": flashBuy,
|
93
|
84
|
"userInfo": userinfo,
|