Browse Source

更新

master
huangjiajun 10 months ago
parent
commit
a8a8e74389
11 changed files with 257 additions and 62 deletions
  1. +196
    -29
      app/hdl/hdl_file_upload.go
  2. +1
    -0
      app/hdl/zhimeng_platform/hdl_order_list.go
  3. +1
    -1
      app/md/md_playlet.go
  4. +2
    -0
      app/router/router.go
  5. +3
    -4
      app/svc/platform/svc_order_list.go
  6. +21
    -0
      app/task/md/cinema5bms.go
  7. +2
    -2
      app/task/md/md_tik_tok_task.go
  8. +4
    -1
      app/task/svc/svc_cinema5bms.go
  9. +23
    -24
      app/task/svc/svc_tik_tok_task.go
  10. +3
    -0
      app/task/svc/svc_tik_tok_task_money.go
  11. +1
    -1
      go.mod

+ 196
- 29
app/hdl/hdl_file_upload.go
File diff suppressed because it is too large
View File


+ 1
- 0
app/hdl/zhimeng_platform/hdl_order_list.go View File

@@ -22,6 +22,7 @@ func OrderList(c *gin.Context) {
{"name": "短剧", "value": "video"},
{"name": "广告", "value": "adv"},
{"name": "电影票", "value": "cinema"},
{"name": "小说", "value": "story"},
}

