Compare commits

...

10 Commits

Author SHA1 Message Date
tangchangquan bf07e1ab2a update——百度视频审核错误原因
4 years ago
tangchangquan f53370401f update——百度视频审核错误原因
4 years ago
tangchangquan cb3e1f8e70 laotang_0714
4 years ago
tangchangquan b13a92cdbb laotang_0714
4 years ago
tangchangquan 6c7323f875 laotang_0714
4 years ago
tangchangquan 1f87ab9140 laotang_0706
4 years ago
tangchangquan 21d4e7184b laotang_0702
4 years ago
kanade 65febdb4ab test
4 years ago
kanade 3b48372ee5 直播功能添加
5 years ago
kanade 57d4311eff 修改热门商品
5 years ago

@ -0,0 +1,93 @@
package goods
import (
"github.com/gin-gonic/gin"
"live/app/common"
"live/app/lib"
"live/app/lib/back"
"live/app/lib/tools"
"live/app/logic/goods"
)
type Car struct {
}
// 橱柜列表请求参数
type argsList struct {
lib.Page
}
// @Title 获取直播车列表
// @Param keyword string false "检索关键字"
// @Param page int false "页数 默认1"
// @Param limit int false "分页大小"
func (car *Car) List(c *gin.Context) {
uid := common.GetUserId(c)
if uid == 0 {
back.Fail(c, "未登录")
return
}
args := argsList{}
if err := tools.ParseParams(&args, c); err != nil {
back.Fail(c, err.Error())
return
}
list, count := (&goods.Car{}).GetList(uid, args.Page)
back.Suc(c, "操作成功", gin.H{
"list": list,
"total": count,
})
}
type argsDel struct {
Ids []int `json:"ids" form:"ids"`
}
// @Title 删除直播车商品
// @Param Ids []int true "删除橱柜商品id数组"
func (car *Car) Delete(c *gin.Context) {
uid := common.GetUserId(c)
argsDel := argsDel{}
if err := tools.ParseParams(&argsDel, c); err != nil {
back.Fail(c, err.Error())
return
}
if len(argsDel.Ids) == 0 {
back.Fail(c, "参数不全")
return
}
if (&goods.Car{}).Delete(uid, argsDel.Ids) {
back.Suc(c, "操作成功", "")
return
} else {
back.Fail(c, "操作失败")
return
}
}
type argsAdd struct {
GoodsIds []uint `json:"goodsIds" form:"goodsIds"`
}
// @Title 添加直播车商品
// @Param Ids []int true "添加直播车商品id数组"
func (car *Car) Add(c *gin.Context) {
uid := common.GetUserId(c)
args := argsAdd{}
if err := tools.ParseParams(&args, c); err != nil {
back.Fail(c, err.Error())
return
}
if len(args.GoodsIds) == 0 {
back.Fail(c, "参数不全")
return
}
if (&goods.Car{}).Add(uid, args.GoodsIds) > 0 {
back.Suc(c, "操作成功", "")
return
} else {
back.Fail(c, "操作失败")
return
}
}

