Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweijian
hilo-user
Commits
c3d71b31
Commit
c3d71b31
authored
Jul 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派对邀请
parent
8194b74c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
invite_apply.go
cv/invite_cv/invite_apply.go
+9
-0
party_invite.go
route/invite_r/party_invite.go
+21
-1
router.go
route/router.go
+1
-0
No files found.
cv/invite_cv/invite_apply.go
View file @
c3d71b31
...
@@ -31,3 +31,12 @@ type InviteApplyNumRes struct {
...
@@ -31,3 +31,12 @@ type InviteApplyNumRes struct {
Type
int
`json:"type"`
// 1.已申请2.待审核3.已通过4.已拒绝"
Type
int
`json:"type"`
// 1.已申请2.待审核3.已通过4.已拒绝"
Num
int
`json:"num"`
Num
int
`json:"num"`
}
}
type
AgentPeriod
struct
{
Week
[]
AgentPeriodWeek
`json:"week"`
}
type
AgentPeriodWeek
struct
{
StartDate
string
`json:"startDate"`
EndDate
string
`json:"endDate"`
}
route/invite_r/party_invite.go
View file @
c3d71b31
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/utils"
"git.hilo.cn/hilo-common/utils"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/jinzhu/now"
"hilo-user/cv/invite_cv"
"hilo-user/cv/invite_cv"
"hilo-user/domain/cache/user_c"
"hilo-user/domain/cache/user_c"
"hilo-user/domain/model/invite_m"
"hilo-user/domain/model/invite_m"
...
@@ -215,7 +216,7 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -215,7 +216,7 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
nil
return
myCtx
,
nil
}
}
// @tags
推广团队管理
// @tags
新人邀请
// @Summary 平台列表
// @Summary 平台列表
// @Success 200 {object} []string
// @Success 200 {object} []string
// @Router /v2/user/invite/platform [get]
// @Router /v2/user/invite/platform [get]
...
@@ -224,3 +225,22 @@ func PromotionPlatform(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -224,3 +225,22 @@ func PromotionPlatform(c *gin.Context) (*mycontext.MyContext, error) {
resp
.
ResponseOk
(
c
,
[]
string
{
"Falla"
,
"Yalla"
,
"Whisper"
,
"Ahlan"
,
"Mashi"
,
"YoYo"
,
"Yoho"
,
"Echo"
,
"Hawa"
,
"Yalla Ludo"
,
"Hafla"
})
resp
.
ResponseOk
(
c
,
[]
string
{
"Falla"
,
"Yalla"
,
"Whisper"
,
"Ahlan"
,
"Mashi"
,
"YoYo"
,
"Yoho"
,
"Echo"
,
"Hawa"
,
"Yalla Ludo"
,
"Hafla"
})
return
myCtx
,
nil
return
myCtx
,
nil
}
}
// @Tags 新人邀请
// @Summary 查询周期
// @Success 200 {object} invite_cv.AgentPeriod
// @Router /v2/user/invite/period [get]
func
AgentPeriod
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
var
response
invite_cv
.
AgentPeriod
week
:=
now
.
BeginningOfWeek
()
.
AddDate
(
0
,
0
,
1
)
// 周一开始
for
i
:=
0
;
i
<
12
;
i
++
{
response
.
Week
=
append
(
response
.
Week
,
invite_cv
.
AgentPeriodWeek
{
StartDate
:
week
.
Format
(
"2006-01-02"
),
EndDate
:
week
.
AddDate
(
0
,
0
,
6
)
.
Format
(
"2006-01-02"
),
})
week
=
week
.
AddDate
(
0
,
0
,
-
7
)
}
resp
.
ResponseOk
(
c
,
response
)
return
myCtx
,
nil
}
route/router.go
View file @
c3d71b31
...
@@ -58,6 +58,7 @@ func InitRouter() *gin.Engine {
...
@@ -58,6 +58,7 @@ func InitRouter() *gin.Engine {
userV2
.
POST
(
"/invite/apply"
,
wrapper
(
invite_r
.
InviteApply
))
userV2
.
POST
(
"/invite/apply"
,
wrapper
(
invite_r
.
InviteApply
))
userV2
.
GET
(
"/invite/apply"
,
wrapper
(
invite_r
.
InviteApplyList
))
userV2
.
GET
(
"/invite/apply"
,
wrapper
(
invite_r
.
InviteApplyList
))
userV2
.
GET
(
"/invite/platform"
,
wrapper
(
invite_r
.
PromotionPlatform
))
userV2
.
GET
(
"/invite/platform"
,
wrapper
(
invite_r
.
PromotionPlatform
))
userV2
.
GET
(
"/invite/period"
,
wrapper
(
invite_r
.
AgentPeriod
))
}
}
inner
:=
r
.
Group
(
"/inner"
)
inner
:=
r
.
Group
(
"/inner"
)
inner
.
Use
(
ExceptionHandle
,
LoggerHandle
)
inner
.
Use
(
ExceptionHandle
,
LoggerHandle
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment