|
@@ -411,7 +411,7 @@ import (
|
|
|
//}
|
|
|
|
|
|
// UpdateCompanyContractSellerMove 权益客户移动所属销售之后,更新所关联的销售信息
|
|
|
-func UpdateCompanyContractSellerMove(companyId, productId int) (moveMap map[string]bool) {
|
|
|
+func UpdateCompanyContractSellerMove(companyId, productId int) {
|
|
|
if productId != utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
return
|
|
|
}
|
|
@@ -496,3 +496,32 @@ func UpdateCompanyContractSellerMove(companyId, productId int) (moveMap map[stri
|
|
|
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// 权益客户创建新的有效合同之后,更新所关联的销售信息
|
|
|
+func UpdateCompanyProductSellerMove(companyId, productId int) {
|
|
|
+ if productId != utils.COMPANY_PRODUCT_RAI_ID {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ time.Sleep(1 * time.Second) // 延迟1秒
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ go alarm_msg.SendAlarmMsg("权益客户创建新的有效合同之后,更新所关联的销售信息,UpdateCompanyProductSellerMove "+fmt.Sprint("companyId:", companyId, ";err:", err), 3)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+
|
|
|
+ cp, e := company.GetCompanyProductByCompanyIdAndProductId(companyId, productId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetCompanyProductByCompanyIdAndProductId Err: " + e.Error())
|
|
|
+ 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
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+}
|