fengweiqiang 5 жил өмнө
parent
commit
c373f2408f

+ 6 - 2
src/jy/admin/audit/qiyeku.go

@@ -37,6 +37,7 @@ func init() {
 			c.JSON(200, gin.H{"rep": 400})
 			return
 		}
+		//金额转换
 		capitalfloat := clear.ObjToMoney([]interface{}{capital, ""})[0]
 		e := make(map[string]interface{})
 		e["company_name"] = company_name
@@ -58,6 +59,7 @@ func init() {
 				"capital":         capitalfloat,
 				"company_address": company_address,
 			}}, false, false)
+			//更新es
 			if tmpb {
 				escon := elastic.GetEsConn()
 				defer elastic.DestoryEsConn(escon)
@@ -76,6 +78,7 @@ func init() {
 				}
 			}
 		} else {
+			//不存在直接保存新数据
 			sid = Mgo.Save("enterprise_qyxy", e)
 			delete(e, "_id")
 			escon := elastic.GetEsConn()
@@ -101,6 +104,7 @@ func init() {
 			c.JSON(200, gin.H{"data": []map[string]interface{}{}, "recordsFiltered": 0, "recordsTotal": 0})
 		} else {
 			//log.Println(util.ElasticClientIndex, util.ElasticClientType, search)
+			//查询es
 			escon := elastic.GetEsConn()
 			defer elastic.DestoryEsConn(escon)
 			res, err := escon.Search(util.ElasticClientIndex).
@@ -162,7 +166,7 @@ func init() {
 			c.JSON(200, gin.H{"rep": 400})
 		}
 	})
-	//updateIndustrys
+	//updateIndustrys  更新行业类型
 	Admin.POST("/audit/query_qyk/UpdateIndustrys", func(c *gin.Context) {
 		_id := c.PostForm("_id")
 		industrys := c.PostFormArray("industry")
@@ -184,7 +188,7 @@ func init() {
 			c.JSON(200, gin.H{"rep": 400})
 		}
 	})
-	//updateTels
+	//updateTels  更新联系方式
 	Admin.POST("/audit/query_qyk/UpdateTels", func(c *gin.Context) {
 		_id := c.PostForm("_id")
 		//log.Println(_id)

+ 5 - 0
src/res/fieldscore.json

@@ -262,6 +262,11 @@
                 "describe": "包含负分",
                 "regstr": "(详见公告|原因|未知|收费|标注|负责人)",
                 "score": -10
+            },
+            {
+                "describe": "时间",
+                "regstr": "^\\d{4}-\\d{1,2}-\\d{1,2}\\s{0,1}\\d{1,2}:\\d{1,2}:\\d{1,2}$",
+                "score": -10
             }
         ],
         "length": [