wangshan 1 год назад
Родитель
Сommit
d74ac6dbf0

+ 0 - 0
src/service/a/init.go → src/a/init.go


+ 0 - 0
src/service/config/config.go → src/config/config.go


+ 1 - 0
src/consts/consts.go

@@ -0,0 +1 @@
+package consts

+ 1 - 0
src/entity/entity.go

@@ -0,0 +1 @@
+package entity

+ 0 - 0
src/service/filter/filter.go → src/filter/filter.go


+ 7 - 7
src/service/filter/logfilter.go → src/filter/logfilter.go

@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"log"
 	"net/http"
-	. "salesLeads/src/service/config"
+	. "salesLeads/src/config"
 	"sync"
 	"time"
 
@@ -14,13 +14,13 @@ import (
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 )
 
-//日志过滤器
+// 日志过滤器
 type logfilter struct {
 	App         *xweb.App
 	SessionName string
 }
 
-//继承过滤器方法
+// 继承过滤器方法
 func (l *logfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	req.Proto = util.GetIp(req)
 	session := l.App.SessionManager.Session(req, w)
@@ -30,7 +30,7 @@ func (l *logfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	return true
 }
 
-//定时保存日志
+// 定时保存日志
 func SaveLogTask() {
 	lock.Lock()
 	if len(arr) >= 1 {
@@ -46,13 +46,13 @@ func SaveLogTask() {
 	time.AfterFunc(5*time.Minute, SaveLogTask)
 }
 
-//内存缓存日志数量,超过此数量存库
+// 内存缓存日志数量,超过此数量存库
 var nc = 500
 
-//内存缓存日志map
+// 内存缓存日志map
 var arr = make([]map[string]interface{}, 0)
 
-//对map的同步
+// 对map的同步
 var lock sync.Mutex
 
 func addLog(l *logfilter, session *httpsession.Session, req *http.Request) {

+ 0 - 0
src/service/filter/sessionfilter.go → src/filter/sessionfilter.go


+ 2 - 2
src/main.go

@@ -2,9 +2,9 @@ package main
 
 import (
 	"net/http"
-	_ "salesLeads/src/service/a"
+	_ "salesLeads/src/a"
+	"salesLeads/src/config"
 	_ "salesLeads/src/service/action"
-	"salesLeads/src/service/config"
 	_ "salesLeads/src/service/filter"
 	_ "salesLeads/src/service/util"
 

+ 2 - 2
src/service/action/exhibition.go

@@ -11,8 +11,8 @@ import (
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	"fmt"
 	"log"
-	. "salesLeads/src/service/config"
-	. "salesLeads/src/service/util"
+	. "salesLeads/src/config"
+	. "salesLeads/src/util"
 	"strings"
 	"time"
 )

+ 2 - 2
src/service/action/info.go

@@ -6,8 +6,8 @@ import (
 	"fmt"
 	"log"
 	"regexp"
-	. "salesLeads/src/service/config"
-	. "salesLeads/src/service/util"
+	. "salesLeads/src/config"
+	. "salesLeads/src/util"
 	"strings"
 	"time"
 

+ 1 - 1
src/service/action/whether.go

@@ -5,7 +5,7 @@ import (
 	"log"
 	"math/rand"
 	"regexp"
-	. "salesLeads/src/service/config"
+	. "salesLeads/src/config"
 	"strings"
 	"time"
 

+ 1 - 0
src/service/exhibition/exhibition.go

@@ -0,0 +1 @@
+package exhibition

+ 1 - 0
src/service/message/message.go

@@ -0,0 +1 @@
+package message

+ 1 - 0
src/timetask/task.go

@@ -0,0 +1 @@
+package timetask

+ 1 - 2
src/service/util/mail.go → src/util/mail.go

@@ -4,7 +4,7 @@ import (
 	"fmt"
 	"log"
 	"regexp"
-	. "salesLeads/src/service/config"
+	. "salesLeads/src/config"
 	"time"
 
 	"app.yhyue.com/moapp/jybase/mail"
@@ -54,7 +54,6 @@ func SendStructedDataByEmail(email string, auth []*mail.GmailAuth) bool {
 	return false
 }
 
-//
 func isEmail(value string) bool {
 	var emailPattern = regexp.MustCompile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")
 	return emailPattern.MatchString(value)

+ 2 - 2
src/service/util/merge.go → src/util/merge.go

@@ -2,7 +2,7 @@ package util
 
 import (
 	"net/http"
-	. "salesLeads/src/service/config"
+	. "salesLeads/src/config"
 	"strings"
 )
 
@@ -20,7 +20,7 @@ func CollectPhone(userId, phone string) bool {
 	return true
 }
 
-//判断是否是微信访问
+// 判断是否是微信访问
 func CheckWxBrowser(Request *http.Request) bool {
 	if strings.Index(Request.UserAgent(), "MicroMessenger") > -1 || strings.Index(Request.UserAgent(), "Wechat") > -1 {
 		return true