Browse Source

2.1.0 优化

胡轶钦 6 years ago
parent
commit
269199cfae
3 changed files with 2 additions and 9 deletions
  1. 0
    3
      models/flashbuy/flashbuy.go
  2. 0
    3
      routers/wechat.go
  3. 2
    3
      service/flashbuy/flashbuy.go

+ 0
- 3
models/flashbuy/flashbuy.go View File

@@ -212,7 +212,6 @@ WHERE
212 212
 	return nil, nil
213 213
 }
214 214
 
215
-<<<<<<< HEAD
216 215
 func (m *FlashbuyDAO) GetCustomerFlashBuyByCustomerId(customerId string, page, pageSize int) ([]CustomerFlashResult, error) {
217 216
 	var customerResult []CustomerFlashResult
218 217
 	sql := `select a.*,b.flash_buy_name
@@ -253,14 +252,12 @@ FROM
253 252
 }
254 253
 
255 254
 // Update
256
-=======
257 255
 // GetCustomerFlashBuy 获取用户抢购信息
258 256
 func (m *FlashbuyDAO) GetCustomerFlashBuy(id, customerid string) ([]model.TaCustomerFlashBuy, error) {
259 257
 	var buys []model.TaCustomerFlashBuy
260 258
 	err := m.db.Where("flash_buy_id=?").And("customer_id=?").And("status>?", models.STATUS_DEL).Find(&buys)
261 259
 	return buys, err
262 260
 }
263
->>>>>>> ce8d19c0e1feb16131f63394d322e9dd7f91d4e2
264 261
 
265 262
 // UpdateFlashBuyJoin 更新抢购参与人数
266 263
 func (m *FlashbuyDAO) UpdateFlashBuyJoin(id string) (int64, error) {

+ 0
- 3
routers/wechat.go View File

@@ -93,12 +93,9 @@ func getWechatRoutes(prefix string) beego.LinkNamespace {
93 93
 		beego.NSRouter("/user/luckdraw/record/:id", &luckdraw.LuckDrawController{}, "get:GetRecordByID"),
94 94
 
95 95
 		// 抢购
96
-<<<<<<< HEAD
97 96
 		beego.NSRouter("/flashbuy/:flashBuyId", &flashbuy.FlashBuyController{}, "get:GetFlashBuyById"),
98 97
 		beego.NSRouter("/flashbuy/:customerId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyByCustomerId"),
99 98
 		beego.NSRouter("/flashbuy/:customerFlashBuyId", &flashbuy.FlashBuyController{}, "get:GetCustomerFlashBuyId"),
100
-=======
101 99
 		beego.NSRouter("/flashbuy/:id", &flashbuy.FlashBuyController{}, "post:FlashBuy"),
102
->>>>>>> ce8d19c0e1feb16131f63394d322e9dd7f91d4e2
103 100
 	)
104 101
 }

+ 2
- 3
service/flashbuy/flashbuy.go View File

@@ -141,7 +141,6 @@ func (s *FlashBuyServ) Verify(customerFlashBuyId string) error {
141 141
 	return nil
142 142
 }
143 143
 
144
-<<<<<<< HEAD
145 144
 func (s *FlashBuyServ) GetCustomerFlashBuyByCustomerId(customerId string, page, pageSize int) (map[string]interface{}, error) {
146 145
 	if pageSize == 0 {
147 146
 		pageSize = service.PAGENUM
@@ -171,7 +170,8 @@ func (s *FlashBuyServ) GetCustomerFlashBuyId(customerFlashBuyId string) (*flashb
171 170
 		return nil, errors.New("获取抢购活动信息失败")
172 171
 	}
173 172
 	return flashbuy, nil
174
-=======
173
+}
174
+
175 175
 // FlashBuy 抢购
176 176
 func (s *FlashBuyServ) FlashBuy(id string) error {
177 177
 	flashbuy, err := s.dao.GetFlashBuyById(id)
@@ -250,5 +250,4 @@ func (s *FlashBuyServ) FlashBuy(id string) error {
250 250
 	}
251 251
 
252 252
 	return nil
253
->>>>>>> ce8d19c0e1feb16131f63394d322e9dd7f91d4e2
254 253
 }