浏览代码

Merge branch 'dev4.6.2.1' of http://192.168.3.207:8080/qmx/jy into dev4.6.2.1

yangfeng 3 年之前
父节点
当前提交
1ddc9e5ab2

+ 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             //用户锁

+ 6 - 6
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -19,7 +19,7 @@ const (
 	must_match                = `{"bool":{"must":[%s]}}`
 	should_match              = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
 	NewMustSearch             = `{"query":{"bool":{"must":[%s]}}%s}`
-	ListSearchLimit           = `,"_source":[%s],"sort":[{"publishtime":{"order":"desc"}}],"from":%d,"size":%d`
+	ListSearchLimit           = `,"_source":[%s],"sort":[{"%s":{"order":"desc"}}],"from":%d,"size":%d`
 
 	newBiddingSearchShowSql = `{"query":{"filtered":{"filter":{"bool":{"must":[%s,{"range":{"firsttime":{"gte":"%d"}}}]}}}},"aggs":{"group_area":{"terms":{"field":"area","size":40}},"group_scopeArr":{"terms":{"field":"subscopeclass","size":20}}}}`
 )
@@ -219,8 +219,8 @@ func (pwp *PortraitProjectScreen) GetWinnerList() (list []map[string]interface{}
 	}
 	start, limit := (pwp.PageNum-1)*pwp.PageSize, pwp.PageSize
 	//列表查询
-	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"_id","projectname","bidamount","title","publishtime","subtype","toptype","area"`, start, limit))
-	log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
+	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"_id","projectname","bidamount","title","publishtime","subtype","toptype","area"`, "publishtime", start, limit))
+	//log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
 	newData := elastic.Get(biddingIndex, biddingType, listQuery)
 
 	if newData == nil || len(*newData) == 0 {
@@ -316,7 +316,7 @@ func (pwp *PortraitProjectScreen) GetBuyerList() (list []map[string]interface{},
 	if pwp.PageNum == 1 {
 		total = elastic.Count(projectIndex, projectIndex, fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
 		if total <= 0 {
-			log.Println(fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
+			//log.Println(fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), ""))
 			return
 		}
 	} else {
@@ -325,8 +325,8 @@ func (pwp *PortraitProjectScreen) GetBuyerList() (list []map[string]interface{},
 	start, limit := (pwp.PageNum-1)*pwp.PageSize, pwp.PageSize
 
 	//列表查询
-	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"bidstatus","list.infoid","list.title","list.subtype","projectname","list.area","firsttime","area"`, start, limit))
-	log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
+	listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(ListSearchLimit, `"bidstatus","list.infoid","list.title","list.subtype","projectname","list.area","firsttime","area"`, "firsttime", start, limit))
+	//log.Printf("PortraitWinnerProject GetList Sql %s\n", listQuery)
 	newData := elastic.Get(projectIndex, projectType, listQuery)
 
 	if newData == nil || len(*newData) == 0 {

+ 2 - 0
src/jfw/modules/publicapply/src/subscribe/entity/entity.go

@@ -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/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已购买
 			}
 		}
 		//

+ 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')

+ 1 - 1
src/web/templates/weixin/commonPay/paySuccess.html

@@ -79,7 +79,7 @@
             继续浏览
         </button>
     </div>
-    {{else if or .T.doType "dataPack" .T.doType "areaPack"}}
+    {{else if or (eq .T.doType "dataPack") (eq .T.doType "areaPack")}}
         <div class="bottom_button j-button-group">
             <button id ="order" class="j-button-confirm" onclick="window.location.href = '/weixin/common/{{.T.doType}}/orderDetail?order_code={{.T.orderCode}}'">
                 查看订单

+ 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")