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

Merge branch 'master' of https://jygit.jydev.jianyu360.cn/qmx/jy

wangshan 3 сар өмнө
parent
commit
b10e69824b

+ 6 - 5
src/jfw/front/front.go

@@ -1224,6 +1224,7 @@ func (f *Front) Transfer() error {
 	return f.Redirect(f.GetString("url"))
 }
 func (f *Front) SubscribeTransfer() error {
+	pushtime := f.GetString("pushtime")
 	vt := f.GetString("t")
 	switch vt {
 	case "member":
@@ -1236,25 +1237,25 @@ func (f *Front) SubscribeTransfer() error {
 		vt = "s"
 	}
 	if vt != "" {
-		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=%s", vt))
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=%s&pushtime=%s", vt, pushtime))
 	}
 	//查询用户状态
 	bigPower := jy.GetBigVipUserBaseMsg(f.Session(), *config.Middleground)
 	if bigPower.Status > 0 {
 		//大会员用户
-		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=m"))
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=m&pushtime=%s", pushtime))
 	}
 	IsEntPower := bigPower.Data.Entniche.IsEntPower
 	if bigPower.EntnicheStatus == 1 && IsEntPower > 0 {
 		//商机管理
-		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=s"))
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=s&pushtime=%s", pushtime))
 	}
 	if bigPower.VipStatus > 0 {
 		//超级订阅
-		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=v"))
+		return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=v&pushtime=%s", pushtime))
 	}
 	//免费用户
-	return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=f"))
+	return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=f&pushtime=%s", pushtime))
 }
 
 // 关于我们

+ 12 - 6
src/jfw/modules/distribution/src/timetask/timetask.go

@@ -1,6 +1,7 @@
 package timetask
 
 import (
+	. "app.yhyue.com/moapp/jybase/date"
 	"bytes"
 	"database/sql"
 	"fmt"
@@ -13,7 +14,6 @@ import (
 	"time"
 
 	util "app.yhyue.com/moapp/jybase/common"
-	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"github.com/tealeg/xlsx"
 )
@@ -87,7 +87,7 @@ func init() {
 	go util.SimpleCrontab(true, TimetaskConf.FlyerUserTime, Getshareinfo)
 }
 
-//4号结算上个月的佣金
+// 4号结算上个月的佣金
 func settlement() {
 	var err error
 	fx, err = xlsx.OpenFile("./res/settlement/settlement.xlsx")
@@ -294,7 +294,7 @@ func TaxPayable(commission float64) int64 {
 	return int64(util.RetainDecimal(tax_cash, 2) * 100)
 }
 
-//虚拟分享次数
+// 虚拟分享次数
 func shareCount(product string, shareAutoIncs []*shareAutoInc) {
 	defer util.Catch()
 	hour := time.Now().Hour()
@@ -385,8 +385,14 @@ func Getshareinfo() {
 	ShareUser = []map[string]interface{}{}
 	data, ok := MQFW.Find("user", map[string]interface{}{
 		"$or": []map[string]interface{}{
-			map[string]interface{}{"s_headimageurl": map[string]interface{}{"$exists": true}},
-			map[string]interface{}{"s_headimage": map[string]interface{}{"$exists": true}},
+			{"s_headimageurl": map[string]interface{}{
+				"$exists": true,
+				"$ne":     "",
+			}},
+			{"s_headimage": map[string]interface{}{
+				"$exists": true,
+				"$ne":     "",
+			}},
 		},
 		"i_appid": 2,
 	}, `{"l_registedate":-1}`, `{"s_headimageurl":1,"s_headimage":1,"s_phone":1,"s_m_phone":1,"s_nickname":1}`, false, 0, 300)
@@ -538,7 +544,7 @@ func createSettlementFx(sFxs []*settlementFx) []byte {
 	return w.Byte.Bytes()
 }
 
-//20号把已结算的佣金转入可提现金额
+// 20号把已结算的佣金转入可提现金额
 func toCashOut() {
 	util.SimpleCrontab(false, TimetaskConf.ToCashout.Time, func() {
 		defer util.Catch()