This commit is contained in:
parent
82c94a7038
commit
fbd1592762
|
|
@ -13,18 +13,14 @@ 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"`
|
||||||
CollectID int32 `gorm:"column:collect_id;not null" json:"collect_id"`
|
AiPlatformIndex string `gorm:"column:ai_platform_index;not null;default:0" json:"ai_platform_index"`
|
||||||
ScriptTime string `gorm:"column:script_time;not null" json:"script_time"`
|
ContentHTML string `gorm:"column:content_html;not null" json:"content_html"`
|
||||||
Platform int32 `gorm:"column:platform;not null" json:"platform"`
|
|
||||||
CollectData int32 `gorm:"column:collect_data;not null" json:"collect_data"`
|
|
||||||
ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"`
|
ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"`
|
||||||
ImgURL string `gorm:"column:img_url;not null" json:"img_url"`
|
Source string `gorm:"column:source" json:"source"`
|
||||||
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"`
|
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"`
|
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||||
Status int32 `gorm:"column:status;not null" json:"status"`
|
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TableName CollectTask's table name
|
// TableName CollectTask's table name
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,23 @@ 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 {
|
||||||
|
|
||||||
|
return nil
|
||||||
_, err := p.authBiz.ValidateAccessToken(c.UserContext(), req.AccessToken)
|
_, err := p.authBiz.ValidateAccessToken(c.UserContext(), req.AccessToken)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue