Commit 8cc09fe0 authored by szh's avatar szh

update

parent a8340044
......@@ -3707,6 +3707,11 @@ var doc = `{
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -3784,6 +3789,11 @@ var doc = `{
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -3861,6 +3871,11 @@ var doc = `{
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -19212,6 +19227,9 @@ var doc = `{
"description": "主键ID",
"type": "integer"
},
"isPass": {
"type": "boolean"
},
"isShow": {
"type": "boolean"
},
......
......@@ -3691,6 +3691,11 @@
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -3768,6 +3773,11 @@
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -3845,6 +3855,11 @@
},
{
"type": "boolean",
"name": "isPass",
"in": "query"
},
{
"type": "boolean",
"name": "isShow",
"in": "query"
},
......@@ -19196,6 +19211,9 @@
"description": "主键ID",
"type": "integer"
},
"isPass": {
"type": "boolean"
},
"isShow": {
"type": "boolean"
},
......
......@@ -877,6 +877,8 @@ definitions:
id:
description: 主键ID
type: integer
isPass:
type: boolean
isShow:
type: boolean
isSign:
......@@ -4714,6 +4716,9 @@ paths:
name: id
type: integer
- in: query
name: isPass
type: boolean
- in: query
name: isShow
type: boolean
- in: query
......@@ -4761,6 +4766,9 @@ paths:
name: id
type: integer
- in: query
name: isPass
type: boolean
- in: query
name: isShow
type: boolean
- in: query
......@@ -4811,6 +4819,9 @@ paths:
name: id
type: integer
- in: query
name: isPass
type: boolean
- in: query
name: isShow
type: boolean
- in: query
......
......@@ -33,6 +33,6 @@ func (s *CourseActionUsersRouter) InitCourseActionUsersMetaMaskRouter(Router *gi
var courseActionUsersApi = v1.ApiGroupApp.CourseApiGroup.CourseActionUsersApi
{
courseActionUsersRouter.POST("signAction", courseActionUsersApi.SignAction) // 新建CourseActionUsers
courseActionUsersRouter.POST("myAction", courseActionUsersApi.GetMyAction) // 新建CourseActionUsers
courseActionUsersRouter.GET("myAction", courseActionUsersApi.GetMyAction) // 新建CourseActionUsers
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import (
"courseSign/server/model/common/request"
"courseSign/server/model/course"
courseReq "courseSign/server/model/course/request"
"go.uber.org/zap"
"gorm.io/gorm"
)
......@@ -78,21 +79,20 @@ func (courseListService *CourseListService)GetCourseListInfoList(info courseReq.
}
for _, v := range courseLists {
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{
return
} else if err != nil && err == gorm.ErrRecordNotFound {
err = nil
continue
}
if err == nil && *cs.IsPass{
if err == nil && cs.ID >0 {
v.IsSign = true
}
if *cs.IsPass {
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment