|
@@ -711,3 +711,15 @@ func UpdateCompanyProductsellerInit(seller_id_init int, seller_name_init string,
|
|
_, err = o.Raw(sql, seller_id_init, seller_name_init, companyId, productId).Exec()
|
|
_, err = o.Raw(sql, seller_id_init, seller_name_init, companyId, productId).Exec()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 合同未到期更新对应销售的信息
|
|
|
|
+func UpdateCompanyProductSellerUnexpired(sellerId, shareSellerInit int, sellerName, shareSeller string, companyContractId int) (err error) {
|
|
|
|
+ o := orm.NewOrm()
|
|
|
|
+ sql := `UPDATE company_product SET
|
|
|
|
+ seller_id_last = ? ,
|
|
|
|
+ seller_name_last = ? ,
|
|
|
|
+ share_seller_last = ? ,
|
|
|
|
+ share_seller_id_last = ? WHERE companyId = ? AND product_id= 2 `
|
|
|
|
+ _, err = o.Raw(sql, sellerId, sellerName, shareSellerInit, shareSeller, companyContractId).Exec()
|
|
|
|
+ return
|
|
|
|
+}
|