打印影响延迟优化

This commit is contained in:
hoteas
2022-05-13 09:30:09 +08:00
parent ce95cdc021
commit 2ecc70288e
7 changed files with 23 additions and 14 deletions
+1 -1
View File
@@ -893,7 +893,7 @@ var DeclareCtr = Ctr{
RecommendDeclare = declare
}
matchingDegreePercent := ObjToFloat64(matchingDegree) / ObjToFloat64(matchingDegreeCount)
matchingDegreePercent := ObjToFloat64(ObjToFloat64(matchingDegree) / ObjToFloat64(matchingDegreeCount))
if matchingDegreePercent < 0.5 {
matchingDegreePercent = 0.5 + matchingDegreePercent
+2
View File
@@ -50,6 +50,8 @@
"sessionName": "HOTIME",
"smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa",
"smsLogin": "【政策通】您的验证码为:{code},请在5分钟内使用,切勿将验证码泄露于他人,如非本人操作请忽略。",
"tencentId": "AKIDOgT8cKCQksnY7yKATaYO7j9ORJzSYohP",
"tencentKey": "GNXgjdN4czA9ya0FNMApVJzTmsmU0KSN",
"tpt": "tpt",
"wechatAppID": "wxdcc8d6360661a179",
"wechatAppNotifyUrl": "https://zcth5.kct.cn/app/vip_order/callback",
+2
View File
@@ -4,6 +4,7 @@ import (
. "code.hoteas.com/golang/hotime"
"code.hoteas.com/golang/hotime/dri/aliyun"
"code.hoteas.com/golang/hotime/dri/ddsms"
"code.hoteas.com/golang/hotime/dri/tencent"
"code.hoteas.com/golang/hotime/dri/wechat"
"code.hoteas.com/golang/hotime/example/app"
"code.hoteas.com/golang/hotime/example/provider"
@@ -31,6 +32,7 @@ func main() {
appIns.Config.GetString("wechatPaySerialNo"),
appIns.Config.GetString("wechatPayMApiV3Key"),
appIns.Config.GetString("wechatPayPrivateKey"))
tencent.Tencent.Init(appIns.Config.GetString("tencentId"), appIns.Config.GetString("tencentKey"))
//用户侧访问前设置
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
+2
View File
@@ -132,6 +132,8 @@ var Salesman = Ctr{
}
that.Db.Update("wechat", Map{"salesman_id": salesman.GetCeilInt64("id")}, Map{"id": wechat.GetInt64("id")})
that.Db.Update("salesman", Map{"login_time[#]": "now()", "modify_time[#]": "now()"},
Map{"id": salesman.GetCeilInt("id")})
wechat["salesman_id"] = salesman.GetCeilInt64("id")
that.Session("salesman_id", salesman.GetCeilInt64("id"))
+2
View File
@@ -43,6 +43,8 @@ var Wechat = Ctr{
//有用户直接返回
if wechat.GetCeilInt("salesman_id") != 0 {
that.Db.Update("salesman", Map{"login_time[#]": "now()"},
Map{"id": wechat.GetCeilInt("salesman_id")})
that.Session("salesman_id", wechat.GetCeilInt("salesman_id"))
that.Display(0, "登录成功")