Browse Source

Merge branch 'master' into feature/v1.0.1

lianbingjie 1 year ago
parent
commit
1e456b464a
2 changed files with 5 additions and 5 deletions
  1. 4 4
      service/custom.go
  2. 1 1
      service/sale_chance.go

+ 4 - 4
service/custom.go

@@ -283,7 +283,7 @@ func saveSalesFunnel(tx *sql.Tx, args []interface{}, tpl_id int64) int64 {
 	//当前阶段
 	stageId := int64(0)
 	stageData := cm.CrmMysql.Find(entity.CONFIG_TPL_STAGE, map[string]interface{}{
-		"tpl_id": tpl_id}, "id, order", "", -1, -1)
+		"tpl_id": tpl_id}, "id, `order`", "", -1, -1)
 	if stageData != nil && len(*stageData) > 0 {
 		var a1 []interface{}
 		for _, m := range *stageData {
@@ -298,16 +298,16 @@ func saveSalesFunnel(tx *sql.Tx, args []interface{}, tpl_id int64) int64 {
 			a1 = append(a1, 0)
 			a1 = append(a1, stageId)
 			//进度查询
-			matterData := cm.CrmMysql.SelectBySql("select COUNT(1) as ratio from config_stage_matter where stage_id=? and is_must == 1", stageId)
+			/*matterData := cm.CrmMysql.SelectBySql("select COUNT(1) as ratio from config_stage_matter where stage_id=? and is_must == 1", stageId)
 			if matterData != nil && len(*matterData) > 0 {
 				ratio := gconv.Int64((*matterData)[0]["ratio"])
 				a1 = append(a1, ratio)
 			} else {
 				a1 = append(a1, 0)
-			}
+			}*/
 		}
 		//当前阶段进展
-		_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.SALES_FUNNEL, fields, args)
+		_, id := cm.CrmMysql.InsertBatchByTx(tx, entity.SALES_FUNNEL, fields, a1)
 		return id
 		/**/
 	}

+ 1 - 1
service/sale_chance.go

@@ -203,7 +203,7 @@ func (this *SaleChanceService) SaveChange(ctx context.Context, argsChange, argsT
 		if changeId > 0 && taskId > 0 && ok1 && planId > 0 && SalesFunnel > 0 {
 			return true
 		}
-		log.Println("save change err: ", changeId, taskId, ok1, planId)
+		log.Println("save change err: ", changeId, taskId, ok1, planId, SalesFunnel)
 		return false
 	})