Bläddra i källkod

更新

master
huangjiajun 1 år sedan
förälder
incheckning
ea3a778a05
8 ändrade filer med 58 tillägg och 42 borttagningar
  1. +1
    -1
      app/db/db_guide_order.go
  2. +18
    -13
      app/svc/platform/svc_guide_order_list.go
  3. +14
    -13
      app/svc/platform/svc_hw_order_list.go
  4. +13
    -11
      app/svc/platform/svc_order_list.go
  5. +1
    -1
      app/task/svc/svc_hw_order_settle.go
  6. +1
    -1
      app/task/svc/svc_playlet_order_settle.go
  7. +9
    -1
      app/task/svc/svc_tik_tok_local_life_order.go
  8. +1
    -1
      app/task/svc/svc_tik_tok_local_life_order_settle.go

+ 1
- 1
app/db/db_guide_order.go Visa fil

@@ -57,7 +57,7 @@ func GetGuideOrderList(args map[string]string) []model.GuideOrder {
sort = args["sort"]
}
if args["is_to_settle"] == "1" {
sess = sess.And("settle_time=?", 0)
sess = sess.And("platform_settle_time=?", 0)
}
if args["is_commission"] == "1" {
sess = sess.And("real_commission>?", 0)


+ 18
- 13
app/svc/platform/svc_guide_order_list.go Visa fil

@@ -23,20 +23,25 @@ func GuideOrderList(c *gin.Context, args map[string]string) ([]map[string]string
settleStatus = "已结算"
settleTime = time.Unix(int64(v.SettleTime), 0).Format("2006-01-02 15:04:05")
}
platformSettleTime := "-"
if v.SettleTime > 0 {
platformSettleTime = time.Unix(int64(v.PlatformSettleTime), 0).Format("2006-01-02 15:04:05")
}
var tmp = map[string]string{
"oid": v.PvdOid,
"uid": utils.IntToStr(v.StationUid),
"title": v.Title,
"platform_fee": "0",
"commission_bili": "",
"source": platformMap[v.Pvd],
"amount": v.Payment,
"commission": v.Commission,
"real_commission": v.RealCommission,
"status": v.Status,
"settle_status": settleStatus,
"create_time": time.Unix(int64(v.CreateTime), 0).Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
"oid": v.PvdOid,
"uid": utils.IntToStr(v.StationUid),
"title": v.Title,
"platform_fee": "0",
"commission_bili": "",
"source": platformMap[v.Pvd],
"amount": v.Payment,
"commission": v.Commission,
"platform_settle_time": platformSettleTime,
"real_commission": v.RealCommission,
"status": v.Status,
"settle_status": settleStatus,
"create_time": time.Unix(int64(v.CreateTime), 0).Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
}
data = append(data, tmp)
}


+ 14
- 13
app/svc/platform/svc_hw_order_list.go Visa fil

@@ -25,19 +25,20 @@ func HwOrderList(c *gin.Context, args map[string]string) ([]map[string]string, i
settleTime = time.Unix(int64(v.SettleTime), 0).Format("2006-01-02 15:04:05")
}
var tmp = map[string]string{
"oid": v.Oid,
"uid": v.Zuid,
"title": v.Info,
"platform_fee": "0",
"commission_bili": "",
"source": platformMap[v.Type],
"amount": utils.Float64ToStr(v.Payment),
"commission": utils.Float64ToStr(v.Commission),
"real_commission": utils.Float64ToStr(v.Commission),
"status": v.Status,
"settle_status": settleStatus,
"create_time": time.Unix(int64(v.CreateTime), 0).Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
"oid": v.Oid,
"uid": v.Zuid,
"title": v.Info,
"platform_fee": "0",
"commission_bili": "",
"source": platformMap[v.Type],
"amount": utils.Float64ToStr(v.Payment),
"commission": utils.Float64ToStr(v.Commission),
"real_commission": utils.Float64ToStr(v.Commission),
"platform_settle_time": "-",
"status": v.Status,
"settle_status": settleStatus,
"create_time": time.Unix(int64(v.CreateTime), 0).Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
}
data = append(data, tmp)
}


