diff --git a/app/controller/live/live.go b/app/controller/live/live.go index 938da51..69fadec 100644 --- a/app/controller/live/live.go +++ b/app/controller/live/live.go @@ -6,6 +6,7 @@ import ( "live/app/common" "live/app/lib" "live/app/lib/back" + "live/app/lib/config" "live/app/lib/recook" "live/app/lib/tencent" "live/app/lib/tools" @@ -90,6 +91,14 @@ func (l *Live) List(c *gin.Context) { back.Suc(c, "操作成功", result) } +// @Title live sdk License +func (l *Live) License(c *gin.Context) { + back.Suc(c, "操作成功", gin.H{ + "key": config.Config.Section("tencent.live.license").Key("key").String(), + "licenseUrl": config.Config.Section("tencent.live.license").Key("licenseUrl").String(), + }) +} + type liveInfo struct { LiveItemId uint `json:"liveItemId"` PushUrl string `json:"pushUrl"` @@ -107,8 +116,10 @@ type liveInfo struct { func (l *Live) Info(c *gin.Context) { userId := common.GetUserId(c) liveRoom := (&live2.LiveRoom{}).GetLiveByUserId(userId) + userData := &user.UserData{} + udata := userData.GetByUserId(userId) isFirst := 1 - if liveRoom.Id > 0 { + if udata.LiveTreaty == 1 { isFirst = 0 } liveItem := (&live2.LiveItem{}).GetLiveItemIng(userId) @@ -165,6 +176,33 @@ func (l *Live) Info(c *gin.Context) { back.Suc(c, "操作成功", reply) } +// @Title 同意协议 +func (l *Live) Agree(c *gin.Context) { + userId := common.GetUserId(c) + userDataModel := &user.UserData{} + udata := userDataModel.GetByUserId(userId) + if udata.Id > 0 { + if udata.LiveTreaty != user.LiveTreatyAgree { + row := userDataModel.Treaty(userId) + if row <= 0 { + back.Fail(c, "操作失败") + return + } + } + } else { + data := user.UserData{ + UserId: userId, + LiveTreaty: user.LiveTreatyAgree, + } + userDataModel.Create(&data) + if data.Id <= 0 { + back.Fail(c, "操作失败") + return + } + } + back.Suc(c, "操作成功", "") +} + type userFolowLive struct { Id uint `json:"id"` UserId uint `json:"userId"` @@ -539,6 +577,28 @@ func (l *Live) Stop(c *gin.Context) { back.Suc(c, "操作成功", result) } +type argsTranscribe struct { + LiveItemId uint `json:"liveItemId" form:"liveItemId"` +} + +// @Title 保存录制 +func (l *Live) Transcribe(c *gin.Context) { + args := argsTranscribe{} + if err := tools.ParseParams(&args, c); err != nil { + back.Fail(c, err.Error()) + return + } + if args.LiveItemId <= 0 { + back.Fail(c, "参数错误") + return + } + if err := live.LiveLogic.Transcribe(args.LiveItemId); err != nil { + back.Fail(c, err.Error()) + return + } + back.Suc(c, "操作成功", "") +} + type argsUserData struct { Identifiers []string `json:"identifiers" form:"identifiers"` } diff --git a/app/lib/asset/asset.go b/app/lib/asset/asset.go index c417470..39deadc 100644 --- a/app/lib/asset/asset.go +++ b/app/lib/asset/asset.go @@ -1,7 +1,7 @@ // Code generated for package asset by go-bindata DO NOT EDIT. (@generated) // sources: -// config/app.dev.ini // config/app.ini +// config/app.prod.ini // config/app.test.ini package asset @@ -79,47 +79,47 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _configAppDevIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x55\xc9\xce\xa3\x4a\x93\xdd\xfb\x55\x90\x8a\x19\x27\xbf\xe4\x05\xb3\x31\x18\x8c\x0d\xb6\xe1\xaa\x54\x82\x24\x19\xcc\x3c\x0f\x4f\xdf\xfa\xbe\xba\x7d\xbb\x6e\xaf\x7e\xe5\x26\x22\x75\x32\x4e\x9c\x38\x29\x45\x8c\xa2\x29\x3d\x8d\xfd\x84\x0e\x61\x1c\xf7\x27\xe2\xc7\xf7\xf9\x0f\x20\x78\xfe\x70\xf8\xab\xda\x86\xae\xfc\x79\x88\xa3\xac\x19\xc6\x13\x49\x52\x3f\x48\x8a\xf9\x41\x11\xc4\x0f\x8a\xe0\x0e\x71\xd4\x36\xfd\x78\xa2\xe9\xef\x78\x1a\x50\x7f\x8a\xa3\x5f\x3d\x82\x4d\x53\xfc\x1a\xa6\x16\xf5\x5f\x90\x70\x18\x96\xa6\x8f\x4f\x43\x3c\x29\x11\x7f\x75\x1f\x79\x97\x2d\xe8\xad\xb5\x6b\x48\x1c\xe2\xa8\x0e\x2b\xf4\x7f\xcf\x0e\x6d\x8f\x92\x7c\x3d\xfd\x5d\xa4\xcc\x67\xf4\xeb\x50\x85\xab\x1e\x97\xe8\x44\x12\x5f\xa1\xdd\xa2\xfa\xc4\x12\x87\xc3\x5f\x23\xaa\x21\xaa\xc7\x9f\x87\x21\x2e\x84\xb6\xd5\xe3\x13\xc9\x10\x04\x43\xb3\x2c\xc7\x1d\xf2\x18\xd5\x63\x9e\xe4\xa8\x3f\x85\x71\x95\xd7\x07\xb4\xb6\x79\x8f\x4e\x1c\x41\x1c\x0a\xb4\x9d\x58\x3e\x66\x09\x2a\x64\x10\x43\x84\x80\xa5\x8f\xcc\x91\x85\x21\xa4\x13\x08\x99\x88\x81\x20\x4a\xc2\x38\x89\x78\x32\x01\x34\x85\x28\x9e\xa2\xe3\x98\xe1\x78\x2a\x64\xe0\x11\xa2\x90\x65\xb8\xc3\x80\x60\x8f\x46\x3d\x3e\x09\x86\x2e\x27\xc0\x3c\x2f\x8b\x33\x8d\x89\x70\xab\xe7\xe8\xde\x6e\x9d\xe6\x3d\x78\xbf\xfa\xdc\xea\xae\x77\xea\xbf\xd1\x06\xda\x4e\x8a\xda\x02\x81\xfd\x70\x8d\x7a\xbb\x2c\xda\x25\x44\xa4\xc3\x3d\xdb\x21\x16\xef\xce\x31\x5d\xb7\xec\x10\xfe\x96\x42\x13\x34\x45\x03\x9e\x22\xff\x11\xfa\xe3\x6b\x1c\x3f\x0f\xed\x34\x64\x6e\x8f\xc2\x71\x3b\xf5\x63\xd5\x7e\xe7\xca\x6f\x71\x80\x63\x08\xe2\xfb\xe2\x8b\x29\xe1\x8e\x04\x8a\x12\x02\x41\x18\xd1\x28\xe1\x20\xcf\x45\x5c\x18\x1e\x13\x92\x47\x74\x12\x1e\xbf\x81\x72\x53\x85\x79\x7d\x1a\xd1\x30\x7e\xa5\x3f\x7a\xf4\x3d\xfa\x1f\xb0\x3e\xb4\x65\xb8\xfd\x8b\xa8\x0c\xb7\x7f\x13\x95\xe1\xf6\xdf\x11\x95\xe1\xf6\x27\x51\x19\x6e\xff\x9f\xe8\x31\x25\x5f\xc6\xff\x6d\x93\x9b\x57\xff\x4b\xf2\x8f\xfa\x21\x6b\xfa\xf1\xe7\x9f\x3e\x36\xf5\x37\xf0\x19\x96\x79\x7c\x22\xbf\x6d\x85\x74\xbd\x69\x85\x0c\x9b\x11\x84\x6f\x03\xa6\x5e\x60\xa2\xc3\xe1\xaf\xdf\xff\xe9\xe7\x61\xea\xcb\x53\x36\x8e\xed\xf0\x1f\x1c\xff\xea\x24\x6c\xf3\x3f\x1a\xc1\xc3\x36\xc7\x67\xf2\xd0\xf6\xf9\x1c\x8e\xe8\xd7\x57\xc1\xab\xae\x2b\xcd\xa2\x8b\x82\x60\x48\x82\xa3\x08\xbb\xf5\xda\x3e\x3e\xa2\xbb\x91\xf1\xef\xae\xbc\x08\xd6\x2a\xdf\x2c\x53\xb8\xf0\x6e\x20\x4e\xe7\xe1\xd1\x3d\x3e\x97\x2b\x2b\xd2\x6c\x22\x88\x8b\x45\xa7\x4b\xc5\x3a\xf8\x43\xda\x71\xae\x48\x0d\xb7\x43\x8f\x54\x7a\xde\x54\x3f\xb3\xf1\xdd\x96\x39\x0d\x18\x47\xe5\x62\xa6\x2b\xcf\x06\x3a\x12\x44\x5e\x29\x5e\xd8\xda\x67\xaa\x2c\x8f\x99\x17\x08\x85\x40\xd0\xfb\xf9\x62\x73\x8f\x42\x35\x6c\x98\x9b\xea\x33\xe7\x19\x31\x96\x62\xad\xb4\xd4\xb2\x0e\x45\xb1\x13\x30\xf0\x9e\xa5\x56\x26\x9f\x40\x56\x21\xce\xc3\x36\x62\x73\x18\xcc\x75\x3a\x81\x59\x29\x96\x22\xf2\x21\x92\xde\x86\x77\xb5\xd6\xe6\xed\xe3\x0a\x05\x55\x04\x12\x6a\x7c\xaa\x77\xb6\xbd\x17\x4e\x7a\x37\xa3\xeb\x91\xf8\x8c\xcc\x26\x6a\xb6\x0c\xda\x68\x2a\xb8\x04\xd6\xf2\x31\xcd\xb4\x57\xba\x5f\x3b\x1c\x30\xac\x45\x2f\xfa\xe3\xe1\xb6\x78\x2a\x38\x29\x60\x08\x5a\x2d\x30\x20\x34\x26\xa6\x1a\xe9\xea\x15\x1f\xcf\x6e\x6f\x3a\xf5\xee\x61\xeb\x54\x84\xd2\x66\x93\xf0\x66\x2e\xc4\x7b\x6e\xe8\xf3\xc4\xb9\xca\x2d\xf0\xb7\xce\x33\x95\xb7\xe6\x52\x97\xa9\xa8\x32\xc2\x7a\x14\x96\x4d\xa8\x34\xbf\x2e\xba\x2c\x38\x82\x28\x34\xba\x28\x38\x92\xd0\xdd\xfd\xdb\x2b\x2b\xd0\xea\x3b\xb8\x11\x01\x0d\x23\xad\x21\x17\x44\x6f\xbd\x64\xf7\x84\xf2\x02\x14\x5c\x3c\x65\x61\x65\x68\x28\x7e\xd6\xe1\x2b\x97\x49\xed\xc2\x9a\xa6\x69\x77\x96\xc5\x94\x1f\xd0\x19\x57\xaf\x14\x95\x4e\x42\xc2\xc2\x52\x05\x5d\x6a\xfd\x30\x0e\x67\x36\xcf\x01\xcd\x55\x33\xe7\x17\x43\xb4\x89\xe7\x9d\x93\x9c\x3b\x1f\xd6\x8a\x19\x5c\x09\xac\xae\x7a\x95\x11\x4c\x76\x7d\x6a\x7b\x95\x32\xcf\xf1\x5c\x43\x39\x07\xf9\x28\x63\xed\x1b\xca\x74\xf4\xfe\xec\x09\x54\xb1\xc7\x34\x5d\xb9\x1e\x73\x06\x69\x2b\x52\x17\xe2\x9f\x05\xbb\x73\x5a\x67\x9f\x67\x99\x01\x95\xe7\x48\x3a\x81\xbf\x17\xee\xf3\x11\x5e\x9e\x97\x11\x9f\xfb\x9b\x12\x67\xd3\x59\x20\x84\x61\xcd\x06\x52\x20\xd3\xd2\xf1\x0a\x52\x6d\xba\xab\x36\x35\xf7\xa0\x54\xcb\xdc\x59\x36\xd5\x4a\x97\xbe\x55\xb0\xa8\x37\xd1\xd5\x42\xe6\x79\x27\x1f\xdc\x7c\x5d\x92\xae\xa7\x7b\xe6\xda\x1d\xc1\xe2\xe6\x59\xb3\x23\x8c\x2e\xf4\x81\x1d\x63\x85\xf0\xef\xc5\xa5\x0d\x6f\x66\x8c\xa4\x61\x76\x40\xae\x26\x32\x5f\x87\xe3\x71\xa9\xad\x73\x0a\x1d\xd1\xc3\x68\x11\x33\x3e\xf6\x45\x0a\x84\x46\x13\x05\xfb\x29\x01\xc1\x07\x1d\xe1\x21\x57\xed\x51\xc3\x30\x6a\x1a\x87\xfc\x25\xc5\xc4\xe1\x4e\x78\x8b\xbb\xbb\xeb\xde\xec\xf1\xf2\xb8\x66\x7a\xb2\x47\x5c\x23\x87\xdc\xf8\x8a\xc1\xd3\x26\x9e\x9c\x1a\x76\x06\xe6\xf5\xeb\x87\xf3\x6e\xf4\x65\xc8\x04\xc7\x05\xd9\xd0\x71\xe7\x0c\x8c\x4a\xe5\xad\x74\xbf\xb6\x4e\xfd\x0a\xd8\x28\x56\x2f\x32\xc5\x93\x61\x6b\x2c\xee\x33\x95\x77\x98\x1c\xab\xe6\x78\xf4\xdb\x4f\x5b\x34\x98\xcf\xd8\x29\xbd\x20\x4f\xb3\xeb\x2b\x96\xb9\xf1\x2d\x77\x1b\xaf\x2a\x82\xf9\x08\xec\x5b\x1a\xdd\xef\xd8\x34\xc6\xbf\xfb\x7d\xb0\x90\x4e\x8e\x69\x9c\xc4\x1c\x51\x95\x82\x78\xd3\xd3\xf6\xec\x40\x18\xba\x9b\x92\xd2\x7e\x23\x39\x8d\x48\x36\x6f\xf7\x5a\x00\x40\xce\xbb\xc4\x2d\x60\x5d\xfc\x3b\x91\xb6\x86\xf6\xe1\xf0\x59\xe3\x55\xa4\xb4\xa9\x6f\xe6\xd8\x16\xbf\x72\xab\xde\xcf\x20\x28\xea\x5b\x2e\x48\x7e\xc0\xa5\x24\x90\xf6\x52\xf2\xe0\xd9\xd3\xc8\x5b\x90\x19\xcd\x48\xee\xe9\xdb\xb1\x78\xfc\x25\xcc\x9f\x57\xc0\x51\x7e\xc5\xa8\xf0\xd6\x2b\xa1\x4a\x63\x13\x00\xb7\xcf\x87\x3a\xce\x8e\xc2\x5e\x65\x1b\xd8\xd4\xf4\xbc\x3b\x8b\xae\xbd\x33\x7e\x17\x1a\x4d\xd0\xcc\x8f\x76\xde\x7d\xab\x44\x3c\x19\x97\xc3\x65\x48\x92\x54\xa6\xcc\xe6\x32\xbc\xbb\xa8\xb2\xe2\xcf\xb2\x45\x57\x29\xe3\x3e\x99\xa0\xe0\x0d\x8e\x55\xcc\xb4\x30\xc1\x99\x0b\xcb\x12\xc6\x2a\xee\xb7\xd3\x99\x54\x05\x4d\x53\x27\x25\xa5\xea\xa2\x77\x71\x96\x76\x1e\x12\xe5\xdc\x74\x6b\x89\x9d\x4e\xeb\x54\x6f\x05\xf0\xe1\xd1\x8c\xff\x5e\x54\xdc\x63\x84\x67\xb0\xc4\x17\xac\x7a\x15\xb7\xd4\x7d\x97\xc9\x94\xb1\x9e\x30\x48\x67\x76\x1b\xd7\x2e\x22\x6d\xec\xc2\xe3\xb7\xa6\xf7\xa8\x16\x3e\x08\x89\x19\xf2\x7a\xb3\x3d\xc3\x32\x3d\x29\xf5\x45\xf5\x62\x0d\xe7\x67\xbd\x53\xc6\x7d\x35\xc1\x5a\x69\x8c\x6f\xd0\xaf\x44\x34\xed\x63\x05\xec\x4d\xd7\x85\xa3\xf4\x19\x76\x22\xf8\xdc\x18\x5a\x32\x0a\xeb\xa2\x15\xa1\xf0\xd8\xfb\x37\xf7\x8e\xc6\xce\x93\x5b\xa2\xbe\x60\x9c\x3f\xbb\x7b\x54\x4e\x6f\xc0\x67\x82\x2f\xcb\x47\x9e\xf0\x24\xe9\x2e\x8d\xa2\xa7\x1a\xca\xe3\xba\x50\x50\xd9\xf2\x4a\x1f\xb5\x78\x26\x06\x70\xec\x0a\x32\x09\x0a\x21\x34\xa5\xb3\x98\xf3\x30\xc6\xda\x9e\x64\xc7\x0e\xcb\x1e\xb3\x4c\x24\xec\xf9\x69\xcc\xaf\x6b\x20\x98\x6d\x49\x32\x3e\x50\xec\x48\x7a\xe4\x8e\x21\xa6\x52\xfe\x30\xae\x43\x7d\x7c\xb1\x48\x7b\xde\x19\x78\xb6\x59\xcb\x01\x37\xee\x49\x11\x81\xad\xe9\xc6\xec\x0d\x17\x6f\x2c\xf7\xfb\x58\xa3\x8b\x72\xef\x9e\xef\xa0\x7b\xb6\xfc\x15\x8e\xad\xb9\x5b\xe5\xe4\x5c\xb5\xdd\xbd\x93\xb1\x52\xa7\x71\x6d\x87\xd4\xe0\xa7\x71\x0c\x04\xd7\xdf\x08\x4b\xcb\x83\x49\x94\xaf\x02\x9d\x11\x09\x11\x3e\x07\x67\x8a\xca\x5b\xe2\x69\x18\xe1\x9c\x71\xba\xeb\x37\x4b\x7f\xbc\x2c\xac\x02\x72\x2d\x8d\x45\x5b\x78\x1a\xa9\xe9\x2c\x4e\xac\x7c\xf0\x7c\x96\x8f\x2d\xd2\xe7\xfd\x78\x06\x56\x39\xea\xeb\xbb\xc7\x0f\xb0\x8e\xff\xb5\x66\x60\x5c\xff\xb9\x66\x86\x31\x1c\x73\xf8\x3f\x01\x00\x00\xff\xff\x9a\x97\xbb\xb3\x7c\x09\x00\x00") +var _configAppIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x4c\x49\x29\xb2\x35\xd0\x03\x43\x2b\x0b\x03\x4b\x03\xae\xa2\xd2\xbc\xdc\xfc\x94\x54\x5b\x95\xea\xa0\x50\x3f\x5f\x7f\x17\xd7\x9a\x9a\x92\xd4\xe2\x92\x5a\x2e\xae\xe8\x82\xc4\xf4\xd4\x58\xae\xdc\xc4\x0a\x9f\xcc\xdc\xcc\x12\x5b\x43\x03\x03\xae\xdc\xcc\x3c\x28\x87\x2b\x25\x35\x2d\xb1\x34\xa7\x04\xca\x35\xe5\xe2\x8a\x2e\xc9\x2f\xc8\x4c\x8e\xe5\xca\xc8\x2f\x71\xce\x2f\xcd\x03\x69\xe0\x02\x04\x00\x00\xff\xff\x1b\x9a\x6c\x17\x70\x00\x00\x00") -func configAppDevIniBytes() ([]byte, error) { +func configAppIniBytes() ([]byte, error) { return bindataRead( - _configAppDevIni, - "config/app.dev.ini", + _configAppIni, + "config/app.ini", ) } -func configAppDevIni() (*asset, error) { - bytes, err := configAppDevIniBytes() +func configAppIni() (*asset, error) { + bytes, err := configAppIniBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/app.dev.ini", size: 2428, mode: os.FileMode(420), modTime: time.Unix(1602830260, 0)} + info := bindataFileInfo{name: "config/app.ini", size: 112, mode: os.FileMode(420), modTime: time.Unix(1601451702, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configAppIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x4a\x4c\x49\x29\xb2\x35\xd0\x03\x43\x2b\x0b\x03\x4b\x03\xae\xa2\xd2\xbc\xdc\xfc\x94\x54\x5b\x95\xea\xa0\x50\x3f\x5f\x7f\x17\xd7\x9a\x9a\x92\xd4\xe2\x92\x5a\x2e\xae\xe8\x82\xc4\xf4\xd4\x58\xae\xdc\xc4\x0a\x9f\xcc\xdc\xcc\x12\x5b\x43\x03\x03\xae\xdc\xcc\x3c\x28\x87\x2b\x25\x35\x2d\xb1\x34\xa7\x04\xca\x35\xe5\xe2\x8a\x2e\xc9\x2f\xc8\x4c\x8e\xe5\xca\xc8\x2f\x71\xce\x2f\xcd\x03\x69\xe0\x02\x04\x00\x00\xff\xff\x1b\x9a\x6c\x17\x70\x00\x00\x00") +var _configAppProdIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x56\xc7\xce\xb3\x4a\x90\xdd\xfb\x55\xd0\x7c\x34\xd1\x70\x25\x2f\xc8\x0e\x18\x8c\x6d\x6c\xc3\xd5\xaf\x5f\xd0\xdd\x04\x93\x73\x78\xfa\xd1\x17\x6e\x9a\xd5\xec\xba\x9a\x43\x9d\x73\xaa\x0a\x15\x08\x87\x43\xbc\x8b\x82\xbc\xc3\x9b\xcd\x9f\xc5\xd2\x35\xf9\xaf\x0d\x0a\x93\xaa\xeb\x77\x6d\xf1\x3f\x43\xc4\x73\x00\xf3\x11\xcb\x32\x62\x34\x4f\x1c\xfb\xf1\x05\xf9\x68\x51\xf7\x11\xe4\xe9\x32\x94\xb0\xfb\x80\x55\xb1\x41\x61\x5d\xb5\xfd\x8e\x61\x00\xbf\x41\xe1\xd0\xe1\x76\x87\xc2\xdf\x2d\x86\x55\x95\xfd\xee\x86\x1a\xb7\x9f\x90\xa0\xeb\xa6\xaa\x45\xbb\x0e\x0d\x5a\x28\x9e\xef\xb7\xb4\x49\x26\xfc\x32\xea\x39\x00\x1b\x14\x96\x41\x81\xff\x79\x6d\x53\xb7\x38\x4a\xe7\xdd\x4f\x92\x3c\x1d\xf1\xef\x4d\x11\xcc\x07\x94\xe3\x1d\x05\x3e\x8f\x76\x8d\xcb\x1d\x07\xc0\x66\xf3\x67\x8f\x4b\x88\xcb\xfe\xd7\xa6\x43\x99\x54\xd7\x07\xb4\xa3\x58\x00\x58\x86\xe3\x78\x7e\x93\x22\x5c\xf6\x69\x94\xe2\x76\x17\xa0\x22\x2d\x37\x78\xae\xd3\x16\xef\x78\x00\x36\x19\x5e\x76\x9c\x88\x38\x40\x07\x2c\x66\x41\x20\x70\xcc\x96\xdd\x72\x30\x80\x4c\x04\x21\x1b\xb2\x50\x08\xa3\x00\x45\xa1\x48\x45\x02\x43\x63\x5a\xa4\x19\x84\x58\x5e\xa4\x03\x16\x6e\x21\x0e\x38\x96\xdf\x74\x18\xb6\xb8\x3f\xa0\x9d\x74\x3a\xa8\x91\x60\xee\xa7\xc9\x19\xfa\x48\xba\x94\x63\x78\xad\x97\xc6\x70\x6f\xa2\x57\xbc\x2f\x65\xd3\x3a\xe5\x0f\xfa\x84\x97\x9d\xa6\xd7\x82\xc4\xbd\xf9\x4a\xbf\x1c\x27\xe3\x18\x60\xca\xe1\x1f\x75\x87\xe4\xab\xb3\x8d\xe7\x25\xd9\x04\xdf\x56\x18\xc0\xd0\x8c\x20\xd2\xd4\xdf\x46\x3f\x3e\xeb\xf1\x6b\x53\x0f\x5d\x72\x6f\x71\xd0\x2f\xbb\xb6\x2f\xea\xaf\x58\xfb\x36\x27\xf0\x2c\x00\x5f\x17\x9f\x4c\x11\xbf\x05\x38\x8c\x00\x86\x30\x64\x70\xc4\x43\x91\x0f\xf9\x20\xd8\x46\x94\x88\x99\x28\xd8\x7e\x01\xd5\xaa\x08\xd2\x72\xf7\x99\xfa\x33\xfc\x68\xf1\x57\xed\x3f\x60\xb9\xa9\xf3\x60\xf9\x0f\x51\x1e\x2c\xff\x25\xca\x83\xe5\xff\x47\x94\x07\xcb\x0f\xd1\xe7\xf1\xff\x92\xdc\x86\xe8\xb3\xeb\x3f\x2d\xba\xa7\xc5\x5f\x04\xff\x71\xfe\x91\xa7\x10\x97\x1d\xfe\xf5\xdd\xbf\x80\xc5\x22\x0f\x42\x14\x32\x28\x8c\x98\x80\x89\x44\xc8\xe2\x80\x66\x18\x0a\x62\x41\x84\x9b\x1f\xb4\xdb\xe6\xbb\xa4\xef\xeb\x3f\x48\xf2\xe7\xe6\x63\xac\x10\xfd\x51\x2c\x0d\xcc\xab\x01\x7d\x8e\xf2\x5f\x4f\xc8\x91\x22\xa3\x30\x8c\x00\x23\xc0\x08\x21\xcc\xb1\x80\xe5\x69\x1a\x22\x4a\x04\x0c\x00\xec\x96\x63\x68\xf2\xfe\x32\xd3\x11\xdf\xd4\xd3\xb7\x1e\x88\xff\x51\xd9\x25\x55\xdb\xff\xfa\xf7\xa4\x55\xe5\x97\x9d\x47\x90\xa7\x68\x47\x7d\x09\x87\x4c\xb9\x18\x99\x0a\xab\x5e\x08\x5e\x27\x18\xbb\xbe\xf9\xf9\x1d\x7e\x8f\xfc\xaf\xcd\xf0\xa3\xb7\xfb\x83\x24\x83\x3a\xfd\x57\xa9\x3e\x43\x72\xa4\x36\x75\x9b\x8e\x41\x8f\x7f\x7f\x26\x3b\x1f\x0e\x5a\x35\x1d\x64\x49\x3a\x29\x92\xa3\x49\xab\xf5\x5c\xde\x1e\x66\x9a\x9e\xf5\xae\x77\x75\x92\xac\x59\xbd\x58\xa6\x74\x14\xef\xbe\x3c\xec\xbb\x5b\x73\x7b\x1f\xcf\x9c\xcc\x70\x91\x24\x4f\x16\x13\x4f\x05\xe7\x90\x37\x65\x25\xf9\x2c\x3e\xdd\x1b\x7c\x8b\x95\xc7\x45\xf7\x12\x9b\x5c\x6d\x95\x37\x84\xd3\x56\x3b\x9a\xf1\x2c\x72\xfe\x01\x4b\xb2\xa8\x65\x4f\x62\x6e\x13\x5d\x55\xfb\xc4\xf5\xa5\x4c\x02\xcc\xba\x3f\xda\xfc\x2d\xd3\x4f\x36\x4c\x4d\xfd\x91\x8a\xac\x8c\x14\x64\xe4\x96\x9e\x97\x81\x2c\x37\x12\x21\xbc\x46\xa5\x56\xa9\x87\xa0\xea\x90\x14\x61\x1d\x72\x29\xf4\xc7\x32\x1e\x84\x51\xcb\xa6\x2c\xf4\x20\x56\x5e\x27\xf7\x6c\xcd\xd5\xcb\x23\x35\x1a\xea\x58\x88\xe8\xfe\xa1\x5f\xb9\xfa\x9a\x39\xf1\xd5\x0c\xcf\x5b\xf0\xee\xd9\x45\x36\x6c\x55\xa8\xc3\x21\xe3\x23\x58\xaa\xdb\x38\x31\x9e\xf1\x7a\x6e\x48\x81\xe5\x2c\x66\x3a\xdc\x6e\xf7\x9a\x8c\x25\x27\x16\x58\xc0\xe8\x19\x21\x48\x95\x49\xe8\xa7\x78\x76\xb3\xb7\x6b\xd7\x97\x03\xfd\x6a\x61\xed\x14\x40\xab\x93\x41\x7a\xb1\x47\xf0\x1a\x2b\x66\x3f\xf0\x77\xed\xe2\x7b\x4b\xe3\x9a\xda\xcb\xb8\xd3\xc7\x21\x2b\x12\x60\xdd\x32\xcb\x06\x3a\x23\xce\xd3\x41\x95\x1c\x49\x96\xaa\x83\x2c\x39\x8a\xd4\x5c\xbd\xcb\x33\xc9\xf0\xec\x39\xe4\x29\x14\x0c\x82\xb2\xba\x54\x92\xdd\xf9\x98\x5c\x23\xda\xf5\xb1\x7f\x74\xb5\x89\x53\xe1\x49\xf3\x92\x86\x9c\xf9\x44\xa9\x27\xce\x34\x4d\xbb\xb1\x2c\x36\x7f\x0b\xcd\xe9\xec\xe6\xb2\xd6\x28\x58\x9a\x38\x3a\x63\x72\xa3\xed\xfa\x6e\xcf\xa5\xa9\xc0\xf0\xc5\xc8\x7b\x59\x17\x2e\xf2\x7e\xe5\x15\xe7\x2a\x06\xa5\x66\xfa\x67\x40\x94\x45\xab\xb3\x92\xc9\xcd\x0f\x63\x2d\x62\xf6\xd1\xef\x4b\xa8\xa6\x42\xda\xab\x44\xfd\x82\x2a\x13\xbe\xde\x6b\x04\x75\xe2\x36\x0c\x67\xbe\x25\x9c\x4e\x59\xb2\xf8\x0e\xc9\xf7\x44\x5c\x79\xa3\xb1\xf7\xa3\xca\x0a\x85\xeb\x28\x07\x40\xbe\x26\xfe\xfd\x96\x9e\xae\x9b\x80\xf7\xf5\x45\xcb\xa3\xe9\x4c\x10\xc2\xa0\xe4\x7c\xc5\x57\x19\x65\x7b\x16\x62\x63\xb8\xea\x36\x3d\xb6\x42\xae\xe7\xa9\x33\x2d\xba\x15\x4f\x6d\xad\x11\x61\x6b\xe2\xb3\x85\xcd\xfd\x4a\xdd\xf8\xf1\x3c\x45\x4d\xcb\xb4\xec\xb9\xd9\x0a\xd3\x3d\x4d\xaa\x15\x13\x4c\x76\xe8\xb8\x1e\x69\xc0\xbb\x66\xc7\x3a\xb8\x98\x08\x2b\xdd\xe8\x08\xa9\x1e\xa9\x62\x19\xf4\xdb\xa9\xb4\xf6\x31\x74\x64\x97\x60\x64\xe2\xf4\xb6\x8f\x8a\x2f\x55\x86\x2c\xd9\x0f\x45\x90\x3c\xa1\x01\x2e\xbe\xeb\x2d\xae\x58\x56\x8f\x51\x20\x1e\x63\x42\xee\xae\xc0\x9d\xee\xeb\x7d\x5e\xab\x15\x4d\xb7\x73\x72\x88\xd6\x90\xaf\xd4\x80\xef\x9f\x48\x78\xd8\xe0\xc1\xeb\x41\x73\x22\xdc\x76\x7e\xf3\xee\x85\x39\x76\x89\xe4\xdc\x85\xa4\x6b\xf8\x7d\x22\xf4\x5a\xe1\xce\x4c\x3b\xd7\x4e\xf9\xf4\xb9\x10\xe9\x47\x95\x16\xa9\xa0\x3e\x4d\xf7\x47\xac\xae\x30\xda\x16\xd5\x76\xeb\xd5\xef\x3a\xab\x08\x8f\xb5\x63\x66\xc2\xae\x61\x97\x67\x22\xb9\xa3\x4b\x7a\xaf\xdc\x22\xf3\xc7\xad\x60\x5f\xe2\xf0\x7a\x25\x86\x1e\x7d\xeb\xbd\x71\x90\x89\xb6\x31\x8a\x10\x0f\x8a\x5c\x92\x2f\x87\xb8\xde\x3b\x10\x06\xf7\x45\x8b\x19\xaf\x52\x9c\x4a\xa6\xaa\xd7\xfd\x9c\x09\x02\x35\xae\x0a\x3f\x09\xf3\xe4\x5d\x41\x5c\x9f\x8c\x37\x4f\x8e\x86\xa8\x63\xad\x8e\x3d\x33\x25\x16\xf4\x4c\xad\x72\xdd\x0b\x7e\x56\x5e\x52\x49\xf1\x7c\x3e\xa6\x04\x65\xcd\x15\x17\xee\x5d\x83\xba\xf8\xc9\xa9\xea\xa9\x35\x7e\x39\x96\x48\x3e\xa5\xf1\xfd\xf4\x79\xda\x2b\x58\x1d\x5e\x5a\x2d\xd0\x19\x62\x10\x84\xcb\xfb\x4d\x6f\x47\x47\xe3\xce\xaa\x2d\xd8\xf4\xf0\xb8\x3a\xd3\xc1\x78\x25\xe2\x2a\x55\x86\x64\x98\x6f\x63\xbf\x7a\x56\x8e\x45\x0a\xe5\xdd\xb1\x8b\xa2\x58\xa5\xcd\xea\xd8\xbd\x9a\xb0\xb0\xd0\x7b\x5a\xc2\xb3\x92\xf0\xef\x44\xd2\xc8\x8a\x24\x0a\x76\x98\x58\x7f\xcf\x07\x79\x0e\x91\x4e\x7a\xf5\xb0\xa7\x74\xc9\x30\xf4\x41\x8b\xe9\x32\x6b\xef\x24\xc7\x38\x37\x85\x76\x2e\x07\x6b\x42\x4e\x63\x34\xba\x3b\x0b\xf0\xe6\x32\xac\xf7\x9a\x74\xd2\x65\xa5\x87\x3f\xa1\x23\x51\x3c\xb3\x4b\x7c\x7f\xe5\xd1\x90\x70\xae\xd4\x29\x7b\x6e\xe9\xe7\x26\xa4\x6c\xe2\x28\x92\x97\xaa\x75\xe9\x1a\xde\x80\xc2\x76\x69\xb9\xd8\xee\xc9\x32\x5d\x25\xf6\x64\xfd\x68\x75\xfb\x47\xb9\xd2\xa7\xeb\x6c\x0a\x73\x61\xb0\xde\x89\x79\x46\xb2\x69\x6f\x0b\xc1\x5e\x0e\x07\x69\xab\xbc\xbb\x15\xf8\xef\x0b\xcb\x28\xa7\xcc\x3a\x1a\x59\x20\xdd\xd6\xf6\xc5\xbf\xc2\xbe\x71\xd5\x1a\x94\x47\x82\xf7\xc6\xfb\x1a\xe6\xc3\x4b\x10\x13\xc9\x53\xd5\xad\x08\x5c\x45\xb9\x2a\xbd\xec\xea\x27\xed\x76\x9e\x68\xa8\x2d\x69\x71\xe8\x0d\x34\x82\x4e\xd8\x36\x19\x15\xf9\x99\x14\x98\xca\x5e\x4e\x45\x88\x88\xba\xa5\xb8\xbe\x21\x92\xdb\xa8\x82\x88\xdb\x3f\x4e\xe3\xf3\xec\x4b\x66\x9d\x53\xac\x27\x68\x76\xa8\xdc\x52\xe7\x24\xc7\x4a\x7a\x3b\x9d\xbb\x72\xfb\xe4\xb0\xf1\xb8\xb2\x70\x6f\x73\x96\x23\x5c\xf8\x07\x0d\x7c\xdb\x38\x9c\x46\xb7\x3b\xba\x7d\xbe\x5e\xfb\x12\x1f\xb5\x6b\xf3\x78\xf9\xcd\xa3\x16\xcf\xb0\xaf\xcd\xd5\xca\x07\xe7\x6c\xac\xf7\x2b\x85\xb4\x32\x46\xa5\x1d\xd0\x9d\x17\x23\x24\x48\x77\x6f\x01\x96\x91\xfa\x83\xac\x9e\x25\x26\x01\x11\x08\x1e\x9d\x33\x84\xf9\x25\x72\x0d\x02\x38\x7b\x92\x69\xda\xc5\x3a\xdc\x9e\x16\x51\x08\x6a\xa9\xf4\x59\x9d\xb9\x06\x65\x1c\x38\x12\xcc\xa2\xff\x78\xe4\xb7\x25\x3c\x8c\xeb\x76\x2f\x58\x79\x7f\x98\x5f\x2d\xb9\x81\x25\xfa\x7b\xc5\x40\x54\xfe\x7b\xc5\x74\x7d\xd0\xa7\x70\xb3\xf9\xf3\xfb\x57\xa3\x08\xe6\x4b\x1b\xa4\x1d\xde\x31\x00\x80\xff\x0d\x00\x00\xff\xff\x49\x5a\x4a\x99\x39\x0a\x00\x00") -func configAppIniBytes() ([]byte, error) { +func configAppProdIniBytes() ([]byte, error) { return bindataRead( - _configAppIni, - "config/app.ini", + _configAppProdIni, + "config/app.prod.ini", ) } -func configAppIni() (*asset, error) { - bytes, err := configAppIniBytes() +func configAppProdIni() (*asset, error) { + bytes, err := configAppProdIniBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "config/app.ini", size: 112, mode: os.FileMode(420), modTime: time.Unix(1601451702, 0)} + info := bindataFileInfo{name: "config/app.prod.ini", size: 2617, mode: os.FileMode(420), modTime: time.Unix(1603700126, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _configAppTestIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x55\xc9\xce\xa3\x4a\x93\xdd\xfb\x55\x90\x8a\x19\x27\x2d\x79\xc1\x6c\x0c\x06\x63\x83\x6d\xb8\x2a\x95\x20\x49\x06\x33\xcf\xc3\xd3\xb7\xbe\xaf\x6e\xdf\xae\xfb\xaf\xfe\x5d\x44\xea\x64\x9c\x38\x71\x42\x8a\x18\x45\x53\x7a\x1a\xfb\x09\x1d\x0e\x7f\x55\xdb\xd0\x95\x3f\x0f\x71\x94\x35\xc3\x78\x22\x49\xea\x07\x49\x31\x3f\x28\x82\xf8\x41\x11\xdc\x21\x8e\xda\xa6\x1f\x4f\x34\xfd\x1d\x4f\x03\xea\x4f\x71\xf4\xab\x47\xb0\x69\x8a\x5f\xc3\xd4\xa2\xfe\x0b\x12\x0e\xc3\xd2\xf4\xf1\x69\x88\x27\x25\xe2\xaf\xee\x23\xef\xb2\x05\xbd\xb5\x76\x0d\x89\x43\x1c\xd5\x61\x85\xfe\xff\xdb\xa1\xed\x51\x92\xaf\xa7\xbf\x8b\x94\xf9\x8c\x7e\x1d\xaa\x70\xd5\xe3\x12\x9d\x48\xe2\x2b\xb4\x5b\x54\x9f\x58\xe2\x70\xf8\x6b\x44\x35\x44\xf5\xf8\xf3\x30\xc4\x85\xd0\xb6\x7a\x7c\x22\x19\x82\x60\x68\x96\xe5\xb8\x43\x1e\xa3\x7a\xcc\x93\x1c\xf5\xa7\x30\xae\xf2\xfa\x80\xd6\x36\xef\xd1\x89\x23\x88\x43\x81\xb6\x13\xcb\xc7\x2c\x41\x85\x0c\x62\x88\x10\xb0\xf4\x91\x39\xb2\x30\x84\x74\x02\x21\x13\x31\x10\x44\x49\x18\x27\x11\x4f\x26\x80\xa6\x10\xc5\x53\x74\x1c\x33\x1c\x4f\x85\x0c\x3c\x42\x14\xb2\x0c\x77\x18\x10\xec\xd1\xa8\xc7\x27\xc1\xd0\xe5\x04\x98\xe7\x65\x71\xa6\x31\x11\x6e\xf5\x1c\xdd\xdb\xad\xd3\xbc\x07\xef\x57\x9f\x5b\xdd\xf5\x4e\xfd\x37\xda\x40\xdb\x49\x51\x5b\x20\xb0\x1f\xae\x51\x6f\x97\x45\xbb\x84\x88\x74\xb8\x67\x3b\xc4\xe2\xdd\x39\xa6\xeb\x96\x1d\xc2\xdf\x52\x68\x82\xa6\x68\xc0\x53\xe4\x3f\x42\x7f\x7c\x8d\xe3\xe7\xa1\x9d\x86\xcc\xed\x51\x38\x6e\xa7\x7e\xac\xda\xef\x5c\xf9\x2d\x0e\x70\x0c\x41\x7c\x3f\x7c\x31\x25\xdc\x91\x40\x51\x42\x20\x08\x23\x1a\x25\x1c\xe4\xb9\x88\x0b\xc3\x63\x42\xf2\x88\x4e\xc2\xe3\x37\x50\x6e\xaa\x30\xaf\x4f\x23\x1a\xc6\xaf\xf4\x47\x8f\xbe\x47\xff\x03\xd6\x87\xb6\x0c\xb7\x7f\x11\x95\xe1\xf6\x6f\xa2\x32\xdc\xfe\x3b\xa2\x32\xdc\xfe\x24\x2a\xc3\xed\x3f\x89\x1e\x53\xf2\x65\xfc\xdf\x36\xb9\x79\xf5\x7f\x24\xff\xa8\x1f\xb2\xa6\x1f\x7f\xfe\xe9\x63\x53\x7f\x03\x9f\x61\x99\xc7\x27\xf2\xdb\x56\x48\xd7\x9b\x56\xc8\xb0\x19\x41\xf8\x36\x60\xea\x05\xe6\xd7\x22\xff\xde\xa7\x9f\x87\xa9\x2f\x4f\xd9\x38\xb6\xc3\xff\xe0\xf8\x57\x27\x61\x9b\xff\xd1\x08\x1e\xb6\x39\x3e\x93\x87\xb6\xcf\xe7\x70\x44\xbf\xbe\x0a\x5e\x75\x5d\x69\x16\x5d\x14\x04\x43\x12\x1c\x45\xd8\xad\xd7\xf6\xf1\x11\xdd\x8d\x8c\x7f\x77\xe5\x45\xb0\x56\xf9\x66\x99\xc2\x85\x77\x03\x71\x3a\x0f\x8f\xee\xf1\xb9\x5c\x59\x91\x66\x13\x41\x5c\x2c\x3a\x5d\x2a\xd6\xc1\x1f\xd2\x8e\x73\x45\x6a\xb8\x1d\x7a\xa4\xd2\xf3\xa6\xfa\x99\x8d\xef\xb6\xcc\x69\xc0\x38\x2a\x17\x33\x5d\x79\x36\xd0\x91\x20\xf2\x4a\xf1\xc2\xd6\x3e\x53\x65\x79\xcc\xbc\x40\x28\x04\x82\xde\xcf\x17\x9b\x7b\x14\xaa\x61\xc3\xdc\x54\x9f\x39\xcf\x88\xb1\x14\x6b\xa5\xa5\x96\x75\x28\x8a\x9d\x80\x81\xf7\x2c\xb5\x32\xf9\x04\xb2\x0a\x71\x1e\xb6\x11\x9b\xc3\x60\xae\xd3\x09\xcc\x4a\xb1\x14\x91\x0f\x91\xf4\x36\xbc\xab\xb5\x36\x6f\x1f\x57\x28\xa8\x22\x90\x50\xe3\x53\xbd\xb3\xed\xbd\x70\xd2\xbb\x19\x5d\x8f\xc4\x67\x64\x36\x51\xb3\x65\xd0\x46\x53\xc1\x25\xb0\x96\x8f\x69\xa6\xbd\xd2\xfd\xda\xe1\x80\x61\x2d\x7a\xd1\x1f\x0f\xb7\xc5\x53\xc1\x49\x01\x43\xd0\x6a\x81\x01\xa1\x31\x31\xd5\x48\x57\xaf\xf8\x78\x76\x7b\xd3\xa9\x77\x0f\x5b\xa7\x22\x94\x36\x9b\x84\x37\x73\x21\xde\x73\x43\x9f\x27\xce\x55\x6e\x81\xbf\x75\x9e\xa9\xbc\x35\x97\xba\x4c\x45\x95\x11\xd6\xa3\xb0\x6c\x42\xa5\xf9\x75\xd1\x65\xc1\x11\x44\xa1\xd1\x45\xc1\x91\x84\xee\xee\xdf\x5e\x59\x81\x56\xdf\xc1\x8d\x08\x68\x18\x69\x0d\xb9\x20\x7a\xeb\x25\xbb\x27\x94\x17\xa0\xe0\xe2\x29\x0b\x2b\x43\x43\xf1\xb3\x0e\x5f\xb9\x4c\x6a\x17\xd6\x34\x4d\xbb\xb3\x2c\xa6\xfc\x80\xce\xb8\x7a\xa5\xa8\x74\x12\x12\x16\x96\x2a\xe8\x52\xeb\x87\x71\x38\xb3\x79\x0e\x68\xae\x9a\x39\xbf\x18\xa2\x4d\x3c\xef\x9c\xe4\xdc\xf9\xb0\x56\xcc\xe0\x4a\x60\x75\xd5\xab\x8c\x60\xb2\xeb\x53\xdb\xab\x94\x79\x8e\xe7\x1a\xca\x39\xc8\x47\x19\x6b\xdf\x50\xa6\xa3\xf7\x67\x4f\xa0\x8a\x3d\xa6\xe9\xca\xf5\x98\x33\x48\x5b\x91\xba\x10\xff\x2c\xd8\x9d\xd3\x3a\xfb\x3c\xcb\x0c\xa8\x3c\x47\xd2\x09\xfc\xbd\x70\x9f\x8f\xf0\xf2\xbc\x8c\xf8\xdc\xdf\x94\x38\x9b\xce\x02\x21\x0c\x6b\x36\x90\x02\x99\x96\x8e\x57\x90\x6a\xd3\x5d\xb5\xa9\xb9\x07\xa5\x5a\xe6\xce\xb2\xa9\x56\xba\xf4\xad\x82\x45\xbd\x89\xae\x16\x32\xcf\x3b\xf9\xe0\xe6\xeb\x92\x74\x3d\xdd\x33\xd7\xee\x08\x16\x37\xcf\x9a\x1d\x61\x74\xa1\x0f\xec\x18\x2b\x84\x7f\x2f\x2e\x6d\x78\x33\x63\x24\x0d\xb3\x03\x72\x35\x91\xf9\x3a\x1c\x8f\x4b\x6d\x9d\x53\xe8\x88\x1e\x46\x8b\x98\xf1\xb1\x2f\x52\x20\x34\x9a\x28\xd8\x4f\x09\x08\x3e\xe8\x08\x0f\xb9\x6a\x8f\x1a\x86\x51\xd3\x38\xe4\x2f\x29\x26\x0e\x77\xc2\x5b\xdc\xdd\x5d\xf7\x66\x8f\x97\xc7\x35\xd3\x93\x3d\xe2\x1a\x39\xe4\xc6\x57\x0c\x9e\x36\xf1\xe4\xd4\xb0\x33\x30\xaf\x5f\x3f\x9c\x77\xa3\x2f\x43\x26\x38\x2e\xc8\x86\x8e\x3b\x67\x60\x54\x2a\x6f\xa5\xfb\xb5\x75\xea\x57\xc0\x46\xb1\x7a\x91\x29\x9e\x0c\x5b\x63\x71\x9f\xa9\xbc\xc3\xe4\x58\x35\xc7\xa3\xdf\x7e\xda\xa2\xc1\x7c\xc6\x4e\xe9\x05\x79\x9a\x5d\x5f\xb1\xcc\x8d\x6f\xb9\xdb\x78\x55\x11\xcc\x47\x60\xdf\xd2\xe8\x7e\xc7\xa6\x31\xfe\xdd\xef\x83\x85\x74\x72\x4c\xe3\x24\xe6\x88\xaa\x14\xc4\x9b\x9e\xb6\x67\x07\xc2\xd0\xdd\x94\x94\xf6\x1b\xc9\x69\x44\xb2\x79\xbb\xd7\x02\x00\x72\xde\x25\x6e\x01\xeb\xe2\xdf\x89\xb4\x35\xb4\x0f\x87\xcf\x1a\xaf\x22\xa5\x4d\x7d\x33\xc7\xb6\xf8\x95\x5b\xf5\x7e\x06\x41\x51\xdf\x72\x41\xf2\x03\x2e\x25\x81\xb4\x97\x92\x07\xcf\x9e\x46\xde\x82\xcc\x68\x46\x72\x4f\xdf\x8e\xc5\xe3\x2f\x61\xfe\xbc\x02\x8e\xf2\x2b\x46\x85\xb7\x5e\x09\x55\x1a\x9b\x00\xb8\x7d\x3e\xd4\x71\x76\x14\xf6\x2a\xdb\xc0\xa6\xa6\xe7\xdd\x59\x74\xed\x9d\xf1\xbb\xd0\x68\x82\x66\x7e\xb4\xf3\xee\x5b\x25\xe2\xc9\xb8\x1c\x2e\x43\x92\xa4\x32\x65\x36\x97\xe1\xdd\x45\x95\x15\x7f\x96\x2d\xba\x4a\x19\xf7\xc9\x04\x05\x6f\x70\xac\x62\xa6\x85\x09\xce\x5c\x58\x96\x30\x56\x71\xbf\x9d\xce\xa4\x2a\x68\x9a\x3a\x29\x29\x55\x17\xbd\x8b\xb3\xb4\xf3\x90\x28\xe7\xa6\x5b\x4b\xec\x74\x5a\xa7\x7a\x2b\x80\x0f\x8f\x66\xfc\xf7\xa2\xe2\x1e\x23\x3c\x83\x25\xbe\x60\xd5\xab\xb8\xa5\xee\xbb\x4c\xa6\x8c\xf5\x84\x41\x3a\xb3\xdb\xb8\x76\x11\x69\x63\x17\x1e\xbf\x35\xbd\x47\xb5\xf0\x41\x48\xcc\x90\xd7\x9b\xed\x19\x96\xe9\x49\xa9\x2f\xaa\x17\x6b\x38\x3f\xeb\x9d\x32\xee\xab\x09\xd6\x4a\x63\x7c\x83\x7e\x25\xa2\x69\x1f\x2b\x60\x6f\xba\x2e\x1c\xa5\xcf\xb0\x13\xc1\xe7\xc6\xd0\x92\x51\x58\x17\xad\x08\x85\xc7\xde\xbf\xb9\x77\x34\x76\x9e\xdc\x12\xf5\x05\xe3\xfc\xd9\xdd\xa3\x72\x7a\x03\x3e\x13\x7c\x59\x3e\xf2\x84\x27\x49\x77\x69\x14\x3d\xd5\x50\x1e\xd7\x85\x82\xca\x96\x57\xfa\xa8\xc5\x33\x31\x80\x63\x57\x90\x49\x50\x08\xa1\x29\x9d\xc5\x9c\x87\x31\xd6\xf6\x24\x3b\x76\x58\xf6\x98\x65\x22\x61\xcf\x4f\x63\x7e\x5d\x03\xc1\x6c\x4b\x92\xf1\x81\x62\x47\xd2\x23\x77\x0c\x31\x95\xf2\x87\x71\x1d\xea\xe3\x8b\x45\xda\xf3\xce\xc0\xb3\xcd\x5a\x0e\xb8\x71\x4f\x8a\x08\x6c\x4d\x37\x66\x6f\xb8\x78\x63\xb9\xdf\xc7\x1a\x5d\x94\x7b\xf7\x7c\x07\xdd\xb3\xe5\xaf\x70\x6c\xcd\xdd\x2a\x27\xe7\xaa\xed\xee\x9d\x8c\x95\x3a\x8d\x6b\x3b\xa4\x06\x3f\x8d\x63\x20\xb8\xfe\x46\x58\x5a\x1e\x4c\xa2\x7c\x15\xe8\x8c\x48\x88\xf0\x39\x38\x53\x54\xde\x12\x4f\xc3\x08\xe7\x8c\xd3\x5d\xbf\x59\xfa\xe3\x65\x61\x15\x90\x6b\x69\x2c\xda\xc2\xd3\x48\x4d\x67\x71\x62\xe5\x83\xe7\xb3\x7c\x6c\x91\x3e\xef\xc7\x33\xb0\xca\x51\x5f\xdf\x3d\x7e\x80\x75\xfc\xaf\x33\x03\xe3\xfa\xcf\x33\x33\x8c\xe1\x98\xc3\xc3\xe1\xaf\xdf\x07\xbd\x0a\xd7\x5b\x1f\xe6\x03\x3a\xd1\x04\x41\xfc\x6f\x00\x00\x00\xff\xff\xf0\x08\x31\xab\x81\x09\x00\x00") +var _configAppTestIni = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x56\x49\x8f\xa3\x48\x16\xbe\xfb\xaf\x20\x25\xc1\x6a\x68\xc9\x07\x76\xdb\x60\x30\x36\xd8\x86\x56\xa9\x04\x41\xb0\x98\x7d\x5f\x7e\xfd\x28\x33\xab\xa7\xab\xe6\x34\xb7\x88\xe0\x23\xbe\xe5\x3d\xf4\x88\x50\x38\x26\x87\xa1\x1b\xd1\x6e\xf7\x77\xb9\xf6\x6d\xf1\x63\x17\x85\x69\xdd\x0f\x07\x82\x20\x3f\x08\x92\xfe\x20\x01\xf8\x20\x01\xbb\x8b\xc2\xa6\xee\x86\x03\x45\x7d\xad\xc7\x1e\x75\x87\x28\xfc\xd9\x21\x58\xd7\xf9\xcf\x7e\x6c\x50\xf7\x09\x09\xfa\x7e\xae\xbb\xe8\xd0\x47\xa3\x12\xf2\x17\xe7\x9e\xb5\xe9\x8c\x5e\x5a\xb3\x04\x60\x17\x85\x55\x50\xa2\x7f\x5f\xdb\x35\x1d\x8a\xb3\xe5\xf0\xeb\x92\x22\x9b\xd0\xcf\x5d\x19\x2c\xa7\xa8\x40\x07\x02\x7c\x2e\xad\x06\x55\x07\x06\xec\x76\x7f\x0f\xa8\x82\xa8\x1a\x7e\xec\xfa\x28\x17\x9a\xe6\x14\x1d\x08\x1a\x00\x9a\x62\x18\x96\xdd\x65\x11\xaa\x86\x2c\xce\x50\x77\x08\xa2\x32\xab\x76\x68\x69\xb2\x0e\x1d\x58\x00\x76\x39\x5a\x0f\x0c\x1f\x31\x80\x0c\x68\x44\x83\x80\x63\xa8\x3d\xbd\x67\x60\x00\xa9\x18\x42\x3a\xa4\x21\x17\xc6\x41\x14\x87\x3c\x11\x73\x14\x89\x48\x9e\xa4\xa2\x88\x66\x79\x32\xa0\xe1\x1e\xa2\x80\xa1\xd9\x5d\x8f\x60\x87\x86\x53\x74\x10\xf4\x93\x1c\x73\xc6\x71\x9e\xed\x71\x88\x85\x6b\x35\x85\xb7\x66\x6d\x35\xf7\xce\x7b\xe5\xfb\x5a\xb5\x9d\x5d\xfd\x42\xeb\x68\x3d\x28\x6a\xc3\x09\xcc\x9b\xad\xd5\xeb\x79\xd6\xce\x01\x22\x6c\xf6\xd1\xf4\x91\x78\xb3\xf7\xc9\xb2\xa6\xbb\xe0\xdb\x0a\x05\x28\x92\xe2\x78\x92\xf8\xaf\xd1\x8f\xcf\x38\x7e\xec\x9a\xb1\x4f\x9d\x0e\x05\xc3\x7a\xe8\x86\xb2\xf9\xda\x2b\xdf\xe6\x38\x96\x06\xe0\xeb\xe0\x93\x29\x66\xf7\x00\x85\x31\x40\x10\x86\x14\x8a\x59\xc8\xb3\x21\x1b\x04\xfb\x98\xe0\x11\x15\x07\xfb\x2f\xa0\x5c\x97\x41\x56\x1d\x06\xd4\x0f\x9f\xdb\x8f\x0e\x7d\x45\xff\x01\xab\x5d\x53\x04\xeb\x1f\x44\x45\xb0\xfe\x49\x54\x04\xeb\xff\x47\x54\x04\xeb\xef\x44\x45\xb0\xfe\x2f\xd1\x7d\x8c\x3f\x0b\xff\xab\x4c\x4e\x56\xfe\x43\xf2\x87\xfb\x8f\x22\x83\xa8\xea\xd1\x8f\xef\x1a\x06\x34\xe2\x59\x10\x46\x21\x15\x85\x31\x15\x50\x31\x0f\x69\x14\x90\x14\x45\x40\xc4\xf1\x70\xf7\x0b\xed\x76\xc5\x21\x1d\x86\xe6\x2f\x1c\xff\x75\xf2\x31\xd5\x11\xf9\x51\xae\x2d\x2c\xea\x31\xfa\x80\x75\xf9\xcf\x13\x7c\x22\xf0\x38\x0c\x63\x40\x71\x30\x8e\x22\xc4\xd0\x80\x66\x49\x12\x46\x04\x0f\x28\x00\xe8\x3d\x43\x91\xb8\xf3\x32\xb2\x09\xdd\x65\xfd\x5b\x0f\x44\xff\xaa\xec\xd3\xba\x1b\x7e\xfc\xde\x6d\x75\xf5\x65\xe7\x11\x14\x59\x74\x20\xbe\x84\x43\xaa\x5a\xb5\x5c\x86\xf5\xc0\x05\x2f\x1d\x26\xae\x6f\x7c\x7e\x6e\xdf\x5d\xff\x63\x37\xfe\xd2\xdb\xff\x85\xe3\x9f\x79\x05\x4d\xf6\x5b\x5c\x78\xd0\x64\xf8\x44\xec\x9a\x2e\x9b\x82\x01\xfd\xfc\xbc\xf0\x72\x3a\x29\xf5\x7c\x12\x05\x41\x97\x04\x5b\x11\x36\xf3\xb9\xbe\x3d\x44\xb5\x03\xed\xdd\x1c\x79\x16\xcc\x45\xbe\x9a\x86\x70\xe6\x1d\x5f\x1c\x8f\xfd\xbd\xbd\xbf\xcf\x17\x46\xa4\x98\x58\x10\x67\x93\x4a\xe6\x92\xb1\xf1\xbb\xb4\xe1\x6c\x9e\xe8\x4e\x8b\xee\x89\xf4\xb8\xaa\x5e\x6a\xe1\x9b\x25\xb3\x1a\xa7\xef\x95\xb3\x91\x2c\x3c\xe3\x9f\x90\x20\xf2\x4a\xfe\xc4\x96\x2e\x55\x65\x79\x48\x5d\x5f\xc8\x05\x40\x6d\xc7\xb3\xc5\xde\x73\x55\xb7\x60\x66\xa8\x8f\x8c\xa7\xc5\x48\x8a\xb4\xc2\x54\x8b\x2a\x10\xc5\x56\xc0\xb8\xd7\x24\x35\x32\xf1\xe0\x64\x15\xe2\x3c\x6c\x42\x26\x83\xfe\x54\x25\x23\x37\x29\xf9\x9c\x87\x1e\x44\xd2\x4b\x77\x2f\xe6\x52\xbf\x3c\x5c\x21\xa1\x8a\xb8\x98\x1c\x1e\xea\x8d\x69\x6e\xb9\x9d\xdc\x8c\xf0\xb2\x07\xef\x81\x5e\x45\xcd\x92\xb9\x26\x1c\x73\x36\x86\x95\xbc\x4f\x52\xed\x99\x6c\x97\x16\xe7\x68\xc6\xa4\xe6\xd3\xfd\xee\x34\x78\x22\xd8\x09\x47\x03\x4a\xcd\x31\x4e\xa8\x0d\x4c\xd5\x93\xc5\xcd\xdf\xae\xd5\x5c\x4f\xe4\xab\x83\x8d\x5d\x02\xa5\x49\x47\xe1\x45\x9f\xc1\x6b\xaa\xa9\xe3\xc8\x3a\xca\xd5\xf7\xd6\xd6\x35\x94\x97\xe6\x90\xe7\x31\x2f\x53\x60\xde\x73\xd3\x02\x2a\xc5\x2f\xf3\x49\x16\x6c\x41\x14\xea\x93\x28\xd8\x92\xd0\xde\xbc\xeb\x33\xcd\xd1\xe2\xd9\xb8\x1e\x72\x1a\x46\x98\x7d\x26\x88\xee\x72\x4e\x6f\x31\xe9\xfa\xc8\x3f\xbb\xca\xcc\xc8\x50\x57\xbc\xb4\xc5\x17\x36\x95\x9a\x99\x31\x0c\xc3\x6a\x4d\x93\x2e\xde\x5c\xab\x5f\xdc\x42\x54\x5a\x09\x09\x33\x43\xe6\x54\xa1\x75\xfd\xd0\x1f\x99\x2c\xe3\x28\xb6\x9c\x58\x2f\xef\xc3\x55\x3c\x6e\xac\x64\xdf\xf8\xa0\x52\x0c\xff\x02\xb0\xaa\xec\x54\x5a\x30\x98\xe5\xa1\x6d\x65\x42\x3f\x86\x63\x05\xe5\x8c\xcb\x06\x19\x6b\x5e\x50\xa6\xc2\xd7\x7b\x8b\xa1\x8a\xdd\xc7\xf1\xc2\x76\x98\xdd\x4b\x6b\x9e\x38\x10\x7f\xcf\xd8\x8d\xd5\x5a\xeb\x38\xc9\x34\x57\xba\xb6\x74\x02\xf8\x6b\x66\xdf\x6f\xe1\xe9\xba\x29\x78\xdf\x5e\xa4\x38\x19\xf6\x0c\x21\x0c\x2a\xc6\x97\x7c\x99\x92\xf6\x17\x2e\xd1\xc6\x9b\x6a\x91\x53\xc7\x15\x6a\x91\xd9\xf3\xaa\x9a\xc9\xdc\x35\x0a\x16\x76\x06\xba\x98\xc8\x38\x6e\xc4\x9d\x9d\x2e\x73\xdc\x76\x54\x47\x5f\xda\x3d\x37\x3b\x59\x5a\x6f\x08\xa3\xf2\x53\xcf\x0c\x91\x02\xbc\x5b\x7e\x6e\x82\xab\x11\x21\xa9\x9f\x6c\x2e\x53\x63\x99\xaf\x82\x61\x3f\x57\xe6\x31\x81\xb6\xe8\x62\x94\x88\xe9\x6f\xeb\x2c\xf9\x42\xad\x89\x82\xf5\x90\x38\xc1\xe3\x5a\xe0\x22\x47\xed\x50\x4d\xd3\x6a\x12\x05\xfc\x39\xc1\xc4\xfe\x06\xdc\xd9\xd9\x9c\x65\xab\xb7\x68\xbe\x5f\xd2\x53\xbc\x85\x6c\x2d\x07\xec\xf0\x8c\xb8\x87\x05\x1e\xac\x1a\xb4\x3a\xe6\x76\xcb\x9b\x75\xaf\xd4\xb9\x4f\x05\xdb\xe1\xd2\xbe\x65\x8f\x29\x37\x28\xa5\xbb\x50\xdd\xd2\xd8\xd5\xd3\x67\xc2\x48\x3d\xcb\x24\x4f\x04\x8d\x3e\x3b\x8f\x44\xde\x60\xbc\x2f\xeb\xfd\xde\x6b\xde\x4d\x5e\x63\x1e\x6d\x25\xd4\x8c\x5c\xcd\xaa\x2e\x58\xea\x44\xd7\xcc\xa9\xdd\x32\xf7\xa7\x3d\x67\x5d\x93\xf0\x76\xc3\xc6\x21\xfa\xd6\x7b\x67\x20\x15\xef\x93\x28\x8e\x58\x50\x16\x82\x78\x3d\x25\xcd\xd1\x86\x30\x70\x56\x25\xa1\xbc\x5a\xb2\x6b\x91\xa8\x5f\xce\x25\xe7\x38\x62\xda\x24\x76\xe6\x96\xd9\xbb\x81\xa4\xd1\xb5\x37\x8b\x4f\x1a\xaf\x22\xa5\x49\x3c\x23\xc3\xd6\xe8\x99\x99\xd5\x76\xe4\xfc\xbc\xba\x66\x82\xe4\xf9\x6c\x42\x70\xd2\x56\x48\x2e\x3c\xba\x1a\x71\xf5\x53\xbd\x1e\x88\x2d\x79\xd9\x26\x8f\x3f\x85\xe9\xfd\xf4\x59\xd2\x2b\x69\x15\x5e\x3b\x25\x50\x29\x6c\xe4\xb8\xeb\xfb\x4d\xee\x27\x5b\x61\x2e\xb2\xc5\x59\xe4\xf8\xb8\xd9\xf3\x49\x7b\xa5\xfc\x26\xd4\x9a\xa0\x19\x6f\xed\xb8\x79\x66\x81\x78\x22\x2a\xfa\x73\x1f\xc7\x89\x4c\x1a\xf5\xb9\x7f\xb5\x61\x69\x46\xef\x79\x0d\x2f\x52\xca\xbe\x53\x41\xc1\x6b\x1c\x2b\xe9\x71\xa6\xfd\x23\x1b\x14\x05\x8c\x54\xdc\x6b\xc6\x23\xa1\x0a\x9a\xa6\x8e\x4a\x42\x56\x79\xe7\xe0\x0c\x65\xdf\x25\xd2\xbe\x9e\xcc\x39\xb2\x5b\xad\x55\xdd\x85\x83\x77\x97\xa2\xbd\xd7\xac\xe2\x2e\x2d\x3c\xfc\x39\x3a\x63\xe5\x33\xbf\x26\xce\xab\x88\xc7\x94\x71\x85\x5e\x3a\x32\xeb\xb0\xb4\x21\x61\x61\x67\x1e\xbf\xd6\x9d\x4b\x36\xf0\x0e\x24\xba\xcf\xaa\xd5\x72\x75\xd3\x70\xa5\xc4\x13\xd5\xb3\xd9\x1f\x1f\xd5\x46\xea\xb7\xc5\xe0\x96\x52\xa3\x3d\x9d\x7a\xc6\xa2\x61\xed\x4b\xce\x5a\x4f\x27\x61\x2f\xbd\xfb\x0d\xf8\xef\x2b\x4d\x49\x7a\x6e\x9e\xb5\x3c\x10\xee\x5b\xf7\x62\x5f\xe1\xd0\xba\x72\x03\xaa\x33\xc6\x7a\x93\xb3\x85\xc5\xf8\xe2\xf8\x54\xf0\x64\x79\xcf\x03\x57\x92\x6e\xd2\x20\xba\xaa\xae\xdc\x2f\x33\x09\x95\x35\x2b\x4f\x83\x16\x4d\xa0\xe7\xf6\x6d\x4e\xc4\x7e\x2e\x04\x86\x74\x14\x33\x1e\x46\x58\xd3\x11\xcc\xd0\x62\xe9\x7d\x92\x41\xcc\x1c\x1f\xfa\xf4\xbc\xf8\x82\xd1\x14\x04\xed\x71\x8a\x15\x4a\xf7\xcc\xd6\xc5\x44\xca\xee\xfa\xa5\xaf\xf6\x4f\x06\x69\x8f\x1b\x0d\x8f\x16\x63\xda\xdc\x95\x7d\x90\xc0\xb7\xb4\x93\x3e\xb9\xfd\xd9\x1d\x8a\xed\x36\x54\xe8\xac\xdc\xda\xc7\xcb\x6f\x1f\x0d\x7f\x81\x43\x63\x6c\x66\x31\xda\x17\x6d\x73\x6e\x44\xa4\x54\x49\x54\x59\x01\xd9\x7b\x49\x14\x71\x82\xe3\xad\xc0\xd4\x32\x7f\x14\xe5\x8b\x40\xa5\x20\x06\xc1\xa3\xb7\xc7\xb0\xb8\xc6\xae\x86\x01\xfb\x88\x53\x6d\xb7\x9a\xa7\xfb\xd3\xc4\x4a\x4e\xae\xa4\x21\x6f\x72\x57\x23\xb4\x13\x83\x83\x85\xf7\x1f\x8f\xe2\xbe\x86\xa7\x69\xdb\x1f\x39\xb3\x18\x4e\xcb\xab\xc3\x77\xb0\x8a\xfe\x18\x33\x30\xaa\x7e\x1f\x33\xfd\x10\x0c\x19\xdc\xed\xfe\xfe\xfe\xed\x28\x83\xe5\xda\x05\x59\x8f\x0e\x14\x00\xe0\x3f\x01\x00\x00\xff\xff\x88\xf8\xd1\xbf\x27\x0a\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: 2433, mode: os.FileMode(420), modTime: time.Unix(1602832001, 0)} + info := bindataFileInfo{name: "config/app.test.ini", size: 2599, mode: os.FileMode(420), modTime: time.Unix(1603700294, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -191,8 +191,8 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "config/app.dev.ini": configAppDevIni, "config/app.ini": configAppIni, + "config/app.prod.ini": configAppProdIni, "config/app.test.ini": configAppTestIni, } @@ -238,8 +238,8 @@ type bintree struct { var _bintree = &bintree{nil, map[string]*bintree{ "config": &bintree{nil, map[string]*bintree{ - "app.dev.ini": &bintree{configAppDevIni, map[string]*bintree{}}, "app.ini": &bintree{configAppIni, map[string]*bintree{}}, + "app.prod.ini": &bintree{configAppProdIni, map[string]*bintree{}}, "app.test.ini": &bintree{configAppTestIni, map[string]*bintree{}}, }}, }} diff --git a/app/lib/config/config.go b/app/lib/config/config.go index 15be038..d8cc888 100644 --- a/app/lib/config/config.go +++ b/app/lib/config/config.go @@ -21,23 +21,22 @@ func init() { if err != nil { panic(err) } + // 覆盖配置 + for _, s := range asset.AssetNames() { + if err := asset.RestoreAsset(Config.WorkPath, s); err != nil { + log.Fatal("释放资源出错", err) + return + } + } // 配置读取 Config.File, err = ini.Load(Config.WorkPath + "/config/app.ini") if err != nil { - for _, s := range asset.AssetNames() { - if err := asset.RestoreAsset(Config.WorkPath, s); err != nil { - log.Fatal("释放资源出错", err) - return - } - } - Config.File, err = ini.Load(Config.WorkPath + "/config/app.ini") - if err != nil { - log.Fatal("配置文件读取失败,err:", err) - return - } + log.Fatal("配置文件读取失败,err:", err) + return } Config.ValueMapper = ExpandValueEnv Config.RUNMODE = Config.Section("").Key("runmode").String() + log.Println(Config.RUNMODE) if Config.RUNMODE != "" { Config.Append(Config.WorkPath + "/config/app." + Config.RUNMODE + ".ini") } diff --git a/app/logic/live/im.go b/app/logic/live/im.go index 9c6f638..1cf6642 100644 --- a/app/logic/live/im.go +++ b/app/logic/live/im.go @@ -20,6 +20,7 @@ const ( LiveGroupMsgTypeLiveStop = "LiveStop" LiveGroupMsgTypeBuyGoods = "BuyGoods" LiveGroupMsgTypeNotice = "Notice" + LiveGroupMsgTypePraise = "Praise" ) var ImLogic = &im{} diff --git a/app/logic/live/live.go b/app/logic/live/live.go index 8253d07..e982abc 100644 --- a/app/logic/live/live.go +++ b/app/logic/live/live.go @@ -13,6 +13,7 @@ import ( "live/app/logic/goods" live2 "live/app/model/live" "live/app/model/user" + "log" "strconv" "time" ) @@ -47,6 +48,7 @@ func (l live) Start(userId uint, title, cover string, topic uint, goodsIds []uin } groupId := fmt.Sprintf("group_%d", userId) if err = tencent.Im.AddLiveGroup(info.Identifier, "直播群", groupId); err != nil { + log.Println(err) return LiveInfo{}, err } liveRoom = live2.LiveRoom{ @@ -170,6 +172,27 @@ func (l *live) Stop(userId, liveItemId uint) error { }) } +// @Title 直播视频录制 +func (l *live) Transcribe(liveItemId uint) error { + liveItem := &live2.LiveItem{} + item := liveItem.FindById(liveItemId) + if item.TranscribeType != live2.LIVE_Transcribe_Type_none { + return nil + } + if item.FileId == "" { + row := liveItem.Transcribe(liveItemId, live2.LIVE_Transcribe_Type_ing) + if row <= 0 { + return errors.New("网络错误") + } + } else { + row := liveItem.Transcribe(liveItemId, live2.LIVE_Transcribe_Type_finish) + if row <= 0 { + return errors.New("网络错误") + } + } + return nil +} + type replyStopLiveInfo struct { Nickname string `json:"nickname"` HeadImgUrl string `json:"headImgUrl"` diff --git a/app/logic/live/praise.go b/app/logic/live/praise.go index cf07bd4..9966968 100644 --- a/app/logic/live/praise.go +++ b/app/logic/live/praise.go @@ -2,6 +2,7 @@ package live import ( "errors" + "github.com/gin-gonic/gin" "live/app/lib/config" live2 "live/app/model/live" "live/app/model/user" @@ -65,5 +66,11 @@ func (p *Praise) AddPraise(userId, liveItemId, praise uint) (err error) { if row <= 0 { return errors.New("点赞失败") } + + // 发送广播 + ImLogic.SendLiveGroupMessage(info.RoomId, LiveGroupMsgTypePraise, gin.H{ + "praise": trendPraise.Praise + praise, + "addPraise": praise, + }) return } diff --git a/app/model/live/liveItem.go b/app/model/live/liveItem.go index 59dff70..c95bace 100644 --- a/app/model/live/liveItem.go +++ b/app/model/live/liveItem.go @@ -6,27 +6,33 @@ import ( ) const ( - LIVE_STATUS_finish = 0 - LIVE_STATUS_ing = 1 + LIVE_STATUS_finish = 0 // 已完成直播 + LIVE_STATUS_ing = 1 // 直播中 + + LIVE_Transcribe_Type_none = 0 // 不录制 + LIVE_Transcribe_Type_ing = 1 // 录制中 + LIVE_Transcribe_Type_finish = 2 // 录制完成 ) 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"` - Status int `gorm:"column:status" json:"status"` - CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"` - UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"` - StartAt formatime.Second `gorm:"column:start_at" json:"startAt"` - EndAt formatime.Second `gorm:"column:end_at" json:"endAt"` - VideoUrl string `gorm:"column:video_url" json:"videoUrl"` - Fans uint `gorm:"column:fans" json:"fans"` + 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"` + Status int `gorm:"column:status" json:"status"` + CreatedAt formatime.Second `gorm:"column:created_at" json:"createdAt"` + UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"` + StartAt formatime.Second `gorm:"column:start_at" json:"startAt"` + EndAt formatime.Second `gorm:"column:end_at" json:"endAt"` + FileId string `gorm:"column:file_id" json:"fileId"` + VideoUrl string `gorm:"column:video_url" json:"videoUrl"` + Fans uint `gorm:"column:fans" json:"fans"` + TranscribeType int `gorm:"column:transcribe_type" json:"transcribeType"` } // 插入 @@ -40,7 +46,7 @@ func (l *LiveItem) Create(liveItem *LiveItem) uint { // @Title 当前直播列表 func (l *LiveItem) Lists(start, limit int) (result []LiveItem) { - l.GetDb().Model(&LiveItem{}).Offset(start).Limit(limit).Order("id desc").Find(&result) + l.GetDb().Model(&LiveItem{}).Where("status = ? or transcribe_type = ?", LIVE_STATUS_ing, LIVE_Transcribe_Type_finish).Offset(start).Limit(limit).Order("id desc").Find(&result) return } @@ -94,3 +100,8 @@ func (l *LiveItem) GetLiveItemIng(userId uint) (result LiveItem) { l.GetDb().Model(&LiveItem{}).First(&result, "user_id = ? and `status` = ?", userId, LIVE_STATUS_ing) return } + +// @Title 更改录播状态 +func (l *LiveItem) Transcribe(liveItemId uint, transcribeType int) int64 { + return l.GetDb().Model(&LiveItem{}).Where("id = ?", liveItemId).Update("transcribe_type", transcribeType).RowsAffected +} diff --git a/app/model/user/userData.go b/app/model/user/userData.go index 7391568..219cfa3 100644 --- a/app/model/user/userData.go +++ b/app/model/user/userData.go @@ -5,13 +5,19 @@ import ( "live/app/lib/db" ) +const ( + LiveTreatyNone = 0 + LiveTreatyAgree = 1 +) + type UserData struct { db.BaseModel - Id uint `gorm:"column:id" json:"id"` - UserId uint `gorm:"column:user_id" json:"userId"` - Follows uint `gorm:"column:follows" json:"follows"` - Fans uint `gorm:"column:fans" json:"fans"` - Praise uint `gorm:"column:praise" json:"praise"` + Id uint `gorm:"column:id" json:"id"` + UserId uint `gorm:"column:user_id" json:"userId"` + Follows uint `gorm:"column:follows" json:"follows"` + Fans uint `gorm:"column:fans" json:"fans"` + Praise uint `gorm:"column:praise" json:"praise"` + LiveTreaty uint `gorm:"column:live_treaty" json:"liveTreaty"` } // 插入 @@ -48,7 +54,7 @@ func (u *UserData) AddFollow(userId uint) int64 { if userId == 0 { return 0 } - rows := u.GetDb().Model(u).Where(UserData{UserId: userId}).Update("follows", gorm.Expr("follows + ?", 1)).RowsAffected + rows := u.GetDb().Model(u).Where("user_id = ?", userId).Update("follows", gorm.Expr("follows + ?", 1)).RowsAffected if rows == 0 { id := u.GetDb().Create(&UserData{ UserId: userId, @@ -66,7 +72,7 @@ func (u *UserData) CancelFollow(userId uint) int64 { if userId == 0 { return 0 } - return u.GetDb().Model(u).Where(&UserData{UserId: userId}).Update("follows", gorm.Expr("follows - ?", 1)).RowsAffected + return u.GetDb().Model(u).Where("user_id = ?", userId).Update("follows", gorm.Expr("follows - ?", 1)).RowsAffected } // @Title 会员新增粉丝 @@ -74,7 +80,7 @@ func (u *UserData) AddFans(userId uint) int64 { if userId == 0 { return 0 } - rows := u.GetDb().Model(u).Where(&UserData{UserId: userId}).Update("fans", gorm.Expr("fans + ?", 1)).RowsAffected + rows := u.GetDb().Model(u).Where("user_id = ?", userId).Update("fans", gorm.Expr("fans + ?", 1)).RowsAffected if rows == 0 { id := u.GetDb().Create(&UserData{ UserId: userId, @@ -92,7 +98,7 @@ func (u *UserData) CancelFans(userId uint) int64 { if userId == 0 { return 0 } - return u.GetDb().Model(u).Where(&UserData{UserId: userId}).Update("fans", gorm.Expr("fans - ?", 1)).RowsAffected + return u.GetDb().Model(u).Where("user_id = ?", userId).Update("fans", gorm.Expr("fans - ?", 1)).RowsAffected } // @Title 会员新增赞 @@ -100,7 +106,7 @@ func (u *UserData) AddPraise(userId, praise uint) int64 { if userId == 0 { return 0 } - rows := u.GetDb().Model(u).Where(&UserData{UserId: userId}).Update("praise", gorm.Expr("praise + ?", praise)).RowsAffected + rows := u.GetDb().Model(u).Where("user_id = ?", userId).Update("praise", gorm.Expr("praise + ?", praise)).RowsAffected if rows == 0 { id := u.GetDb().Create(&UserData{ UserId: userId, @@ -118,5 +124,13 @@ func (u *UserData) CancelPraise(userId uint) int64 { if userId == 0 { return 0 } - return u.GetDb().Model(u).Where(&UserData{UserId: userId}).Update("praise", gorm.Expr("praise - ?", 1)).RowsAffected + return u.GetDb().Model(u).Where("user_id = ?", userId).Update("praise", gorm.Expr("praise - ?", 1)).RowsAffected +} + +// @Title 同意直播协议 +func (u *UserData) Treaty(userId uint) int64 { + if userId == 0 { + return 0 + } + return u.GetDb().Model(u).Where("user_id = ?", userId).Update("live_treaty", LiveTreatyAgree).RowsAffected } diff --git a/app/router/router.go b/app/router/router.go index cfc2cc4..d20ca82 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -115,11 +115,14 @@ func Router(router *gin.Engine) { { liveC := &live.Live{} { + liveR.POST("license", liveC.License) // 直播列表 liveR.POST("list", liveC.List) // 直播列表 liveR.POST("info", auth, liveC.Info) // 当前用户直播信息获取 + liveR.POST("agree", auth, liveC.Agree) // 同意协议 liveR.POST("follow_list", auth, liveC.FollowList) // 关注主播直播列表 liveR.POST("start", auth, liveC.Start) // 开始直播 liveR.POST("stop", auth, liveC.Stop) // 结束直播 + liveR.POST("transcribe", auth, liveC.Transcribe) // 确认录制视频 liveR.POST("live_info", bothAuth, liveC.LiveInfo) // 获取直播间信息 liveR.POST("video_info", bothAuth, liveC.VideoInfo) // 录播信息 liveR.POST("explain", auth, liveC.Explain) // 讲解 diff --git a/build.sh b/build.sh index 6bf6765..ca54bda 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash echo "编译中" -go-bindata -o=./app/lib/asset/asset.go -pkg=asset config/... +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"` diff --git a/config/app.prod.ini b/config/app.prod.ini new file mode 100644 index 0000000..783c7c9 --- /dev/null +++ b/config/app.prod.ini @@ -0,0 +1,46 @@ +debug=false + +[mysql] +dbhost=rm-uf650e6f4439fxw54.mysql.rds.aliyuncs.com +dbport=3306 +dbuser=db_recook_super +dbpassword=sduEb9MTSiqhweXGpxa0 +dbname=db_recook +prefix=recook_live_ +maxIdle=10 +maxOpen=500 + +[tencent] +sdkAppId=1400435566 +identifier=admin +expire=600 +key=59d502a4e40a8537475cac3fcc4b4c8bfadfb91f832e2923dd4692a4c7cea546 +secretId=AKIDf8LHwwQutfAPnvbRpyqGUS9YmjPnqrQn +secretKey=EFp8A5j6oFPJwGJae1Q6VpsdBRQ7gxyh +appId=1303238921 +[tencent.live] +pushTreaty=rtmp +pushExpire=86400 +pushKey=f670ebf0eccb3ef6c96b6aa7f19e3fa7 +pushDomain=livepush.reecook.cn +playTreaty=rtmp +playExpire=86400 +playKey=f670ebf0eccb3ef6c96b6aa7f19e3fa7 +playDomain=play.reecook.cn +playSuffix= +expireTime=86400 +[tencent.live.license] +key=5a4e960bdb3dbf3a3f9c4ea2331ce89c +licenseUrl=http://license.vod2.myqcloud.com/license/v1/fbbf038cfdde5404622cd19030047532/TXLiveSDK.licence +[tencent.short] +expire=600 +oneTimeValid=1 +key=c3nyGkDcot8aXKcgUZLe + +[recook] +url=https://api.reecook.cn/api/v1 +private_key=MIIEowIBAAKCAQEAzNWyjYe3qt4YRTDwANxDPNLAJ9TZBuHsSqSjJM5B35fABwN3gwm5Q/SCz/6kgKTqeSgCVPFYhO/zOD6G8K7EJLgx95ZIeAB9EkW+xrhFDDthUZAkA03zHJO6SkFKOciLFVi94BdCdGlNFlnaBBqA+8XvCpD1V8DFc/9cpb5icZvngu8vEkwkbYceCXKUMNxoXY/E2cFe8f2tVFR5pRkQgRLbM70jt4yBGOD8pbuk6fcnD7ghGWgzMq/845N3wISSTp/gAQg8403Fk+8AoL+FKgxUkjUOpPI2XrcpQm0EphuAX4J0Xvo3Hu6TEPZYyqULEXGT2Jukmh0NSkNO0F39xwIDAQABAoIBAQCAqRYPWhkexYQ/Kb8G+1NsiABUxJhRf2UZeZJUEw5DcKEYhq/x6hCpw5LLLOqNN4lj8qKMUlBEqCeAw52k3lGrstsH5ii836mv6YksbyBHz6CQR9anELZM0+nmrF4AL5xVGzmg4VtHncDi8itD+pXcD3bXjzfcF+SuuM6r+QsCykgTc/jw+R6GqOHvD48mUQCI0/Xw6jjAWUUh0jRX2BvLQwcccan5ZCZD3C7M8gGuRFO2vr8lFliQwyFNgwrpE+brLeMNeLHz1S6vMwfqr3r4Mq78wTihoze+3kIs5tdE0YRkJpaPLdeCsvQ8iFfD9nat7wnNHgcQBU+3B+KjOJCZAoGBAOVC8AY8q0UeTFreo44Fgda9Jg+BsR0UwTzTxzozdwSMhIfzb6oDa6tWd8VO0V6FaqK+Urxj6UP3JshAQT8hsq6Hh8tEmUx3rxpQnWZ5bdFJD291apKwTVgDzcf7mo77Ypjpko+Y4Og3weUGOnM+hTdPiToUmkZv78OPgbRR+utdAoGBAOS5c3f7gdfd60mlABPIgpHQccaTyEg3YoCQoB1oXTMk881vzC6w8xwYR0gpKGj6/vG9FeEpgYLi+ydWiNnzH8ZknPiACYZ6g18CzlCUcHUG1PZhKot1zgXQN9/WAvjWZ62Ym4FcPrEaF3+u88Pjj27vQE5MDO8O2uVRQwIGXh9zAoGAGLjGHzYNle91dlsJsffgD2LoJsXqbmNdjwybMCh6jhAE/o/+m4uw4ZH6allcdF/YpuH1FAGGFuEg2nkrT/53QSC2QPINwdQqGqFUx8cSU34YXwF/U4AVZwdJ+mWkPgTXlfuh5UAsCH5ytxqb1O+J9/PorU2pcS0C4sinyOUKNLUCgYBFJNsHVnz2KRxL8xmG4YK3WfBLO7m8OyIIA7Cjsz0ZjP43CKkNJGkaASzrX6XbtqUDp0nJ+6YvTzbluX89hAYDD790UCCRCtBUFKESMw2cEyimItGdv0s87qk1fZkAaLCHBi9cd+pr15tq+hSvD0f5HVKvWMZALpl14Y8EObCSiQKBgCiSKMsn7W5eGVR4cHO5NQ8P6V20ZOGIKvUsJUtlzRtneJERqVXZqVp9MctpLzNluQMGzTR1dEngdnOa2sYgdd8ATYy0NGiZuBDMA3h0f0aVsQublPfUG+0QH/3qryNISWN+m8DnCtkpkUG1GI5/0x9ZVVlSybIvz7H8NltIxXr/ +cnd=https://cdn.reecook.cn/static + +[live] +maxPraise=3000 \ No newline at end of file diff --git a/config/app.test.ini b/config/app.test.ini index 6d584f2..6e5d692 100644 --- a/config/app.test.ini +++ b/config/app.test.ini @@ -29,6 +29,9 @@ playKey=f670ebf0eccb3ef6c96b6aa7f19e3fa7 playDomain=testplay.reecook.cn playSuffix= expireTime=86400 +[tencent.live.license] +key=5a4e960bdb3dbf3a3f9c4ea2331ce89c +licenseUrl=http://license.vod2.myqcloud.com/license/v1/fbbf038cfdde5404622cd19030047532/TXLiveSDK.licence [tencent.short] expire=600 oneTimeValid=1 diff --git a/main.go b/main.go index 2a46455..80a8baf 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,10 @@ func main() { } r := gin.Default() - // 直播主动拿回调任务 - go task.Run() + if !config.Config.Section("").Key("debug").MustBool() { + // 直播主动拿回调任务 + go task.Run() + } // 路由配置 router.Router(r)