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

+ 0
- 3
routers/wechat.go View File

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

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

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