소스 검색

feat: 机会来源

zhangxinlei1996 1 년 전
부모
커밋
8b69fff061
2개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 1
      service/custom.go
  2. 3 3
      service/sale_chance.go

+ 0 - 1
service/custom.go

@@ -142,7 +142,6 @@ func (this *CustomService) Add(ctx context.Context) (int64, string) {
 }
 
 //
-
 func SaleCustomAdd(tx *sql.Tx, args []interface{}) int64 {
 	fields := []string{"position_id", "ent_id", "ent_user_id", "employ_info_id", "employ_custom_id", "type", "full_name", "sort_name", "summary", "level", "industry", "subdivision_industry", "province", "city", "county", "address", "phone", "remark", "create_person", "create_time"}
 	_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.CUSTOM, fields, args)

+ 3 - 3
service/sale_chance.go

@@ -81,7 +81,7 @@ func (this *SaleChanceService) Add(ctx context.Context) (int64, string) {
 			baseUserIdArr = append(baseUserIdArr, resp.UserId)
 		}
 
-		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName)
+		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName, 55)
 		//任务
 		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime), this.BusinessType, stageId)
 
@@ -92,7 +92,7 @@ func (this *SaleChanceService) Add(ctx context.Context) (int64, string) {
 		}
 	} else if this.Types == 1 {
 		//线索机会
-		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName)
+		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.CustomId, this.BusinessType, this.ChanceName, this.Summary, this.ChanceClassify, qu.If(this.ExpectedOrderTime == 0, nil, expect_deal_time), qu.If(this.ExpectedMoney == 0, nil, this.ExpectedMoney), qu.If(this.Remarks == "", nil, this.Remarks), nowtime, this.CreateName, 55)
 		//任务
 		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 2, nowtime, 1, 0, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime), this.BusinessType, stageId)
 		//任务团队
@@ -147,7 +147,7 @@ func (this *SaleChanceService) Add(ctx context.Context) (int64, string) {
 
 // SaleChangeAdd 机会存储
 func SaleChangeAdd(tx *sql.Tx, args []interface{}) int64 {
-	fields := []string{"position_id", "ent_id", "ent_user_id", "employ_info_id", "custom_id", "tpl_id", "name", "summary", "classify", "expect_deal_time", "expect_deal_amount", "remark", "create_time", "create_person"}
+	fields := []string{"position_id", "ent_id", "ent_user_id", "employ_info_id", "custom_id", "tpl_id", "name", "summary", "classify", "expect_deal_time", "expect_deal_amount", "remark", "create_time", "create_person", "source"}
 
 	_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.SALE_CHANCE, fields, args)
 	return id