|
@@ -430,6 +430,7 @@ func UpdateCompanyContractSellerMove(companyId, productId int) (moveMap map[stri
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ var updateCompanyProduct bool
|
|
|
//更新还没有生效的合同
|
|
|
{
|
|
|
var condition string
|
|
@@ -451,6 +452,12 @@ func UpdateCompanyContractSellerMove(companyId, productId int) (moveMap map[stri
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ e = company.UpdateCompanyProductSellerUnexpired(cp.SellerId, cp.ShareSellerId, cp.SellerName, cp.ShareSeller, cp.CompanyId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("UpdateCompanyProductSellerUnexpired, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ updateCompanyProduct = true
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -475,6 +482,15 @@ func UpdateCompanyContractSellerMove(companyId, productId int) (moveMap map[stri
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if !updateCompanyProduct {
|
|
|
+ e = company.UpdateCompanyProductSellerUnexpired(cp.SellerId, cp.ShareSellerId, cp.SellerName, cp.ShareSeller, cp.CompanyId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("UpdateCompanyProductSellerUnexpired, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|