|
@@ -215,6 +215,7 @@ func GetLastApplyInfo(userId int) (record Record, err error) {
|
|
|
|
|
|
// Apply 客户申请
|
|
|
func Apply(userId int, companyId int64, mobile, email string, applyInfo userReq.ApplyReq) (ybApplyRecord *yb_apply_record.YbApplyRecord, err error) {
|
|
|
+ ficcSelleriD := 0
|
|
|
sellerName := ``
|
|
|
status := `潜在客户`
|
|
|
companyName := applyInfo.CompanyName
|
|
@@ -245,6 +246,10 @@ func Apply(userId int, companyId int64, mobile, email string, applyInfo userReq.
|
|
|
for _, companyProduct := range companyProductList {
|
|
|
sellerNameList = append(sellerNameList, companyProduct.SellerName)
|
|
|
statusList = append(statusList, companyProduct.Status)
|
|
|
+
|
|
|
+ if companyProduct.ProductID == 1 {
|
|
|
+ ficcSelleriD = companyProduct.SellerID
|
|
|
+ }
|
|
|
}
|
|
|
if len(sellerNameList) > 0 && len(statusList) > 0 {
|
|
|
sellerName = strings.Join(sellerNameList, ",")
|
|
@@ -259,6 +264,7 @@ func Apply(userId int, companyId int64, mobile, email string, applyInfo userReq.
|
|
|
Mobile: mobile,
|
|
|
Email: email,
|
|
|
Permission: applyInfo.Permission,
|
|
|
+ FiccSellerID: uint32(ficcSelleriD),
|
|
|
SellerName: sellerName,
|
|
|
Status: status,
|
|
|
CompanyIDPay: int(companyId),
|