zhangxinlei1996 1 gadu atpakaļ
vecāks
revīzija
01c1f0c702

+ 0 - 6
README.md

@@ -1,6 +0,0 @@
-CRM应用程序,只提供api服务
-
-goctl api go -api application.api -dir .
-
-go test -v -coverprofile=coverage
-go tool cover -html=coverage -o coverage.html

+ 1 - 10
api/common/initconfig.go

@@ -3,12 +3,10 @@ package common
 import (
 	"flag"
 	"log"
-	"strings"
 
 	. "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
-	"app.yhyue.com/moapp/jybase/redis"
 	"bp.jydev.jianyu360.cn/BaseService/fileCenter/rpc/filecenter"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter"
 	"bp.jydev.jianyu360.cn/CRM/application/api/internal/config"
@@ -16,13 +14,11 @@ import (
 	"bp.jydev.jianyu360.cn/CRM/baseCenter/rpc/basecenter"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/core/logx"
-	"github.com/zeromicro/go-zero/zrpc"
 )
 
 var configFile = flag.String("fs", "etc/crmapplication.yaml", "the config file")
 var C config.Config
 
-//
 var logFile = flag.String("lf", "etc/logs.yaml", "the config file")
 var logc entity.Logc
 
@@ -101,12 +97,6 @@ func init() {
 		}
 		CrmMysql.Init()
 	}
-	//初始化数据库配置
-	rm := DB.Redis
-	if len(rm.Addr) > 0 {
-		logx.Info("--初始化 redis--")
-		redis.InitRedisBySize(strings.Join(rm.Addr, ","), 100, 30, 300)
-	}
 	if DB.Mongo.Main.Address != "" {
 		logx.Info("--初始化 mongodb--")
 		Mgo = mongodb.MongodbSim{
@@ -143,6 +133,7 @@ func init() {
 		log.Println("--初始化 elasticsearch--")
 		NewEs(DB.Es.Version, DB.Es.Addr, DB.Es.Size, DB.Es.UserName, DB.Es.Password)
 	}
+
 	UserCenterRpc = usercenter.NewUserCenter(zrpc.MustNewClient(C.UserCenterRpc))
 	FileCenterRpc = filecenter.NewFileCenter(zrpc.MustNewClient(C.FileCenterRpc))
 	BaseCenterRpc = basecenter.NewBaseCenter(zrpc.MustNewClient(C.BaseCenterRpc))

+ 0 - 3
api/etc/db.yaml

@@ -1,6 +1,3 @@
-redis:
-    addr:
-        - msgCount=127.0.0.1:6379
 mysql:
     main:
         dbName: jianyu

+ 3 - 4
api/internal/config/config.go

@@ -20,10 +20,9 @@ type Config struct {
 }
 
 type Db struct {
-	Mysql entity.Mysql      `json:"mysql"`
-	Redis entity.RedisStuct `json:"redis"`
-	Mongo entity.Mongo      `json:"mongo"`
-	Es    entity.EsStruct   `json:"es"`
+	Mysql entity.Mysql    `json:"mysql"`
+	Mongo entity.Mongo    `json:"mongo"`
+	Es    entity.EsStruct `json:"es"`
 }
 
 type Push struct {

+ 10 - 7
api/internal/service/employService.go

@@ -58,7 +58,6 @@ func (e *EmPloyService) InfoEmployinfo(in *types.InfoEmployinfoReq) []map[string
 			valueMap["isIgnore"] = false
 			valueMap["isEmploy"] = false
 		}
-
 		if len(strings.Split(in.IdArr, ",")) == 1 {
 			//列表查询
 			//是否忽略处理
@@ -224,13 +223,17 @@ func InfoFind(id string, employType int64) map[string]interface{} {
 			data["annex"] = 0
 			//类型处理
 			toptype := common.InterfaceToStr(obj["toptype"])
-			switch toptype {
-			case "采购意向", "预告", "招标":
+			subtype := common.InterfaceToStr(obj["subtype"])
+			if toptype == "采购意向" || toptype == "预告" || toptype == "招标" {
 				data["type"] = 2
-			case "其他", "结果":
-				data["type"] = 3
-			default:
-				data["type"] = 1
+			} else {
+				if subtype == "废标" || subtype == "流标" || subtype == "其它" {
+					data["type"] = 2
+				} else if subtype == "成交" || subtype == "中标" || subtype == "合同" || subtype == "验收" || subtype == "违规" {
+					data["type"] = 3
+				} else {
+					data["type"] = 1
+				}
 			}
 			//data["type"] = in.SourceType
 			if obj["projectinfo"] != nil {