作者 唐旭辉

更新错误

... ... @@ -35,4 +35,5 @@ type OrderBestshop struct {
//是否将数据同步到 order_base ,order_good
IsCopy bool `pg:",use_zero"`
CompanyId int64
OrderArea string
}
... ...
... ... @@ -43,6 +43,7 @@ func (respository OrderBestshopRepository) transformPgModelToDomainModel(orderMo
PartnerId: orderModel.PartnerId,
IsCopy: orderModel.IsCopy,
CompanyId: orderModel.CompanyId,
OrderArea: orderModel.OrderArea,
}, nil
}
... ... @@ -65,6 +66,7 @@ func (respository OrderBestshopRepository) Add(order *domain.OrderBestShop) erro
PartnerId: order.PartnerId,
IsCopy: order.IsCopy,
CompanyId: order.CompanyId,
OrderArea: order.OrderArea,
}
_, err := tx.Model(&m).Insert()
order.Id = m.Id
... ... @@ -91,6 +93,7 @@ func (respository OrderBestshopRepository) Edit(order *domain.OrderBestShop) err
PartnerId: order.PartnerId,
IsCopy: order.IsCopy,
CompanyId: order.CompanyId,
OrderArea: order.OrderArea,
}
_, err := tx.Model(&m).Where("id=?", order.Id).Update()
order.Id = m.Id
... ...