瀏覽代碼

Merge branch 'dev4.6.3.14' of http://192.168.3.207:8080/qmx/jy into dev4.6.3.14

zhangyuhan 3 年之前
父節點
當前提交
29533dd926

+ 1 - 1
src/jfw/modules/bigmember/src/entity/portrailUtil.go

@@ -75,7 +75,7 @@ func CalculationRate(buyget, bidamount float64) interface{} {
 	if buyget > 0 {
 		return (buyget - bidamount) / buyget
 	}
-	return 0
+	return nil
 }
 
 //计算占比

+ 6 - 0
src/jfw/modules/bigmember/src/entity/portraitWinnerSearch.go

@@ -77,12 +77,15 @@ func GetProjectContactsMsg(buyerName, entId string) (list []map[string]interface
 			if thisPerson == "" || thisPhone == "" { //联系人为空则不展示
 				continue
 			}
+			//一个项目只选取一条公告联系人
+			thisAddPerson := false
 			//名字中多个联系人拆分
 			for _, name := range strings.Split(thisPerson, ",") {
 				thisName := strings.TrimSpace(name)
 				if thisName == "" { //联系人为空则不展示
 					continue
 				}
+				thisAddPerson = true
 				repeatKey := fmt.Sprintf("%s_%s", thisName, thisPhone)
 				if repeatContacts[repeatKey] {
 					continue
@@ -96,6 +99,9 @@ func GetProjectContactsMsg(buyerName, entId string) (list []map[string]interface
 					"projectname": qutil.If(rowData["projectname"] != nil, rowData["projectname"], thisMsg["title"]),
 				})
 			}
+			if thisAddPerson {
+				break
+			}
 		}
 	}
 	return