Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
courseSign
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
courseSign
Commits
8cc09fe0
Commit
8cc09fe0
authored
Nov 20, 2024
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a8340044
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
7 deletions
+55
-7
docs.go
server/docs/docs.go
+18
-0
swagger.json
server/docs/swagger.json
+18
-0
swagger.yaml
server/docs/swagger.yaml
+11
-0
course_action_users.go
server/router/course/course_action_users.go
+2
-1
course_list.go
server/service/course/course_list.go
+6
-6
No files found.
server/docs/docs.go
View file @
8cc09fe0
...
@@ -3707,6 +3707,11 @@ var doc = `{
...
@@ -3707,6 +3707,11 @@ var doc = `{
},
},
{
{
"type": "boolean",
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"name": "isShow",
"in": "query"
"in": "query"
},
},
...
@@ -3784,6 +3789,11 @@ var doc = `{
...
@@ -3784,6 +3789,11 @@ var doc = `{
},
},
{
{
"type": "boolean",
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"name": "isShow",
"in": "query"
"in": "query"
},
},
...
@@ -3861,6 +3871,11 @@ var doc = `{
...
@@ -3861,6 +3871,11 @@ var doc = `{
},
},
{
{
"type": "boolean",
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"name": "isShow",
"in": "query"
"in": "query"
},
},
...
@@ -19212,6 +19227,9 @@ var doc = `{
...
@@ -19212,6 +19227,9 @@ var doc = `{
"description": "主键ID",
"description": "主键ID",
"type": "integer"
"type": "integer"
},
},
"isPass": {
"type": "boolean"
},
"isShow": {
"isShow": {
"type": "boolean"
"type": "boolean"
},
},
...
...
server/docs/swagger.json
View file @
8cc09fe0
...
@@ -3691,6 +3691,11 @@
...
@@ -3691,6 +3691,11 @@
},
},
{
{
"type"
:
"boolean"
,
"type"
:
"boolean"
,
"name"
:
"isPass"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"name"
:
"isShow"
,
"name"
:
"isShow"
,
"in"
:
"query"
"in"
:
"query"
},
},
...
@@ -3768,6 +3773,11 @@
...
@@ -3768,6 +3773,11 @@
},
},
{
{
"type"
:
"boolean"
,
"type"
:
"boolean"
,
"name"
:
"isPass"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"name"
:
"isShow"
,
"name"
:
"isShow"
,
"in"
:
"query"
"in"
:
"query"
},
},
...
@@ -3845,6 +3855,11 @@
...
@@ -3845,6 +3855,11 @@
},
},
{
{
"type"
:
"boolean"
,
"type"
:
"boolean"
,
"name"
:
"isPass"
,
"in"
:
"query"
},
{
"type"
:
"boolean"
,
"name"
:
"isShow"
,
"name"
:
"isShow"
,
"in"
:
"query"
"in"
:
"query"
},
},
...
@@ -19196,6 +19211,9 @@
...
@@ -19196,6 +19211,9 @@
"description"
:
"主键ID"
,
"description"
:
"主键ID"
,
"type"
:
"integer"
"type"
:
"integer"
},
},
"isPass"
:
{
"type"
:
"boolean"
},
"isShow"
:
{
"isShow"
:
{
"type"
:
"boolean"
"type"
:
"boolean"
},
},
...
...
server/docs/swagger.yaml
View file @
8cc09fe0
...
@@ -877,6 +877,8 @@ definitions:
...
@@ -877,6 +877,8 @@ definitions:
id
:
id
:
description
:
主键ID
description
:
主键ID
type
:
integer
type
:
integer
isPass
:
type
:
boolean
isShow
:
isShow
:
type
:
boolean
type
:
boolean
isSign
:
isSign
:
...
@@ -4714,6 +4716,9 @@ paths:
...
@@ -4714,6 +4716,9 @@ paths:
name
:
id
name
:
id
type
:
integer
type
:
integer
-
in
:
query
-
in
:
query
name
:
isPass
type
:
boolean
-
in
:
query
name
:
isShow
name
:
isShow
type
:
boolean
type
:
boolean
-
in
:
query
-
in
:
query
...
@@ -4761,6 +4766,9 @@ paths:
...
@@ -4761,6 +4766,9 @@ paths:
name
:
id
name
:
id
type
:
integer
type
:
integer
-
in
:
query
-
in
:
query
name
:
isPass
type
:
boolean
-
in
:
query
name
:
isShow
name
:
isShow
type
:
boolean
type
:
boolean
-
in
:
query
-
in
:
query
...
@@ -4811,6 +4819,9 @@ paths:
...
@@ -4811,6 +4819,9 @@ paths:
name
:
id
name
:
id
type
:
integer
type
:
integer
-
in
:
query
-
in
:
query
name
:
isPass
type
:
boolean
-
in
:
query
name
:
isShow
name
:
isShow
type
:
boolean
type
:
boolean
-
in
:
query
-
in
:
query
...
...
server/router/course/course_action_users.go
View file @
8cc09fe0
...
@@ -33,6 +33,6 @@ func (s *CourseActionUsersRouter) InitCourseActionUsersMetaMaskRouter(Router *gi
...
@@ -33,6 +33,6 @@ func (s *CourseActionUsersRouter) InitCourseActionUsersMetaMaskRouter(Router *gi
var
courseActionUsersApi
=
v1
.
ApiGroupApp
.
CourseApiGroup
.
CourseActionUsersApi
var
courseActionUsersApi
=
v1
.
ApiGroupApp
.
CourseApiGroup
.
CourseActionUsersApi
{
{
courseActionUsersRouter
.
POST
(
"signAction"
,
courseActionUsersApi
.
SignAction
)
// 新建CourseActionUsers
courseActionUsersRouter
.
POST
(
"signAction"
,
courseActionUsersApi
.
SignAction
)
// 新建CourseActionUsers
courseActionUsersRouter
.
POS
T
(
"myAction"
,
courseActionUsersApi
.
GetMyAction
)
// 新建CourseActionUsers
courseActionUsersRouter
.
GE
T
(
"myAction"
,
courseActionUsersApi
.
GetMyAction
)
// 新建CourseActionUsers
}
}
}
}
\ No newline at end of file
server/service/course/course_list.go
View file @
8cc09fe0
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"courseSign/server/model/common/request"
"courseSign/server/model/common/request"
"courseSign/server/model/course"
"courseSign/server/model/course"
courseReq
"courseSign/server/model/course/request"
courseReq
"courseSign/server/model/course/request"
"go.uber.org/zap"
"gorm.io/gorm"
"gorm.io/gorm"
)
)
...
@@ -78,21 +79,20 @@ func (courseListService *CourseListService)GetCourseListInfoList(info courseReq.
...
@@ -78,21 +79,20 @@ func (courseListService *CourseListService)GetCourseListInfoList(info courseReq.
}
}
for
_
,
v
:=
range
courseLists
{
for
_
,
v
:=
range
courseLists
{
var
cs
course
.
CourseSignup
var
cs
course
.
CourseSignup
err
=
global
.
GVA_DB
.
Debug
()
.
Model
(
&
course
.
CourseSignup
{})
.
Where
(
"uid = ? and cid = ?"
,
cu
.
ID
,
v
.
ID
)
.
First
(
&
cs
)
.
Error
err
=
global
.
GVA_DB
.
Model
(
&
course
.
CourseSignup
{})
.
Where
(
"uid = ? and cid = ?"
,
cu
.
ID
,
v
.
ID
)
.
First
(
&
cs
)
.
Error
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
if
err
!=
nil
&&
err
!=
gorm
.
ErrRecordNotFound
{
return
return
}
else
if
err
!=
nil
&&
err
==
gorm
.
ErrRecordNotFound
{
}
else
if
err
!=
nil
&&
err
==
gorm
.
ErrRecordNotFound
{
err
=
nil
err
=
nil
continue
continue
}
}
if
err
==
nil
&&
*
cs
.
IsPass
{
if
err
==
nil
&&
cs
.
ID
>
0
{
v
.
IsSign
=
true
v
.
IsSign
=
true
}
if
*
cs
.
IsPass
{
v
.
IsPass
=
true
v
.
IsPass
=
true
}
else
if
err
==
nil
&&
!*
cs
.
IsPass
{
v
.
IsSign
=
true
v
.
IsPass
=
false
}
}
global
.
GVA_LOG
.
Info
(
"info"
,
zap
.
Any
(
"detail"
,
v
))
}
}
}
}
return
courseLists
,
total
,
err
return
courseLists
,
total
,
err
...
...
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