Эх сурвалжийг харах

修改二次推送item拆分

fuwencai 4 жил өмнө
parent
commit
7f0a34a730

+ 5 - 5
src/service/second_push.go

@@ -410,7 +410,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					items := strings.Split(v["item"].(string), ",")
 					for _, i := range items {
-						if len(items) > 1 {
+						if len(items) > 1 &&v["itemdist"]!=nil{
 							v["matchkey"] = v["itemdist"].(map[string]interface{})[i]
 							v["item"] = i
 						}
@@ -457,7 +457,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					items := strings.Split(v["item"].(string), ",")
 					for _, i := range items {
-						if len(items) > 1 {
+						if len(items) > 1 &&v["itemdist"]!=nil{
 							v["matchkey"] = v["itemdist"].(map[string]interface{})[i]
 							v["item"] = i
 						}
@@ -523,7 +523,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					items := strings.Split(v["item"].(string), ",")
 					for _, i := range items {
-						if len(items) > 1 {
+						if len(items) > 1 &&v["itemdist"]!=nil{
 							v["matchkey"] = v["itemdist"].(map[string]interface{})[i]
 							v["item"] = i
 						}
@@ -584,7 +584,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					items := strings.Split(v["item"].(string), ",")
 					for _, i := range items {
-						if len(items) > 1 {
+						if len(items) > 1 &&v["itemdist"]!=nil{
 							v["matchkey"] = v["itemdist"].(map[string]interface{})[i]
 							v["item"] = i
 						}
@@ -652,7 +652,7 @@ func GetXlsxs(mMap []map[string]interface{}, fn, email, id string) {
 					}
 					items := strings.Split(v["item"].(string), ",")
 					for _, i := range items {
-						if len(items) > 1 {
+						if len(items) > 1 &&v["itemdist"]!=nil{
 							v["matchkey"] = v["itemdist"].(map[string]interface{})[i]
 							v["item"] = i
 						}