Select("o.receiver as receiver, o.phone as phone, o.address as address,l.extra_data as extra_data, "+
" g.name as good_name, o.buyer_id as user_id, o.total_amount as order_money, o.id as order_id, "+
" DATE_FORMAT(o.created_at, '%Y-%m-%d %H:%i:%S') AS order_time").Join("LEFT",
(&models.CustomerGoods{}).Alias("g"),"o.goods_id=g.id and o.activity_id=g.activity_id and g.is_delete=0").
Join("LEFT",(&models.InvitationLetter{}).Alias("l"),"l.user_id = o.buyer_id and o.activity_id=l.activity_id and o.arch_id=l.arch_id and l.is_delete=0").
Where("o.activity_id=? and o.order_entry_person_id=? and o.rehearsal_id=? and o.arch_id=? "+
" and o.is_delete=0",activity.Id,uid,activity.RehearsalId,activity.ArchId).
// Select("o.receiver as receiver, o.phone as phone, o.address as address,l.extra_data as extra_data, "+
// " g.name as good_name, o.buyer_id as user_id, o.total_amount as order_money, o.id as order_id, "+
// " DATE_FORMAT(o.created_at, '%Y-%m-%d %H:%i:%S') AS order_time").Join("LEFT",
// (&models.CustomerGoods{}).Alias("g"), "o.goods_id=g.id and o.activity_id=g.activity_id").
// Join("LEFT", (&models.InvitationLetter{}).Alias("l"), "l.user_id = o.buyer_id and o.activity_id=l.activity_id and o.arch_id=l.arch_id and l.is_delete=0").
// Where("o.activity_id=? and o.order_entry_person_id=? and o.rehearsal_id=? and o.arch_id=? "+
// " and o.is_delete=0", activity.Id, uid, activity.RehearsalId, activity.ArchId).