From c1642c77122100d0858259a8e4369b69ce2fb841 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 5 Dec 2024 15:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/member_center/hdl_user_management.go | 3 +- app/hdl/notice/hdl_notice.go | 2 +- app/md/md_notice.go | 2 + app/router/router.go | 6 ++ app/svc/advertising/svc_function.go | 2 + app/svc/advertising/svc_list.go | 2 + app/svc/notice/svc_aliyun_sms.go | 3 + app/svc/notice/svc_notice.go | 5 +- docs/docs.go | 59 +++++++++++++++++++- docs/swagger.json | 59 +++++++++++++++++++- docs/swagger.yaml | 40 ++++++++++++- go.mod | 2 +- 12 files changed, 174 insertions(+), 11 deletions(-) diff --git a/app/hdl/member_center/hdl_user_management.go b/app/hdl/member_center/hdl_user_management.go index 65a879a..157ea91 100644 --- a/app/hdl/member_center/hdl_user_management.go +++ b/app/hdl/member_center/hdl_user_management.go @@ -4,6 +4,7 @@ import ( "applet/app/db" "applet/app/e" "applet/app/md/member_center" + svc2 "applet/app/svc" svc "applet/app/svc/member_center" "applet/app/utils" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" @@ -107,7 +108,7 @@ func UserManagementGetUserList(c *gin.Context) { list[i] = md.UserManagementGetUserListNode{ ID: user.Id, Sex: user.Sex, - Avatar: user.Avatar, + Avatar: svc2.GetOssUrl(user.Avatar), Nickname: user.Nickname, Phone: user.Phone, IsRealName: user.IsRealName, diff --git a/app/hdl/notice/hdl_notice.go b/app/hdl/notice/hdl_notice.go index 23783f1..6f7b9d3 100644 --- a/app/hdl/notice/hdl_notice.go +++ b/app/hdl/notice/hdl_notice.go @@ -72,7 +72,7 @@ func PushList(c *gin.Context) { // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" -// @Param req body md.NoticeSaveReq true "(分页信息必填)" +// @Param req body md.NoticePushSaveReq true "(分页信息必填)" // @Success 200 {string} "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/notice/jPush/push/save [post] diff --git a/app/md/md_notice.go b/app/md/md_notice.go index ee88e55..2ed8bb5 100644 --- a/app/md/md_notice.go +++ b/app/md/md_notice.go @@ -62,6 +62,7 @@ type NoticePushSaveReq struct { SendStartTime string `json:"send_start_time"` SendEndTime string `json:"send_end_time"` UserList []string `json:"user_list"` + TagList []string `json:"tag_list"` Level string `json:"level"` } @@ -114,5 +115,6 @@ type NoticeAliyunSmsPushSaveReq struct { Content string `json:"content"` Target string `json:"target"` PhoneList []string `json:"phone_list"` + TagList []string `json:"tag_list"` Level string `json:"level"` } diff --git a/app/router/router.go b/app/router/router.go index 98410ac..854f8d7 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -129,11 +129,17 @@ func rNotice(r *gin.RouterGroup) { rJpush := r.Group("/jPush") //极光 { rJpush.POST("/push/list", notice.PushList) + rJpush.POST("/getUserList", member_center.UserManagementGetUserList) + rJpush.GET("/getTagList", member_center.GetTagList) + rJpush.GET("/getLevelList", member_center.GetLevelList) rJpush.POST("/push/save", notice.PushSave) } rAliyunSms := r.Group("/aliyunSms") //阿里云短信 { rAliyunSms.POST("/file/phone", notice.AliyunSmsFilePhone) + rAliyunSms.POST("/getUserList", member_center.UserManagementGetUserList) + rAliyunSms.GET("/getTagList", member_center.GetTagList) + rAliyunSms.GET("/getLevelList", member_center.GetLevelList) rAliyunSms.GET("/sale/base", notice.AliyunSmsSaleBase) rAliyunSms.POST("/sale/save", notice.AliyunSmsSaleSave) rAliyunSms.POST("/push/list", notice.AliyunSmsPushList) diff --git a/app/svc/advertising/svc_function.go b/app/svc/advertising/svc_function.go index 5fa12e4..8043e10 100644 --- a/app/svc/advertising/svc_function.go +++ b/app/svc/advertising/svc_function.go @@ -25,6 +25,8 @@ func FunctionList(c *gin.Context) { {"name": "提现(激励视频)", "value": "incentive_withdraw"}, {"name": "积分兑换(插屏)", "value": "interstitial_integralExchange"}, {"name": "动态IM(信息流)", "value": "information_im"}, + {"name": "短视频(短视频)", "value": "short_video"}, + {"name": "短剧(短剧)", "value": "short_playlet"}, } NewAdvertisingSpaceDb := implement.NewAdvertisingSpaceDb(db.Db) adv, _, _ := NewAdvertisingSpaceDb.FindUserFeedbackCateAndTotal("1", "1000", "", "") diff --git a/app/svc/advertising/svc_list.go b/app/svc/advertising/svc_list.go index c46b6ac..8944a57 100644 --- a/app/svc/advertising/svc_list.go +++ b/app/svc/advertising/svc_list.go @@ -24,6 +24,8 @@ func List(c *gin.Context) { {"name": "激励视频", "value": "3"}, {"name": "信息流广告", "value": "4"}, {"name": "全屏视频", "value": "5"}, + {"name": "短视频", "value": "6"}, + {"name": "短剧", "value": "7"}, } resp.SelectData = md.AdvertisingPlatform NewJpushNoticeDb := implement.NewAdvertisingSpaceDb(db.Db) diff --git a/app/svc/notice/svc_aliyun_sms.go b/app/svc/notice/svc_aliyun_sms.go index 0b9f5a7..6623e2e 100644 --- a/app/svc/notice/svc_aliyun_sms.go +++ b/app/svc/notice/svc_aliyun_sms.go @@ -151,6 +151,8 @@ func AliyunSmsPushList(c *gin.Context) { {"name": "全部会员", "value": "0"}, {"name": "指定会员", "value": "1"}, {"name": "指定等级", "value": "2"}, + {"name": "指定标签", "value": "3"}, + {"name": "站外手机", "value": "4"}, } NewAliyunSmsRecordDb := implement.NewAliyunSmsRecordDb(db.Db) notice, total, _ := NewAliyunSmsRecordDb.FindAliyunSmsRecordAndTotal(req.Page, req.Limit, "") @@ -184,6 +186,7 @@ func AliyunSmsPushSave(c *gin.Context) { Platform: "all", Target: req.Target, Phone: utils.SerializeStr(req.PhoneList), + TagId: utils.SerializeStr(req.TagList), Level: utils.StrToInt(req.Level), Title: req.Title, Content: req.Content, diff --git a/app/svc/notice/svc_notice.go b/app/svc/notice/svc_notice.go index 578948c..6a4a7bf 100644 --- a/app/svc/notice/svc_notice.go +++ b/app/svc/notice/svc_notice.go @@ -26,14 +26,13 @@ func List(c *gin.Context) { {"name": "昵称", "value": "{昵称}"}, {"name": "手机号", "value": "{手机号}"}, {"name": "金额", "value": "{金额}"}, - {"name": "时间", "value": "{时间}"}, {"name": "小时", "value": "{小时}"}, {"name": "升级后等级", "value": "{升级后等级}"}, } resp.SelectData = []map[string]string{ {"name": "X小时未签到提醒", "value": "sign"}, - {"name": "提现到账提醒", "value": "withdraw"}, {"name": "X小时未登录提醒", "value": "login"}, + {"name": "提现到账提醒", "value": "withdraw"}, {"name": "升级提醒", "value": "update"}, } if notice != nil { @@ -113,6 +112,7 @@ func PushList(c *gin.Context) { {"name": "全部会员", "value": "0"}, {"name": "指定会员", "value": "1"}, {"name": "指定等级", "value": "2"}, + {"name": "指定标签", "value": "3"}, } NewJpushRecordDb := implement.NewJpushRecordDb(db.Db) notice, total, _ := NewJpushRecordDb.FindJpushRecordAndTotal(req.Page, req.Limit, "") @@ -153,6 +153,7 @@ func PushSave(c *gin.Context) { Platform: req.Platform, Target: req.Target, UserId: utils.SerializeStr(req.UserList), + TagId: utils.SerializeStr(req.TagList), Level: utils.StrToInt(req.Level), Title: req.Title, Content: req.Content, diff --git a/docs/docs.go b/docs/docs.go index 7ba9435..02807b8 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -965,7 +965,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ArticleDelReq" + "$ref": "#/definitions/md.CloudBundleDelReq" } } ], @@ -6637,7 +6637,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeSaveReq" + "$ref": "#/definitions/md.NoticePushSaveReq" } } ], @@ -8670,6 +8670,17 @@ const docTemplate = `{ } } }, + "md.CloudBundleDelReq": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "md.CloudBundleImgResp": { "type": "object", "properties": { @@ -11505,6 +11516,50 @@ const docTemplate = `{ } } }, + "md.NoticePushSaveReq": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "string" + }, + "level": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "send_end_time": { + "type": "string" + }, + "send_start_time": { + "type": "string" + }, + "send_type": { + "type": "string" + }, + "tag_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "target": { + "type": "string" + }, + "title": { + "type": "string" + }, + "user_list": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "md.NoticeSaveReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 6c7931e..edeb7a7 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -957,7 +957,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ArticleDelReq" + "$ref": "#/definitions/md.CloudBundleDelReq" } } ], @@ -6629,7 +6629,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeSaveReq" + "$ref": "#/definitions/md.NoticePushSaveReq" } } ], @@ -8662,6 +8662,17 @@ } } }, + "md.CloudBundleDelReq": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "md.CloudBundleImgResp": { "type": "object", "properties": { @@ -11497,6 +11508,50 @@ } } }, + "md.NoticePushSaveReq": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "string" + }, + "level": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "send_end_time": { + "type": "string" + }, + "send_start_time": { + "type": "string" + }, + "send_type": { + "type": "string" + }, + "tag_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "target": { + "type": "string" + }, + "title": { + "type": "string" + }, + "user_list": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "md.NoticeSaveReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 0021767..fb869fd 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -956,6 +956,13 @@ definitions: version: type: string type: object + md.CloudBundleDelReq: + properties: + ids: + items: + type: string + type: array + type: object md.CloudBundleImgResp: properties: android_logo: @@ -2922,6 +2929,35 @@ definitions: total: type: integer type: object + md.NoticePushSaveReq: + properties: + content: + type: string + id: + type: string + level: + type: string + platform: + type: string + send_end_time: + type: string + send_start_time: + type: string + send_type: + type: string + tag_list: + items: + type: string + type: array + target: + type: string + title: + type: string + user_list: + items: + type: string + type: array + type: object md.NoticeSaveReq: properties: content: @@ -5314,7 +5350,7 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.ArticleDelReq' + $ref: '#/definitions/md.CloudBundleDelReq' produces: - application/json responses: @@ -9063,7 +9099,7 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.NoticeSaveReq' + $ref: '#/definitions/md.NoticePushSaveReq' produces: - application/json responses: diff --git a/go.mod b/go.mod index c49201f..5ca2b5e 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241204091019-14b93d36ac8e + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241205055206-f02789cb9cac code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241203080408-75cfef2c6334 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5