Browse Source

feat:xiugai

wangchuanjin 1 year ago
parent
commit
c0b3f6a7b2
2 changed files with 7 additions and 2 deletions
  1. 2 0
      api/internal/logic/salechanceaddlogic.go
  2. 5 2
      service/sale_chance.go

+ 2 - 0
api/internal/logic/salechanceaddlogic.go

@@ -50,6 +50,8 @@ func (l *SaleChanceAddLogic) SaleChanceAdd(req *types.SaleChanceReq) (resp *type
 		CustomId:          req.CustomId,          //客户id
 		CustomId:          req.CustomId,          //客户id
 		CreateName:        req.CreateName,
 		CreateName:        req.CreateName,
 		ChanceSource:      req.ChanceSource,
 		ChanceSource:      req.ChanceSource,
+		OwnerId:           req.OwnerId,
+		BusinessId:        req.BusinessId,
 	}
 	}
 
 
 	status, error_msg := service.CanAdd(req.EntId, "more_create_chance", req.EmployInfoId, req.CustomId, req.PositionId)
 	status, error_msg := service.CanAdd(req.EntId, "more_create_chance", req.EmployInfoId, req.CustomId, req.PositionId)

+ 5 - 2
service/sale_chance.go

@@ -5,12 +5,12 @@ import (
 	"database/sql"
 	"database/sql"
 	"fmt"
 	"fmt"
 	"log"
 	"log"
-	"time"
-
 	"strings"
 	"strings"
+	"time"
 
 
 	qu "app.yhyue.com/moapp/jybase/common"
 	qu "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/encrypt"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	cm "bp.jydev.jianyu360.cn/CRM/application/api/common"
 	cm "bp.jydev.jianyu360.cn/CRM/application/api/common"
 	"bp.jydev.jianyu360.cn/CRM/application/entity"
 	"bp.jydev.jianyu360.cn/CRM/application/entity"
@@ -206,6 +206,9 @@ func (this *SaleChanceService) SaveChange(ctx context.Context, argsChange, argsT
 		SalesFunnel := saveSalesFunnel(tx, argsSalesFunnel, this.BusinessType)
 		SalesFunnel := saveSalesFunnel(tx, argsSalesFunnel, this.BusinessType)
 		//人脉保存
 		//人脉保存
 		if ownerId != "" || connectionBusinessId != "" {
 		if ownerId != "" || connectionBusinessId != "" {
+			if connectionBusinessId != "" {
+				connectionBusinessId = encrypt.DecodeArticleId2ByCheck(connectionBusinessId)[0]
+			}
 			SaveConnection(tx, this.PositionId, connectionBusinessId, ownerId, this.EntId, this.EntDeptId, this.EntUserId)
 			SaveConnection(tx, this.PositionId, connectionBusinessId, ownerId, this.EntId, this.EntDeptId, this.EntUserId)
 		}
 		}
 		if changeId > 0 && taskId > 0 && ok1 && planId > 0 && SalesFunnel > 0 {
 		if changeId > 0 && taskId > 0 && ok1 && planId > 0 && SalesFunnel > 0 {