Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/dev4.6.2.1' into dev4.6.2.1

wangkaiyue 3 gadi atpakaļ
vecāks
revīzija
568fc7da8e

+ 10 - 6
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -30,11 +30,11 @@ $(function () {
                     $(".productType").text("超级订阅(试用)");
                 }
             }
-            if (r.data.order.discount_price==undefined) {
+            if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
             		$(".discountPrice").parent().hide();
             }
             //价格
-            $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
+            $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money  || r.data.order.order_money) / 100));
             $(".totalPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
             if (!r.data.order.isLiveActive) {
                 $(".origin-price-container").hide();
@@ -304,9 +304,11 @@ $(function () {
                   discount_price = r.data.order.discount_price;
                   var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                   $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                  $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                    $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  }
                 }
-                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                 //未支付
                 $("#card-header-bg").addClass("bg nopay-bg")
                 $("#pageTitle").addClass("status")
@@ -358,9 +360,11 @@ $(function () {
                   discount_price = r.data.order.discount_price;
                   var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                   $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                  $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                    $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                  }
                 }
-                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
 
 
 

+ 25 - 36
src/jfw/modules/bigmember/src/entity/analysis.go

@@ -43,47 +43,36 @@ func (this *AnalysisDec) DecQueryNewSimilarMsgByBW() (qstr string) {
 	bools := []string{}
 	musts := []string{}
 	shoulds := []string{}
-	switch this.SearchType {
-	case 1:
-		//中标单位 类似项目明显
-		if this.Winner != "" {
-			winnerterms := `{"terms":{"s_winner":[`
-			for k, v := range strings.Split(this.Winner, ",") {
-				if k > 0 {
-					winnerterms += `,`
-				}
-				winnerterms += `"` + v + `"`
-			}
-			winnerterms += `]}}`
-			musts = append(musts, winnerterms)
-		}
-	case 2, 3:
-		//中标单位 类似项目合作历史
-		if this.Winner != "" {
-			winnerterms := `{"terms":{"s_winner":[`
-			for k, v := range strings.Split(this.Winner, ",") {
-				if k > 0 {
-					winnerterms += `,`
-				}
-				winnerterms += `"` + v + `"`
+	var BWExists = 1
+	//中标单位 类似项目合作历史||采购单位类似项目
+	if this.Winner != "" {
+		BWExists += 1
+		winnerterms := `{"terms":{"s_winner":[`
+		for k, v := range strings.Split(this.Winner, ",") {
+			if k > 0 {
+				winnerterms += `,`
 			}
-			winnerterms += `]}}`
-			musts = append(musts, winnerterms)
+			winnerterms += `"` + v + `"`
 		}
-		//中标单位 类似项目合作历史
-		if this.Buyer != "" {
-			buyerterms := `{"terms":{"buyer":[`
-			for k, v := range strings.Split(this.Buyer, ",") {
-				if k > 0 {
-					buyerterms += `,`
-				}
-				buyerterms += `"` + v + `"`
+		winnerterms += `]}}`
+		musts = append(musts, winnerterms)
+	}
+	//中标单位 类似项目合作历史||采购单位类似项目
+	if this.Buyer != "" {
+		BWExists += 1
+		buyerterms := `{"terms":{"buyer":[`
+		for k, v := range strings.Split(this.Buyer, ",") {
+			if k > 0 {
+				buyerterms += `,`
 			}
-			buyerterms += `]}}`
-			musts = append(musts, buyerterms)
+			buyerterms += `"` + v + `"`
 		}
+		buyerterms += `]}}`
+		musts = append(musts, buyerterms)
+	}
+	if BWExists > 1 && this.SearchType == 3 {
+		this.SearchType = 1
 	}
-
 	//省份
 	areaCity := []string{}
 	citys := []string{}

+ 1 - 1
src/jfw/modules/bigmember/src/entity/analysisEntName.go

@@ -188,7 +188,7 @@ type AnalysisDec struct {
 	MobileModel      string                 //手机型号
 	AppVersion       string                 //app版本号
 	Winner           string                 //中标企业
-	SearchType       int                    //默认0;1:类似项目明细;2:和采购单位类似项目明细;3:和采购单位其他项目明细
+	SearchType       int                    //默认0;1:中标企业||采购单位-类似项目明细;2:中标企业和采购单位类似项目明细;3:中标企业和采购单位其他项目明细
 	UserId           string                 //用户id
 	IsPower          bool                   //是否有权限
 	UserLock         sync.Mutex             //用户锁

+ 1 - 1
src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go

@@ -141,7 +141,7 @@ func GetBigVipUserBaseMsg(userId string, mysql *mysql.Mysql, mg MongodbSim) *Big
 			userPower.FreeBuyerPort = redis.GetInt(PowerCacheDb, fmt.Sprintf(PowerCacheBuyerPortKey, userId))
 			userPower.FreeFile = redis.GetInt(PowerCacheDb, fmt.Sprintf(PowerCacheFileKey, userId))
 			o_jy := qutil.ObjToMap((*data)["o_jy"])
-			if (*o_jy)["o_area"] == nil {
+			if _, ok := (*o_jy)["o_area"]; !ok {
 				userPower.IsUpgrade = false
 			}
 		}

+ 3 - 1
src/jfw/modules/publicapply/src/subscribe/entity/entity.go

@@ -156,7 +156,7 @@ func (pi *ParamInfo) GetSubMsg() UserSubMsg {
 	}
 	if ok && mData != nil && len(*mData) != 0 {
 		o_jy, _ := (*mData)["o_jy"].(map[string]interface{})
-		if o_jy["o_area"] != nil {
+		if _, ok := o_jy["o_area"]; ok && o_jy["o_area"] != nil {
 			res.Area, _ = o_jy["o_area"].(map[string]interface{})
 		}
 		res.Infotype, _ = o_jy["a_infotype"].([]interface{})
@@ -174,6 +174,8 @@ func (pi *ParamInfo) GetSubMsg() UserSubMsg {
 			res.Ppstarttime = qutil.Int64All(o_jy["l_areaStart_p"])
 			res.Ppendtime = qutil.Int64All(o_jy["l_areaEnd_p"])
 			res.Area, _ = o_jy["o_area_p"].(map[string]interface{})
+		} else if res.Area != nil && len(res.Area) == 0 {
+			res.Area = nil
 		}
 		//关键词
 		a_key, _ := o_jy["a_key"].([]interface{})

+ 1 - 1
src/jfw/modules/publicapply/src/subscribe/service/action.go

@@ -11,5 +11,5 @@ type ServiceStruct struct {
 	getPushView      xweb.Mapper `xweb:"/free/pushview"`       //推送结果预览
 	getPushCountitem xweb.Mapper `xweb:"/free/pushcountitem"`  //单组推送结果预览 计数
 	areaPackEndTip   xweb.Mapper `xweb:"/free/areapack/(.*)"`  //省份订阅包到期提醒
-	oneProvinceSet   xweb.Mapper `xweb:"/free/oneProvinceSet"` //免费老用户点击去升级订阅设置
+	oneProvinceSet   xweb.Mapper `xweb:"/free/oneProvinceSet"` //免费老用户点击去升级订阅设置 一个省份的 自动带入新设置
 }

+ 1 - 1
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -654,7 +654,7 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 			if len(*data) > 0 && err {
 				v["i_vip_status"] = qutil.Int64All((*data)["i_vip_status"])
 				ojy := qutil.ObjToMap((*data)["o_jy"])
-				v["i_pp_status"] = qutil.IntAllDef((*ojy)["i_pp_status"], 0) //i_pp_status : -1 到期  0未购买 1已购买
+				v["i_pp_status"] = qutil.IntAllDef((*ojy)["i_ppstatus"], 0) //i_pp_status : -1 到期  0未购买 1已购买
 			}
 		}
 		//

+ 2 - 2
src/web/staticres/common-module/big-member/js/high_set.js

@@ -97,7 +97,7 @@ var highSet = new Vue({
     },
     hasSpace () {
       var key = this.conf.keywords
-      return key && key.length > 1 && key.replace(/^\s\s*/,'').indexOf(' ') > -1
+      return key && key.replace(/^\s\s*/,'').indexOf(' ') > -1
     },
     filterInfoUrl: function () {
       var path = ''
@@ -115,7 +115,7 @@ var highSet = new Vue({
           url = urlMap[this.reqSign]
       }
       return url
-  },
+    }
   },
   created () {
     var eid = utils.getParam('eid')

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

@@ -219,7 +219,7 @@ var vm = new Vue({
       // 订单金额
       this.orderInfo.orderMoney = this.moneyFormat(order.order_money)
       // 实付金额
-      this.orderInfo.payMoney = this.moneyFormat(order.order_money)
+      this.orderInfo.payMoney = this.moneyFormat(order.pay_money || order.order_money)
 
       if (info.transaction_id) {
         this.orderInfo.paymentId = info.transaction_id // 支付单号
@@ -277,7 +277,7 @@ var vm = new Vue({
       var payTime = order.pay_time ? this.time2Stamp(order.pay_time) : ''
       var payWay = order.pay_way ? order.pay_way : ''
 
-      var discountPrice = 0
+      var discountPrice = ''
       if (order.discount_price) {
         discountPrice = utils.formatMoney(order.discount_price / 100)
         discountPrice = '-¥' +  discountPrice
@@ -323,7 +323,7 @@ var vm = new Vue({
         {
           label: '实付金额',
           split: ':',
-          text: (order.pay_money==0) ? '¥' + this.moneyFormat(order.pay_money) : ''
+          text: (order.pay_money > 0)  ? '¥' + this.moneyFormat(order.pay_money) : ''
         },
         {
           label: '产品类型',
@@ -454,6 +454,9 @@ var vm = new Vue({
 
       function formatTimeText (type) {
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')

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

@@ -561,7 +561,7 @@ 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.order_money)
+      info.payPrice = utils.formatMoney(order.pay_money || order.order_money)
 
       switch (productType) {
         case '历史数据': {
@@ -2078,6 +2078,9 @@ var vm = new Vue({
 
       function formatTimeText (type) {
         var result = ''
+        if (typeof type === "string") {
+          type = type.replace(/-/g, '/')
+        }
         var tempDate = new Date(type)
         if (typeof tempDate.getTime() === 'number') {
           result = tempDate.pattern('yyyy/MM/dd')

+ 3 - 0
src/web/templates/areaPack/pc/page_order.html

@@ -235,6 +235,9 @@
                     }
                     function formatTimeText (type) {
                         var result = ''
+                        if (typeof type === "string") {
+                            type = type.replace(/-/g, '/')
+                        }
                         var tempDate = new Date(type)
                         if (typeof tempDate.getTime() === 'number') {
                             result = tempDate.Format('yyyy/MM/dd')

+ 3 - 0
src/web/templates/pc/myOrder.html

@@ -684,6 +684,9 @@
         },
         formatTimeText (type) {
           var result = ''
+          if (typeof type === "string") {
+            type = type.replace(/-/g, '/')
+          }
           var tempDate = new Date(type)
           if (typeof tempDate.getTime() === 'number') {
               result = tempDate.Format('yyyy/MM/dd')

+ 10 - 6
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -227,11 +227,11 @@
                         $(".productType").text("超级订阅(试用)");
                     }
                 }
-                if (r.data.order.discount_price==undefined) {
+                if (!r.data.order.discount_price || (r.data.order.discount_price && r.data.order.discount_price <= 0)) {
             		    $(".discountPrice").parent().hide();
                 }
                 //价格
-                $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
+                $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100));
                 $(".totalPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
 
                 //优惠码
@@ -570,9 +570,11 @@
                       discount_price = r.data.order.discount_price;
                       var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                       $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                      $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                          $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      }
                     }
-                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                     //未支付
                     $("#card-header-bg").addClass("bg nopay-bg")
                     $("#pageTitle").addClass("status")
@@ -638,9 +640,11 @@
                       discount_price = r.data.order.discount_price;
                       var totalPrice = Number(r.data.order.discount_price)+Number(r.data.order.order_money);
                       $(".totalPrice").text('¥'+ formatMoney(totalPrice / 100)+'元')
-                      $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      if (r.data.order.discount_price && r.data.order.discount_price > 0) {
+                        $(".discountPrice").text('-¥'+ formatMoney(parseFloat(r.data.order.discount_price) / 100)+'元')
+                      }
                     }
-                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100) + "元");
+                    $(".payPrice").text("¥ " + formatMoney(parseFloat(r.data.order.pay_money || r.data.order.order_money) / 100) + "元");
                     $("#card-header-bg").addClass("bg finish-bg")