@@ -57,7 +57,7 @@ func (s *teacher) Create(ctx context.Context, req *userV1.CreateTeacherRequest)
57
57
return nil , ecode .StatusCreateTeacher .Err ()
58
58
}
59
59
60
- // ctx = interceptor.WrapServerCtx(ctx)
60
+ ctx = interceptor .WrapServerCtx (ctx )
61
61
err = s .iDao .Create (ctx , record )
62
62
if err != nil {
63
63
logger .Error ("Create error" , logger .Err (err ), logger .Any ("teacher" , record ), interceptor .ServerCtxRequestIDField (ctx ))
@@ -75,7 +75,7 @@ func (s *teacher) DeleteByID(ctx context.Context, req *userV1.DeleteTeacherByIDR
75
75
return nil , ecode .StatusInvalidParams .Err ()
76
76
}
77
77
78
- // ctx = interceptor.WrapServerCtx(ctx)
78
+ ctx = interceptor .WrapServerCtx (ctx )
79
79
err = s .iDao .DeleteByID (ctx , req .Id )
80
80
if err != nil {
81
81
logger .Error ("DeleteByID error" , logger .Err (err ), logger .Any ("id" , req .Id ), interceptor .ServerCtxRequestIDField (ctx ))
@@ -93,7 +93,7 @@ func (s *teacher) DeleteByIDs(ctx context.Context, req *userV1.DeleteTeacherByID
93
93
return nil , ecode .StatusInvalidParams .Err ()
94
94
}
95
95
96
- // ctx = interceptor.WrapServerCtx(ctx)
96
+ ctx = interceptor .WrapServerCtx (ctx )
97
97
err = s .iDao .DeleteByIDs (ctx , req .Ids )
98
98
if err != nil {
99
99
logger .Error ("DeleteByID error" , logger .Err (err ), logger .Any ("ids" , req .Ids ), interceptor .ServerCtxRequestIDField (ctx ))
@@ -118,7 +118,7 @@ func (s *teacher) UpdateByID(ctx context.Context, req *userV1.UpdateTeacherByIDR
118
118
}
119
119
record .ID = req .Id
120
120
121
- // ctx = interceptor.WrapServerCtx(ctx)
121
+ ctx = interceptor .WrapServerCtx (ctx )
122
122
err = s .iDao .UpdateByID (ctx , record )
123
123
if err != nil {
124
124
logger .Error ("UpdateByID error" , logger .Err (err ), logger .Any ("teacher" , record ), interceptor .ServerCtxRequestIDField (ctx ))
@@ -136,7 +136,7 @@ func (s *teacher) GetByID(ctx context.Context, req *userV1.GetTeacherByIDRequest
136
136
return nil , ecode .StatusInvalidParams .Err ()
137
137
}
138
138
139
- // ctx = interceptor.WrapServerCtx(ctx)
139
+ ctx = interceptor .WrapServerCtx (ctx )
140
140
record , err := s .iDao .GetByID (ctx , req .Id )
141
141
if err != nil {
142
142
if errors .Is (err , query .ErrNotFound ) {
@@ -164,7 +164,7 @@ func (s *teacher) GetByCondition(ctx context.Context, req *userV1.GetTeacherByCo
164
164
return nil , ecode .StatusInvalidParams .Err ()
165
165
}
166
166
167
- // ctx = interceptor.WrapServerCtx(ctx)
167
+ ctx = interceptor .WrapServerCtx (ctx )
168
168
conditions := & query.Conditions {}
169
169
for _ , v := range req .Conditions .GetColumns () {
170
170
column := query.Column {}
@@ -206,7 +206,7 @@ func (s *teacher) ListByIDs(ctx context.Context, req *userV1.ListTeacherByIDsReq
206
206
return nil , ecode .StatusInvalidParams .Err ()
207
207
}
208
208
209
- // ctx = interceptor.WrapServerCtx(ctx)
209
+ ctx = interceptor .WrapServerCtx (ctx )
210
210
teacherMap , err := s .iDao .GetByIDs (ctx , req .Ids )
211
211
if err != nil {
212
212
logger .Error ("GetByIDs error" , logger .Err (err ), logger .Any ("ids" , req .Ids ), interceptor .ServerCtxRequestIDField (ctx ))
@@ -243,7 +243,7 @@ func (s *teacher) List(ctx context.Context, req *userV1.ListTeacherRequest) (*us
243
243
}
244
244
params .Size = int (req .Params .Limit )
245
245
246
- // ctx = interceptor.WrapServerCtx(ctx)
246
+ ctx = interceptor .WrapServerCtx (ctx )
247
247
records , total , err := s .iDao .GetByColumns (ctx , params )
248
248
if err != nil {
249
249
if strings .Contains (err .Error (), "query params error:" ) {
0 commit comments