Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
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
hujiebin
hilo-group
Commits
fc7d91ea
Commit
fc7d91ea
authored
Mar 15, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
家族
parent
86972535
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
utime.go
common/utime/utime.go
+6
-5
groupPower.go
cv/group_power_cv/groupPower.go
+2
-2
group_power.go
route/group_power_r/group_power.go
+4
-3
No files found.
common/utime/utime.go
View file @
fc7d91ea
...
@@ -11,6 +11,7 @@ const (
...
@@ -11,6 +11,7 @@ const (
LayoutDay
=
"2006-01-02"
LayoutDay
=
"2006-01-02"
LayoutDay2
=
"20060102"
LayoutDay2
=
"20060102"
LayoutMonth
=
"2006-01"
LayoutMonth
=
"2006-01"
LayoutMinute
=
"2006-01-02 15:04"
)
)
// 获取时间所在周的第一天(周一) 00:00:00,和最后一天(周日)23:59:59
// 获取时间所在周的第一天(周一) 00:00:00,和最后一天(周日)23:59:59
...
...
cv/group_power_cv/groupPower.go
View file @
fc7d91ea
...
@@ -690,14 +690,14 @@ type FamilyMemberDetail struct {
...
@@ -690,14 +690,14 @@ type FamilyMemberDetail struct {
type
FamilyApplyList
struct
{
type
FamilyApplyList
struct
{
User
*
user_m
.
UserTiny
`json:"user"`
User
*
user_m
.
UserTiny
`json:"user"`
Time
time
.
Time
`json:"time"`
Time
string
`json:"time"`
Status
int8
`json:"status"`
// 0未操作,1已接受,2.已拒绝
Status
int8
`json:"status"`
// 0未操作,1已接受,2.已拒绝
MgrName
string
`json:"mgrName"`
// 管理员名称
MgrName
string
`json:"mgrName"`
// 管理员名称
}
}
type
FamilyQuitList
struct
{
type
FamilyQuitList
struct
{
User
*
user_m
.
UserTiny
`json:"user"`
User
*
user_m
.
UserTiny
`json:"user"`
Time
time
.
Time
`json:"time"`
Time
string
`json:"time"`
QuitType
int8
`json:"status"`
// 1.主动退出 2.被踢出
QuitType
int8
`json:"status"`
// 1.主动退出 2.被踢出
MgrName
string
`json:"mgrName"`
// 管理员名称
MgrName
string
`json:"mgrName"`
// 管理员名称
}
}
route/group_power_r/group_power.go
View file @
fc7d91ea
...
@@ -14,6 +14,7 @@ import (
...
@@ -14,6 +14,7 @@ import (
"hilo-group/_const/enum/msg_e"
"hilo-group/_const/enum/msg_e"
"hilo-group/_const/redis_key"
"hilo-group/_const/redis_key"
"hilo-group/common"
"hilo-group/common"
"hilo-group/common/utime"
"hilo-group/cv/group_cv"
"hilo-group/cv/group_cv"
"hilo-group/cv/group_power_cv"
"hilo-group/cv/group_power_cv"
"hilo-group/cv/medal_cv"
"hilo-group/cv/medal_cv"
...
@@ -1094,7 +1095,7 @@ func GroupPowerApplyList(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -1094,7 +1095,7 @@ func GroupPowerApplyList(c *gin.Context) (*mycontext.MyContext, error) {
result
:=
make
([]
*
group_power_cv
.
FamilyApplyList
,
0
,
len
(
rows
))
result
:=
make
([]
*
group_power_cv
.
FamilyApplyList
,
0
,
len
(
rows
))
for
_
,
v
:=
range
rows
{
for
_
,
v
:=
range
rows
{
info
:=
&
group_power_cv
.
FamilyApplyList
{
User
:
userMap
[
v
.
UserId
],
Time
:
v
.
CreatedTime
,
Status
:
v
.
IsAccept
}
info
:=
&
group_power_cv
.
FamilyApplyList
{
User
:
userMap
[
v
.
UserId
],
Time
:
v
.
CreatedTime
.
Format
(
utime
.
LayoutMinute
)
,
Status
:
v
.
IsAccept
}
if
v
.
MgrId
>
0
{
if
v
.
MgrId
>
0
{
info
.
MgrName
=
userMap
[
v
.
MgrId
]
.
Nick
info
.
MgrName
=
userMap
[
v
.
MgrId
]
.
Nick
}
}
...
@@ -1197,7 +1198,7 @@ func GroupPowerQuit(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -1197,7 +1198,7 @@ func GroupPowerQuit(c *gin.Context) (*mycontext.MyContext, error) {
// @Summary 家族退出列表
// @Summary 家族退出列表
// @Param pageSize query int true "分页大小 默认:10" default(10)
// @Param pageSize query int true "分页大小 默认:10" default(10)
// @Param pageIndex query int true "第几个分页,从1开始 默认:1" default(1)
// @Param pageIndex query int true "第几个分页,从1开始 默认:1" default(1)
// @Success 200
// @Success 200
{object} []group_power_cv.FamilyQuitList
// @Router /v1/groupPower/quit/list [get]
// @Router /v1/groupPower/quit/list [get]
func
GroupPowerQuitList
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
func
GroupPowerQuitList
(
c
*
gin
.
Context
)
(
*
mycontext
.
MyContext
,
error
)
{
myContext
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
myContext
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
...
@@ -1244,7 +1245,7 @@ func GroupPowerQuitList(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -1244,7 +1245,7 @@ func GroupPowerQuitList(c *gin.Context) (*mycontext.MyContext, error) {
result
:=
make
([]
*
group_power_cv
.
FamilyQuitList
,
0
,
len
(
rows
))
result
:=
make
([]
*
group_power_cv
.
FamilyQuitList
,
0
,
len
(
rows
))
for
_
,
v
:=
range
rows
{
for
_
,
v
:=
range
rows
{
item
:=
&
group_power_cv
.
FamilyQuitList
{
User
:
userMap
[
v
.
UserId
],
Time
:
v
.
CreatedTime
}
item
:=
&
group_power_cv
.
FamilyQuitList
{
User
:
userMap
[
v
.
UserId
],
Time
:
v
.
CreatedTime
.
Format
(
utime
.
LayoutMinute
)
}
if
v
.
UserId
==
v
.
MgrId
{
if
v
.
UserId
==
v
.
MgrId
{
item
.
QuitType
=
1
// 主动退出
item
.
QuitType
=
1
// 主动退出
}
else
{
}
else
{
...
...
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