|
@@ -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()
|