|
@@ -37,6 +37,7 @@ type SaleClueService struct {
|
|
User []int64
|
|
User []int64
|
|
FollowUpTime int64
|
|
FollowUpTime int64
|
|
CreateName string
|
|
CreateName string
|
|
|
|
+ Channel string
|
|
}
|
|
}
|
|
|
|
|
|
//Add 创建线索
|
|
//Add 创建线索
|
|
@@ -70,7 +71,7 @@ func (this *SaleClueService) Add(ctx context.Context) (int64, string) {
|
|
baseUserIdArr = append(baseUserIdArr, resp.UserId)
|
|
baseUserIdArr = append(baseUserIdArr, resp.UserId)
|
|
}
|
|
}
|
|
//线索
|
|
//线索
|
|
- args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, nowtime, this.CreateName)
|
|
|
|
|
|
+ args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, nowtime, this.CreateName, this.Channel)
|
|
//任务
|
|
//任务
|
|
argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime), nil, nil)
|
|
argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime), nil, nil)
|
|
clueId, taskId = Save(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, 0, this.PositionId, this.CreateName, transferArr, this.EntId, this.EntUserId, this.EntDeptId)
|
|
clueId, taskId = Save(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, 0, this.PositionId, this.CreateName, transferArr, this.EntId, this.EntUserId, this.EntDeptId)
|
|
@@ -79,7 +80,7 @@ func (this *SaleClueService) Add(ctx context.Context) (int64, string) {
|
|
}
|
|
}
|
|
} else if this.Types == 1 {
|
|
} else if this.Types == 1 {
|
|
//线索
|
|
//线索
|
|
- args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, time.Now().Format(date.Date_Full_Layout), this.CreateName)
|
|
|
|
|
|
+ args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, time.Now().Format(date.Date_Full_Layout), this.CreateName, this.Channel)
|
|
//任务
|
|
//任务
|
|
|
|
|
|
argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 2, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime), nil, nil)
|
|
argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 2, nowtime, 1, 0, qu.If(this.FollowUpTime == 0, nil, nextFollowTime), nil, nil)
|
|
@@ -129,7 +130,7 @@ func (this *SaleClueService) Add(ctx context.Context) (int64, string) {
|
|
|
|
|
|
//SaleClueAdd 线索存储
|
|
//SaleClueAdd 线索存储
|
|
func SaleClueAdd(tx *sql.Tx, args []interface{}) int64 {
|
|
func SaleClueAdd(tx *sql.Tx, args []interface{}) int64 {
|
|
- fields := []string{"position_id", "ent_id", "ent_user_id", "name", "source", "summary", "employ_info_id", "is_close", "create_time", "create_person"}
|
|
|
|
|
|
+ fields := []string{"position_id", "ent_id", "ent_user_id", "name", "source", "summary", "employ_info_id", "is_close", "create_time", "create_person", "channel"}
|
|
_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.SALE_CLUE, fields, args)
|
|
_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.SALE_CLUE, fields, args)
|
|
return id
|
|
return id
|
|
}
|
|
}
|