@@ -22,6 +22,7 @@ func OrderList(c *gin.Context) { | |||||
{"name": "短剧", "value": "video"}, | {"name": "短剧", "value": "video"}, | ||||
{"name": "广告", "value": "adv"}, | {"name": "广告", "value": "adv"}, | ||||
{"name": "电影票", "value": "cinema"}, | {"name": "电影票", "value": "cinema"}, | ||||
{"name": "小说", "value": "story"}, | |||||
} | } | ||||
videoList := []map[string]string{ | videoList := []map[string]string{ | ||||
@@ -1,4 +1,4 @@ | |||||
package md | 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": "快手"} | var VideoTypeMap = map[string]string{"channel": "视频号", "douyin": "抖音", "kuaishou": "快手"} |
@@ -69,6 +69,8 @@ func routeZhimeng(r *gin.RouterGroup) { | |||||
r.POST("/bihai_file_new", hdl.BihaiFile) | r.POST("/bihai_file_new", hdl.BihaiFile) | ||||
r.GET("/bihai_add", hdl.BihaiAdd) | 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_new", hdl.File) | ||||
r.POST("/file_new1", hdl.FileNew) | r.POST("/file_new1", hdl.FileNew) | ||||
r.POST("/file_old", hdl.FileTwo) | r.POST("/file_old", hdl.FileTwo) | ||||
@@ -39,10 +39,9 @@ func OrderList(c *gin.Context, args map[string]string) ([]map[string]string, int | |||||
"status": v.Status, | "status": v.Status, | ||||
"settle_status": settleStatus, | "settle_status": settleStatus, | ||||
"platform_settle_time": "-", | "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 { | if utils.StrToFloat64(v.Commission) > 0 { | ||||
tmp["commission_bili"] = utils.Float64ToStr(utils.StrToFloat64(v.Commission)/utils.StrToFloat64(v.Amount)*100) + "%" | tmp["commission_bili"] = utils.Float64ToStr(utils.StrToFloat64(v.Commission)/utils.StrToFloat64(v.Amount)*100) + "%" | ||||
@@ -66,3 +66,24 @@ type Bihai struct { | |||||
AppName string `json:"app_name"` | AppName string `json:"app_name"` | ||||
KsAppId string `json:"ks_app_id"` | 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"` | |||||
} |
@@ -1,7 +1,7 @@ | |||||
package md | 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 { | type TikTokTaskDetail struct { | ||||
AnchorTitle string `json:"anchor_title"` | AnchorTitle string `json:"anchor_title"` | ||||
@@ -48,7 +48,10 @@ func Cinema5bms() { | |||||
PayEpisode: 0, | PayEpisode: 0, | ||||
Material: "", | Material: "", | ||||
OnlineTime: v.PublishDate, | 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)) | uniqueId := php2go.Md5(tmp.Appid + "_" + tmp.Type + "_" + tmp.FirstCate + "_" + utils.IntToStr(tmp.Id)) | ||||
tmp.Key = uniqueId | tmp.Key = uniqueId | ||||
@@ -13,7 +13,6 @@ import ( | |||||
"encoding/json" | "encoding/json" | ||||
"fmt" | "fmt" | ||||
"github.com/jinzhu/copier" | "github.com/jinzhu/copier" | ||||
"github.com/syyongx/php2go" | |||||
"github.com/tidwall/gjson" | "github.com/tidwall/gjson" | ||||
"strings" | "strings" | ||||
"time" | "time" | ||||
@@ -104,29 +103,29 @@ func GetTaskDetail(appId string, tmp []int64) { | |||||
tmpIn.TaskEndTime = int(time.Now().Unix() - 10) | tmpIn.TaskEndTime = int(time.Now().Unix() - 10) | ||||
} | } | ||||
if tmpIn.Appid == "tt8a93fc2e15affaaa01" { | 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) | CommAddTaskDetail(utils.Int64ToStr(tmpIn.TaskId), tmpIn) | ||||
} | } | ||||
@@ -134,6 +134,9 @@ func TikTokTaskMoney(types string) { | |||||
PlatformFee: utils.Float64ToStr(fee), | PlatformFee: utils.Float64ToStr(fee), | ||||
TikFee: utils.Float64ToStr(talentBili), | TikFee: utils.Float64ToStr(talentBili), | ||||
} | } | ||||
if utils.InArr(appId, []string{"ttd02aa6974f166cca01", "tt8a93fc2e15affaaa01"}) { | |||||
tmp.OrdType = "story" | |||||
} | |||||
playletSaleOrderDb := db.PlayletSaleOrderDb{} | playletSaleOrderDb := db.PlayletSaleOrderDb{} | ||||
playletSaleOrderDb.Set() | playletSaleOrderDb.Set() | ||||
ord := playletSaleOrderDb.GetPlayletVideoOrderByOid(tmp.Oid, tmp.OrdType) | ord := playletSaleOrderDb.GetPlayletVideoOrderByOid(tmp.Oid, tmp.OrdType) | ||||
@@ -4,7 +4,7 @@ go 1.15 | |||||
require ( | 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_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/360EntSecGroup-Skylar/excelize v1.4.1 | ||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 | ||||
github.com/boombuler/barcode v1.0.1 | github.com/boombuler/barcode v1.0.1 | ||||