...
|
...
|
@@ -70,15 +70,20 @@ func (repository OrderRepository) Save(orderInfo *domain.Order) error { |
|
|
PartnerId: orderInfo.PartnerInfo.Id,
|
|
|
PartnerBonusPercent: orderInfo.PartnerBonusPercent,
|
|
|
SalesmanBonusPercent: orderInfo.SalesmanBonusPercent,
|
|
|
CreateAt: orderInfo.CreateAt,
|
|
|
UpdateAt: orderInfo.UpdateAt,
|
|
|
LastViewTime: orderInfo.LastViewTime,
|
|
|
// CreateAt: orderInfo.CreateAt,
|
|
|
// UpdateAt: orderInfo.UpdateAt,
|
|
|
// LastViewTime: orderInfo.LastViewTime,
|
|
|
}
|
|
|
if m.Id == 0 {
|
|
|
err = tx.Insert(m)
|
|
|
orderInfo.Id = m.Id
|
|
|
} else {
|
|
|
err = tx.Update(m)
|
|
|
_, err = tx.Model(m).WherePK().
|
|
|
Column("order_type", "order_code", "order_name", "order_status", "order_count",
|
|
|
"order_actual_count", "order_amount", "order_actual_amount", "order_payment_amount",
|
|
|
"order_region_info", "buyer", "partner_id", "partner_bonus_percent", "salesman_bonus_percent",
|
|
|
"update_at").
|
|
|
Update()
|
|
|
}
|
|
|
return err
|
|
|
}
|
...
|
...
|
|