|
|
@ -22,6 +22,7 @@ func (t *OrderEntryCtl) List() { |
|
|
|
_type := t.GetAccountType() |
|
|
|
uid := t.GetAccountId() |
|
|
|
activityId := t.MustGetInt("activity_id") |
|
|
|
|
|
|
|
areaId := 0 |
|
|
|
if _type == define.TYPE_ENTRYPEOPLE { |
|
|
|
entryPerson := models.OrderEntryPerson{} |
|
|
@ -33,7 +34,17 @@ func (t *OrderEntryCtl) List() { |
|
|
|
areaId = t.MustGetInt("area_id") |
|
|
|
} |
|
|
|
|
|
|
|
goods, err := models.GetGoodsByActivityId(activityId, areaId) |
|
|
|
area := &models.AreaStore{} |
|
|
|
exist, err := models.Get(area, areaId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区不存在") |
|
|
|
if area.IsMainArea != 1 && area.AreaGoodsRuleSwitch != 1 { |
|
|
|
exist, err = area.GetMainAreaById(activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_AREASTORE_NOT_EXIST, "地区不存在") |
|
|
|
} |
|
|
|
|
|
|
|
goods, err := models.GetGoodsByActivityId(activityId, area.Id) |
|
|
|
t.CheckErr(err) |
|
|
|
if _type == define.TYPE_USER { |
|
|
|
for index := range goods { |
|
|
|