|
@@ -87,6 +87,9 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
|
|
"updatetime": nowTime,
|
|
"updatetime": nowTime,
|
|
"comeintime": nowTime,
|
|
"comeintime": nowTime,
|
|
"comeinsource_private": 4,
|
|
"comeinsource_private": 4,
|
|
|
|
+ "comeinsource_open": nil,
|
|
|
|
+ "level_open": nil,
|
|
|
|
+ "clue_level": nil,
|
|
}
|
|
}
|
|
ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
|
|
ok := JyBiTidb.Update("dwd_f_crm_clue_info", map[string]interface{}{"id": v}, updateClue)
|
|
// ok := JyBiTidb.Update("dwd_f_crm_private_sea", map[string]interface{}{"clue_id": v}, map[string]interface{}{
|
|
// ok := JyBiTidb.Update("dwd_f_crm_private_sea", map[string]interface{}{"clue_id": v}, map[string]interface{}{
|
|
@@ -142,6 +145,9 @@ func DistributeClueMore(saleMap map[string]map[string]interface{}, distributedAr
|
|
"comeinsource_private": 4,
|
|
"comeinsource_private": 4,
|
|
"is_task": 0,
|
|
"is_task": 0,
|
|
"taskstatus": 0,
|
|
"taskstatus": 0,
|
|
|
|
+ "comeinsource_open": nil,
|
|
|
|
+ "level_open": nil,
|
|
|
|
+ "clue_level": nil,
|
|
}
|
|
}
|
|
if trailstatus != "08" {
|
|
if trailstatus != "08" {
|
|
updateClue["trailstatus"] = "01"
|
|
updateClue["trailstatus"] = "01"
|
|
@@ -210,8 +216,8 @@ func DrawClue(this *biservice.DrawClueReq) *biservice.AddProjectResp {
|
|
func DrawClueSync(this *biservice.DrawClueReq) (int, int) {
|
|
func DrawClueSync(this *biservice.DrawClueReq) (int, int) {
|
|
if DataLock.TryLock() {
|
|
if DataLock.TryLock() {
|
|
defer DataLock.Unlock()
|
|
defer DataLock.Unlock()
|
|
- count1 := JyBiTidb.Count("dwd_f_crm_clue_info", map[string]interface{}{"level": 1, "is_assign": 0})
|
|
|
|
- count2 := JyBiTidb.Count("dwd_f_crm_clue_info", map[string]interface{}{"level": 2, "is_assign": 0})
|
|
|
|
|
|
+ count1 := JyBiTidb.Count("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 1, "is_assign": 0})
|
|
|
|
+ count2 := JyBiTidb.Count("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 2, "is_assign": 0})
|
|
counts1, counts2, counts3 := int64(0), int64(0), int64(0)
|
|
counts1, counts2, counts3 := int64(0), int64(0), int64(0)
|
|
counts1 = int64(math.Ceil(float64(this.Count) / float64(10) * 5))
|
|
counts1 = int64(math.Ceil(float64(this.Count) / float64(10) * 5))
|
|
if this.Count-counts1 == 0 {
|
|
if this.Count-counts1 == 0 {
|
|
@@ -244,13 +250,13 @@ func DrawClueSync(this *biservice.DrawClueReq) (int, int) {
|
|
func DrawClues(positionId, count1, count2, count3 int64) int {
|
|
func DrawClues(positionId, count1, count2, count3 int64) int {
|
|
data1, data2, data3, drawCount := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}, 0
|
|
data1, data2, data3, drawCount := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}, 0
|
|
if count1 > 0 {
|
|
if count1 > 0 {
|
|
- data1 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level": 1, "is_assign": 0}, "", "", 0, int(count1))
|
|
|
|
|
|
+ data1 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 1, "is_assign": 0}, "", "", 0, int(count1))
|
|
}
|
|
}
|
|
if count2 > 0 {
|
|
if count2 > 0 {
|
|
- data2 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level": 2, "is_assign": 0}, "", "", 0, int(count2))
|
|
|
|
|
|
+ data2 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 2, "is_assign": 0}, "", "", 0, int(count2))
|
|
}
|
|
}
|
|
if count3 > 0 {
|
|
if count3 > 0 {
|
|
- data3 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level": 3, "is_assign": 0}, "", "", 0, int(count3))
|
|
|
|
|
|
+ data3 = JyBiTidb.Find("dwd_f_crm_clue_info", map[string]interface{}{"level_open": 3, "is_assign": 0}, "", "", 0, int(count3))
|
|
}
|
|
}
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
seatNumber, name := getSeatNumber(positionId)
|
|
seatNumber, name := getSeatNumber(positionId)
|
|
@@ -295,6 +301,9 @@ func batchDraw(data []map[string]interface{}, nowTime, seatNumber, name string,
|
|
"tasktime": nowTime,
|
|
"tasktime": nowTime,
|
|
"taskstatus": 0,
|
|
"taskstatus": 0,
|
|
"tasksource": "领取公海线索",
|
|
"tasksource": "领取公海线索",
|
|
|
|
+ "comeinsource_open": nil,
|
|
|
|
+ "level_open": nil,
|
|
|
|
+ "clue_level": nil,
|
|
}
|
|
}
|
|
if trailstatus != "08" {
|
|
if trailstatus != "08" {
|
|
updateClue["trailstatus"] = "01"
|
|
updateClue["trailstatus"] = "01"
|