作者 tangxvhui

bug 修复

... ... @@ -105,7 +105,7 @@ func (PartnerInfoService *PartnerInfoService) GetPartnerInfo(command query.GetPa
return
}
// 更新客户价值
//UpdatePartnerInfo 更新合伙人
func (PartnerInfoService *PartnerInfoService) UpdatePartnerInfo(updatePartnerInfoCommand *command.UpdatePartnerInfoCommand) (err error) {
var (
transactionContext, _ = factory.CreateTransactionContext(nil)
... ...
... ... @@ -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
}
... ...
... ... @@ -64,7 +64,10 @@ func (repository *PartnerInfoRepository) Save(dm *domain.PartnerInfo) (*domain.P
return nil, err
}
} else {
err = tx.Update(m)
_, err = tx.Model(m).WherePK().
Column("partner_name", "account", "password", "status", "partner_category", "salesman",
"regionInfo", "cooperate_time", "update_at").
Update()
if err != nil {
return nil, err
}
... ...