+ 13
- 11
app/svc/platform/svc_order_list.go Visa fil

@@ -27,17 +27,19 @@ func OrderList(c *gin.Context, args map[string]string) ([]map[string]string, int
settleTime = time.Unix(int64(v.SettleTime), 0).Format("2006-01-02 15:04:05")
}
var tmp = map[string]string{
"oid": v.Oid,
"mid": v.Uid,
"custom_oid": v.CustomOid,
"title": v.Title,
"source": source,
"amount": v.Amount,
"platform_fee": v.PlatformFee,
"commission": v.Commission,
"real_commission": v.Commission,
"status": v.Status,
"settle_status": settleStatus,
"oid": v.Oid,
"mid": v.Uid,
"custom_oid": v.CustomOid,
"title": v.Title,
"source": source,
"amount": v.Amount,
"platform_fee": v.PlatformFee,
"commission": v.Commission,
"real_commission": v.Commission,
"status": v.Status,
"settle_status": settleStatus,
"platform_settle_time": "-",

"create_time": v.CreateTime.Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
"commission_bili": "-",


+ 1
- 1
app/task/svc/svc_hw_order_settle.go Visa fil

@@ -11,7 +11,7 @@ import (

func HwOrderSettle() {
day := time.Now().Day()
if day < 15 {
if day < 20 {
return
}
month := utils.GetTimeRange("current_month")


+ 1
- 1
app/task/svc/svc_playlet_order_settle.go Visa fil

@@ -11,7 +11,7 @@ import (

func PlayletOrderSettle() {
day := time.Now().Day()
if day < 5 {
if day < 20 {
return
}
month := utils.GetTimeRange("current_month")


+ 9
- 1
app/task/svc/svc_tik_tok_local_life_order.go Visa fil

@@ -132,12 +132,14 @@ func AddTikTokLocalLifeOrder(order md.TikTokLocalLifeOrderDetail) {
if order.CommissionInfo.AllSettleRemitFinish || order.Status != 2 {
var amount int64 = 0
isEnd := 1
var endTime int64 = 0
for _, v := range order.CommissionInfo.SettleInfoMap {
tmp, ok := v.(map[string]interface{})
if ok == false || utils.AnyToInt64(tmp["status"]) < 3 {
isEnd = 0
}
if ok && utils.AnyToInt64(tmp["status"]) == 3 {
endTime = utils.AnyToInt64(tmp["settle_time"])
amount += utils.AnyToInt64(tmp["settle_amount"])
}
}
@@ -149,7 +151,10 @@ func AddTikTokLocalLifeOrder(order md.TikTokLocalLifeOrderDetail) {
if order.Status == 5 {
ord.Status = "部分结算"
}
ord.PlatformSettleTime = order.UpdateTime
ord.PlatformSettleTime = int(endTime)
if ord.PlatformSettleTime == 0 {
ord.PlatformSettleTime = ord.UpdateTime
}
ord.RealCommission = utils.Float64ToStr(float64(amount) / 100)
}
}
@@ -160,6 +165,9 @@ func AddTikTokLocalLifeOrder(order md.TikTokLocalLifeOrderDetail) {
fmt.Println(err)
} else {
ord.SettleTime = one.SettleTime
if one.PlatformSettleTime > 0 {
ord.PlatformSettleTime = one.PlatformSettleTime
}
db.ZhimengDb.Where("id=?", one.Id).AllCols().Update(ord)
}
return


+ 1
- 1
app/task/svc/svc_tik_tok_local_life_order_settle.go Visa fil

@@ -11,7 +11,7 @@ import (

func TikTokLocalLifeOrderSettle() {
day := time.Now().Day()
if day < 15 {
if day < 20 {
return
}
month := utils.GetTimeRange("current_month")


Laddar…
Avbryt
Spara