|
@@ -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)
|