Compare commits
2 Commits
a7d5f4ff0b
...
5d75f68ab9
| Author | SHA1 | Date |
|---|---|---|
|
|
5d75f68ab9 | |
|
|
fbd1592762 |
|
|
@ -12,20 +12,15 @@ const TableNameCollectTask = "collect_task"
|
||||||
|
|
||||||
// CollectTask mapped from table <collect_task>
|
// CollectTask mapped from table <collect_task>
|
||||||
type CollectTask struct {
|
type CollectTask struct {
|
||||||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||||
RequestID string `gorm:"column:request_id;not null" json:"request_id"`
|
CollectCode string `gorm:"column:collect_code;not null;default:0" json:"collect_code"`
|
||||||
CollectCode string `gorm:"column:collect_code;not null" json:"collect_code"`
|
AiPlatformIndex string `gorm:"column:ai_platform_index;not null;default:0" json:"ai_platform_index"`
|
||||||
Question string `gorm:"column:question;not null" json:"question"`
|
ContentHTML string `gorm:"column:content_html;not null" json:"content_html"`
|
||||||
ScriptTime int32 `gorm:"column:script_time;not null" json:"script_time"`
|
ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"`
|
||||||
Platform int32 `gorm:"column:platform;not null" json:"platform"`
|
Source string `gorm:"column:source" json:"source"`
|
||||||
CollectData string `gorm:"column:collect_data;not null" json:"collect_data"`
|
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||||
ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"`
|
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||||
ImgURL string `gorm:"column:img_url;not null" json:"img_url"`
|
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
|
||||||
PointKeyword string `gorm:"column:point_keyword;not null" json:"point_keyword"`
|
|
||||||
Res string `gorm:"column:res" json:"res"`
|
|
||||||
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
|
|
||||||
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
|
||||||
Status int32 `gorm:"column:status;not null" json:"status"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TableName CollectTask's table name
|
// TableName CollectTask's table name
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,20 @@ func (p *ProductService) CreateProductInfoByDocx(c *fiber.Ctx) error {
|
||||||
return pkg.HandleResponse(c, productInfo)
|
return pkg.HandleResponse(c, productInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CollectInfo struct {
|
||||||
|
AIPlatformIndex string `json:"ai_platform_index"`
|
||||||
|
ContentHtml string `json:"content_html"`
|
||||||
|
ShareUrl string `json:"share_url"`
|
||||||
|
Source []Source `json:"source"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Source struct {
|
||||||
|
Title string `json:"name"`
|
||||||
|
Url string `json:"url"`
|
||||||
|
PlatformName string `json:"platform"`
|
||||||
|
PlatformIcon string `json:"Platform_icon"`
|
||||||
|
}
|
||||||
|
|
||||||
func (p *ProductService) Collect(c *fiber.Ctx, req *entitys.ProductCollectRequest) error {
|
func (p *ProductService) Collect(c *fiber.Ctx, req *entitys.ProductCollectRequest) error {
|
||||||
log.Printf("[DEBUG] ========== 请求开始 ==========")
|
log.Printf("[DEBUG] ========== 请求开始 ==========")
|
||||||
log.Printf("[DEBUG] 请求时间: %s", time.Now().Format("2006-01-02 15:04:05.000"))
|
log.Printf("[DEBUG] 请求时间: %s", time.Now().Format("2006-01-02 15:04:05.000"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue