瀏覽代碼

feat: 任务表删除字段调整

zhangxinlei1996 1 年之前
父節點
當前提交
eabce2707a
共有 3 個文件被更改,包括 7 次插入7 次删除
  1. 2 2
      service/custom.go
  2. 2 2
      service/sale_chance.go
  3. 3 3
      service/sale_clue.go

+ 2 - 2
service/custom.go

@@ -71,7 +71,7 @@ func (this *CustomService) Add(ctx context.Context) int64 {
 		//客户
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.EmployCustomId, this.CustomType, this.CustomAllName, this.CustomAbbreviation, this.Summary, qu.If(this.CustomLevel == 0, nil, this.CustomLevel), this.CustomIndustry, this.CustomDetailIndustry, qu.If(this.Province == "", nil, this.Province), qu.If(this.City == "", nil, this.City), qu.If(this.District == "", nil, this.District), qu.If(this.Address == "", nil, this.Address), qu.If(this.CompanyPhone == "", nil, this.CompanyPhone), qu.If(this.Remarks == "", nil, this.Remarks), this.CreateName, nowtime)
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 
 		if !SaveCustom(ctx, args, argsTask, argsTaskTeam, this.EmployInfoId, this.EmployCustomId, this.PositionId, this.CreateName, transferArr) {
 			return 0
@@ -80,7 +80,7 @@ func (this *CustomService) Add(ctx context.Context) int64 {
 		//客户
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.EmployInfoId, this.EmployCustomId, this.CustomType, this.CustomAllName, this.CustomAbbreviation, this.Summary, qu.If(this.CustomLevel == 0, nil, this.CustomLevel), this.CustomIndustry, this.CustomDetailIndustry, qu.If(this.Province == "", nil, this.Province), qu.If(this.City == "", nil, this.City), qu.If(this.District == "", nil, this.District), qu.If(this.Address == "", nil, this.Address), qu.If(this.CompanyPhone == "", nil, this.CompanyPhone), qu.If(this.Remarks == "", nil, this.Remarks), this.CreateName, nowtime)
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.CustomAllName+"的跟进任务", 3, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库

+ 2 - 2
service/sale_chance.go

@@ -69,7 +69,7 @@ func (this *SaleChanceService) Add(ctx context.Context) int64 {
 		}
 		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)
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 
 		if !SaveChange(ctx, args, argsTask, argsTaskTeam, this.PositionId, this.BusinessType, this.CreateName, transferArr) {
 			return 0
@@ -78,7 +78,7 @@ func (this *SaleChanceService) Add(ctx context.Context) int64 {
 		//线索
 		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)
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ChanceName+"的跟进任务", 2, this.PositionId, 1, nowtime, 1, qu.If(this.NextfollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库

+ 3 - 3
service/sale_clue.go

@@ -57,7 +57,7 @@ func (this *SaleClueService) Add(ctx context.Context) int64 {
 		//线索
 		args = append(args, this.PositionId, this.EntId, this.EntUserId, this.ClueName, this.CluesSource, this.Summary, this.EmployInfoId, 0, nowtime)
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
 
 		if !Save(ctx, args, argsTask, argsTaskTeam, this.PositionId, this.CreateName, transferArr) {
 			return 0
@@ -66,7 +66,7 @@ func (this *SaleClueService) Add(ctx context.Context) int64 {
 		//线索
 		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))
 		//任务
-		argsTask = append(argsTask, this.PositionId, this.EntId, this.EntUserId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
+		argsTask = append(argsTask, this.EntId, this.ClueName+"的跟进任务", 1, this.PositionId, 1, nowtime, 1, qu.If(this.FollowUpTime == 0, nil, nextFollowTime))
 		//任务团队
 		argsTaskTeam = append(argsTaskTeam, this.PositionId, this.EntUserId, this.CreateName, 1, nowtime)
 		//存库
@@ -91,7 +91,7 @@ taskTransferMap 自办的map
 transferArr 转办的用户职位id
 */
 func TaskAdd(tx *sql.Tx, args, taskTeamArgs []interface{}, transferArr []int64, positionId int64) int64 {
-	fields := []string{"position_id", "ent_id", "ent_user_id", "name", "source", "create_person", "status", "create_time", "create_way", "next_follow_time", "source_id"}
+	fields := []string{"ent_id", "name", "source", "create_person", "status", "create_time", "create_way", "next_follow_time", "source_id"}
 	_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.TASK, fields, args)
 	teamId, transferId := int64(0), int64(0)
 	if len(taskTeamArgs) > 0 {