Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-backend
Commits
c428f3e8
Commit
c428f3e8
authored
Jul 01, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug
parent
441ec6bf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
8 deletions
+17
-8
TeacherController.java
...m/qkdata/biz/management/controller/TeacherController.java
+11
-4
QuestionPO.java
...ain/java/com/qkdata/biz/management/entity/QuestionPO.java
+1
-0
TeacherService.java
...ava/com/qkdata/biz/management/service/TeacherService.java
+1
-1
QuestionModel.java
...main/java/com/qkdata/biz/management/vo/QuestionModel.java
+1
-0
FrontendQAController.java
...a/com/qkdata/biz/web/controller/FrontendQAController.java
+1
-1
V1.0.16__update.sql
src/main/resources/db/migration/V1.0.16__update.sql
+2
-2
No files found.
src/main/java/com/qkdata/biz/management/controller/TeacherController.java
View file @
c428f3e8
...
...
@@ -2,6 +2,7 @@ package com.qkdata.biz.management.controller;
import
com.qkdata.biz.common.BizConstants
;
import
com.qkdata.biz.management.entity.TeacherPO
;
import
com.qkdata.biz.management.service.TeacherService
;
import
com.qkdata.biz.management.vo.QueryTeacherModel
;
import
com.qkdata.biz.management.vo.TeacherModel
;
...
...
@@ -14,10 +15,7 @@ import org.apache.shiro.authz.annotation.Logical;
import
org.apache.shiro.authz.annotation.RequiresRoles
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
...
...
@@ -37,6 +35,15 @@ public class TeacherController {
@Autowired
private
TeacherService
teacherService
;
@ApiOperation
(
"获取讲师信息"
)
@SysLog
(
"获取讲师信息"
)
@GetMapping
(
"/{id}"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_ADMIN
,
BizConstants
.
ROLE_OPERATOR
},
logical
=
Logical
.
OR
)
public
Result
<
TeacherPO
>
info
(
@PathVariable
Long
id
){
TeacherPO
po
=
teacherService
.
getById
(
id
);
return
Result
.
succeed
(
po
);
}
@ApiOperation
(
"添加讲师信息"
)
@PostMapping
(
"/save"
)
@SysLog
(
value
=
"添加讲师信息"
)
...
...
src/main/java/com/qkdata/biz/management/entity/QuestionPO.java
View file @
c428f3e8
package
com
.
qkdata
.
biz
.
management
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.qkdata.biz.enums.QuestionStatusEnum
;
import
com.qkdata.common.base.entity.BasePO
;
...
...
src/main/java/com/qkdata/biz/management/service/TeacherService.java
View file @
c428f3e8
...
...
@@ -101,6 +101,7 @@ public class TeacherService extends ServiceImpl<TeacherMapper, TeacherPO> {
po
.
setMobile
(
model
.
getMobile
());
po
.
setIntroduce
(
model
.
getIntroduce
());
po
.
setOrgId
(
model
.
getOrgId
());
po
.
setAccount
(
model
.
getAccount
());
updateById
(
po
);
//添加讲师帐号
if
(
StrUtil
.
isBlank
(
po
.
getAccount
())
&&
StrUtil
.
isNotBlank
(
model
.
getAccount
())){
...
...
@@ -111,7 +112,6 @@ public class TeacherService extends ServiceImpl<TeacherMapper, TeacherPO> {
public
PageResult
<
TeacherModel
>
queryPage
(
QueryTeacherModel
param
)
{
Page
page
=
new
Page
(
param
.
getPageIndex
(),
param
.
getPageSize
());
List
<
TeacherModel
>
list
=
baseMapper
.
queryPage
(
page
,
param
);
//TODO add courseCount
for
(
TeacherModel
model
:
list
){
int
count
=
courseService
.
countByTeacher
(
model
.
getId
());
model
.
setCourseCount
(
count
);
...
...
src/main/java/com/qkdata/biz/management/vo/QuestionModel.java
View file @
c428f3e8
package
com
.
qkdata
.
biz
.
management
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.qkdata.biz.enums.QuestionStatusEnum
;
import
lombok.Data
;
...
...
src/main/java/com/qkdata/biz/web/controller/FrontendQAController.java
View file @
c428f3e8
...
...
@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
@Api
(
tags
=
"问答模块接口-
前
端"
)
@Api
(
tags
=
"问答模块接口-
手机
端"
)
@RestController
@RequestMapping
(
"/api/question"
)
public
class
FrontendQAController
{
...
...
src/main/resources/db/migration/V1.0.16__update.sql
View file @
c428f3e8
ALTER
TABLE
`question`
MODIFY
COLUMN
`status`
tinyint
(
1
)
NULL
DEFAULT
NULL
COMMENT
'状态:待回复、已回复、已完成'
AFTER
`update_time`
;
\ No newline at end of file
MODIFY
COLUMN
`status`
int
(
1
)
NULL
DEFAULT
NULL
COMMENT
'状态:待回复、已回复、已完成'
AFTER
`update_time`
;
\ No newline at end of file
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