From 083404cf7bd705eaafcd961ef57257ab4187f1bc Mon Sep 17 00:00:00 2001 From: kanade <3136520963@qq.com> Date: Thu, 15 Oct 2020 10:20:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/live/data.go | 2 +- app/controller/live/live.go | 9 +++++ app/controller/user/live.go | 70 ++++++++++++++++++++++++++++++++++ app/controller/user/trend.go | 4 +- app/lib/asset/asset.go | 8 ++-- app/lib/recook/trend.go | 3 ++ app/logic/goods/cupboard.go | 11 +++++- app/logic/live/im.go | 18 +++++++++ app/logic/live/live.go | 6 +++ app/logic/short/short.go | 40 +++++++++++++++---- app/logic/user/trend.go | 31 ++++++++++++++- app/model/goods/goodsWindow.go | 9 +++++ app/model/live/liveGoods.go | 4 +- app/model/live/liveItem.go | 16 +++++++- app/model/live/liveRoom.go | 11 ++++++ app/router/router.go | 5 ++- build.sh | 29 ++++++++++++++ 17 files changed, 255 insertions(+), 21 deletions(-) create mode 100644 app/controller/user/live.go create mode 100755 build.sh diff --git a/app/controller/live/data.go b/app/controller/live/data.go index 1fc0b92..c9449d4 100644 --- a/app/controller/live/data.go +++ b/app/controller/live/data.go @@ -29,7 +29,7 @@ func (d *Data) List(c *gin.Context) { return } userId := common.GetUserId(c) - liveItems := (&live.LiveItem{}).GetUserList(userId, args.GetStart(), args.GetLimit()) + liveItems := (&live.LiveItem{}).GetUserListFinish(userId, args.GetStart(), args.GetLimit()) reply := []replyList{} for _, item := range liveItems { reply = append(reply, replyList{ diff --git a/app/controller/live/live.go b/app/controller/live/live.go index 9c11b29..1e9e8cb 100644 --- a/app/controller/live/live.go +++ b/app/controller/live/live.go @@ -376,6 +376,11 @@ func (l *Live) Explain(c *gin.Context) { liveGoods := &live2.LiveGoods{} liveGoods.UnExplain(args.LiveItemId) liveGoods.Explain(args.LiveItemId, args.GoodsId) + + live.ImLogic.SendLiveGroupMessage(liveItem.RoomId, live.LiveGroupMsgTypeExplain, gin.H{ + "goodsId": args.GoodsId, + }) + back.Suc(c, "操作成功", nil) } @@ -398,6 +403,10 @@ func (l *Live) UnExplain(c *gin.Context) { } liveGoods := &live2.LiveGoods{} liveGoods.UnExplain(args.LiveItemId) + + live.ImLogic.SendLiveGroupMessage(liveItem.RoomId, live.LiveGroupMsgTypeUnExplain, gin.H{ + "goodsId": args.GoodsId, + }) back.Suc(c, "操作成功", nil) } diff --git a/app/controller/user/live.go b/app/controller/user/live.go new file mode 100644 index 0000000..d3c8cc0 --- /dev/null +++ b/app/controller/user/live.go @@ -0,0 +1,70 @@ +package user + +import ( + "github.com/gin-gonic/gin" + "live/app/lib" + "live/app/lib/back" + "live/app/lib/tools" + live2 "live/app/model/live" +) + +type Live struct { +} +type argsUserList struct { + UserId uint `json:"userId" form:"userId"` + lib.Page +} + +type replyItem struct { + Id uint `json:"id"` + GoodsCount uint `json:"goodsCount"` + Cover string `json:"cover"` + Look int `json:"look"` + Title string `json:"title"` + IsLive int `json:"isLive"` + StartAt int64 `json:"startAt"` +} + +// @Title 用户直播场次列表 +func (l *Live) UserList(c *gin.Context) { + args := argsUserList{} + if err := tools.ParseParams(&args, c); err != nil { + back.Fail(c, err.Error()) + return + } + if args.UserId <= 0 { + back.Fail(c, "参数错误") + return + } + liveItemModel := &live2.LiveItem{} + start := args.GetStart() + total := int(liveItemModel.GetUserListTotal(args.UserId)) + resultList := []replyItem{} + if total > start { + lists := liveItemModel.GetUserList(args.UserId, args.GetStart(), args.GetLimit()) + liveItemIds := []uint{} + for _, list := range lists { + liveItemIds = append(liveItemIds, list.Id) + } + liveDatas := (&live2.LiveData{}).GetByLiveItemIds(liveItemIds) + liveDataMap := map[uint]live2.LiveData{} + for _, data := range liveDatas { + liveDataMap[data.LiveItemId] = data + } + for _, list := range lists { + resultList = append(resultList, replyItem{ + Id: list.Id, + Title: list.Title, + IsLive: list.Status, + Look: liveDataMap[list.Id].Look, + GoodsCount: list.GoodsCount, + Cover: list.Cover, + StartAt: list.StartAt.Time.Unix(), + }) + } + } + back.Suc(c, "操作成功", gin.H{ + "total": total, + "lists": resultList, + }) +} diff --git a/app/controller/user/trend.go b/app/controller/user/trend.go index 6c1a34c..dd1a6e9 100644 --- a/app/controller/user/trend.go +++ b/app/controller/user/trend.go @@ -2,6 +2,7 @@ package user import ( "github.com/gin-gonic/gin" + "live/app/common" "live/app/lib" "live/app/lib/back" "live/app/lib/tools" @@ -27,6 +28,7 @@ func (t *Trend) List(c *gin.Context) { back.Fail(c, "参数错误") return } - back.Suc(c, "操作成功", (&user.Trend{}).GetList(args.UserId, args.Page)) + userId := common.GetUserId(c) + back.Suc(c, "操作成功", (&user.Trend{}).GetList(userId, args.UserId, args.Page)) return } diff --git a/app/lib/asset/asset.go b/app/lib/asset/asset.go index e50475c..3de5abd 100644 --- a/app/lib/asset/asset.go +++ b/app/lib/asset/asset.go @@ -79,7 +79,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _configAppDevIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4c\x51\xd9\xce\xab\xb8\xba\xbc\xcf\xab\x20\x2d\xcc\x6c\xb6\x94\x0b\x66\x08\x04\x42\x02\x49\xa0\xb5\xb4\xc5\x60\x86\x30\xcf\x84\xa7\x3f\x5a\x7f\xb7\x4e\x6f\xf9\xa6\xfc\x55\x95\x5d\x65\xa7\x28\x5e\xf2\xf3\x3c\x2e\xe8\x14\xa5\xe9\x78\x06\xbf\x7e\xd6\x7f\x20\xe0\xf9\xd3\xe9\xaf\xe6\x3b\x0d\xf5\xef\x53\x1a\x17\xdd\x34\x9f\x09\x92\xfb\xa1\x89\x53\x1a\xf7\xdd\x38\x9f\x29\x0a\xb0\xa7\x34\x5e\x26\x34\x9e\xc7\xae\x9b\xff\xcc\xa3\x69\xda\xba\x31\x3d\xcf\x68\xfa\xb3\x6f\xa3\x06\xfd\x8d\xfb\x11\x65\xe5\xfe\x83\xff\x7b\x6a\xa2\xdd\x48\x6b\x74\x26\xc0\x1f\xe8\xf4\xa8\x3d\x33\xe0\x74\xfa\x6b\x46\x6d\x82\xda\xf9\xf7\x69\x4a\x2b\xa1\xef\x8d\xf4\x4c\xd0\x00\xd0\x24\xc5\xb3\xc4\xa9\x4c\x51\x3b\x97\x59\x89\xc6\x73\x94\x36\x65\x5b\x4e\xf3\x18\xcd\xdd\x78\x42\x7b\x5f\x8e\xe8\xcc\x82\x53\x85\xbe\x67\x92\x40\x11\x15\xc7\x11\x1f\x53\x6c\x06\x38\x9e\x07\x19\x95\x91\x14\xcb\x93\x34\x9b\x81\x94\x4f\x38\x90\x46\x80\xa6\x39\xc4\x24\x34\x4d\x27\x3c\x43\xd2\x80\xa2\x79\x96\x88\x63\x36\x61\x89\xd3\x84\x92\x11\xcd\x46\x7a\x16\x4c\x43\x76\xc2\x3b\x0c\x2b\x41\xff\x88\x68\x3a\xc6\x61\xe5\x83\x32\x56\xbc\x43\xd3\x0e\xaf\x68\x1d\x71\xfa\x47\x6d\xa2\xef\x39\x06\x3c\x41\xf5\x56\x14\x1a\xcd\xd6\x13\x44\x27\xdb\x84\x1b\xe8\xd5\xbe\xc4\x64\xc9\x9b\xca\x78\x8a\xfe\x6e\x44\x32\x24\x20\x09\xc8\x30\xff\xdf\xf7\x57\x5d\xae\xe8\xf7\x4f\x7a\x2a\xe2\x40\xcc\xa3\x8c\xa3\x33\x8e\xa4\x39\x9e\xe1\xa9\x34\x41\x2c\x22\x48\x12\x00\x40\x10\xa7\xb4\x6b\xa2\xb2\x3d\x13\x04\x49\xb0\xf4\x8f\xb1\x5f\xa6\xe2\x57\xf3\x1d\x92\xba\x5b\xd2\x5f\x49\xd7\xfc\xfb\x20\xe0\x34\x8f\x28\x9a\xbf\xe7\x71\x6e\xfa\x7f\xc6\x5e\xd9\xa0\x33\x64\x69\x00\xfe\xbd\x7f\x2a\xba\x71\xfe\xfd\xbf\xbe\xae\xfd\x11\x3e\xa3\xba\x4c\xcf\xc4\x4f\xb4\x84\x6a\xbf\x5a\x25\x27\xdd\x0c\xa3\xb7\x99\xe4\x7e\x68\xa1\xd3\xe9\xaf\x11\x25\x5d\x57\xfd\x3e\x2d\x63\x7d\x2e\xe6\xb9\x9f\xfe\x83\xe3\x7f\x7e\x39\xea\xcb\x5f\x23\xfa\x21\x7f\x25\x2d\x1e\xf5\x25\xbe\x12\xa7\x7e\x2c\xd7\x68\x46\xff\xfd\x73\xe0\xd5\x30\x94\x6e\x33\x44\x41\x30\x25\xc1\x55\x84\xc3\x7e\x7d\x3f\x01\xa2\x86\x99\x0e\xee\x9e\xbc\x09\xf6\x2e\xdf\x6c\x4b\xb8\xf0\x5e\x28\x2e\xfa\xf4\x18\x1e\x9f\xcb\x95\x11\x29\x26\x13\xc4\xcd\xa6\xf2\xad\x61\x5c\xfc\x21\x1d\x38\x5b\xe5\xa6\x37\xa0\x47\x2e\x3d\x6f\x6a\x50\x38\xf8\xe1\xc8\xac\x06\x4d\x4e\xb9\x58\xf9\xce\x33\xa1\x81\x04\x91\x57\xaa\x17\xb6\x8f\x85\x2a\xcb\x73\xe1\x87\x42\x25\x00\xea\xd0\x2f\x0e\xfb\xa8\x54\xd3\x49\x4a\x4b\x7d\x96\x3c\x2d\xa6\x52\xaa\xd5\xb6\x5a\xb7\x91\x28\x0e\x02\x06\xdf\xab\xd4\xcb\xc4\x13\xca\x6a\x82\xf3\x49\x1f\x33\x65\x12\xae\x6d\xbe\xc0\x55\xa9\xb6\x2a\x0e\x12\x24\xbd\x4d\xff\x6a\xef\xdd\x3b\xc0\x15\x32\x51\x11\xcc\xc8\xf9\xa9\xde\x99\xfe\x5e\xb9\xf9\xdd\x8a\xaf\x1c\xf8\xcc\xf4\x57\xd4\x1c\x19\xf6\xf1\x52\xb1\x59\xd2\xca\x5c\x5e\x68\xaf\xfc\xb8\x0e\x38\xa4\x19\x9b\xda\x8c\xc7\xc3\xeb\xf1\x5c\x70\x73\x48\x03\x4a\xad\x30\x28\x74\x16\xa6\x9a\xf9\xee\x57\x1f\xdf\xe9\x6f\x06\xf9\x1e\x93\xde\x6d\x80\xd2\x17\x8b\xf0\xa6\x2f\xe0\xbd\x76\x94\xbe\xb0\x9e\x72\x0b\x83\xef\xe0\x5b\xca\x5b\xf3\xc8\xcb\x52\x35\x05\xb0\x1f\x95\xed\x00\x95\xe2\xf7\xcd\x90\x05\x57\x10\x85\xce\x10\x05\x57\x12\x86\x7b\x70\x7b\x15\x15\xda\x03\x17\x37\x63\xa8\x61\x84\x3d\x95\x82\xe8\xef\x97\xe2\x9e\x91\x7e\x88\xc2\x8b\xaf\x6c\x8c\x9c\x98\x4a\x50\x0c\xf8\xce\x16\x52\xbf\x31\x96\x65\x39\x83\x6d\xd3\xf5\x07\x0e\xe6\xd5\xaf\x45\x65\x90\x90\xb0\x31\x64\x45\xd5\xda\x38\xcd\x93\xce\x94\x25\xa4\xd8\x66\x65\x83\x6a\x8a\xbf\xa2\x7e\xb0\x92\x7b\xe7\xa3\x56\xb1\xc2\x2b\xc0\xda\x66\x54\x69\xc1\x62\xf6\xa7\x76\x34\x39\xfd\x9c\xf5\x36\x91\x4b\x58\xce\x32\xd6\xbf\x13\x99\x8a\xdf\x9f\x23\x4b\x54\xec\xb1\x2c\x57\x76\xc4\xdc\x49\xfa\x56\xb9\x97\xe0\x9f\x0d\xbb\xb3\xda\xe0\xe8\xab\x4c\xc3\xc6\x77\x25\x03\xe0\xef\x8d\xfd\x7c\x84\x97\xef\x17\xe0\x73\x7f\x93\xe2\x6a\xb9\x5b\x92\x24\x51\xcb\x84\x52\x28\x53\x12\x77\x85\xb9\xb6\xdc\x55\x87\x5c\x47\x58\xab\x75\xe9\x6e\x5f\xd5\xce\xb7\xb1\x57\xb0\x78\xb4\xd0\xd5\x46\x96\x7e\x10\x0f\x76\xbd\x6e\xd9\x30\x52\x23\x7d\x1d\x38\xb8\x79\x65\xd1\x1d\x08\xa3\x2a\x63\x62\xe6\x54\x01\xc1\xbd\xba\xf4\xd1\xcd\x4a\x91\x34\xad\x2e\x2c\xd5\x4c\xe6\xdb\x68\xe6\xb6\xd6\xd6\xf3\xc4\x15\x7d\x8c\x12\x31\xf3\xe3\x5c\xa4\x50\xe8\x34\x51\x70\x9e\x12\x14\x02\x38\x00\x1f\x79\xea\x88\x3a\x9a\x56\xf3\x34\xe2\x2f\x39\x26\x4e\x77\xe0\x6f\xde\xe1\xed\x47\x77\xa4\xdb\xe3\x5a\x18\xd9\x11\xb3\x9d\x1c\xb1\xf3\x2b\x85\x4f\x07\x3c\x59\x35\x1a\x4c\xcc\x1f\xf7\x0f\xeb\xdf\xa8\xcb\x54\x08\xae\x07\x8b\x69\x60\xf5\x02\xce\x4a\xe3\xef\xd4\xb8\xf7\x6e\xfb\x0a\x99\x38\x55\x2f\x32\xc9\x13\x51\x6f\x6e\xde\x33\x97\x8f\x24\xe3\x9a\x8e\xe3\x82\xfe\xd3\x57\x1d\x16\xd0\x4e\x4e\x6d\xc8\xd7\x9c\xf6\x8a\x15\x5e\x7a\x2b\xbd\xce\x6f\xaa\x70\xe5\xa0\x73\xcb\xe3\xfb\x1d\x5b\xe6\xf4\xef\xbc\x0f\x26\xa1\x32\x2e\x4f\xb3\x94\x05\x4d\x2d\x88\x37\x23\xef\x75\x37\x49\x22\xef\xab\xe4\x54\xd0\x49\x6e\x27\x12\xdd\xdb\xbb\x56\x10\x12\xeb\x21\xb1\x1b\xdc\xb7\xe0\x0e\xf2\xde\xd4\x3e\x2c\xbe\x6a\xbc\x8a\x94\x3e\x0f\xac\x12\xfb\xa6\xaf\xd2\x6e\x0f\x1d\x86\x55\x7b\x2b\x05\x29\x08\xd9\x9c\x80\xd2\x51\x4b\x7e\xa2\xfb\x1a\x71\x0b\x0b\xb3\x9b\x89\x23\x7f\xbb\x36\x8f\xbf\x84\xf5\xf3\x0a\x59\x32\x68\x68\x35\xb9\x8d\x4a\xa4\x52\xd8\x02\xe1\xed\xf3\x21\xb9\xd5\x55\x98\xab\xec\x40\x87\x5c\x9e\x77\x77\x33\xb4\x77\xc1\x1f\x42\xa7\x09\x9a\xf5\xd1\xf4\x23\xb0\x6b\xc4\x13\x69\x3d\x5d\xa6\x2c\xcb\x65\xd2\xea\x2e\xd3\x7b\x88\x1b\x3b\xfd\x6c\xdf\xf8\x2a\x15\xec\xa7\x10\x14\xbc\xc3\xb1\x86\x5e\x36\x3a\xd4\xd9\xa8\xae\x93\x54\xc5\x83\x7e\xd1\x09\x55\xd0\x34\x75\x51\x72\xb2\xad\x46\x0f\x67\x28\xf7\x21\x91\xee\xcd\xb0\xb7\xd4\x1d\xb4\x41\xf5\x77\x98\x3c\x7c\x8a\x0e\xde\x9b\x8a\xfb\xb4\xf0\x0c\xb7\xf4\x82\x35\xaf\xea\x96\x7b\xef\x3a\x5b\x0a\xc6\x17\x26\x49\x67\xbe\xf3\x3e\xc4\x84\x83\x5d\x78\xfc\xd6\x8d\x3e\xd9\x27\x0f\x20\xd1\x53\xd9\x7e\x1d\xdf\xb4\x2d\x5f\xca\x03\x51\xbd\xd8\x93\xfe\x6c\x0f\xd2\xbc\xef\x16\xdc\x1b\x8d\x0e\x4c\xea\x95\x89\x96\xc3\x35\xd0\xf9\x1a\x86\xc0\x49\x9f\xe9\x00\xe1\xe7\x46\x53\x92\x59\xd9\x17\xad\x8a\x84\xc7\x31\xbe\xd9\x77\x3c\x0f\xbe\xdc\x83\xf6\x82\xb1\xc1\xea\x1d\x71\xbd\xbc\x21\x5f\x08\x81\x2c\x73\x3c\xf0\x25\xe9\x2e\xcd\xa2\xaf\x9a\xca\xe3\xba\x91\x89\xf2\x2d\x1b\x63\xd6\xd2\x15\x4c\x90\x1b\x2a\x22\x0b\x2b\x21\xb2\x24\x5d\x2c\xf9\x24\xc5\xfa\x91\x60\xe6\x01\x2b\x1e\xab\x0c\x32\x46\x7f\x9a\xeb\xeb\x1a\x0a\x56\x5f\x13\x74\x00\x15\x27\x96\x1e\xa5\x6b\x8a\xb9\x54\x3e\xcc\xeb\xd4\x72\x2f\x06\x69\xcf\x3b\x9d\xe8\x0e\x63\xbb\xf0\xc6\x3e\x49\x10\x3a\x9a\x61\xae\xfe\x74\xf1\xe7\xfa\xb8\xcf\x2d\xba\x28\xf7\xe1\xf9\x0e\x87\x67\xcf\x5f\x93\xb9\xb7\x0e\xbb\x5e\xdc\xab\x76\x78\x77\x22\x55\xda\x3c\x6d\x9d\x88\x9c\x82\x3c\x4d\xa1\xe0\x05\x5f\x60\x6b\x65\xb8\x88\xf2\x55\xa0\x0a\x90\x81\xe8\x39\xb9\x4b\x5c\xdf\x32\x5f\xc3\x80\xab\xe3\xd4\x30\x7e\x6d\xe3\xf1\xb2\xb1\x06\xca\xad\x34\x57\x7d\xe5\x6b\x84\x66\x30\x38\xd8\xf9\xf0\xf9\xac\x1f\xdf\xd8\x58\x0f\x4e\x87\x76\x3d\x1b\xfb\x7b\xc4\xff\x2f\x00\x00\xff\xff\xc0\xdb\xe3\x62\xb2\x08\x00\x00") +var _configAppDevIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x95\xd9\xce\xa3\x38\xdf\xc4\xcf\x73\x2b\x48\x8d\xd9\xcd\x48\x39\x60\x0f\x81\x40\x48\x20\x09\x8c\x5a\x23\x16\xb3\x84\x7d\x27\x5c\xfd\xa7\xe7\xe9\xf9\x46\xdd\xaf\x38\xa9\xbf\x29\xf9\xe7\x52\x59\x72\x82\xa2\x39\x3b\x4e\xc3\x8c\x0e\x61\x92\x0c\x47\xf0\xe3\xfb\xfb\x0b\x02\x9e\x3f\x1c\xfe\xae\x3f\x63\x5f\xfd\x3c\x24\x51\xde\x8e\xd3\x91\x20\xb9\xef\xdf\xc4\x21\x89\xba\x76\x98\x8e\x14\x05\xd8\x43\x12\xcd\x23\x1a\x8e\x43\xdb\x4e\x5f\xeb\xe1\x38\xae\xed\x90\x1c\x27\x34\x7e\xcd\x4d\x58\xa3\x5f\xba\x1b\x50\x5a\x6c\xdf\xfa\x9f\x43\x1d\x6e\x7a\x52\xa1\x23\x01\xbe\xa4\xdd\xa1\xe6\xc8\x80\xc3\xe1\xef\x09\x35\x31\x6a\xa6\x9f\x87\x31\x29\x85\xae\xd3\x93\x23\x41\x03\x40\x93\x14\xcf\x12\x87\x22\x41\xcd\x54\xa4\x05\x1a\x8e\x61\x52\x17\x4d\x31\x4e\x43\x38\xb5\xc3\x01\x6d\x5d\x31\xa0\x23\x0b\xc0\xa1\x44\x9f\x23\x49\xa0\x90\x8a\xa2\x90\x8f\x28\x36\x05\x1c\xcf\x83\x94\x4a\x49\x8a\xe5\x49\x9a\x4d\x41\xc2\xc7\x1c\x48\x42\x40\xd3\x1c\x62\x62\x9a\xa6\x63\x9e\x21\x69\x40\xd1\x3c\x4b\x44\x11\x1b\xb3\xc4\x61\x44\xf1\x80\x26\x3d\x39\x0a\x86\x2e\xdb\xc1\x0d\x06\xa5\x70\x7a\x8b\x68\xdc\x87\x7e\xe1\xfd\x22\x52\xdc\x5d\xd3\x76\x37\x6f\x6c\x71\xfc\xd7\x6d\xa0\xcf\x31\x02\x3c\x41\x75\x66\x18\xe8\xf5\xda\x11\x44\x2b\x5b\x84\xe3\x9f\xca\x6d\x8e\xc8\x82\x37\x94\xe1\x10\xfe\x8a\x44\x32\x24\x20\x09\xc8\x30\xff\x05\xfe\x51\x15\x0b\xfa\x79\xe8\xe6\x31\x77\x07\x14\x4e\x9f\xe3\x30\xd5\xdd\xf7\xac\xfc\x0a\x07\x59\x1a\x80\xef\x85\x2f\x12\x15\x72\x20\xe2\x51\xca\xd1\x29\x47\xd2\x1c\xcf\xf0\x54\x12\x23\x16\x11\x24\x09\x00\x20\x88\x6f\xa3\xdc\xd6\x61\xd1\x1c\xbf\xb6\xfe\x1a\x7f\x0c\x08\xc5\x6d\x5b\xfe\x88\x9b\x43\x57\x85\x9f\x3f\x40\x55\xf8\xf9\x13\x54\x85\x9f\x2f\x10\x4c\x92\x04\x91\x21\xc7\xf2\x7c\xc8\xa7\x3c\x24\x53\x08\x78\x16\x50\x34\x45\x42\x22\x21\x93\x6f\xe3\xbf\xa0\x2f\xf9\xbf\x90\xfb\x9c\x7e\xb5\xfe\x6f\x45\x6e\x51\xff\x3f\xe0\xbf\xe4\x63\xde\x0e\xd3\xcf\xdf\x3b\x6c\x9b\x6f\xe3\x23\xac\x8a\xe4\x48\x7c\x57\x1a\x53\xcd\x47\x2b\xe5\xb8\x9d\x60\xf8\x32\xe2\xcc\x0b\x4c\x74\x38\xfc\x3d\x7c\xb3\x7e\x1e\xe6\xa1\x3a\xe6\xd3\xd4\x8d\x7f\xe1\xf8\xd7\x05\x0b\xbb\xe2\xb7\x83\xe0\x61\x57\xe0\x0b\x71\xe8\x86\x62\x09\x27\xf4\xcf\xd7\x86\x17\x5d\x57\xda\x55\x17\x05\xc1\x90\x04\x47\x11\x76\xeb\xf9\x79\xfb\x88\xea\x27\xda\xbf\xb9\xf2\x2a\x58\x9b\x7c\xb5\x4c\xe1\xcc\xbb\x81\x38\x9f\xc6\x7b\x7f\x7f\x9f\x2f\x8c\x48\x31\xa9\x20\xae\x16\x95\xad\x35\xe3\xe0\x77\x69\xc7\xd9\x32\x33\xdc\x1e\xdd\x33\xe9\x71\x55\xfd\xdc\xc6\x77\x5b\x66\x35\x68\x70\xca\xd9\xcc\x36\x9e\x09\x74\x24\x88\xbc\x52\x3e\xb1\x6d\xc8\x55\x59\x9e\x72\x2f\x10\x4a\x01\x50\xfb\xe9\x6c\xb3\xf7\x52\x35\xec\xb8\x30\xd5\x47\xc1\xd3\x62\x22\x25\x5a\x65\xa9\x55\x13\x8a\x62\x2f\x60\xf0\xb5\x48\x9d\x4c\x3c\xa0\xac\xc6\x38\x1f\x77\x11\x53\xc4\xc1\xd2\x64\x33\x5c\x94\x72\x2d\x23\x3f\x46\xd2\xcb\xf0\x2e\xd6\xd6\xbe\x7c\x5c\x21\x63\x15\xc1\x94\x9c\x1e\xea\x8d\xe9\x6e\xa5\x93\xdd\xcc\xe8\xc2\x81\xf7\x44\x7f\x44\xcd\x96\x61\x17\xcd\x25\x9b\xc6\x8d\xcc\x65\xb9\xf6\xcc\xf6\x4b\x8f\x43\x9a\xb1\xa8\x55\xbf\xdf\xdd\x0e\xcf\x04\x27\x83\x34\xa0\xd4\x12\x83\x42\x6b\x62\xaa\x91\x6d\x5e\xf9\xf6\xec\xee\xaa\x93\xaf\x21\xee\x9c\x1a\x28\x5d\x3e\x0b\x2f\xfa\x0c\x5e\x4b\x4b\x9d\x66\xd6\x55\xae\x81\xff\xe9\x3d\x53\x79\x69\x2e\x79\x9e\xcb\x3a\x07\xd6\xbd\xb4\x6c\xa0\x52\xfc\xb6\xea\xb2\xe0\x08\xa2\xd0\xea\xa2\xe0\x48\x42\x7f\xf3\xaf\xcf\xbc\x44\x9b\xef\xe0\x46\x04\x35\x8c\xb0\xc6\x42\x10\xbd\xed\x9c\xdf\x52\xd2\x0b\x50\x70\xf6\x94\x95\x91\x63\x43\xf1\xf3\x1e\xdf\xd8\x5c\xea\x56\xc6\x34\x4d\xbb\xb7\x2c\xba\x7a\xc3\xde\xb8\x78\x95\xa8\xf4\x12\x12\x56\x86\x2c\xa9\x4a\x1b\xc6\x69\x3c\x31\x45\x01\x29\xb6\x5e\x58\xbf\x1c\xa3\x8f\x78\xda\x59\xc9\xb9\xf1\x61\xa3\x98\xc1\x05\x60\x4d\x3d\xa8\xb4\x60\x32\xdb\x43\xdb\xeb\x8c\x7e\x4c\xa7\x26\x96\x0b\x58\x4c\x32\xd6\xbd\x62\x99\x8a\x5e\xef\x3d\x8d\x55\xec\x3e\xcf\x17\x76\xc0\x9c\x51\xfa\x94\x99\x1b\xe3\xef\x15\xbb\xb1\x5a\x6f\x9f\x16\x99\x86\xb5\xe7\x48\x3a\xc0\x5f\x2b\xfb\x7e\x0b\x4f\xcf\xcb\xc1\xfb\xf6\x22\xc5\xc5\x74\xd6\x38\x8e\xc3\x86\x09\xa4\x40\xa6\x24\xee\x02\x33\x6d\xbe\xa9\x36\xb9\x0c\xb0\x52\xab\xc2\x59\x3f\xaa\x95\xad\x43\xa7\x60\xd1\x60\xa2\x8b\x85\xcc\xd3\x4e\xdc\xd9\xe5\xb2\xa6\xfd\x40\x0d\xf4\xa5\xe7\xe0\xea\x16\x79\xbb\x23\x8c\x2a\xf5\x91\x99\x12\x05\xf8\xb7\xf2\xdc\x85\x57\x33\x41\xd2\xb8\x38\xb0\x50\x53\x99\x6f\xc2\x89\x5b\x1b\xeb\x94\xc5\x8e\xe8\x61\x94\x88\x19\x6f\xfb\x2c\x05\x42\xab\x89\x82\xfd\x90\xa0\xe0\xc3\x1e\x78\xc8\x55\x07\xd4\xd2\xb4\x9a\x25\x21\x7f\xce\x30\x71\xbc\x01\x6f\x75\x77\x77\xdb\xdb\x3d\x59\xef\x97\x5c\x4f\xf7\x88\x6d\xe5\x90\x9d\x9e\x09\x7c\xd8\xe0\xc1\xaa\x61\x6f\x60\xde\xb0\xbd\x59\xef\x4a\x9d\xc7\x5c\x70\x5c\x98\x8f\x3d\x7b\xca\xe1\xa4\xd4\xde\x46\x0d\x5b\xe7\x34\xcf\x80\x89\x12\xf5\x2c\x93\x3c\x11\x76\xc6\xea\x3e\x32\x79\x8f\x53\xae\x6e\x39\xce\xef\xde\x5d\xd9\x62\x3e\x6d\x67\xd4\x8a\x3c\xcd\x6e\x2e\x58\xee\x26\xd7\xc2\x6d\xbd\xba\x0c\x16\x0e\xda\xd7\x2c\xba\xdd\xb0\x79\x4a\x7e\x9d\xf7\xce\xc4\x54\xca\x65\x49\x9a\xb0\xa0\xae\x04\xf1\xaa\x67\xdd\xc9\x89\xe3\xd0\xfd\x28\x19\xe5\xb7\x92\xd3\x8a\x44\xfb\x72\x2f\x25\x84\xc4\xb2\x4b\xec\x0a\xb7\xd5\xbf\x81\xac\x33\xb4\x37\x8b\x2f\x1a\xaf\x22\xa5\xcb\x7c\xb3\xc0\x3e\xc9\xb3\xb0\x9a\xfd\x04\x83\xb2\xb9\x16\x82\xe4\x07\x6c\x46\x40\x69\xaf\x24\x2f\x3e\x79\x1a\x71\x0d\x72\xa3\x9d\x88\x3d\x7b\x39\x16\x8f\x3f\x85\xe5\xfd\x0c\x58\xd2\xaf\x69\x35\xbe\x0e\x4a\xa8\x52\xd8\x0c\xe1\xf5\xfd\x26\xb9\xc5\x51\x98\x8b\x6c\x43\x9b\x9c\x1f\x37\x67\xd5\xb5\x57\xce\xef\x42\xab\x09\x9a\xf9\xd6\x4e\xbb\x6f\x55\x88\x27\x92\x6a\x3c\x8f\x69\x9a\xc9\xa4\xd9\x9e\xc7\x57\x1f\xd5\x56\xf2\x5e\x3f\xd1\x45\xca\xd9\x77\x2e\x28\x78\x8b\x63\x35\x3d\xaf\x74\x70\x62\xc3\xaa\x8a\x13\x15\xf7\xbb\xf9\x44\xa8\x82\xa6\xa9\xb3\x92\x91\x4d\x39\xb8\x38\x43\x39\x77\x89\x74\xae\xba\xb5\x26\x4e\xaf\xf5\xaa\xb7\xc1\xf8\xee\x51\xb4\xff\x5a\x55\xdc\xa3\x85\x47\xb0\x26\x67\xac\x7e\x96\xd7\xcc\x7d\x55\xe9\x9c\x33\x9e\x30\x4a\x27\xe6\x33\x6d\x7d\x44\xd8\xd8\x99\xc7\xaf\xed\xe0\x91\x5d\x7c\x07\x12\x3d\x16\xcd\xc7\xf6\x0c\xcb\xf4\xa4\xcc\x17\xd5\xb3\x35\x9e\x1e\xcd\x4e\x1a\xb7\xcd\x84\x5b\xad\xd1\xbe\x41\x3d\x53\xd1\xb4\xb9\x1a\xda\x1f\x5d\x17\x38\xe9\x3d\xee\x20\x78\x5f\x69\x4a\x32\x4a\xeb\xac\x95\xa1\x70\xdf\x87\x17\xfb\x8a\xa6\xde\x93\x3b\xd0\x9c\x31\xd6\x5f\xdc\x3d\xaa\xe6\x17\xe4\x73\xc1\x97\x65\x8e\x07\x9e\x24\xdd\xa4\x49\xf4\x54\x43\xb9\x5f\x56\x32\x56\x3e\x45\xad\x4f\x5a\xb2\x80\x11\x72\x7d\x49\xa4\x41\x29\x84\xa6\x74\x12\x0b\x3e\x4e\xb0\x6e\x20\x98\xa9\xc7\xf2\xfb\x22\x83\x94\x39\x3d\x8c\xe5\x79\x09\x04\xb3\xab\x08\xda\x87\x8a\x1d\x49\xf7\xc2\x31\xc4\x4c\x2a\xee\xc6\x65\x6c\xb8\x27\x83\xb4\xc7\x8d\x8e\x4f\x36\x63\x39\xf0\xca\x3e\x48\x10\xd8\x9a\x6e\x2c\xde\x78\xf6\xa6\x6a\xbf\x4d\x0d\x3a\x2b\xb7\xfe\xf1\x0a\xfa\x47\xc7\x5f\xe2\xa9\x33\x77\xab\x9a\x9d\x8b\xb6\xbb\x37\x22\x51\x9a\x2c\x69\xec\x90\x1c\xfd\x2c\x49\xa0\xe0\xfa\x1f\x60\x69\x45\x30\x8b\xf2\x45\xa0\x72\x90\x82\xf0\x31\x3a\x73\x54\x5d\x53\x4f\xc3\x80\x73\xc2\xa9\x7e\xf8\x58\xfa\xfd\x69\x61\x35\x94\x1b\x69\x2a\xbb\xd2\xd3\x08\x4d\x67\x70\xb0\xf1\xc1\xe3\x51\xdd\x3f\x91\xbe\xec\xdc\x09\x5a\xd5\xa4\x6f\xaf\x01\x3f\xc4\x4d\xf2\xc7\x33\x13\x27\xcd\xef\xcf\xcc\x38\x85\x53\x11\xff\x5f\x00\x00\x00\xff\xff\xab\xf1\x1d\x61\x53\x09\x00\x00") func configAppDevIniBytes() ([]byte, error) { return bindataRead( @@ -94,7 +94,7 @@ func configAppDevIni() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "config/app.dev.ini", size: 2226, mode: os.FileMode(420), modTime: time.Unix(1602208473, 0)} + info := bindataFileInfo{name: "config/app.dev.ini", size: 2387, mode: os.FileMode(420), modTime: time.Unix(1602727988, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -119,7 +119,7 @@ func configAppIni() (*asset, error) { return a, nil } -var _configAppTestIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4c\x52\xd7\xae\xa3\x4a\x16\x7d\xf7\xaf\x20\x1d\x8a\x0c\x23\xf9\x81\x0c\x06\x83\xb1\xc1\x06\xae\x5a\x2d\x42\x11\x4c\xce\x98\xaf\x1f\x9d\x73\x5b\xd3\xf3\xb6\x55\xb5\xd6\xae\x15\x2a\x85\xf1\x92\x9f\xe7\x71\x81\xa7\xd3\x3f\xcd\x67\x1a\xea\x5f\xa7\x34\x2e\xba\x69\x3e\x63\x18\xfe\x85\xe1\xe4\x17\x0e\xc0\x17\x0e\xe8\x53\x1a\xf7\xdd\x38\x9f\x09\xe2\x67\x5e\x26\x38\x9e\xd3\xf8\xf7\x08\x93\xae\xab\x7e\x4f\x4b\x0f\xc7\x6f\x48\x34\x4d\x5b\x37\xa6\xe7\x29\x5d\xe4\x98\xbb\xba\x8f\x72\x28\x36\xe8\xab\xfd\x1e\x81\x53\x1a\xb7\x51\x03\xff\xd2\x4e\xfd\x08\xb3\x72\x3f\xff\x59\x52\x97\x2b\xfc\x7d\x6a\xa2\x5d\x4f\x6b\x78\xc6\xc0\xf7\x68\xf7\xb0\x3d\x53\xe0\x74\xfa\x67\x86\x6d\x02\xdb\xf9\xd7\x69\x4a\x2b\xbe\xef\xf5\xf4\x8c\x91\x00\x90\x38\xc1\xd1\xd8\xa9\x4c\x61\x3b\x97\x59\x09\xc7\x73\x94\x36\x65\x5b\x4e\xf3\x18\xcd\xdd\x78\x82\x7b\x5f\x8e\xf0\x4c\x83\x53\x05\x3f\x67\x1c\x83\x11\x11\xc7\x11\x17\x13\x74\x06\x18\x8e\x03\x19\x91\xe1\x04\xcd\xe1\x24\x9d\x81\x94\x4b\x18\x90\x46\x80\x24\x19\x48\x25\x24\x49\x26\x1c\x85\x93\x80\x20\x39\x1a\x8b\x63\x3a\xa1\xb1\xd3\x04\x93\x11\xce\x7a\x7a\xe6\x0d\x5d\xb2\xc3\x3b\x1b\x56\xbc\xf6\x16\xe0\x74\x8c\xc3\xca\x05\x65\x2c\xbb\x87\xaa\x1e\x6e\xd1\xda\xc2\xf4\x07\x6d\xc0\xcf\x39\x06\x1c\x46\xf4\x66\x14\xea\xcd\xd6\x63\x58\x27\x59\x98\x13\x68\xd5\xbe\xc4\x78\xc9\x19\xf2\x78\x8a\xfe\x75\x84\x53\x38\xc0\x31\x96\xa2\xfe\xe7\xf7\xeb\x3b\x95\x5f\x3f\xea\x89\x88\x01\x31\x07\x33\x86\xcc\x18\x9c\x64\x38\x8a\x23\xd2\x04\xd2\x10\xc3\x71\x00\x00\x86\x9d\xd2\xae\x89\xca\xf6\xbb\x39\x8c\x26\x7f\x88\xfd\x32\x15\x5f\xcd\x67\x48\xea\x6e\x49\xbf\x92\xae\xf9\x1b\x08\x38\xcd\x23\x8c\xe6\xcf\x79\x9c\x9b\xfe\xcf\xb1\x5b\x36\xf0\xcc\xd2\x24\x00\x7f\xdf\x9f\x8a\x6e\x9c\x7f\xfd\x3f\xaf\x6b\x7f\x80\xcf\xa8\x2e\xd3\x33\xf6\x23\x2d\x21\xda\x8f\x5a\x49\x49\x37\xb3\x91\x6f\x24\xb9\x17\x9a\xdf\x3f\xea\xdf\x62\x7f\x9d\x96\xb1\x3e\x17\xf3\xdc\x4f\xff\x41\xd1\x19\x4e\x73\xd4\x97\x5f\x23\xfc\xb9\xfc\x4a\x5a\x34\xea\x4b\x74\xc5\x4e\xfd\x58\xae\xd1\x0c\x7f\x7f\x2f\xbc\xea\xba\xdc\x6d\xba\xc0\xf3\x86\xc8\x3b\x32\x7f\x58\xaf\xcf\x3b\x80\xc4\x30\x93\xc1\xdd\x95\x36\xde\xda\xa5\x9b\x65\xf2\x17\xce\x0d\x85\x45\x9b\x1e\xc3\xe3\x7d\xb9\x52\x02\x41\x65\xbc\xb0\x59\x44\xbe\x35\x94\x83\x3e\xc4\x03\xa5\xab\xdc\x70\x07\xf8\xc8\xc5\xe7\x4d\x09\x0a\x1b\x3d\x6c\x89\x56\x59\x83\x91\x2f\x66\xbe\x73\x54\xa8\x43\x5e\xe0\xe4\xea\x85\xec\x63\xa1\x48\xd2\x5c\x78\x21\x5f\xf1\x80\x38\xb4\x8b\x4d\x3f\x2a\xc5\xb0\x93\xd2\x54\x9e\x25\x47\x0a\xa9\x98\xaa\xb5\xa5\xd4\x6d\x24\x08\x03\x8f\xb0\xfe\x2a\xf6\x12\xf6\x64\x25\x25\x41\xb9\xa4\x8f\xa9\x32\x09\xd7\x36\x5f\xd8\x55\xae\xb6\x2a\x0e\x12\x28\xfa\x86\x77\xb5\xf6\xce\x0f\x50\x19\x4f\x14\xc8\x66\xf8\xfc\x54\xee\x54\x7f\xaf\x9c\xfc\x6e\xc6\x57\x06\xbc\x67\xf2\x23\xa8\xb6\xc4\xf6\xf1\x52\xd1\x59\xd2\x4a\x4c\x5e\xa8\xaf\xfc\xb8\x0e\x28\x4b\x52\x16\xb1\xe9\x8f\x87\xdb\xa3\x39\xef\xe4\x2c\x09\x08\xa5\x42\x58\xbe\x33\x11\xc5\xc8\x77\xaf\x7a\x7b\x76\x7f\xd3\x71\x7f\x4c\x7a\xa7\x01\x72\x5f\x2c\xbc\x4f\x5e\x80\xbf\x76\x84\xb6\xd0\xae\x7c\x0b\x83\xcf\xe0\x99\xb2\xaf\xba\xf8\x65\xa9\x9a\x02\x58\x8f\xca\xb2\x81\x42\x70\xfb\xa6\x4b\xbc\xc3\x0b\x7c\xa7\x0b\xbc\x23\xf2\xc3\x3d\xb8\xbd\x8a\x0a\xee\x81\x83\x1a\x31\xab\x22\x98\x35\x95\xbc\xe0\xed\x97\xe2\x9e\xe1\x5e\x08\xc3\x8b\x27\x6f\x94\x94\x18\x72\x50\x0c\xe8\x4e\x17\x62\xbf\x51\xa6\x69\xda\x83\x65\x91\xf5\x9b\x1d\x8c\xab\x57\x0b\xf2\x20\x42\x7e\xa3\xf0\x8a\xa8\xd5\x71\x9a\x27\x8d\x2a\x4b\x96\xa0\x9b\x95\x0e\xaa\x29\xfe\x08\xda\x41\x8b\xce\x9d\x8b\x5a\xd9\x0c\xaf\x00\x69\x9b\x51\x21\x79\x93\xda\x9f\xea\xd1\xe4\xe4\x73\xd6\xda\x44\x2a\xd9\x72\x96\x90\xde\x4f\x24\x22\xf6\xdf\x47\x96\x28\xc8\x63\x59\xae\xf4\x88\x38\x93\xf8\xa9\x72\x37\x41\xdf\x1b\x72\xa7\xd5\xc1\xd6\x56\x89\x64\x1b\xcf\x11\x75\x80\xfa\x1b\xfd\x7e\xf3\x2f\xcf\x2b\xc0\xfb\xee\xe3\xc2\x6a\x3a\x5b\x92\x24\x51\x4b\x85\x62\x28\x11\x22\x73\x65\x73\x75\xb9\x2b\x36\xbe\x8e\x6c\xad\xd4\xa5\xb3\x7d\x14\x2b\xdf\xc6\x5e\x46\xe2\xd1\x84\x57\x0b\x9a\xda\x81\x3d\xe8\xf5\xba\x65\xc3\x48\x8c\xe4\x75\x60\xd8\xcd\x2d\x8b\xee\x80\x08\x51\xe9\x13\x35\xa7\x32\x08\xee\xd5\xa5\x8f\x6e\x66\x0a\xc5\x69\x75\xd8\x52\xc9\x24\xae\x8d\x66\x66\x6b\x2d\x2d\x4f\x1c\xc1\x43\x08\x01\x31\xde\xf6\x45\x0c\xf9\x4e\x15\x78\xfb\x29\xb2\x7c\xc0\x0e\xc0\x83\xae\x32\xc2\x8e\x24\x95\x3c\x8d\xb8\x4b\x8e\x08\xd3\x1d\x78\x9b\x7b\xb8\xfb\xd1\x1d\xe9\xf6\xb8\x16\x7a\x76\xc4\x74\x27\x45\xf4\xfc\x4a\xd9\xa7\x0d\x9e\xb4\x12\x0d\x06\xe2\x8d\xfb\x9b\xf6\x6e\xc4\x65\x2a\x78\xc7\x65\x8b\x69\xa0\xb5\x82\x9d\xe5\xc6\xdb\x89\x71\xef\x9d\xf6\x15\x52\x71\xaa\x5c\x24\x9c\xc3\xa2\xde\xd8\xdc\x67\x2e\x1d\x49\xc6\x34\x1d\xc3\x04\xfd\xbb\xaf\x3a\x24\x20\xed\x9c\xd8\xa0\xa7\xda\xed\x15\x29\xdc\xf4\x56\xba\x9d\xd7\x54\xe1\xca\xb0\xf6\x2d\x8f\xef\x77\x64\x99\xd3\x7f\xf5\x3e\xa8\x84\xc8\x98\x3c\xcd\x52\x1a\x34\x35\x2f\xdc\xf4\xbc\xd7\x9c\x24\x89\xdc\x8f\x9c\x13\x41\x27\x3a\x9d\x80\x75\xbe\x7b\xad\x58\x16\x5b\x0f\x91\xde\xd8\x7d\x0b\xee\x20\xef\x0d\xf5\x4d\xa3\xab\xca\x29\x50\xee\xf3\xc0\x2c\x91\x4f\xfa\x2a\xad\xf6\xd0\xd8\xb0\x6a\x6f\x25\x2f\x06\x21\x9d\x63\xac\x78\xd4\xa2\x97\x68\x9e\x8a\xdd\xc2\xc2\xe8\x66\xec\xc8\x7d\xc7\xe2\xd0\x17\xbf\xbe\x5f\x21\x8d\x07\x0d\xa9\x24\xb7\x51\x8e\x14\x02\x59\x58\xf6\xf6\x7e\xe3\xcc\xea\xc8\xd4\x55\xb2\x59\x1b\x5f\x9e\x77\x67\xd3\x55\xbf\xe0\x0e\xbe\x53\x79\xd5\x7c\xab\xda\x11\x58\x35\xe4\xb0\xb4\x9e\x2e\x53\x96\xe5\x12\x6e\x76\x97\xc9\x1f\xe2\xc6\x4a\xdf\xdb\x27\xbe\x8a\x05\xfd\x2e\x78\x19\xed\x50\xa4\x21\x97\x8d\x0c\x35\x3a\xaa\xeb\x24\x55\xd0\xa0\x5f\x34\x4c\xe1\x55\x55\x59\xe4\x1c\x6f\xab\xd1\x45\x29\xc2\x79\x88\xb8\x73\xd3\xad\x2d\x75\x06\x75\x50\xbc\x9d\x4d\x1e\x1e\x41\x06\xfe\xa6\xa0\x1e\xc9\x3f\xc3\x2d\xbd\x20\xcd\xab\xba\xe5\xae\x5f\x67\x4b\x41\x79\xfc\x24\x6a\xd4\x67\xde\x87\x18\xb3\x91\x0b\x87\xde\xba\xd1\xc3\xfb\xe4\x01\x44\x72\x2a\xdb\x8f\xed\x19\x96\xe9\x89\x79\x20\x28\x17\x6b\xd2\x9e\xed\x81\x1b\xf7\xdd\x64\xf7\x46\x25\x03\x83\x78\x65\x82\x69\x33\x0d\x6b\x7f\x74\x9d\x67\xc4\xf7\x74\x80\xf0\x7d\x23\x09\xd1\xa8\xac\x8b\x5a\x45\xfc\xe3\x18\x7d\xda\x8f\xe7\xc1\x93\x7a\xd0\x5e\x10\x3a\x58\xdd\x23\xae\x17\x9f\xe5\x0a\x3e\x90\x24\x86\x03\x9e\x28\xde\xc5\x59\xf0\x14\x43\x7e\x5c\x37\x3c\x91\x3f\x65\xa3\xcf\x6a\xba\x82\x89\x65\x86\x0a\xcb\xc2\x8a\x8f\x4c\x51\x13\x4a\x2e\x49\x91\x7e\xc4\xa8\x79\x40\x8a\xc7\x2a\x81\x8c\xd2\x9e\xc6\xfa\xba\x86\xbc\xd9\xd7\x18\x19\xb0\xb2\x1d\x8b\x8f\xd2\x31\x84\x5c\x2c\x1f\xc6\x75\x6a\x99\x17\x05\xd5\xe7\x9d\x4c\x34\x9b\xb2\x1c\xf6\x46\x3f\x71\x10\xda\xaa\x6e\xac\xde\x74\xf1\xe6\xfa\xb8\xcf\x2d\xbc\xc8\xf7\xe1\xe9\x87\xc3\xb3\xe7\xae\xc9\xdc\x9b\x87\x55\x2f\xce\x55\x3d\xdc\x3b\x96\xca\x6d\x9e\xb6\x76\x84\x4f\x41\x9e\xa6\x2c\xef\x06\x1f\x60\xa9\x65\xb8\x08\xd2\x95\x27\x0a\x90\x81\xe8\x39\x39\x4b\x5c\xdf\x32\x4f\x45\x80\xa3\xa1\xc4\x30\x7e\x2c\xfd\xf1\xb2\x90\x86\x95\x5a\x71\xae\xfa\xca\x53\x31\x55\xa7\x50\xb0\x73\xe1\xf3\x59\x3f\x3e\xb1\xbe\x1e\x8c\xc6\x5a\xf5\xac\xef\xfe\x88\x9e\xfe\x1b\x00\x00\xff\xff\x27\x06\x61\x4b\xce\x08\x00\x00") +var _configAppTestIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\x95\xd9\xce\xa3\xc8\xb2\x85\xef\xfd\x2a\x48\x45\x32\x27\x47\xf2\x05\xb3\x31\x18\x8c\x0d\xb6\xa1\x55\x2a\x31\x24\x83\x99\x67\xcc\xd3\x1f\xfd\x7f\xd5\xee\xdd\xbd\xef\x22\xd1\x22\xbe\x5c\xb9\x42\x8a\x04\x45\x73\x76\x9c\x86\x19\x1d\x0e\x7f\xd5\x9f\xb1\xaf\x7e\x1e\x92\x28\x6f\xc7\xe9\x48\x10\xe4\x0f\x82\xa4\x7f\x90\x00\xfc\x20\x01\x7b\x48\xa2\xae\x1d\xa6\x23\x45\x7d\xd7\xf3\x88\x86\x63\x12\xfd\x1a\x50\xdc\xb6\xe5\xaf\x71\xee\xd0\xf0\x25\x09\xc7\x71\x6d\x87\xe4\x38\x26\xb3\x12\xf1\x17\xf7\x5e\xf4\xf9\x8a\x5e\x5a\xb7\x85\xe0\x90\x44\x4d\x58\xa3\xff\xfe\x76\xe8\x06\x94\x16\xdb\xf1\x4f\x93\xaa\x58\xd0\xaf\x43\x1d\x6e\x7a\x52\xa1\x23\x01\xbe\x4a\xbb\x43\xcd\x91\x01\x87\xc3\x5f\x13\x6a\x62\xd4\x4c\x3f\x0f\x63\x52\x0a\x5d\xa7\x27\x47\x82\x06\x80\x26\x29\x9e\x25\x0e\x45\x82\x9a\xa9\x48\x0b\x34\x1c\xc3\xa4\x2e\x9a\x62\x9c\x86\x70\x6a\x87\x03\xda\xba\x62\x40\x47\x16\x80\x43\x89\x3e\x47\x92\x40\x21\x15\x45\x21\x1f\x51\x6c\x0a\x38\x9e\x07\x29\x95\x92\x14\xcb\x93\x34\x9b\x82\x84\x8f\x39\x90\x84\x80\xa6\x39\xc4\xc4\x34\x4d\xc7\x3c\x43\xd2\x80\xa2\x79\x96\x88\x22\x36\x66\x89\xc3\x88\xe2\x01\x4d\x7a\x72\x14\x0c\x5d\xb6\x83\x1b\x0c\x4a\xe1\xf4\x16\xd1\xb8\x0f\xfd\xc2\xfb\x45\xa4\xb8\xbb\xa6\xed\x6e\xde\xd8\xe2\xf8\x47\x6d\xa0\xcf\x31\x02\x3c\x41\x75\x66\x18\xe8\xf5\xda\x11\x44\x2b\x5b\x84\xe3\x9f\xca\x6d\x8e\xc8\x82\x37\x94\xe1\x10\xfe\xb6\x44\x32\x24\x20\x09\xc8\x30\x7f\x1b\xfe\xf1\xf5\x2c\x3f\x0f\xdd\x3c\xe6\xee\x80\xc2\xe9\x73\x1c\xa6\xba\xfb\x3e\x2b\xbf\xcd\x41\x96\x06\xe0\xfb\xc3\x17\x89\x0a\x39\x10\xf1\x28\xe5\xe8\x94\x23\x69\x8e\x67\x78\x2a\x89\x11\x8b\x08\x92\x04\x00\x10\xc4\xb7\x50\x6e\xeb\xb0\x68\x8e\x5f\xad\xbf\x8e\x3f\x06\xf4\x1d\xc1\x8f\xb8\x39\x74\x55\xf8\xf9\x17\xa8\x0a\x3f\xff\x06\x55\xe1\xe7\x0b\x04\x93\x24\x41\x64\xc8\xb1\x3c\x1f\xf2\x29\x0f\xc9\x14\x02\x9e\x05\x14\x4d\x91\x90\x48\xc8\xe4\x5b\xf8\x07\xf4\x55\xfe\x2f\xe4\x3e\xa7\x5f\xe1\xff\x89\xc8\x2d\xea\xff\x00\xfe\x76\x3e\xe6\xed\x30\xfd\xfc\x67\x86\x6d\xf3\x2d\x7c\x84\x55\x91\x1c\x89\xef\x48\x63\xaa\xf9\x68\xa5\x1c\xb7\x13\x0c\x5f\x46\x9c\x79\x81\xf9\x35\xcc\xbf\x67\xea\xe7\x61\x1e\xaa\x63\x3e\x4d\xdd\xf8\x7f\x38\x3e\xa1\x71\x0a\xbb\xe2\x1f\x17\xc1\xc3\xae\xc0\x17\xe2\xd0\x0d\xc5\x12\x4e\xe8\xd7\x57\xc3\x8b\xae\x2b\xed\xaa\x8b\x82\x60\x48\x82\xa3\x08\xbb\xf5\xfc\xbc\x7d\x44\xf5\x13\xed\xdf\x5c\x79\x15\xac\x4d\xbe\x5a\xa6\x70\xe6\xdd\x40\x9c\x4f\xe3\xbd\xbf\xbf\xcf\x17\x46\xa4\x98\x54\x10\x57\x8b\xca\xd6\x9a\x71\xf0\xbb\xb4\xe3\x6c\x99\x19\x6e\x8f\xee\x99\xf4\xb8\xaa\x7e\x6e\xe3\xbb\x2d\xb3\x1a\x34\x38\xe5\x6c\x66\x1b\xcf\x04\x3a\x12\x44\x5e\x29\x9f\xd8\x36\xe4\xaa\x2c\x4f\xb9\x17\x08\xa5\x00\xa8\xfd\x74\xb6\xd9\x7b\xa9\x1a\x76\x5c\x98\xea\xa3\xe0\x69\x31\x91\x12\xad\xb2\xd4\xaa\x09\x45\xb1\x17\x30\xf8\x5a\xa4\x4e\x26\x1e\x50\x56\x63\x9c\x8f\xbb\x88\x29\xe2\x60\x69\xb2\x19\x2e\x4a\xb9\x96\x91\x1f\x23\xe9\x65\x78\x17\x6b\x6b\x5f\x3e\xae\x90\xb1\x8a\x60\x4a\x4e\x0f\xf5\xc6\x74\xb7\xd2\xc9\x6e\x66\x74\xe1\xc0\x7b\xa2\x3f\xa2\x66\xcb\xb0\x8b\xe6\x92\x4d\xe3\x46\xe6\xb2\x5c\x7b\x66\xfb\xa5\xc7\x21\xcd\x58\xd4\xaa\xdf\xef\x6e\x87\x67\x82\x93\x41\x1a\x50\x6a\x89\x41\xa1\x35\x31\xd5\xc8\x36\xaf\x7c\x7b\x76\x77\xd5\xc9\xd7\x10\x77\x4e\x0d\x94\x2e\x9f\x85\x17\x7d\x06\xaf\xa5\xa5\x4e\x33\xeb\x2a\xd7\xc0\xff\xf4\x9e\xa9\xbc\x34\x97\x3c\xcf\x65\x9d\x03\xeb\x5e\x5a\x36\x50\x29\x7e\x5b\x75\x59\x70\x04\x51\x68\x75\x51\x70\x24\xa1\xbf\xf9\xd7\x67\x5e\xa2\xcd\x77\x70\x23\x82\x1a\x46\x58\x63\x21\x88\xde\x76\xce\x6f\x29\xe9\x05\x28\x38\x7b\xca\xca\xc8\xb1\xa1\xf8\x79\x8f\x6f\x6c\x2e\x75\x2b\x63\x9a\xa6\xdd\x5b\x16\x5d\xbd\x61\x6f\x5c\xbc\x4a\x54\x7a\x09\x09\x2b\x43\x96\x54\xa5\x0d\xe3\x34\x9e\x98\xa2\x80\x14\x5b\x2f\xac\x5f\x8e\xd1\x47\x3c\xed\xac\xe4\xdc\xf8\xb0\x51\xcc\xe0\x02\xb0\xa6\x1e\x54\x5a\x30\x99\xed\xa1\xed\x75\x46\x3f\xa6\x53\x13\xcb\x05\x2c\x26\x19\xeb\x5e\xb1\x4c\x45\xaf\xf7\x9e\xc6\x2a\x76\x9f\xe7\x0b\x3b\x60\xce\x28\x7d\xca\xcc\x8d\xf1\xf7\x8a\xdd\x58\xad\xb7\x4f\x8b\x4c\xc3\xda\x73\x24\x1d\xe0\xaf\x95\x7d\xbf\x85\xa7\xe7\xe5\xe0\x7d\x7b\x91\xe2\x62\x3a\x6b\x1c\xc7\x61\xc3\x04\x52\x20\x53\x12\x77\x81\x99\x36\xdf\x54\x9b\x5c\x06\x58\xa9\x55\xe1\xac\x1f\xd5\xca\xd6\xa1\x53\xb0\x68\x30\xd1\xc5\x42\xe6\x69\x27\xee\xec\x72\x59\xd3\x7e\xa0\x06\xfa\xd2\x73\x70\x75\x8b\xbc\xdd\x11\x46\x95\xfa\xc8\x4c\x89\x02\xfc\x5b\x79\xee\xc2\xab\x99\x20\x69\x5c\x1c\x58\xa8\xa9\xcc\x37\xe1\xc4\xad\x8d\x75\xca\x62\x47\xf4\x30\x4a\xc4\x8c\xb7\x7d\x96\x02\xa1\xd5\x44\xc1\x7e\x48\x50\xf0\x61\x0f\x3c\xe4\xaa\x03\x6a\x69\x5a\xcd\x92\x90\x3f\x67\x98\x38\xde\x80\xb7\xba\xbb\xbb\xed\xed\x9e\xac\xf7\x4b\xae\xa7\x7b\xc4\xb6\x72\xc8\x4e\xcf\x04\x3e\x6c\xf0\x60\xd5\xb0\x37\x30\x6f\xd8\xde\xac\x77\xa5\xce\x63\x2e\x38\x2e\xcc\xc7\x9e\x3d\xe5\x70\x52\x6a\x6f\xa3\x86\xad\x73\x9a\x67\xc0\x44\x89\x7a\x96\x49\x9e\x08\x3b\x63\x75\x1f\x99\xbc\xc7\x29\x57\xb7\x1c\xe7\x77\xef\xae\x6c\x31\x9f\xb6\x33\x6a\x45\x9e\x66\x37\x17\x2c\x77\x93\x6b\xe1\xb6\x5e\x5d\x06\x0b\x07\xed\x6b\x16\xdd\x6e\xd8\x3c\x25\xbf\xef\x7b\x67\x62\x2a\xe5\xb2\x24\x4d\x58\x50\x57\x82\x78\xd5\xb3\xee\xe4\xc4\x71\xe8\x7e\x94\x8c\xf2\x5b\xc9\x69\x45\xa2\x7d\xb9\x97\x12\x42\x62\xd9\x25\x76\x85\xdb\xea\xdf\x40\xd6\x19\xda\x9b\xc5\x17\x8d\x57\x91\xd2\x65\xbe\x59\x60\x9f\xe4\x59\x58\xcd\x7e\x82\x41\xd9\x5c\x0b\x41\xf2\x03\x36\x23\xa0\xb4\x57\x92\x17\x9f\x3c\x8d\xb8\x06\xb9\xd1\x4e\xc4\x9e\xbd\x1c\x8b\xc7\x9f\xc2\xf2\x7e\x06\x2c\xe9\xd7\xb4\x1a\x5f\x07\x25\x54\x29\x6c\x86\xf0\xfa\x7e\x93\xdc\xe2\x28\xcc\x45\xb6\xa1\x4d\xce\x8f\x9b\xb3\xea\xda\x2b\xe7\x77\xa1\xd5\x04\xcd\x7c\x6b\xa7\xdd\xb7\x2a\xc4\x13\x49\x35\x9e\xc7\x34\xcd\x64\xd2\x6c\xcf\xe3\xab\x8f\x6a\x2b\x79\xaf\x9f\xe8\x22\xe5\xec\x3b\x17\x14\xbc\xc5\xb1\x9a\x9e\x57\x3a\x38\xb1\x61\x55\xc5\x89\x8a\xfb\xdd\x7c\x22\x54\x41\xd3\xd4\x59\xc9\xc8\xa6\x1c\x5c\x9c\xa1\x9c\xbb\x44\x3a\x57\xdd\x5a\x13\xa7\xd7\x7a\xd5\xdb\x60\x7c\xf7\x28\xda\x7f\xad\x2a\xee\xd1\xc2\x23\x58\x93\x33\x56\x3f\xcb\x6b\xe6\xbe\xaa\x74\xce\x19\x4f\x18\xa5\x13\xf3\x99\xb6\x3e\x22\x6c\xec\xcc\xe3\xd7\x76\xf0\xc8\x2e\xbe\x03\x89\x1e\x8b\xe6\x63\x7b\x86\x65\x7a\x52\xe6\x8b\xea\xd9\x1a\x4f\x8f\x66\x27\x8d\xdb\x66\xc2\xad\xd6\x68\xdf\xa0\x9e\xa9\x68\xda\x5c\x0d\xed\x8f\xae\x0b\x9c\xf4\x1e\x77\x10\xbc\xaf\x34\x25\x19\xa5\x75\xd6\xca\x50\xb8\xef\xc3\x8b\x7d\x45\x53\xef\xc9\x1d\x68\xce\x18\xeb\x2f\xee\x1e\x55\xf3\x0b\xf2\xb9\xe0\xcb\x32\xc7\x03\x4f\x92\x6e\xd2\x24\x7a\xaa\xa1\xdc\x2f\x2b\x19\x2b\x9f\xa2\xd6\x27\x2d\x59\xc0\x08\xb9\xbe\x24\xd2\xa0\x14\x42\x53\x3a\x89\x05\x1f\x27\x58\x37\x10\xcc\xd4\x63\xf9\x7d\x91\x41\xca\x9c\x1e\xc6\xf2\xbc\x04\x82\xd9\x55\x04\xed\x43\xc5\x8e\xa4\x7b\xe1\x18\x62\x26\x15\x77\xe3\x32\x36\xdc\x93\x41\xda\xe3\x46\xc7\x27\x9b\xb1\x1c\x78\x65\x1f\x24\x08\x6c\x4d\x37\x16\x6f\x3c\x7b\x53\xb5\xdf\xa6\x06\x9d\x95\x5b\xff\x78\x05\xfd\xa3\xe3\x2f\xf1\xd4\x99\xbb\x55\xcd\xce\x45\xdb\xdd\x1b\x91\x28\x4d\x96\x34\x76\x48\x8e\x7e\x96\x24\x50\x70\xfd\x0f\xb0\xb4\x22\x98\x45\xf9\x22\x50\x39\x48\x41\xf8\x18\x9d\x39\xaa\xae\xa9\xa7\x61\xc0\x39\xe1\x54\x3f\x7c\x2c\xfd\xfe\xb4\xb0\x1a\xca\x8d\x34\x95\x5d\xe9\x69\x84\xa6\x33\x38\xd8\xf8\xe0\xf1\xa8\xee\x9f\x48\x5f\x76\xee\x04\xad\x6a\xd2\xb7\xd7\x80\x1f\xe2\x26\xf9\xd7\x9a\x89\x93\xe6\x9f\x6b\x66\x9c\xc2\xa9\x88\xff\x3f\x00\x00\xff\xff\xf1\xdf\xbe\x64\x6e\x09\x00\x00") func configAppTestIniBytes() ([]byte, error) { return bindataRead( @@ -134,7 +134,7 @@ func configAppTestIni() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "config/app.test.ini", size: 2254, mode: os.FileMode(420), modTime: time.Unix(1602207728, 0)} + info := bindataFileInfo{name: "config/app.test.ini", size: 2414, mode: os.FileMode(420), modTime: time.Unix(1602487283, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/app/lib/recook/trend.go b/app/lib/recook/trend.go index 7876b0c..c502230 100644 --- a/app/lib/recook/trend.go +++ b/app/lib/recook/trend.go @@ -47,6 +47,9 @@ type TrendItem struct { UpdatedAt string `json:"updatedAt"` Short Short `json:"short"` Praise uint `json:"praise"` + IsPraise uint `json:"isPraise"` + TopicId uint `json:"topicId"` + TopicName string `json:"topicName"` } type TrendList struct { List []TrendItem `json:"list"` diff --git a/app/logic/goods/cupboard.go b/app/logic/goods/cupboard.go index 18c180c..0098658 100644 --- a/app/logic/goods/cupboard.go +++ b/app/logic/goods/cupboard.go @@ -50,6 +50,13 @@ func (c *Cupboard) Delete(uid uint, ids []int) (err bool) { // @Title 添加会员橱柜数据 // @Param uid int true "会员id" -func (c *Cupboard) Add(uid int, ids []int) (err error) { - return +func (c *Cupboard) Add(userId uint, goodsIds []uint) int64 { + data := []goods.GoodsWindow{} + for _, goodsId := range goodsIds { + data = append(data, goods.GoodsWindow{ + UserId: userId, + GoodsId: goodsId, + }) + } + return (&goods.GoodsWindow{}).CreateAll(&data) } diff --git a/app/logic/live/im.go b/app/logic/live/im.go index 44bc35f..8479e20 100644 --- a/app/logic/live/im.go +++ b/app/logic/live/im.go @@ -1,6 +1,7 @@ package live import ( + "encoding/json" "errors" "fmt" "live/app/lib/config" @@ -13,6 +14,11 @@ import ( type im struct { } +const ( + LiveGroupMsgTypeExplain = "Explain" + LiveGroupMsgTypeUnExplain = "UnExplain" +) + var ImLogic = &im{} type UserInfo struct { @@ -62,3 +68,15 @@ func (i *im) NoLoginUserInfo() (err error, userInfo UserInfo) { } } } + +type LiveGroupMessage struct { + Type string `json:"type"` + Data interface{} `json:"data"` +} + +// @Title 直播群消息 +func (i *im) SendLiveGroupMessage(liveRoomId uint, messageType string, data interface{}) { + liveRoom := (&live2.LiveRoom{}).GetLiveById(liveRoomId) + strData, _ := json.Marshal(LiveGroupMessage{Type: messageType, Data: data}) + tencent.Im.SendLiveGroupMessage(liveRoom.GroupId, string(strData)) +} diff --git a/app/logic/live/live.go b/app/logic/live/live.go index 2e64df5..e6d3c15 100644 --- a/app/logic/live/live.go +++ b/app/logic/live/live.go @@ -9,6 +9,7 @@ import ( "live/app/lib" "live/app/lib/recook" "live/app/lib/tencent" + "live/app/logic/goods" live2 "live/app/model/live" "live/app/model/user" "strconv" @@ -58,6 +59,7 @@ func (l live) Start(userId uint, title, cover string, topic uint, goodsIds []uin liveItemModel.SetDb(tx) liveItem := live2.LiveItem{ UserId: userId, + RoomId: liveRoom.Id, MainGoodsId: goodsIds[0], Title: title, Cover: cover, @@ -86,6 +88,10 @@ func (l live) Start(userId uint, title, cover string, topic uint, goodsIds []uin if row <= 0 { return errors.New("网络异常") } + + // 加入橱窗 + (&goods.Cupboard{}).Add(userId, goodsIds) + liveDataModel := &live2.LiveData{} liveData := live2.LiveData{ UserId: userId, diff --git a/app/logic/short/short.go b/app/logic/short/short.go index 9e2ac21..ecb53a9 100644 --- a/app/logic/short/short.go +++ b/app/logic/short/short.go @@ -60,13 +60,17 @@ func (s *Short) Publish(userId, goodsId, topicId uint, fileId, content string, l type TopicInfoItem struct { recook.ReplyUserItem - Content string `json:"content"` - CoverUrl string `json:"coverUrl"` - TrendId uint `json:"trendId"` - OriginId uint `json:"originId"` - TrendType int `json:"trendType"` - Praise uint `json:"praise"` - IsPraise int `json:"isPraise"` + Content string `json:"content"` + CoverUrl string `json:"coverUrl"` + TrendId uint `json:"trendId"` + OriginId uint `json:"originId"` + TrendType int `json:"trendType"` + Praise uint `json:"praise"` + IsPraise int `json:"isPraise"` + Goods recook.TrendGoods `json:"goods"` + MediaUrl string `json:"mediaUrl"` + TopicId uint `json:"topicId"` + TopicName string `json:"topicName"` } func (s *Short) List(userId uint, page lib.Page) (result *[]TopicInfoItem, count int64, err error) { @@ -105,9 +109,15 @@ func (s *Short) ListByTopicId(userId, topicId uint, page lib.Page) (result *[]To func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoItem) (err error) { userIds := []uint{} shortIds := []uint{} + goodsIds := []uint{} + topicIds := []uint{} for _, list := range lists { userIds = append(userIds, list.UserId) shortIds = append(shortIds, list.Id) + goodsIds = append(goodsIds, list.GoodsId) + if list.TopicId > 0 { + topicIds = append(topicIds, list.TopicId) + } } // 获取会员信息 @@ -120,6 +130,15 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI userMap[userItem.UserId] = userItem } + // 获取话题信息 + topicMap := map[uint]topic2.Topic{} + if len(topicIds) > 0 { + topics := (&topic2.Topic{}).GetlistByIds(topicIds) + for _, item := range topics { + topicMap[item.Id] = item + } + } + // 获取会员动态信息 trendLists := recook.Trend.Infos(shortIds, user.TREND_TYPE_short) trendIds := []uint{} @@ -129,6 +148,9 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI trendMap[trendInfo.OriginId] = trendInfo } + // 获取商品信息 + goodsInfos := recook.Trend.GetGoods(goodsIds) + // 获取动态统计信息 userTrendDataModel := &user2.UserTrendData{} userTrendDataLists := userTrendDataModel.GetListByTrendIds(trendIds) @@ -162,6 +184,10 @@ func (s *Short) formtList(userId uint, lists []short.Short, result *[]TopicInfoI TrendType: trendInfo.TrendType, Praise: userTrendDataMap[trendInfo.Id].Praise, IsPraise: hasPraise, + Goods: goodsInfos[list.GoodsId], + MediaUrl: list.MediaUrl, + TopicId: list.TopicId, + TopicName: topicMap[list.TopicId].Title, }) } return diff --git a/app/logic/user/trend.go b/app/logic/user/trend.go index d91dc79..78df477 100644 --- a/app/logic/user/trend.go +++ b/app/logic/user/trend.go @@ -4,6 +4,7 @@ import ( "live/app/lib" "live/app/lib/recook" "live/app/model/short" + "live/app/model/topic" "live/app/model/user" ) @@ -16,7 +17,7 @@ type Trend struct { } // @Title 获取动态列表 -func (t *Trend) GetList(userId uint, page lib.Page) *recook.TrendList { +func (t *Trend) GetList(loginUserId, userId uint, page lib.Page) *recook.TrendList { // 获取动态列表及图文消息 list := recook.Trend.GetList(userId, page.GetPage(), page.GetLimit()) shortIds := []uint{} @@ -37,25 +38,51 @@ func (t *Trend) GetList(userId uint, page lib.Page) *recook.TrendList { for _, item := range trendDataLists { trendDataMap[item.TrendId] = item } + + // 获取是否点赞 + userTrendPraiseMap := map[uint]uint{} + if loginUserId > 0 { + userTrendPraiseModel := &user.UserTrendPraise{} + userTrendPraises := userTrendPraiseModel.GetPraiseByUserIdAndTrendIds(loginUserId, trendIds) + for _, praise := range userTrendPraises { + userTrendPraiseMap[praise.TrendId] = 1 + } + } + for i, item := range list.List { list.List[i].Praise = trendDataMap[item.ID].Praise + list.List[i].IsPraise = userTrendPraiseMap[item.ID] } - if len(shortIds) > 0 { shortModel := &short.Short{} shortList := shortModel.GetByUserIdAndIds(userId, shortIds) goodsIds := []uint{} + topicIds := []uint{} for _, shortItem := range shortList { goodsIds = append(goodsIds, shortItem.GoodsId) + if shortItem.TopicId > 0 { + topicIds = append(topicIds, shortItem.TopicId) + } } goodsInfos := recook.Trend.GetGoods(goodsIds) + // 获取话题信息 + topicMap := map[uint]topic.Topic{} + if len(topicIds) > 0 { + topics := (&topic.Topic{}).GetlistByIds(topicIds) + for _, item := range topics { + topicMap[item.Id] = item + } + } + for _, shortItem := range shortList { trendInfo := trendMap[shortItem.Id] trendInfo.Goods = goodsInfos[shortItem.GoodsId] trendInfo.Content = shortItem.Content trendInfo.Short.CoverUrl = shortItem.CoverUrl trendInfo.Short.MediaUrl = shortItem.MediaUrl + trendInfo.TopicId = shortItem.TopicId + trendInfo.TopicName = topicMap[shortItem.TopicId].Title } } return list diff --git a/app/model/goods/goodsWindow.go b/app/model/goods/goodsWindow.go index d51d735..546cf6a 100644 --- a/app/model/goods/goodsWindow.go +++ b/app/model/goods/goodsWindow.go @@ -2,6 +2,7 @@ package goods import ( "github.com/golangkit/formatime" + "gorm.io/gorm/clause" "live/app/lib/db" ) @@ -24,6 +25,14 @@ func (g *GoodsWindow) Create(goodsWindow *GoodsWindow) uint { return 0 } +// 批量插入 忽略重复 +func (g *GoodsWindow) CreateAll(goodsWindows *[]GoodsWindow) int64 { + if len(*goodsWindows) == 0 { + return 0 + } + return g.GetDb().Clauses(clause.OnConflict{DoNothing: true}).Create(goodsWindows).RowsAffected +} + // @Title 通过会员id获取数据 // @Param userId uint true "会员id" func (g *GoodsWindow) GetListByUserId(userId uint, start, limit int) *[]GoodsWindow { diff --git a/app/model/live/liveGoods.go b/app/model/live/liveGoods.go index 2c0dd29..d49db5c 100644 --- a/app/model/live/liveGoods.go +++ b/app/model/live/liveGoods.go @@ -44,7 +44,7 @@ func (l *LiveGoods) UnExplain(liveItemId uint) int64 { if liveItemId == 0 { return 0 } - return l.GetDb().Model(&LiveGoods{LiveItemId: liveItemId}).Update("is_explain", 0).RowsAffected + return l.GetDb().Model(&LiveGoods{}).Where("live_item_id = ?", liveItemId).Update("is_explain", 0).RowsAffected } // 讲解 @@ -52,5 +52,5 @@ func (l *LiveGoods) Explain(liveItemId, goodsId uint) int64 { if liveItemId == 0 { return 0 } - return l.GetDb().Model(&LiveGoods{LiveItemId: liveItemId, GoodsId: goodsId}).Update("is_explain", 1).RowsAffected + return l.GetDb().Model(&LiveGoods{}).Where("live_item_id = ? and goods_id = ?", liveItemId, goodsId).Update("is_explain", 1).RowsAffected } diff --git a/app/model/live/liveItem.go b/app/model/live/liveItem.go index ea742af..82fb7e9 100644 --- a/app/model/live/liveItem.go +++ b/app/model/live/liveItem.go @@ -14,7 +14,9 @@ type LiveItem struct { db.BaseModel Id uint `gorm:"column:id" json:"id"` UserId uint `gorm:"column:user_id" json:"userId"` + RoomId uint `gorm:"column:room_id" json:"roomId"` MainGoodsId uint `gorm:"column:main_goods_id" json:"mainGoodsId"` + GoodsCount uint `gorm:"column:goods_count" json:"goodsCount"` Title string `gorm:"column:title" json:"title"` Cover string `gorm:"column:cover" json:"cover"` Topic uint `gorm:"column:topic" json:"topic"` @@ -61,7 +63,19 @@ func (l *LiveItem) GetListByTime(userId uint, startTime, endTime formatime.Secon } // @Title 当前直播场次信息 -func (l *LiveItem) GetUserList(userId uint, start, limit int) (result []LiveItem) { +func (l *LiveItem) GetUserListFinish(userId uint, start, limit int) (result []LiveItem) { l.GetDb().Model(&LiveItem{}).Find(&result, "user_id = ? and `status` = ?", userId, LIVE_STATUS_finish) return } + +// @Title 当前直播场次信息 +func (l *LiveItem) GetUserListTotal(userId uint) (result int64) { + l.GetDb().Model(&LiveItem{}).Where("user_id = ?", userId).Count(&result) + return +} + +// @Title 当前直播场次信息 +func (l *LiveItem) GetUserList(userId uint, start, limit int) (result []LiveItem) { + l.GetDb().Model(&LiveItem{}).Order("id desc").Find(&result, "user_id = ?", userId) + return +} diff --git a/app/model/live/liveRoom.go b/app/model/live/liveRoom.go index c7b1f2f..09a1637 100644 --- a/app/model/live/liveRoom.go +++ b/app/model/live/liveRoom.go @@ -27,6 +27,17 @@ func (l *LiveRoom) Create(liveRoom *LiveRoom) uint { } func (l *LiveRoom) GetLiveByUserId(userId uint) (result LiveRoom) { + if userId <= 0 { + return + } l.GetDb().First(&result, "user_id = ?", userId) return } + +func (l *LiveRoom) GetLiveById(id uint) (result LiveRoom) { + if id <= 0 { + return + } + l.GetDb().First(&result, "id = ?", id) + return +} diff --git a/app/router/router.go b/app/router/router.go index eedf3cd..109aa3c 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -58,7 +58,7 @@ func Router(router *gin.Engine) { } trendC := &user.Trend{} - userR.POST("trend/list", trendC.List) // 会员动态列表 + userR.POST("trend/list", middleware.BothAuth(), trendC.List) // 会员动态列表 commentC := &trend.Comment{} userR.POST("trend/comment/list", middleware.BothAuth(), commentC.List) // 评论列表 @@ -71,6 +71,9 @@ func Router(router *gin.Engine) { praiseC := &trend.Praise{} userR.POST("trend/praise/add", middleware.Auth(), praiseC.Add) // 动态点赞 userR.POST("trend/praise/cancel", middleware.Auth(), praiseC.Cancel) // 动态取消点赞 + + liveC := user.Live{} + userR.POST("live/list", liveC.UserList) // 会员直播列表 } // 订单 orderR := liveRouter.Group("/order") diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..6bf6765 --- /dev/null +++ b/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +echo "编译中" +go-bindata -o=./app/lib/asset/asset.go -pkg=asset config/... + +# shellcheck disable=SC2006 +DIR=`dirname "$0"` +# shellcheck disable=SC2164 +# shellcheck disable=SC2086 +cd $DIR + +if [[ -f "./bin/recook" ]];then + echo "删除原来执行文件..." + rm ./bin/recook +fi + +GOPROXY=https://goproxy.cn GOSUMDB=off GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/recook_live +echo "🎄🎄🎄🎄🎄🎄🎄🎄编译完成🎄🎄🎄🎄🎄🎄🎄🎄🎄" + + + + + + + + + + + + \ No newline at end of file