Browse Source

sql处理

WH01243 1 năm trước cách đây
mục cha
commit
4dad0cf218
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 2 2
      service/custom.go
  2. 2 1
      service/sale_chance.go

+ 2 - 2
service/custom.go

@@ -277,8 +277,8 @@ func saveSalesFunnel(tx *sql.Tx, args []interface{}, tpl_id int64) int64 {
 	ratio := int64(0)
 	stageId := int64(0)
 	stageData := cm.CrmMysql.FindOne(entity.CONFIG_TPL_STAGE, map[string]interface{}{
-		"tpl_id": tpl_id,
-		"order":  1,
+		"tpl_id":  tpl_id,
+		"`order`": 1,
 	}, "id", "")
 	if stageData != nil {
 		stageId = gconv.Int64((*stageData)["id"])

+ 2 - 1
service/sale_chance.go

@@ -177,12 +177,13 @@ func (this *SaleChanceService) SaveChange(ctx context.Context, argsChange, argsT
 		//任务执行计划
 		planId := TaskExecutePlanAdd(tx, this.BusinessType, taskId)
 		//销售漏斗
+		nextFollowTime := time.Unix(this.NextfollowUpTime, 0).Format(date.Date_Full_Layout)
 		argsSalesFunnel := []interface{}{
 			changeId,
 			taskId,
 			fmt.Sprintf("%s创建了销售机会", this.CreateName),
 			this.Summary,
-			this.NextfollowUpTime,
+			nextFollowTime,
 			this.ExpectedMoney,
 			this.BusinessType,
 			this.EntId,