正在显示
3 个修改的文件
包含
14 行增加
和
6 行删除
@@ -105,7 +105,7 @@ func (PartnerInfoService *PartnerInfoService) GetPartnerInfo(command query.GetPa | @@ -105,7 +105,7 @@ func (PartnerInfoService *PartnerInfoService) GetPartnerInfo(command query.GetPa | ||
105 | return | 105 | return |
106 | } | 106 | } |
107 | 107 | ||
108 | -// 更新客户价值 | 108 | +//UpdatePartnerInfo 更新合伙人 |
109 | func (PartnerInfoService *PartnerInfoService) UpdatePartnerInfo(updatePartnerInfoCommand *command.UpdatePartnerInfoCommand) (err error) { | 109 | func (PartnerInfoService *PartnerInfoService) UpdatePartnerInfo(updatePartnerInfoCommand *command.UpdatePartnerInfoCommand) (err error) { |
110 | var ( | 110 | var ( |
111 | transactionContext, _ = factory.CreateTransactionContext(nil) | 111 | transactionContext, _ = factory.CreateTransactionContext(nil) |
@@ -70,15 +70,20 @@ func (repository OrderRepository) Save(orderInfo *domain.Order) error { | @@ -70,15 +70,20 @@ func (repository OrderRepository) Save(orderInfo *domain.Order) error { | ||
70 | PartnerId: orderInfo.PartnerInfo.Id, | 70 | PartnerId: orderInfo.PartnerInfo.Id, |
71 | PartnerBonusPercent: orderInfo.PartnerBonusPercent, | 71 | PartnerBonusPercent: orderInfo.PartnerBonusPercent, |
72 | SalesmanBonusPercent: orderInfo.SalesmanBonusPercent, | 72 | SalesmanBonusPercent: orderInfo.SalesmanBonusPercent, |
73 | - CreateAt: orderInfo.CreateAt, | ||
74 | - UpdateAt: orderInfo.UpdateAt, | ||
75 | - LastViewTime: orderInfo.LastViewTime, | 73 | + // CreateAt: orderInfo.CreateAt, |
74 | + // UpdateAt: orderInfo.UpdateAt, | ||
75 | + // LastViewTime: orderInfo.LastViewTime, | ||
76 | } | 76 | } |
77 | if m.Id == 0 { | 77 | if m.Id == 0 { |
78 | err = tx.Insert(m) | 78 | err = tx.Insert(m) |
79 | orderInfo.Id = m.Id | 79 | orderInfo.Id = m.Id |
80 | } else { | 80 | } else { |
81 | - err = tx.Update(m) | 81 | + _, err = tx.Model(m).WherePK(). |
82 | + Column("order_type", "order_code", "order_name", "order_status", "order_count", | ||
83 | + "order_actual_count", "order_amount", "order_actual_amount", "order_payment_amount", | ||
84 | + "order_region_info", "buyer", "partner_id", "partner_bonus_percent", "salesman_bonus_percent", | ||
85 | + "update_at"). | ||
86 | + Update() | ||
82 | } | 87 | } |
83 | return err | 88 | return err |
84 | } | 89 | } |
@@ -64,7 +64,10 @@ func (repository *PartnerInfoRepository) Save(dm *domain.PartnerInfo) (*domain.P | @@ -64,7 +64,10 @@ func (repository *PartnerInfoRepository) Save(dm *domain.PartnerInfo) (*domain.P | ||
64 | return nil, err | 64 | return nil, err |
65 | } | 65 | } |
66 | } else { | 66 | } else { |
67 | - err = tx.Update(m) | 67 | + _, err = tx.Model(m).WherePK(). |
68 | + Column("partner_name", "account", "password", "status", "partner_category", "salesman", | ||
69 | + "regionInfo", "cooperate_time", "update_at"). | ||
70 | + Update() | ||
68 | if err != nil { | 71 | if err != nil { |
69 | return nil, err | 72 | return nil, err |
70 | } | 73 | } |
-
请 注册 或 登录 后发表评论