Jianghan 1 ano atrás
pai
commit
2a19da842a

+ 4 - 1
CMPlatform/service/data_ent.go

@@ -227,6 +227,9 @@ func ImportDataByExcel(mf multipart.File, eid int64, entid string) (int, int64,
 			tmp["entid"] = entid
 			tmp["jybxhref"] = "https://www.jianyu360.cn/succbi/yyssjdz/app/sjdz.app/detail.spg?E_id=" + common.ObjToString(tmp["infoid"])
 			tmp["pici"] = now.Format(date.Date_Full_Layout)
+			if tmp["tagname3"] == nil {
+				tmp["tagname3"] = "DICT"
+			}
 			if info := util.EntMysql.FindOne("customer_data", bson.M{"entid": entid, "infoid": tmp["infoid"]}, "", ""); info != nil && len(*info) > 0 {
 				tmp["status"] = 1
 				util.EntMysql.Update("customer_data", bson.M{"entid": entid, "infoid": tmp["infoid"]}, tmp)
@@ -317,6 +320,7 @@ func (e *EntData) RecordRevoke() {
 		b := util.EntMysql.Update("customer_data", query, bson.M{"status": -1, "projectId": nil})
 		qEs := es.NewBoolQuery().Must(es.NewTermQuery("pici", pici)).Must(es.NewTermQuery("ent_id", eid))
 		util.DelBy("bidding_customer", qEs, util.EsCus.(*elastic.EsV7))
+		DelFucByP(pici, eid)
 		if b {
 			util.Mgo.UpdateById("customer_import_record", _id, bson.M{"$set": bson.M{"del": true, "revokeTime": time.Now().Unix(), "revokeUser": userName}})
 			e.ServeJson(map[string]interface{}{"rep": true})
@@ -331,7 +335,6 @@ func (e *EntData) DelData() {
 	if e.Method() == "POST" {
 		id, _ := e.GetInt("id")
 		eid, _ := e.GetInt("eid")
-		// todo rpc
 		DelFuc(id, eid)
 		b := util.EntMysql.Update("customer_data", bson.M{"id": id}, bson.M{"status": -2})
 		util.EsCus.DelById("bidding_customer", "", fmt.Sprint(id))

+ 19 - 0
CMPlatform/service/rpc_serveice.go

@@ -35,3 +35,22 @@ func DelFuc(infoid, eid int64) {
 	log.Debug(res.Msg)
 	_ = conn.Close()
 }
+
+func DelFucByP(pici, eid int64) {
+	conn, err := rpc.DialHTTP("tcp", util.RpcProServer)
+	if err != nil {
+		log.Error("dailing error: ", zap.Error(err))
+	}
+	req := DelRequest{
+		Eid:    eid,
+		InfoId: pici,
+	}
+	var res DelResponse
+	log.Debug("", zap.Int64("req.Eid", req.Eid), zap.Int64("req.InfoId", req.InfoId))
+	err = conn.Call("JyService.InfoDel", req, &res)
+	if err != nil {
+		log.Error("JyService error: ", zap.Error(err))
+	}
+	log.Debug(res.Msg)
+	_ = conn.Close()
+}

+ 1 - 1
CMPlatform/util/config.go

@@ -409,7 +409,7 @@ func InitLog() {
 		log.Path(common.ObjToString(Sysconfig["logpath"])),
 		log.Level("debug"),
 		log.Compress(true),
-		log.MaxSize(10), // M
+		log.MaxSize(20), // M
 		log.MaxBackups(10),
 		log.MaxAge(7),
 		log.Format("text"), // text or json output