Эх сурвалжийг харах

Merge branch 'master' into feature/v4.7.43

lianbingjie 2 жил өмнө
parent
commit
7a3d12b26d

+ 7 - 1
src/db.json

@@ -67,6 +67,12 @@
 	        "passWord": "Topnet123",
 			"maxOpenConns": 5,
 			"maxIdleConns": 5
-	    }
+	    },
+      "base": {
+        "username": "root",
+        "password": "=PDT49#80Z!RVv52_z",
+        "address": "192.168.3.217:4000",
+        "dbName": "base_service"
+      }
     }
 }

+ 45 - 11
src/jfw/front/shorturl.go

@@ -36,12 +36,13 @@ type Short struct {
 var mobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
 var DateFullLayout = "2006-01-02 15:04:05"
 var Map_stype = map[string]bool{
-	"content":      true,
-	"entservice":   true,
-	"bdprivate":    true,
-	"mailprivate":  true,
-	"bdcontent":    true,
-	"indexcontent": true,
+	"content":         true,
+	"entservice":      true,
+	"bdprivate":       true,
+	"mailprivate":     true,
+	"bdcontent":       true,
+	"indexcontent":    true,
+	"advancedProject": true,
 }
 
 func (s *Short) Article(stype, id string) error {
@@ -75,7 +76,7 @@ func (s *Short) Article(stype, id string) error {
 	if !Map_stype[stype] {
 		s.Redirect("/not/nottype", 302)
 		return nil
-	} else if stype == "content" || stype == "bdcontent" {
+	} else if stype == "content" || stype == "bdcontent" || stype == "advancedProject" {
 		if s.Session().Get("userId") == nil {
 			if s.GetString("state") == "wx" {
 				//微信跳回来的
@@ -145,7 +146,6 @@ func (s *Short) Article(stype, id string) error {
 			s.T["shareid"] = se.EncodeString(shareid)
 			s.T["keywords"] = s.GetString("kds")
 			ssOpenid := s.Session().Get("s_m_openid")
-
 			po, bo, wo, obj := pcVRT(sid, industry, stype, true)
 			if obj != nil && len(obj) > 0 {
 
@@ -222,7 +222,6 @@ func (s *Short) Article(stype, id string) error {
 	if ok && res != nil && len(*res) > 0 {
 		isVip = util.IntAll((*res)["i_vip_status"]) == 1 || util.IntAll((*res)["i_vip_status"]) == 2
 		isMember = util.IntAll((*res)["i_member_status"]) > 0
-
 		if isVip && util.Int64All((*res)["l_vip_starttime"]) < util.Int64All(config.Sysconfig["contextOldVipLimit"]) {
 			isOldVip = true
 		}
@@ -293,6 +292,24 @@ func (s *Short) Article(stype, id string) error {
 		} else {
 			canRead = SeeDetailLimit(obj, userId, sid)
 		}
+		if stype == "advancedProject" {
+			newCanRead := false
+			//判断此用户是否有打开的权限
+			newUserId := s.GetSession("base_user_id")
+			pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
+			//访问次数加1
+			if pushData == nil {
+				newCanRead = false
+			} else {
+				public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET  visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
+				newCanRead = true
+			}
+			if newCanRead || canRead {
+				obj = wxvisitD(sid, userId, myopenid, stype, true)
+				canRead = true
+			}
+			s.T["canRead"] = canRead
+		}
 		if len(obj) > 0 {
 			if canRead {
 				FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, true)
@@ -370,7 +387,6 @@ func (s *Short) Article(stype, id string) error {
 			return nil
 		}
 		sid := sids[0]
-
 		//免费用户浏览三级页判断留资与浏览次数
 		indust := s.GetString("industry")
 		if userId != "" && stype == "indexcontent" { //已登录用户直接跳转至正常三级页
@@ -397,6 +413,25 @@ func (s *Short) Article(stype, id string) error {
 				node = SeeDetailLimit(objc, userId, sid)
 			}
 			s.T["canRead"] = node
+			if stype == "advancedProject" {
+				canRead := false
+				//判断此用户是否有打开的权限
+				newUserId := s.GetSession("base_user_id")
+				pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
+				//访问次数加1
+				if pushData == nil {
+					canRead = false
+				} else {
+					public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET  visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
+					canRead = true
+				}
+				if canRead || node {
+					_, _, _, obj = pcVRT(sid, indust, stype, true)
+					canRead = true
+					node = canRead
+				}
+				s.T["canRead"] = canRead
+			}
 			if node {
 				if len(po) > 0 {
 					s.T["projectOther"] = po
@@ -476,7 +511,6 @@ func (s *Short) Article(stype, id string) error {
 
 			s.T["obj"] = obj
 			s.T["url"] = s.Uri()
-
 			return s.Render("/pc/biddetail_rec.html", &s.T)
 
 		}

+ 0 - 3
src/jfw/modules/app/src/app/front/me.go

@@ -328,9 +328,7 @@ func (l *Me) MyInfo() {
 		"userType": "free",
 	}
 	userId, _ := l.GetSession("userId").(string)
-	fmt.Println("1223312", userId)
 	user, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"o_jy":1,"i_vip_status":1,"l_vip_endtime":1,"o_vipjy":1,"i_vip_subtips":1,"i_entniche_first":1}`)
-	fmt.Println("1223312", (*user)["s_phone"].(string), (*user)["s_m_phone"].(string))
 	if ok && user != nil {
 		isExpire := -1
 		isPassCount := false
@@ -366,7 +364,6 @@ func (l *Me) MyInfo() {
 				hasKeyFlag = len(a_key) > 0
 			}
 		}
-		fmt.Println("1223312", (*user)["s_phone"].(string), (*user)["s_m_phone"].(string))
 		//商机管理处理
 		phone := ""
 		if s_phone, _ := (*user)["s_phone"].(string); s_phone != "" {

+ 21 - 4
src/jfw/modules/app/src/app/front/shorturl.go

@@ -108,7 +108,27 @@ func (s *Short) Article(stype, id string) error {
 			}
 		}
 	}
+	//超前项目推送处理
 	s.T["canRead"] = canRead
+	if stype == "advancedProject" {
+		newCanRead := false
+		//判断此用户是否有打开的权限
+		newUserId := s.GetSession("base_user_id")
+		pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
+		//访问次数加1
+		if pushData == nil {
+			newCanRead = false
+		} else {
+			public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET  visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
+			newCanRead = true
+		}
+		if newCanRead || canRead {
+			obj = wxvisitD(sid, userId, true)
+			canRead = true
+		}
+		s.T["canRead"] = canRead
+	}
+
 	if len(obj) > 0 {
 		if canRead {
 			if belongUserId != "" && belongUserId != userId && util.ObjToString(obj["subtype"]) != "拟建" { //分享开打的
@@ -119,10 +139,7 @@ func (s *Short) Article(stype, id string) error {
 					err := jy.Publish(public.Mgo_Log, config.Sysconfig["nsq"].(string), config.Sysconfig["nsq_topic"].(string), jy.Jyweb_article_open, belongUserId, jy.Jyapp_node1)
 					if err != nil {
 						log.Println("nsq队列写入失败-->", jy.Jyweb_article_open, belongUserId)
-					} /* else {
-						//integral_article_ +userId+ 三级页id
-						redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, belongUserId, userId), "1", 60*60*24)
-					}*/
+					}
 				}
 			}
 			//获取打赏文案

+ 4 - 4
src/jfw/modules/app/src/db.json

@@ -35,10 +35,10 @@
 	    	"size": 2
 		}
     },
-    "redis": {
-    	"main": {
-			"address": "other=192.168.3.206:1712,push=192.168.3.206:1712,pushcache_1=192.168.3.206:5000,pushcache_2_a=192.168.3.206:5001,pushcache_2_b=192.168.3.206:5002,sso=192.168.3.206:1712,session=192.168.3.206:1712,merge=192.168.3.206:1712,grayupdate=192.168.3.206:1712,newother=192.168.3.206:1712"
-		}
+  "redis": {
+    "main":{
+      "address": "other=192.168.3.11:1712,push=192.168.3.206:1712,pushcache_1=192.168.3.206:5000,pushcache_2_a=192.168.3.206:5001,pushcache_2_b=192.168.3.206:5002,sso=192.168.3.206:1712,session=192.168.3.11:1713,recovery=192.168.3.206:1712,merge=192.168.3.206:1712,newother=192.168.3.206:1712"
+    }
     },
     "mysql": {
 	    "main": {

+ 1 - 1
src/jfw/modules/bigmember/src/config.json

@@ -1,5 +1,5 @@
 {
-  "webPort": "814",
+  "webPort": "8146",
   "mail": [
     {
       "addr": "smtp.exmail.qq.com",

+ 17 - 3
src/jfw/public/db.go

@@ -15,6 +15,7 @@ var (
 	Mysql       *mysql.Mysql
 	BaseMysql   *mysql.Mysql
 	PushMysql   *mysql.Mysql
+	BaseService *mysql.Mysql
 	MQFW        m.MongodbSim
 	Mgo_Ent     m.MongodbSim
 	Mgo_Log     m.MongodbSim
@@ -38,9 +39,10 @@ type dbConf struct {
 		Login *redisConf
 	}
 	Mysql struct {
-		Main *mysqlConf
-		Push *mysqlConf
-		Base *mysqlConf
+		Main        *mysqlConf
+		Push        *mysqlConf
+		Base        *mysqlConf
+		BaseService *mysqlConf
 	}
 }
 type mgoConf struct {
@@ -187,5 +189,17 @@ func init() {
 			}
 			BaseMysql.Init()
 		}
+		if DbConf.Mysql.BaseService != nil {
+			log.Println("初始化 BaseMysql")
+			BaseService = &mysql.Mysql{
+				Address:      DbConf.Mysql.BaseService.Address,
+				UserName:     DbConf.Mysql.BaseService.UserName,
+				PassWord:     DbConf.Mysql.BaseService.PassWord,
+				DBName:       DbConf.Mysql.BaseService.DbName,
+				MaxOpenConns: DbConf.Mysql.BaseService.MaxOpenConns,
+				MaxIdleConns: DbConf.Mysql.BaseService.MaxIdleConns,
+			}
+			BaseService.Init()
+		}
 	}
 }

+ 3 - 1
src/web/staticres/common-module/order-list/js/order-list.js

@@ -559,7 +559,9 @@ var vm = new Vue({
         info.totalPrice = Number(order.order_money) + Number(order.discount_price)
         info.totalPrice = utils.formatMoney(info.totalPrice);
       }
-      info.payPrice = utils.formatMoney((order.pay_money >= 0 ? order.pay_money : order.order_money))
+      var payMoneyExist = order.pay_money !== null && order.pay_money !== undefined
+      var payPrice = (payMoneyExist && order.pay_money >= 0) ? order.pay_money : order.order_money
+      info.payPrice = utils.formatMoney(payPrice)
 
       switch (productType) {
         case '历史数据': {

+ 4 - 0
src/web/staticres/dataExport/css/conditions.css

@@ -309,6 +309,10 @@ button.w100 {
   border-radius: 4px 4px 0px 0px;
 }
 
+.select-area-box>span.select-area.click:hover {
+  color: #2abed1;
+}
+
 .select-area-box>span.select-area.click::after {
   content: "";
   width: 100%;

+ 1 - 1
src/web/templates/pc/index.html

@@ -759,7 +759,7 @@
         adv_url = AD.s_link
       }
       if(AD.s_pic){
-        adv_img = AD.s_pic+"?v="+ new Date().getTime()
+        adv_img = AD.s_pic
       }
       if (AD.o_extend != undefined) {
         var nowTime = new Date().getTime();

+ 10 - 3
src/web/templates/pc/supsearch.html

@@ -102,9 +102,16 @@
   }
   formarForSelectType()
   if (beforeOfSelectType != selectType) {
-    if (selectType==""){
-      //搜索范围空选择,后端路由默认标题和正文,避免筛选收藏和数据导出因为搜索范围异常导致信息数量不匹配
-      selectType = beforeOfSelectType
+    // 如果url有selectType传参,则优先使用url参数
+    var urlParamSelectType = getParam('selectType')
+    if (urlParamSelectType) {
+      selectType = urlParamSelectType
+    } else {
+      // url参数取不到,并且selectType为空
+      if (!selectType){
+        //搜索范围空选择,后端路由默认标题和正文,避免筛选收藏和数据导出因为搜索范围异常导致信息数量不匹配
+        selectType = beforeOfSelectType
+      }
     }
     $(function () {
       $("#zbSeatchT [name='selectType']").val(selectType);