videoList := []map[string]string{


+ 1
- 1
app/md/md_playlet.go View File

@@ -1,4 +1,4 @@
package md

var OrdTypeMap = map[string]string{"video": "短剧", "adv": "广告", "cinema": "电影票"}
var OrdTypeMap = map[string]string{"video": "短剧", "adv": "广告", "cinema": "电影票", "story": "小说"}
var VideoTypeMap = map[string]string{"channel": "视频号", "douyin": "抖音", "kuaishou": "快手"}

+ 2
- 0
app/router/router.go View File

@@ -69,6 +69,8 @@ func routeZhimeng(r *gin.RouterGroup) {

r.POST("/bihai_file_new", hdl.BihaiFile)
r.GET("/bihai_add", hdl.BihaiAdd)
r.GET("/bihai_story_add", hdl.BihaiStoryAdd)
r.GET("/beiwo_story_add", hdl.BeiwoStoryAdd)
r.POST("/file_new", hdl.File)
r.POST("/file_new1", hdl.FileNew)
r.POST("/file_old", hdl.FileTwo)


+ 3
- 4
app/svc/platform/svc_order_list.go View File

@@ -39,10 +39,9 @@ func OrderList(c *gin.Context, args map[string]string) ([]map[string]string, int
"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": "-",
"create_time": v.CreateTime.Format("2006-01-02 15:04:05"),
"settle_time": settleTime,
"commission_bili": "-",
}
if utils.StrToFloat64(v.Commission) > 0 {
tmp["commission_bili"] = utils.Float64ToStr(utils.StrToFloat64(v.Commission)/utils.StrToFloat64(v.Amount)*100) + "%"


+ 21
- 0
app/task/md/cinema5bms.go View File

@@ -66,3 +66,24 @@ type Bihai struct {
AppName string `json:"app_name"`
KsAppId string `json:"ks_app_id"`
}
type BihaiStory struct {
Id int `json:"id"`
BookName string `json:"book_name"`
Description string `json:"description"`
BookUrl string `json:"book_url"`
IsComplete int `json:"is_complete"`
CreatedAt string `json:"created_at"`
Author string `json:"author"`
BookContent string `json:"book_content"`
AppId string `json:"app_id"`
AppName string `json:"app_name"`
}
type BeiwoStory struct {
AppId string `json:"app_id"`
CoverUrl string `json:"cover_url"`
Describe string `json:"describe"`
Id int `json:"id"`
Name string `json:"name"`
PublishUrl string `json:"publish_url"`
KsAppId string `json:"ks_app_id"`
}

+ 2
- 2
app/task/md/md_tik_tok_task.go View File

@@ -1,7 +1,7 @@
package md

var SourceCate = map[string]string{"tt99fdef4006c36ff001": "dianzhong", "tt38e94e54a7d70c4601": "bihai"}
var SourceBili = map[string]string{"tt99fdef4006c36ff001": "15", "tt38e94e54a7d70c4601": "20"}
var SourceCate = map[string]string{"tt99fdef4006c36ff001": "dianzhong", "tt38e94e54a7d70c4601": "bihai", "ttd02aa6974f166cca01": "bihai", "tt8a93fc2e15affaaa01": "beiwo"}
var SourceBili = map[string]string{"tt99fdef4006c36ff001": "15", "tt38e94e54a7d70c4601": "20", "ttd02aa6974f166cca01": "20", "tt8a93fc2e15affaaa01": "20"}

type TikTokTaskDetail struct {
AnchorTitle string `json:"anchor_title"`


+ 4
- 1
app/task/svc/svc_cinema5bms.go View File

@@ -48,7 +48,10 @@ func Cinema5bms() {
PayEpisode: 0,
Material: "",
OnlineTime: v.PublishDate,
Time: int(time.Now().Unix()),
Time: int(utils.TimeStdParseUnix(v.PublishDate)),
}
if v.IsSession == 0 || tmp.Time > int(time.Now().Unix()+86400) {
tmp.IsClose = 1
}
uniqueId := php2go.Md5(tmp.Appid + "_" + tmp.Type + "_" + tmp.FirstCate + "_" + utils.IntToStr(tmp.Id))
tmp.Key = uniqueId


+ 23
- 24
app/task/svc/svc_tik_tok_task.go View File

@@ -13,7 +13,6 @@ import (
"encoding/json"
"fmt"
"github.com/jinzhu/copier"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"strings"
"time"
@@ -104,29 +103,29 @@ func GetTaskDetail(appId string, tmp []int64) {
tmpIn.TaskEndTime = int(time.Now().Unix() - 10)
}
if tmpIn.Appid == "tt8a93fc2e15affaaa01" {
tmp2 := md.Cinema5bmsData{
Description: "",
ImageUrl: tmpIn.TaskIcon,
Material: "",
OnlineTime: time.Unix(int64(tmpIn.TaskStartTime), 0).Format("2006-01-02 15:04:05"),
Type: "fenghuang",
Title: tmpIn.TaskName,
UpdateTime: int(time.Now().Unix()),
Time: tmpIn.TaskStartTime,
Appid: "tt8a93fc2e15affaaa01",
Id: utils.StrToInt(tmpIn.VideoId),
IsClose: 0,
IsHot: 0,
FirstCate: "story",
SecondCate: "",
Platform: "tikTok",
}
if tmpIn.TaskEndTime < int(time.Now().Unix()) {
tmp2.IsClose = 1
}
uniqueId := php2go.Md5(tmp2.Appid + "_" + tmp2.Type + "_" + tmp2.FirstCate + "_" + utils.IntToStr(tmp2.Id))
fmt.Println(uniqueId)
commAddNew(uniqueId, tmp2)
//tmp2 := md.Cinema5bmsData{
// Description: "",
// ImageUrl: tmpIn.TaskIcon,
// Material: "",
// OnlineTime: time.Unix(int64(tmpIn.TaskStartTime), 0).Format("2006-01-02 15:04:05"),
// Type: "fenghuang",
// Title: tmpIn.TaskName,
// UpdateTime: int(time.Now().Unix()),
// Time: tmpIn.TaskStartTime,
// Appid: "tt8a93fc2e15affaaa01",
// Id: utils.StrToInt(tmpIn.VideoId),
// IsClose: 0,
// IsHot: 0,
// FirstCate: "story",
// SecondCate: "",
// Platform: "tikTok",
//}
//if tmpIn.TaskEndTime < int(time.Now().Unix()) {
// tmp2.IsClose = 1
//}
//uniqueId := php2go.Md5(tmp2.Appid + "_" + tmp2.Type + "_" + tmp2.FirstCate + "_" + utils.IntToStr(tmp2.Id))
//fmt.Println(uniqueId)
//commAddNew(uniqueId, tmp2)
}
CommAddTaskDetail(utils.Int64ToStr(tmpIn.TaskId), tmpIn)
}


+ 3
- 0
app/task/svc/svc_tik_tok_task_money.go View File

@@ -134,6 +134,9 @@ func TikTokTaskMoney(types string) {
PlatformFee: utils.Float64ToStr(fee),
TikFee: utils.Float64ToStr(talentBili),
}
if utils.InArr(appId, []string{"ttd02aa6974f166cca01", "tt8a93fc2e15affaaa01"}) {
tmp.OrdType = "story"
}
playletSaleOrderDb := db.PlayletSaleOrderDb{}
playletSaleOrderDb.Set()
ord := playletSaleOrderDb.GetPlayletVideoOrderByOid(tmp.Oid, tmp.OrdType)


+ 1
- 1
go.mod View File

@@ -4,7 +4,7 @@ go 1.15

require (
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20230707081910-52e70aa52998
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240204013130-5c8d80b56d52
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240221065505-ecd0e68f3e19
github.com/360EntSecGroup-Skylar/excelize v1.4.1
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/boombuler/barcode v1.0.1


Loading…
Cancel
Save