xuzhiheng %!s(int64=2) %!d(string=hai) anos
pai
achega
763956f0af
Modificáronse 4 ficheiros con 17 adicións e 18 borrados
  1. 1 1
      api/internal/logic/distributecluelogic.go
  2. 1 1
      rpc/biService.proto
  3. 4 4
      rpc/pb/biService.pb.go
  4. 11 12
      service/clue.go

+ 1 - 1
api/internal/logic/distributecluelogic.go

@@ -34,7 +34,7 @@ func (l *DistributeClueLogic) DistributeClue(req *types.DistributeClueReq) (resp
 			PositionId:       common.Int64All(v["positionId"]),
 			TotalCount:       common.ObjToString(v["totalCount"]),
 			UncompletedCount: common.ObjToString(v["uncompletedCount"]),
-			DistributedCount: common.ObjToString(v["distributedCount"]),
+			DistributedCount: common.Int64All(v["distributedCount"]),
 		}
 		datas = append(datas, data)
 	}

+ 1 - 1
rpc/biService.proto

@@ -80,7 +80,7 @@ message DistributeDatas {
 	int64 positionId = 2;
 	string totalCount = 3;
 	string uncompletedCount = 4;
-	string distributedCount = 5;
+	int64 distributedCount = 5;
 }
 
 service BiService {

+ 4 - 4
rpc/pb/biService.pb.go

@@ -778,7 +778,7 @@ type DistributeDatas struct {
 	PositionId       int64  `protobuf:"varint,2,opt,name=positionId,proto3" json:"positionId,omitempty"`
 	TotalCount       string `protobuf:"bytes,3,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
 	UncompletedCount string `protobuf:"bytes,4,opt,name=uncompletedCount,proto3" json:"uncompletedCount,omitempty"`
-	DistributedCount string `protobuf:"bytes,5,opt,name=distributedCount,proto3" json:"distributedCount,omitempty"`
+	DistributedCount int64  `protobuf:"varint,5,opt,name=distributedCount,proto3" json:"distributedCount,omitempty"`
 }
 
 func (x *DistributeDatas) Reset() {
@@ -841,11 +841,11 @@ func (x *DistributeDatas) GetUncompletedCount() string {
 	return ""
 }
 
-func (x *DistributeDatas) GetDistributedCount() string {
+func (x *DistributeDatas) GetDistributedCount() int64 {
 	if x != nil {
 		return x.DistributedCount
 	}
-	return ""
+	return 0
 }
 
 var File_biService_proto protoreflect.FileDescriptor
@@ -951,7 +951,7 @@ var file_biService_proto_rawDesc = []byte{
 	0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
 	0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e,
 	0x74, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64,
-	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x69, 0x73,
+	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x69, 0x73,
 	0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x94, 0x02,
 	0x0a, 0x09, 0x42, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d,
 	0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44,

+ 11 - 12
service/clue.go

@@ -4,7 +4,6 @@ import (
 	"database/sql"
 	"log"
 	"math"
-	"strconv"
 	"sync"
 	"time"
 
@@ -26,7 +25,7 @@ func DistributeClue(this *biservice.DistributeClueReq) *biservice.AddProjectResp
 	}
 	for _, data := range this.Datas {
 		seatNumber := common.ObjToString(saleMap[data.Name]["seatNumber"])
-		distributedCount, _ := strconv.Atoi(data.DistributedCount)
+		distributedCount := int(data.DistributedCount)
 		distributedArr := this.ClueIdList[count : count+distributedCount]
 		count += distributedCount
 		DistributeClueMore(saleMap, distributedArr, seatNumber, data.Name, data.PositionId, this.PositionId)
@@ -69,11 +68,11 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
 						"seatNumber":   seatNumber,
 						"comeinsource": 4,
 						"comeintime":   nowTime,
-						// "is_task":      1,
-						// "task_time":    nowTime,
-						// "tasktime":     nowTime,
-						// "taskstatus":   0,
-						// "tasksource":   "线索批量分配",
+						"is_task":      1,
+						"task_time":    nowTime,
+						"tasktime":     nowTime,
+						"taskstatus":   0,
+						"tasksource":   "线索批量分配",
 					})
 					if ok {
 						JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
@@ -97,11 +96,11 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
 						"seatNumber":   seatNumber,
 						"comeinsource": 4,
 						"comeintime":   nowTime,
-						// "is_task":      1,
-						// "task_time":    nowTime,
-						// "tasktime":     nowTime,
-						// "taskstatus":   0,
-						// "tasksource":   "线索批量分配",
+						"is_task":      1,
+						"task_time":    nowTime,
+						"tasktime":     nowTime,
+						"taskstatus":   0,
+						"tasksource":   "线索批量分配",
 					})
 					if seaId > 0 {
 						JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{