浏览代码

9.29带货存档

yankun 7 月之前
父节点
当前提交
c4d2973514

+ 0 - 6
.idea/swagger-settings.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="SwaggerSettings">
-    <option name="defaultPreviewType" value="SWAGGER_UI" />
-  </component>
-</project>

+ 2 - 0
app/model/youngee_talent_model/kuaishouAuth.go → app/model/youngee_talent_model/auth_model.go

@@ -27,6 +27,8 @@ type KuaishouUserInfo struct {
 	VideoNum     int         `json:"video_num" orm:"video_num"`
 	VideoNum     int         `json:"video_num" orm:"video_num"`
 	Status       int         `json:"status"`
 	Status       int         `json:"status"`
 	UseCode      int         `json:"use_code" ` //满足条件的账号可被选择
 	UseCode      int         `json:"use_code" ` //满足条件的账号可被选择
+	BindCode     int         `json:"bind_code"` //账号绑定情况
+	Exipired     int         `json:"exipired"`
 }
 }
 
 
 // 快手列表返回的结果
 // 快手列表返回的结果

+ 16 - 2
app/service/youngee_talent_service/talent_getVideo.go → app/service/youngee_talent_service/talentVideoInfo.go

@@ -7,8 +7,11 @@ import (
 )
 )
 
 
 const (
 const (
+	//快手
 	VideoCountUrl = "https://open.kuaishou.com/openapi/photo/count?app_id=%s&access_token=%s"
 	VideoCountUrl = "https://open.kuaishou.com/openapi/photo/count?app_id=%s&access_token=%s"
 	VideoListUrl  = "https://open.kuaishou.com/openapi/photo/count?app_id=%s&access_token=%s?count=200"
 	VideoListUrl  = "https://open.kuaishou.com/openapi/photo/count?app_id=%s&access_token=%s?count=200"
+	//抖音
+	DyVideoList = "https://open.douyin.com/api/douyin/v1/video/video_list?count=20&open_id=%s&cursor=%d"
 )
 )
 
 
 type Videoresponse struct {
 type Videoresponse struct {
@@ -36,7 +39,7 @@ type VideoInfo struct {
 	Pending      int `json:"pending"`
 	Pending      int `json:"pending"`
 }
 }
 
 
-// 获取总作品数
+// 获取快手总作品数
 func GetVideoCount(appid string, accesstoken string) (info Videoresponse, err error) {
 func GetVideoCount(appid string, accesstoken string) (info Videoresponse, err error) {
 	uri := fmt.Sprintf(VideoCountUrl, appid, accesstoken)
 	uri := fmt.Sprintf(VideoCountUrl, appid, accesstoken)
 	var response []byte
 	var response []byte
@@ -52,7 +55,7 @@ func GetVideoCount(appid string, accesstoken string) (info Videoresponse, err er
 	return result, nil
 	return result, nil
 }
 }
 
 
-// 获取总点赞数(暂时最多统计200个视频)
+// 获取快手视频列表(暂时最多统计200个视频)
 func GetVideoList(appid string, accesstoken string) (info VideoListResponse, err error) {
 func GetVideoList(appid string, accesstoken string) (info VideoListResponse, err error) {
 	uri := fmt.Sprintf(VideoListUrl, appid, accesstoken)
 	uri := fmt.Sprintf(VideoListUrl, appid, accesstoken)
 	var response []byte
 	var response []byte
@@ -68,6 +71,7 @@ func GetVideoList(appid string, accesstoken string) (info VideoListResponse, err
 	return result, nil
 	return result, nil
 }
 }
 
 
+// 获取快手总点赞数(暂时最多统计200个视频)
 func GetLikeCount(appid string, accesstoken string) (int, error) {
 func GetLikeCount(appid string, accesstoken string) (int, error) {
 	videoListResponse, err := GetVideoList(appid, accesstoken)
 	videoListResponse, err := GetVideoList(appid, accesstoken)
 	if err != nil {
 	if err != nil {
@@ -80,3 +84,13 @@ func GetLikeCount(appid string, accesstoken string) (int, error) {
 	}
 	}
 	return totalLikes, nil
 	return totalLikes, nil
 }
 }
+
+// 获取抖音视频列表
+// 获取快手视频列表(暂时最多统计200个视频)
+func GetDyVideoList(openid string, accesstoken string) (info VideoListResponse, err error) {
+
+}
+
+//获取抖音总点赞数
+
+//获取抖音总评论数

+ 0 - 276
swagger/swagger.json

@@ -1,276 +0,0 @@
-{
-    "swagger": "2.0",
-    "info": {
-        "contact": {}
-    },
-    "paths": {
-        "/talent/g/get-project-list": {
-            "get": {
-                "description": "GetProjectListInfo",
-                "consumes": [
-                    "application/json"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "Project"
-                ],
-                "summary": "GetProjectList",
-                "parameters": [
-                    {
-                        "type": "integer",
-                        "description": "index of page",
-                        "name": "idx",
-                        "in": "query",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "size of page",
-                        "name": "cnt",
-                        "in": "query",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "search by platform",
-                        "name": "platform",
-                        "in": "query"
-                    },
-                    {
-                        "type": "string",
-                        "description": "search by mode",
-                        "name": "mode",
-                        "in": "query"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/youngee_talent_model.ProjectInfoList"
-                        }
-                    }
-                }
-            }
-        }
-    },
-    "definitions": {
-        "youngee_talent_model.ProductCoverInfo": {
-            "type": "object",
-            "properties": {
-                "productCovers": {
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/youngee_talent_model.YounggeeProductPhoto"
-                    }
-                },
-                "product_id": {
-                    "description": "gmeta.Meta    `orm:\"table:younggee_product\"`",
-                    "type": "integer"
-                },
-                "product_price": {
-                    "type": "integer"
-                }
-            }
-        },
-        "youngee_talent_model.ProjectInfo": {
-            "type": "object",
-            "properties": {
-                "content_type": {
-                    "description": "内容形式,1代表图文,2代表视频",
-                    "type": "integer"
-                },
-                "enterprise_id": {
-                    "description": "所属企业id",
-                    "type": "integer"
-                },
-                "productInfo": {
-                    "$ref": "#/definitions/youngee_talent_model.ProductCoverInfo"
-                },
-                "product_id": {
-                    "description": "关联商品id",
-                    "type": "integer"
-                },
-                "project_detail": {
-                    "description": "项目详情",
-                    "type": "string"
-                },
-                "project_form": {
-                    "description": "项目形式,1-4分别代表实体商品寄拍、虚拟产品测评、线下探店打卡、素材微原创",
-                    "type": "integer"
-                },
-                "project_id": {
-                    "description": "gmeta.Meta       `orm:\"table:project_info\"`",
-                    "type": "integer"
-                },
-                "project_name": {
-                    "description": "项目名称",
-                    "type": "string"
-                },
-                "project_platform": {
-                    "description": "项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎",
-                    "type": "integer"
-                },
-                "project_status": {
-                    "description": "项目状态,1-7分别代表创建中、待审核、招募中、待支付、失效、执行中、已结案",
-                    "type": "integer"
-                },
-                "recruitStrategys": {
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/youngee_talent_model.RecruitStrategy"
-                    }
-                },
-                "recruit_ddl": {
-                    "description": "招募截止时间",
-                    "type": "string"
-                },
-                "taskInfos": {
-                    "$ref": "#/definitions/youngee_talent_model.TaskInfo"
-                }
-            }
-        },
-        "youngee_talent_model.ProjectInfoList": {
-            "type": "object",
-            "properties": {
-                "max_page": {
-                    "type": "integer"
-                },
-                "projectInfos": {
-                    "type": "array",
-                    "items": {
-                        "$ref": "#/definitions/youngee_talent_model.ProjectInfo"
-                    }
-                }
-            }
-        },
-        "youngee_talent_model.RecruitStrategy": {
-            "type": "object",
-            "properties": {
-                "fee_form": {
-                    "description": "稿费形式,1-3分别代表产品置换、固定稿费、自报价",
-                    "type": "integer"
-                },
-                "followers_low": {
-                    "description": "达人粉丝数下限",
-                    "type": "integer"
-                },
-                "followers_up": {
-                    "description": "达人粉丝数上限",
-                    "type": "integer"
-                },
-                "offer": {
-                    "description": "报价",
-                    "type": "integer"
-                },
-                "project_id": {
-                    "description": "所属项目id",
-                    "type": "integer"
-                },
-                "recruit_number": {
-                    "description": "招募数量",
-                    "type": "integer"
-                },
-                "recruit_strategy_id": {
-                    "description": "gmeta.Meta        `orm:\"table:recruit_strategy\"`",
-                    "type": "integer"
-                },
-                "strategy_id": {
-                    "description": "策略id",
-                    "type": "integer"
-                }
-            }
-        },
-        "youngee_talent_model.TaskInfo": {
-            "type": "object",
-            "properties": {
-                "complete_date": {
-                    "description": "结束时间",
-                    "type": "string"
-                },
-                "complete_status": {
-                    "description": "结束方式 1未结束 2正常结束 3反选失败 4被解约",
-                    "type": "integer"
-                },
-                "create_date": {
-                    "description": "创建时间",
-                    "type": "string"
-                },
-                "project_id": {
-                    "description": "任务id",
-                    "type": "integer"
-                },
-                "select_date": {
-                    "description": "反选时间",
-                    "type": "string"
-                },
-                "settle_amount": {
-                    "description": "待结算金额(任务奖励扣除违规扣款)",
-                    "type": "integer"
-                },
-                "strategy_id": {
-                    "description": "报名选择的招募策略id",
-                    "type": "integer"
-                },
-                "talent_id": {
-                    "description": "达人id",
-                    "type": "integer"
-                },
-                "talent_personal_info_snap": {
-                    "description": "达人个人信息快照",
-                    "type": "string"
-                },
-                "talent_platform_info_snap": {
-                    "description": "达人平台信息快照",
-                    "type": "string"
-                },
-                "talent_post_addr_snap": {
-                    "description": "收货地址快照",
-                    "type": "string"
-                },
-                "task_id": {
-                    "description": "gmeta.Meta             `orm:\"table:youngee_task_info\"`",
-                    "type": "integer"
-                },
-                "task_reward": {
-                    "description": "任务奖励金额",
-                    "type": "integer"
-                },
-                "task_status": {
-                    "description": "任务状态",
-                    "type": "integer"
-                }
-            }
-        },
-        "youngee_talent_model.YounggeeProductPhoto": {
-            "type": "object",
-            "properties": {
-                "created_at": {
-                    "description": "创建时间",
-                    "type": "string"
-                },
-                "photo_uid": {
-                    "type": "string"
-                },
-                "photo_url": {
-                    "description": "图片或视频url",
-                    "type": "string"
-                },
-                "product_id": {
-                    "description": "所属商品id",
-                    "type": "integer"
-                },
-                "product_photo_id": {
-                    "description": "gmeta.Meta     `orm:\"table:younggee_product_photo\"`",
-                    "type": "integer"
-                },
-                "symbol": {
-                    "description": "图片为主图或详情图标志位,1为主图,2为详情图,3为视频",
-                    "type": "integer"
-                }
-            }
-        }
-    }
-}