Browse Source

fix:bug

token_replace
黄梓健 5 years ago
parent
commit
4aea07e0b1
  1. 3
      controllers/client/login.go
  2. 4
      controllers/client/order_entry.go

3
controllers/client/login.go

@ -91,9 +91,6 @@ func (t *UserCtl) WxLogin() {
exist, err = user.GetUserByOpenid(info.OpenId)
t.CheckErr(err)
//user.ActivityId = activityId
//user.AreaId = area.Id
//user.AreaName = area.Name
user.Nickname = info.Nickname
user.Openid = info.OpenId
user.Gender = func() string {

4
controllers/client/order_entry.go

@ -325,10 +325,10 @@ func (t *OrderEntryCtl) ManualOrder() {
}
ms := make([]map[string]int, 0)
err = s.Table(&models.CustomerOrderSub{}).Alias("s").Select("s.goods_id, (COALESCE sum(goods_num), 0) as goods_num").
err = s.Table(&models.CustomerOrderSub{}).Alias("s").Select("s.goods_id, COALESCE(SUM(s.goods_num), 0) as goods_num").
Join("left", (&models.CustomerOrder{}).Alias("o"), "o.id=s.order_id").
Where("o.activity_id=? and o.rehearsal_id=? and o.arch_id=?", activity.Id, activity.RehearsalId, activity.ArchId).
In("goods_id", goodIds).GroupBy("goods_id").Find(&ms)
In("s.goods_id", goodIds).GroupBy("s.goods_id").Find(&ms)
if err != nil {
s.Rollback()
t.CheckErr(err)

Loading…
Cancel
Save