@ -7,7 +7,6 @@ import (
"live/app/lib/back"
"live/app/lib/tools"
"live/app/logic/goods"
"log"
)
type Cupboard struct {
@ -49,10 +48,6 @@ type ArgsDel struct {
// @Param Ids []int true "删除橱柜商品id数组"
func (cup *Cupboard) Delete(c *gin.Context) {
uid := common.GetUserId(c)
if uid == 0 {
back.Fail(c, "未登录")
return
}
argsDel := ArgsDel{}
if err := tools.ParseParams(&argsDel, c); err != nil {
back.Fail(c, err.Error())
@ -62,7 +57,6 @@ func (cup *Cupboard) Delete(c *gin.Context) {
back.Fail(c, "参数不全")
return
}
log.Println(argsDel.Ids)
if (&goods.Cupboard{}).Delete(uid, argsDel.Ids) {
back.Suc(c, "操作成功", "")
return

@ -17,7 +17,7 @@ func (g *Goods) Histroy(c *gin.Context) {
back.Fail(c, err.Error())
return
}
list, err := recook.Order.GetHistoryGoods(c.Request.Header.Get("X-Recook-Id"), c.Request.Header.Get("X-Recook-Token"), page)
list, err := recook.Order.GetHistoryGoods(c.Request.Header.Get("X-Recook-Id"), c.Request.Header.Get("X-Recook-Token"), c.Request.Header.Get("Device-Type"), page)
if err != nil {
back.Fail(c, err.Error())
return

@ -49,7 +49,7 @@ func (s *Short) Publish(c *gin.Context) {
back.Fail(c, "参数错误")
return
}
err := (&short.Short{}).Publish(uid, args.GoodsId, args.TopicId, args.FileId, args.Content, c.Request.Header.Get("X-Recook-Id"), c.Request.Header.Get("X-Recook-Token"))
err := (&short.Short{}).Publish(uid, args.GoodsId, args.TopicId, args.FileId, args.Content, c.Request.Header.Get("X-Recook-Id"), c.Request.Header.Get("X-Recook-Token"), c.Request.Header.Get("Device-Type"))
if err != nil {
back.Fail(c, err.Error())
return

@ -48,11 +48,12 @@ func (t *Topic) Add(c *gin.Context) {
back.Fail(c, err.Error())
return
}
userId := common.GetUserId(c)
if args.Title == "" {
back.Fail(c, "参数错误")
return
}
topicId, err := (&topic.Topic{}).Add(args.Title)
topicId, err := (&topic.Topic{}).Add(userId, args.Title)
if err != nil {
back.Fail(c, err.Error())
return

@ -65,6 +65,7 @@ func RequestFormData(url string, data url.Values, headers ...map[string]string)
} else {
reqest.Header.Add("Content-Type", write.FormDataContentType())
}
reqest.Header.Add("X-Recook-System", "recookapi")
response, err := client.Do(reqest)
if err != nil {
return nil, err

@ -26,7 +26,7 @@ type ArgsHistoryList struct {
}
// @Title 获取会员购买历史商品
func (o *order) GetHistoryGoods(id string, token string, page lib.Page) (result *ArgsHistoryList, err error) {
func (o *order) GetHistoryGoods(id string, token, deviceType string, page lib.Page) (result *ArgsHistoryList, err error) {
result = &ArgsHistoryList{}
err = RecookClient.Exec(actionHistory, url.Values{
"page": []string{strconv.Itoa(page.GetPage())},
@ -34,6 +34,7 @@ func (o *order) GetHistoryGoods(id string, token string, page lib.Page) (result
}, result, map[string]string{
"X-Recook-ID": id,
"X-Recook-Token": token,
"Device-Type": deviceType,
})
if err != nil {
return

@ -42,14 +42,16 @@ type TrendItem struct {
URL string `json:"url"`
Width uint `json:"width"`
} `json:"imgList"`
OriginID uint `json:"originId"`
TrendType int `json:"trendType"`
UpdatedAt string `json:"updatedAt"`
Short Short `json:"short"`
Praise uint `json:"praise"`
IsPraise uint `json:"isPraise"`
TopicId uint `json:"topicId"`
TopicName string `json:"topicName"`
OriginID uint `json:"originId"`
TrendType int `json:"trendType"`
UpdatedAt string `json:"updatedAt"`
Short Short `json:"short"`
Praise uint `json:"praise"`
IsPraise uint `json:"isPraise"`
TopicId uint `json:"topicId"`
TopicName string `json:"topicName"`
Compliance int `json:"compliance"`
PassStatus int `json:"pass_status"`
}
type TrendList struct {
List []TrendItem `json:"list"`
@ -88,7 +90,7 @@ func (t *trend) GetGoods(goodsIds []uint) (result map[uint]TrendGoods) {
}
// @Title 添加会员动态
func (t *trend) AddTrend(userId, originId uint, trendType, isShow int, id, token string) error {
func (t *trend) AddTrend(userId, originId uint, trendType, isShow int, id, token, deviceType string) error {
result := ""
if userId <= 0 || originId <= 0 || trendType <= 0 {
return errors.New("参数错误")
@ -101,6 +103,7 @@ func (t *trend) AddTrend(userId, originId uint, trendType, isShow int, id, token
}, &result, map[string]string{
"X-Recook-ID": id,
"X-Recook-Token": token,
"Device-Type": deviceType,
}); err != nil {
return err
}

@ -23,11 +23,12 @@ type Userinfo struct {
UserId uint `json:"userId"`
}
func (u *user) GetUserId(id uint, token string) uint {
func (u *user) GetUserId(id uint, token, deviceType string) uint {
userinfo := &Userinfo{}
if err := RecookClient.Exec(actionUserinfo, url.Values{}, userinfo, map[string]string{
"X-Recook-ID": strconv.FormatUint(uint64(id), 10),
"X-Recook-Token": token,
"Device-Type": deviceType,
}); err != nil {
return 0
}

@ -0,0 +1,62 @@
package goods
import (
"live/app/lib"
"live/app/lib/recook"
"live/app/model/goods"
)
type Car struct {
}
// @Title 获取会员直播车列表
// @Param uid uint true "会员id"
// @Param listArgs Listargs true "筛选分页参数"
func (c *Car) GetList(userId uint, page lib.Page) (result *[]recook.GoodsInfo, count int64) {
goodsCarModel := &goods.GoodsCar{}
result = &[]recook.GoodsInfo{}
start := (page.GetPage() - 1) * page.GetLimit()
count = goodsCarModel.GetCountByUserId(userId)
if count <= int64(start) {
// 没有数据,不需要查库
return
}
goodsWindows := goodsCarModel.GetListByUserId(userId, start, page.GetLimit())
if len(*goodsWindows) == 0 {
// 未查询到数据
return
}
goodsIds := []uint{}
for _, goodsWindow := range *goodsWindows {
goodsIds = append(goodsIds, goodsWindow.GoodsId)
}
goodsInfo, err := recook.Goods.GetListByIds(goodsIds)
if err != nil {
return
}
return goodsInfo, count
}
// @Title 根据ids批量删除会员直播车数据
func (c *Car) Delete(uid uint, ids []int) (err bool) {
upRow := (&goods.GoodsCar{}).DelByUserIdAndIds(uid, ids)
if upRow > 0 {
return true
} else {
return false
}
}
// @Title 添加会员直播车数据
// @Param uid int true "会员id"
func (c *Car) Add(userId uint, goodsIds []uint) int64 {
data := []goods.GoodsCar{}
for _, goodsId := range goodsIds {
data = append(data, goods.GoodsCar{
UserId: userId,
GoodsId: goodsId,
})
}
return (&goods.GoodsCar{}).CreateAll(&data)
}

@ -2,11 +2,13 @@ package short
import (
"errors"
"fmt"
"live/app/lib"
"live/app/lib/recook"
"live/app/lib/tencent"
"live/app/logic/topic"
"live/app/logic/user"
"live/app/model/baiduapi"
"live/app/model/short"
topic2 "live/app/model/topic"
user2 "live/app/model/user"
@ -22,7 +24,7 @@ type Short struct {
// @Param topicIc uint true "参与话题id 0=未参与话题"
// @Param fileId string true "腾讯云视频id"
// @Param content string true "发布内容"
func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, loginId, token string) error {
func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, loginId, token, deviceType string) error {
info, err := tencent.Short.GetInfo(fileId)
if err != nil {
return errors.New("上传视频错误")
@ -41,7 +43,7 @@ func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, l
CoverUrl: fileInfo.BasicInfo.CoverUrl,
})
if id > 0 {
err := (&user.Trend{}).AddTrend(userId, id, user.TREND_TYPE_short, 1, loginId, token)
err := (&user.Trend{}).AddTrend(userId, id, user.TREND_TYPE_short, 1, loginId, token, deviceType)
if err != nil {
log.Println("视频上传错误, err:", err)
}
@ -53,11 +55,28 @@ func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, l
// 添加内容
(&topic2.Topic{}).AddPartake(topicId)
}
go videoAudit(id, content, fileInfo.BasicInfo.MediaUrl, fileInfo.BasicInfo.MediaUrl)
return nil
}
return errors.New("网络异常")
}
//新增内容,过滤短视频是否合规
func videoAudit(id uint, name string, video string, exid string) {
b := baiduapi.BdAudit{}
rest := b.VideoAudit(name, video, exid)
fmt.Println(rest, "=========")
if rest.Conclusion != "合规" {
var st = short.Short{
Compliance: 1,
Emg: rest.Msg,
}
(&short.Short{}).GetDb().Model(&short.Short{}).Where("id=?", id).Updates(&st)
}
}
type TopicInfoItem struct {
recook.ReplyUserItem
Content string `json:"content"`
@ -71,6 +90,7 @@ type TopicInfoItem struct {
MediaUrl string `json:"mediaUrl"`
TopicId uint `json:"topicId"`
TopicName string `json:"topicName"`
IsFollow int `json:"isFollow"`
}
func (s *Short) List(userId uint, page lib.Page) (result *[]TopicInfoItem, count int64, err error) {
@ -142,10 +162,12 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI
// 获取会员动态信息
trendLists := recook.Trend.Infos(shortIds, user.TREND_TYPE_short)
trendIds := []uint{}
trendUserIds := []uint{}
trendMap := map[uint]recook.TrendInfo{}
for _, trendInfo := range *trendLists {
trendIds = append(trendIds, trendInfo.Id)
trendMap[trendInfo.OriginId] = trendInfo
trendUserIds = append(trendUserIds, trendInfo.UserId)
}
// 获取商品信息
@ -169,12 +191,26 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI
}
}
// 当前会员是否关注过当前列表的数据
userFollowMap := map[uint]user2.UserFollow{}
if userId > 0 {
userFollow := &user2.UserFollow{}
userFollows := userFollow.GetByUserIdAndFollowIds(userId, trendUserIds)
for _, follow := range userFollows {
userFollowMap[follow.FollowUserId] = follow
}
}
for _, list := range lists {
trendInfo := trendMap[list.Id]
hasPraise := 0
if _, ok := userPraiseMap[trendInfo.Id]; ok {
hasPraise = 1
}
hasFollow := 0
if _, ok := userFollowMap[trendInfo.UserId]; ok {
hasFollow = 1
}
*result = append(*result, TopicInfoItem{
ReplyUserItem: userMap[list.UserId],
Content: list.Content,
@ -184,6 +220,7 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI
TrendType: trendInfo.TrendType,
Praise: userTrendDataMap[trendInfo.Id].Praise,
IsPraise: hasPraise,
IsFollow: hasFollow,
Goods: goodsInfos[list.GoodsId],
MediaUrl: list.MediaUrl,
TopicId: list.TopicId,

@ -27,7 +27,7 @@ func (t *Topic) List(keyword string, page lib.Page) (result *[]topic.Topic, coun
}
// @Title 添加话题
func (t *Topic) Add(title string) (uint, error) {
func (t *Topic) Add(userId uint, title string) (uint, error) {
topicModel := &topic.Topic{}
topicInfo := topicModel.GetByTitle(title)
if topicInfo.Id > 0 {
@ -47,6 +47,7 @@ func (t *Topic) Add(title string) (uint, error) {
if data.Id <= 0 {
return 0, errors.New("网络异常")
}
(&Follow{}).Add(userId, data.Id)
return data.Id, nil
}

@ -3,6 +3,7 @@ package user
import (
"live/app/lib"
"live/app/lib/recook"
"live/app/model/momentscopy"
"live/app/model/short"
"live/app/model/topic"
"live/app/model/user"
@ -85,12 +86,34 @@ func (t *Trend) GetList(loginUserId, userId uint, page lib.Page) *recook.TrendLi
trendInfo.TopicName = topicMap[shortItem.TopicId].Title
}
}
//根据需求,返回视频的状态,风险或安全,审核中或审核失败通过
for i, k := range list.List {
if k.TrendType == 2 {
var a short.Short
(&short.Short{}).GetDb().Where("id=?", k.OriginID).First(&a)
list.List[i].Compliance = a.Compliance
list.List[i].PassStatus = a.Pass
} else if k.TrendType == 1 {
var gm momentscopy.MomentsCopy
(&momentscopy.MomentsCopy{}).GetDb().Table("recook_goods_moments_copy").Where("id=?", k.OriginID).First(&gm)
list.List[i].Compliance = gm.Compliance
if gm.Reviewing == 0 { //审核通过
list.List[i].PassStatus = 2
} else if gm.Reviewing == 1 { //审核中
list.List[i].PassStatus = 0
} else if gm.Reviewing == 2 { //驳回
list.List[i].PassStatus = 1
}
}
}
return list
}
// @Title 添加会员动态信息
func (t *Trend) AddTrend(userId, originId uint, trendType, isShow int, id, token string) error {
return recook.Trend.AddTrend(userId, originId, trendType, isShow, id, token)
func (t *Trend) AddTrend(userId, originId uint, trendType, isShow int, id, token, deviceType string) error {
return recook.Trend.AddTrend(userId, originId, trendType, isShow, id, token, deviceType)
}
// @Title 更改会员动态信息

@ -0,0 +1,165 @@
package baiduapi
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
const (
//url = "https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined"
aPIKey = "OH7VGIOa7mUQXNKRpDwvywuk"
secretKey = "tSbkq2ntrFQzSotG1Swv92wvBPmjvKLw"
)
type BdAudit struct {
}
/*{ https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=Va5yQRHlA4Fq5eR3LT0vuXV4&client_secret=0rDSjzQ20XUj5itV6WRtznPQSzr5pVw2& 目前只需要用到Access_token
"refresh_token": ,
"expires_in": 2592000,
"scope": "public wise_adapt",
"session_key": "9mzdDAYpaA7hnkLhBZHyFS8w8++LPHDsgoOlz9v3K8Gbtxn6fMCVojbFkwNc9JrQD9Y0htiZvSQEZHP6\/DjVjUmAZN3QO",
"scope"
"access_token": "24.737badb6a34ceec6c9f2cea76dc39c37.2592000.1627527054.282335-24455959",
"session_secret": "dfac94a3489fe9fca7c3221cbf7525ff"
}*/
type AccRespAll struct {
RefreshToken string `json:"refresh_token"`
ExpiresIn int64 `json:"expires_in"`
SessionKey string `json:"session_key"`
AccessToken string `json:"access_token"`
Scope string `json:"scope"`
SessionSecret string `json:"session_secret"`
}
//获取access_token
func (r *BdAudit) GetAccessToken() AccRespAll {
u, _ := url.Parse("https://aip.baidubce.com/oauth/2.0/token")
q := u.Query()
q.Set("grant_type", "client_credentials")
q.Set("client_id", aPIKey)
q.Set("client_secret", secretKey)
u.RawQuery = q.Encode()
//u := "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials" + "&client_id=" + aPIKey + "&client_secret=" + secretKey
resp, err := http.Post(u.String(),
"application/x-www-form-urlencoded",
strings.NewReader(""))
if err != nil {
fmt.Println(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(string(body))
var al AccRespAll
err = json.Unmarshal(body, &al)
if err != nil {
fmt.Println(err)
}
return al
}
type ImageResp struct {
LogId int64 `json:"log_id"`
ErrorCode int64 `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Conclusion string `json:"conclusion"`
ConclusionType uint `json:"conclusionType"`
}
//内容审核--图像审核
func (r *BdAudit) ImageAudit(img string) ImageResp {
//图像审核,传入图像的路由地址
method := "https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined"
u, _ := url.Parse(method)
q := u.Query()
q.Set("access_token", r.GetAccessToken().AccessToken)
q.Set("imgUrl", img)
u.RawQuery = q.Encode()
resp, err := http.Post(u.String(),
"application/x-www-form-urlencoded",
strings.NewReader(""))
if err != nil {
fmt.Println(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err.Error())
}
fmt.Println(string(body))
var rest ImageResp
json.Unmarshal(body, &rest)
return rest
}
//内容审核--文本审核
func (r *BdAudit) TextAudit(text string) ImageResp {
method := "https://aip.baidubce.com/rest/2.0/solution/v1/text_censor/v2/user_defined"
u, _ := url.Parse(method)
q := u.Query()
q.Set("access_token", r.GetAccessToken().AccessToken)
q.Set("text", text)
u.RawQuery = q.Encode()
resp, err := http.Post(u.String(), "application/x-www-form-urlencoded", strings.NewReader(""))
if err != nil {
fmt.Println(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err.Error())
}
var rest ImageResp
json.Unmarshal(body, &rest)
return rest
}
type VideoResp struct {
LogId int64 `json:"log_id"`
ErrorCode uint `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Conclusion string `json:"conclusion"`
ConclusionType int `json:"conclusion_type"`
IsHitMd5 bool `json:"isHitMd5"`
Msg string `json:"msg"`
}
//短视频审核
func (r *BdAudit) VideoAudit(name, videoUrl, id string) VideoResp {
method := "https://aip.baidubce.com/rest/2.0/solution/v1/video_censor/v2/user_defined"
u, _ := url.Parse(method)
q := u.Query()
q.Set("access_token", r.GetAccessToken().AccessToken)
q.Set("name", name)
q.Set("videoUrl", videoUrl)
q.Set("extId", id)
u.RawQuery = q.Encode()
resp, e := http.Post(u.String(), "application/x-www-form-urlencoded", strings.NewReader(""))
if e != nil {
fmt.Println(e.Error(), "12321321")
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err.Error(), "123213")
}
//fmt.Println(string(body))
var rest VideoResp
json.Unmarshal(body, &rest)
fmt.Println("err.Error()")
return rest
}

@ -0,0 +1,62 @@
package goods
import (
"github.com/golangkit/formatime"
"gorm.io/gorm/clause"
"live/app/lib/db"
)
type GoodsCar struct {
db.BaseModel
Id uint `gorm:"column:id" json:"id"`
UserId uint `gorm:"column:user_id" json:"userId"`
GoodsId uint `gorm:"column:goods_id" json:"goodsId"`
CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"`
UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"`
IsDel int `gorm:"column:is_del" json:"isDel"`
}
// 插入
func (g *GoodsCar) Create(goodsCar *GoodsCar) uint {
g.GetDb().Create(goodsCar)
if goodsCar.Id > 0 {
return goodsCar.Id
}
return 0
}
// 批量插入 忽略重复
func (g *GoodsCar) CreateAll(goodsCars *[]GoodsCar) int64 {
if len(*goodsCars) == 0 {
return 0
}
return g.GetDb().Clauses(clause.OnConflict{DoNothing: true}).Create(goodsCars).RowsAffected
}
// @Title 通过会员id获取数据
// @Param userId uint true "会员id"
func (g *GoodsCar) GetListByUserId(userId uint, start, limit int) *[]GoodsCar {
if userId <= 0 {
return &[]GoodsCar{}
}
goodsCars := []GoodsCar{}
g.GetDb().Model(g).Where("user_id = ?", userId).Where("is_del = ?", 0).Limit(limit).Offset(start).Order("id desc").Find(&goodsCars)
return &goodsCars
}
// 获取会员橱柜商品数量
func (g *GoodsCar) GetCountByUserId(userId uint) (result int64) {
if userId <= 0 {
return
}
g.GetDb().Model(g).Where("user_id = ?", userId).Where("is_del = ?", 0).Count(&result)
return
}
// 会员删除橱柜商品
func (g *GoodsCar) DelByUserIdAndIds(userId uint, ids []int) int64 {
if userId <= 0 || len(ids) == 0 {
return 0
}
return g.GetDb().Model(g).Where("user_id = ?", userId).Where("goods_id in (?) and is_del = ?", ids, 0).Update("is_del", 1).RowsAffected
}

@ -40,7 +40,7 @@ func (g *GoodsWindow) GetListByUserId(userId uint, start, limit int) *[]GoodsWin
return &[]GoodsWindow{}
}
goodsWindows := []GoodsWindow{}
g.GetDb().Model(g).Where(GoodsWindow{UserId: userId}).Where("is_del = ?", 0).Limit(limit).Offset(start).Order("id desc").Find(&goodsWindows)
g.GetDb().Model(g).Where("user_id = ?", userId).Where("is_del = ?", 0).Limit(limit).Offset(start).Order("id desc").Find(&goodsWindows)
return &goodsWindows
}
@ -49,7 +49,7 @@ func (g *GoodsWindow) GetCountByUserId(userId uint) (result int64) {
if userId <= 0 {
return
}
g.GetDb().Model(g).Where(GoodsWindow{UserId: userId}).Where("is_del = ?", 0).Count(&result)
g.GetDb().Model(g).Where("user_id = ?", userId).Where("is_del = ?", 0).Count(&result)
return
}
@ -58,5 +58,5 @@ func (g *GoodsWindow) DelByUserIdAndIds(userId uint, ids []int) int64 {
if userId <= 0 || len(ids) == 0 {
return 0
}
return g.GetDb().Model(g).Where(GoodsWindow{UserId: userId}).Where("id in (?) and is_del = ?", ids, 0).Update("is_del", 1).RowsAffected
return g.GetDb().Model(g).Where("user_id = ?", userId).Where("goods_id in (?) and is_del = ?", ids, 0).Update("is_del", 1).RowsAffected
}

@ -0,0 +1,22 @@
package momentscopy
import (
"github.com/golangkit/formatime"
"live/app/lib/db"
)
type MomentsCopy struct {
db.BaseModel
ID uint `gorm:"column:id;primary_key" json:"id"`
GoodsID uint `gorm:"column:goods_id" json:"goodsId"`
Text string `gorm:"column:text" json:"text"`
UserID uint `gorm:"column:user_id" json:"userId"`
HeadImgURL string `gorm:"column:head_img_url" json:"headImgUrl"`
Nickname string `gorm:"column:nickname" json:"nickname"`
Reviewing uint `gorm:"column:reviewing" json:"reviewing"` // 1 审核中, 0 审核通过, 2 拒绝
CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"`
ReasonID uint `gorm:"column:reason_id" json:"reasonId"`
ReasonNote string `gorm:"column:reason_note" json:"reasonNote"`
ManagerID int `gorm:"column:manager_id" json:"managerId"` // 审核人id系统操作员
Compliance int `gorm:"column:compliance" json:"compliance"` //合规
}

@ -22,7 +22,6 @@ func (p *PromotionGoods) TableName() string {
// @Title 获取当日所有数据
func (p *PromotionGoods) GetDayAll() (result []PromotionGoods) {
day := time.Now().Format("2006-01-02")
day = "2020-09-19"
p.GetDb().Model(p).Where("promotion_start_date = ?", day).Order("promotion_time_item_id,`order`").Find(&result)
return
}

@ -7,17 +7,20 @@ import (
type Short struct {
db.BaseModel
Id uint `gorm:"column:id" json:"id"`
UserId uint `gorm:"column:user_id" json:"userId"`
GoodsId uint `gorm:"column:goods_id" json:"goodsId"`
TopicId uint `gorm:"column:topic_id" json:"topicId"`
Content string `gorm:"column:content" json:"content"`
FileId string `gorm:"column:file_id" json:"fileId"`
CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"`
UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"`
MediaUrl string `gorm:"column:media_url" json:"mediaUrl"`
CoverUrl string `gorm:"column:cover_url" json:"coverUrl"`
IsDel int `gorm:"column:is_del" json:"isDel"`
Id uint `gorm:"column:id" json:"id"`
UserId uint `gorm:"column:user_id" json:"userId"`
GoodsId uint `gorm:"column:goods_id" json:"goodsId"`
TopicId uint `gorm:"column:topic_id" json:"topicId"`
Content string `gorm:"column:content" json:"content"`
FileId string `gorm:"column:file_id" json:"fileId"`
CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"`
UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"`
MediaUrl string `gorm:"column:media_url" json:"mediaUrl"`
CoverUrl string `gorm:"column:cover_url" json:"coverUrl"`
IsDel int `gorm:"column:is_del" json:"isDel"`
Compliance int `gorm:"column:compliance" json:"compliance"`
Pass int `gorm:"column:pass" json:"pass"`
Emg string `gorm:"column:emg" json:"emg"`
}
// 插入
@ -43,7 +46,7 @@ func (s *Short) GetByUserIdAndIds(userId uint, ids []uint) (result []Short) {
// @Title 获取话题短视频列表
func (s *Short) GetList(start, limit int) (result []Short) {
s.GetDb().Model(s).Order("id desc").Offset(start).Limit(limit).
Find(&result, "is_del = 0")
Find(&result, "is_del = 0 and pass=2")
return
}

@ -34,8 +34,10 @@ func Auth() gin.HandlerFunc {
return
}
deviceType := c.Request.Header.Get("Device-Type")
token := c.Request.Header.Get("X-Recook-Token")
userId := recook.User.GetUserId(uint(id), token)
userId := recook.User.GetUserId(uint(id), token, deviceType)
if userId == 0 {
back.Unauthorized(c)
c.Abort()

@ -27,8 +27,9 @@ func BothAuth() gin.HandlerFunc {
return
}
deviceType := c.Request.Header.Get("Device-Type")
token := c.Request.Header.Get("X-Recook-Token")
userId := recook.User.GetUserId(uint(id), token)
userId := recook.User.GetUserId(uint(id), token, deviceType)
if userId == 0 {
return
}

@ -13,7 +13,7 @@ func CORS() gin.HandlerFunc {
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set(
"Access-Control-Allow-Headers",
"Content-Type, Cookie, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, token, Cache-Control, X-Recook-ID, X-Recook-Token, X-Requested-With")
"Content-Type, Cookie, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, token, Cache-Control, Device-Type, X-Recook-ID, X-Recook-Token, X-Requested-With")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET")
if c.Request.Method == "OPTIONS" {

@ -34,6 +34,15 @@ func Router(router *gin.Engine) {
cupboardR.POST("list", cupboard.List) // 会员橱柜列表
cupboardR.POST("delete", cupboard.Delete) // 会员橱柜商品删除
}
// 直播车
carR := liveRouter.Group("/car")
carR.Use(auth)
{
car := &goods.Car{}
carR.POST("list", car.List) // 会员直播车列表
carR.POST("add", car.Add) // 会员直播车商品添加
carR.POST("delete", car.Delete) // 会员直播车商品删除
}
// 商品
goodsR := liveRouter.Group("/goods")
{

@ -1,6 +1,7 @@
package task
import (
"encoding/json"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
@ -42,9 +43,13 @@ func (live *Live) Run() {
handle = append(handle, *event.EventHandle)
switch *event.EventType {
case "NewFileUpload":
log.Println("NewFileUpload", event)
live.upSuc(event)
case "TranscodeComplete":
log.Println("TranscodeComplete", event)
}
log.Println(event)
marshal, _ := json.Marshal(event)
log.Println(string(marshal))
}
request1.EventHandles = common.StringPtrs(handle)
client.ConfirmEvents(request1)

@ -1,6 +1,6 @@
#!/usr/bin/env bash
echo "编译中"
go-bindata -o=./app/lib/asset/asset.go -pkg=asset config/app.ini config/app.prod.ini config/app.test.ini
#go-bindata -o=./app/lib/asset/asset.go -pkg=asset config/app.ini config/app.prod.ini config/app.test.ini
# shellcheck disable=SC2006
DIR=`dirname "$0"`

@ -13,6 +13,8 @@ require (
github.com/json-iterator/go v1.1.10
github.com/mitchellh/mapstructure v1.3.3
github.com/nanjishidu/gomini v1.4.1
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.13.0 // indirect
github.com/shopspring/decimal v1.2.0
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/tencentcloud/tencentcloud-sdk-go v1.0.15

110
go.sum

@ -1,14 +1,11 @@
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM=
github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
@ -25,23 +22,33 @@ github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGK
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golangkit/formatime v0.0.0-20191104073810-5264c15ae8ec h1:8TelrfI4V2uNNXvfz9QHh/XDdFJtAlYj3ysgoXgLBUs=
github.com/golangkit/formatime v0.0.0-20191104073810-5264c15ae8ec/go.mod h1:+QKvIP5zPMgGauZzgKIQQ7K0KOhhl/8yu3TVqz35h14=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M=
github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E=
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
@ -51,12 +58,8 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA=
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
@ -65,6 +68,18 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLD
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/nanjishidu/gomini v1.4.1 h1:5MRKtVUdN23NIYm3d74ajOfGeUvzRTZrNPIx8Ss6J1g=
github.com/nanjishidu/gomini v1.4.1/go.mod h1:nibJcvZBt7VfdXG9UIoeHJQWg2qd44muH0p5YEvdy34=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
@ -75,8 +90,9 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.15 h1:tH8E3LWSRu4g0egqRNDWzHp6MRqRaNMOnxrgAnQfvYU=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.15/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
github.com/tencentyun/tls-sig-api-v2-golang v1.0.0 h1:NavMw9XO2iCLv8hTKaJW2kTaGR2SdNljMABbe39yu6Q=
@ -85,36 +101,76 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM=
golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M=
gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
gopkg.in/ini.v1 v1.60.2 h1:7i8mqModL63zqi8nQn8Q3+0zvSCZy1AxhBgthKfi4WU=
gopkg.in/ini.v1 v1.60.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gorm.io/driver/mysql v1.0.1 h1:omJoilUzyrAp0xNoio88lGJCroGdIOen9hq2A/+3ifw=
gorm.io/driver/mysql v1.0.1/go.mod h1:KtqSthtg55lFp3S5kUXqlGaelnWpKitn4k1xZTnoiPw=
gorm.io/gorm v1.9.19/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=

Loading…
Cancel
Save