Browse Source

热度搜索

kobe6258 7 months ago
parent
commit
57eb8f67e2

+ 62 - 0
eta_mini_ht_api/conf/app.conf

@@ -0,0 +1,62 @@
+appname = wechat
+httpport = 80
+run_mode = dev
+runmode = dev
+autorender = false
+copyrequestbody = true
+EnableDocs = true
+sqlconn =
+file.path="./conf"
+file.notice="海通小程序注册用户须知.txt"
+file.disclaimer="海通免责声明.txt"
+file.publicKey ="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAIwpWwsvZB2bZSSuFzjv5GE+spQdnd5sW2bDjnGM9hw8Zf1kXuOO2ThuokXgr0iHjQU5WHbrkcefUcvJmQ9NLJ0CAwEAAQ=="
+[dev]
+#系统配置
+
+#验证码长度
+auth.code.length=6
+#redis配置
+#redis.host = 192.168.77.130:6379,127.0.0.1:6379
+redis.host = 192.168.77.130:6379
+redis.password = ""
+redis.db = 0
+redis.maxidle = 50
+redis.maxactive = 100
+redis.timeout = 300
+
+#HT
+ht.es_report_index = "ht_test_report_v1"
+ht.es_media_index="ht_test_media_v1"
+ht.task="false"
+#ht.config_path="/home/code/config/eta_mini_ht_api/conf/app.conf"
+#ht.es_report_index = "report_index"
+#ht.es_media_index="media_index"
+ht.response.encode="false"
+ht.response.des_code="5filp4vSvLVQK8SLioNlKm3q"
+#wechat配置
+#wechat.appid = wx49f965502877530a
+#wechat.secret= eef0b899951d5d5074915e1f56c5e87a
+wechat.appid = wxcc4ac5526a578908
+wechat.secret= a289a3a3289e4ede54932216931ed16f
+#短信
+sms.sms_type = "juhe"
+sms.juhe.tlp_id="254663"
+sms.juhe.expire_minute=3
+sms.juhe.key="4c8504c49dd335e99cfd7b6a3a9e2415"
+sms.emas.url="root:199118@(localhost:3306)/emas?timeout=5000ms&readTimeout=5000ms&writeTimeout=5000ms&charset=utf8mb4&parseTime=true&loc=Local"
+sms.emas.expire_minute=3
+sms.emas.template="【期海通行】您的期海通行小程序验证码为:{{.Code}},请在{{.ExpireMinute}}分钟内完成验证。"
+#database配置
+database.driver = "mysql"
+database.url="hz_technology:hongze@2021@tcp(rm-uf67kg347rhjfep5c1o.mysql.rds.aliyuncs.com:3306)/test_eta_mini_master_ht?charset=utf8mb4&loc=Asia%2FShanghai&parseTime=true"
+#database.url="root:199118@tcp(localhost:3306)/wechat?charset=utf8mb4&loc=Asia%2FShanghai&parseTime=true"
+#eta数据库配置
+eta.database.url= "hz_technology:hongze@2021@tcp(rm-uf67kg347rhjfep5c1o.mysql.rds.aliyuncs.com:3306)/test_v2_hongze_rddp?charset=utf8mb4&loc=Asia%2FShanghai&parseTime=true"
+#钢联数据库配置
+gl.database.url= "hz_technology:hongze@2021@tcp(rm-uf67kg347rhjfep5c1o.mysql.rds.aliyuncs.com:3306)/test_eta_mini_master_ht?charset=utf8mb4&loc=Asia%2FShanghai&parseTime=true"
+#ES配置
+#es.url="http://192.168.77.130:9200"
+es.url="http://es-cn-nif227b580019rgw6.public.elasticsearch.aliyuncs.com:9200"
+es.username="elastic"
+es.password="hongze@2021"
+#es.password="DV=NPV7pTEbRJ4JnMNnt"

+ 57 - 0
eta_mini_ht_api/conf/log/log_config.json

@@ -0,0 +1,57 @@
+{
+  "filepath": "./etalogs",
+  "appenders": [
+    {
+      "type": "console",
+      "rotate": true,
+      "level": "info",
+      "color": true
+    },
+    {
+      "type": "file",
+      "filename": "file/error.log",
+      "maxlines": 1000000,
+      "maxsize": 268435456,
+      "daily": true,
+      "maxdays": 7,
+      "rotate": true,
+      "level": "error",
+      "color": true
+    },
+    {
+      "type": "file",
+      "filename": "file/info.log",
+      "maxlines": 1000000,
+      "maxsize": 268435456,
+      "daily": true,
+      "maxdays": 30,
+      "rotate": true,
+      "level": "info",
+      "color": true
+    },
+    {
+      "filter": "apiRequest",
+      "type": "file",
+      "filename": "api/api.log",
+      "maxlines": 1000000,
+      "maxsize": 268435456,
+      "daily": true,
+      "maxdays": 30,
+      "rotate": true,
+      "level": "info",
+      "color": true
+    },
+    {
+      "filter": "coin,orm....*",
+      "type": "file",
+      "filename": "db/db.log",
+      "maxlines": 1000000,
+      "maxsize": 268435456,
+      "daily": false,
+      "maxdays": 30,
+      "rotate": true,
+      "level": "info",
+      "color": true
+    }
+  ]
+}

File diff suppressed because it is too large
+ 0 - 0
eta_mini_ht_api/conf/海通免责声明.txt


File diff suppressed because it is too large
+ 0 - 0
eta_mini_ht_api/conf/海通小程序注册用户须知.txt


BIN
eta_mini_ht_api/eta_mini_ht_api


+ 6 - 2
main.go

@@ -2,6 +2,7 @@ package main
 
 import (
 	_ "eta/eta_mini_ht_api/common/component"
+	"eta/eta_mini_ht_api/common/component/config"
 	logger "eta/eta_mini_ht_api/common/component/log"
 	"eta/eta_mini_ht_api/common/contants"
 	"eta/eta_mini_ht_api/common/exception"
@@ -16,6 +17,7 @@ import (
 )
 
 func main() {
+	htConfig := config.GetConfig(contants.HT).(*config.HTBizConfig)
 	if web.BConfig.RunMode == "dev" {
 		web.BConfig.WebConfig.DirectoryIndex = true
 		web.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
@@ -26,8 +28,10 @@ func main() {
 	go func() {
 		//内存数据预热预加载
 		logger.Info("开始预加载数据")
-		//初始化研报库
-		initReport()
+		if htConfig.EnableTask() {
+			//初始化研报库
+			initReport()
+		}
 	}()
 	logger.Info("初始化成功")
 	web.Run()

Some files were not shown because too many files changed in this diff