浏览代码

Merge branch 'dev/v1.0.4_xzh' of BaseService/biService into feature/v1.0.4

xuzhiheng 2 年之前
父节点
当前提交
fbe5256fac
共有 1 个文件被更改,包括 15 次插入3 次删除
  1. 15 3
      service/clue.go

+ 15 - 3
service/clue.go

@@ -75,7 +75,11 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
 		for _, v := range *data1 {
 		for _, v := range *data1 {
 			//update postionid and update record
 			//update postionid and update record
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
-			trailstatus := common.ObjToString(v["trailstatus"])
+			trailstatus := ""
+			cluedata := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, "", "")
+			if cluedata != nil && len(*cluedata) > 0 {
+				trailstatus = common.ObjToString((*cluedata)["trailstatus"])
+			}
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 				updateClue := map[string]interface{}{
 				updateClue := map[string]interface{}{
 					"position_id": positionId,
 					"position_id": positionId,
@@ -166,7 +170,11 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
 	if data2 != nil && len(*data2) > 0 {
 	if data2 != nil && len(*data2) > 0 {
 		for _, v := range *data2 {
 		for _, v := range *data2 {
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
-			trailstatus := common.ObjToString(v["trailstatus"])
+			trailstatus := ""
+			cluedata := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, "", "")
+			if cluedata != nil && len(*cluedata) > 0 {
+				trailstatus = common.ObjToString((*cluedata)["trailstatus"])
+			}
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 				updateClue := map[string]interface{}{
 				updateClue := map[string]interface{}{
 					"position_id": positionId,
 					"position_id": positionId,
@@ -257,7 +265,11 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
 	if data3 != nil && len(*data3) > 0 {
 	if data3 != nil && len(*data3) > 0 {
 		for _, v := range *data3 {
 		for _, v := range *data3 {
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
-			trailstatus := common.ObjToString(v["trailstatus"])
+			trailstatus := ""
+			cluedata := JyBiTidb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, "", "")
+			if cluedata != nil && len(*cluedata) > 0 {
+				trailstatus = common.ObjToString((*cluedata)["trailstatus"])
+			}
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 				updateClue := map[string]interface{}{
 				updateClue := map[string]interface{}{
 					"position_id": positionId,
 					"position_id": positionId,