Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
李丛阳
education
Commits
16a4119b
Commit
16a4119b
authored
Jan 29, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
11a661e7
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
13 deletions
+23
-13
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+1
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+7
-5
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+3
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+1
-1
BTeacherServiceImpl.java
...t/business/bteacher/service/impl/BTeacherServiceImpl.java
+1
-0
TQuestionController.java
...ft/business/tquestion/controller/TQuestionController.java
+5
-4
TQuestionRepository.java
...g/rcisoft/business/tquestion/dao/TQuestionRepository.java
+1
-1
TQuestionServiceImpl.java
...business/tquestion/service/impl/TQuestionServiceImpl.java
+4
-2
lesson.xls
src/main/resources/excel-template/lesson.xls
+0
-0
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
16a4119b
...
...
@@ -162,6 +162,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"课程编号"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"lessonName"
,
value
=
"课程名称"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"directionId"
,
value
=
"课程方向ID"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"classHour"
,
value
=
"课时"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"credits"
,
value
=
"学分"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryBLessonsByPagination"
)
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
16a4119b
...
...
@@ -24,13 +24,15 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
* @param param
* @return
*/
@Select
(
"<script>select b.*, bd.name as directionName, bd.business_id as directionId, bd.code as directionCode "
+
@Select
(
"<script>select b.*, bd.name as directionName, bd.business_id as directionId, bd.code as directionCode,"
+
"IFNULL((SELECT SUM(bc.class_hour) from b_chapter bc where bc.lesson_id = b.business_id),0) as chapterClassHour "
+
"from b_lesson b "
+
"left join b_lesson_direction bld on bld.lession_id = b.business_id "
+
"left join b_direction bd on bd.business_id = bld.direction_id "
+
"where b.del_flag != 1 and b.flag = 1 "
+
"<if test=\"name!=null\">and b.`lesson_name` like #{name}</if>"
+
"<if test=\"code!=null\">and b.`code` like #{code}</if></script>"
)
"<if test=\"name!=null and name != ''\">and b.`lesson_name` like #{name}</if>"
+
"<if test=\"directionId!=null and directionId != ''\">and bld.directionId = #{directionId}</if>"
+
"<if test=\"code!=null and code != ''\">and b.`code` like #{code}</if></script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryBLessons
(
Map
<
String
,
Object
>
param
);
...
...
@@ -41,9 +43,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
BLesson
queryBLessonByCode
(
String
code
);
@Insert
(
"<script>INSERT INTO b_lesson"
+
"(create_date,update_date,del_flag,flag,business_id,code,lesson_name,default_url,create_by)VALUES"
+
"(create_date,update_date,del_flag,flag,business_id,code,lesson_name,default_url,create_by
,class_hour,credits
)VALUES"
+
"<foreach collection=\"list\" item=\"item\" separator=\",\">"
+
"( #{item.createDate},#{item.updateDate},#{item.delFlag},#{item.flag},#{item.businessId},#{item.code},#{item.lessonName},#{item.defaultUrl},#{item.createBy})"
+
"( #{item.createDate},#{item.updateDate},#{item.delFlag},#{item.flag},#{item.businessId},#{item.code},#{item.lessonName},#{item.defaultUrl},#{item.createBy}
,#{item.classHour},#{item.credits}
)"
+
"</foreach></script>"
)
int
insertList
(
List
<
BLesson
>
bLessons
);
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
16a4119b
...
...
@@ -42,6 +42,9 @@ public class BLesson extends IdEntity<BLesson> {
@Transient
private
String
directionCode
;
//课程方向编号
@Transient
private
String
chapterClassHour
;
//目前已添加总学时
public
BLesson
(
String
code
)
{
this
.
code
=
code
;
}
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
16a4119b
...
...
@@ -107,7 +107,7 @@ public class BLessonServiceImpl implements BLessonService {
List
<
String
>
errorCode
=
new
ArrayList
<>();
ArrayList
<
String
>
direction
=
new
ArrayList
<
String
>();
String
[]
headers
=
{
"课程编号"
,
"课程名称"
,
"课程方向
"
,
"课
时"
,
"学分"
};
String
[]
headers
=
{
"课程编号"
,
"课程名称"
,
"课程方向
编号"
,
"学
时"
,
"学分"
};
ArrayList
<
String
[]>
values
=
ExcelUtil
.
importExcel
(
hwb
,
headers
);
//获取excel数据
...
...
src/main/java/org/rcisoft/business/bteacher/service/impl/BTeacherServiceImpl.java
View file @
16a4119b
...
...
@@ -208,6 +208,7 @@ public class BTeacherServiceImpl implements BTeacherService {
BTeacher
teacher
=
bTeacherRepository
.
selectOne
(
bTeacher
);
UserUtil
.
setCurrentMergeOperation
(
bTeacher
);
sysUserMapper
.
deleteByCode
(
teacher
.
getCode
());
bTeacher
.
setDeleted
();
int
line
=
bTeacherRepository
.
logicalDelete
(
bTeacher
);
return
new
PersistModel
(
line
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
...
...
src/main/java/org/rcisoft/business/tquestion/controller/TQuestionController.java
View file @
16a4119b
...
...
@@ -74,7 +74,7 @@ public class TQuestionController extends PaginationController<TQuestion> {
}
@ApiOperation
(
value
=
"批量删除"
,
notes
=
"根据ID批量删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id
数组
"
,
value
=
"businessId数组"
,
required
=
true
,
dataType
=
"varchar"
)})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id
InfoList
"
,
value
=
"businessId数组"
,
required
=
true
,
dataType
=
"varchar"
)})
@PostMapping
(
"/removeByIds"
)
@PreAuthorize
(
"hasRole('ROLE_1002')"
)
public
Result
deletes
(
String
idInfoList
)
{
...
...
@@ -97,7 +97,6 @@ public class TQuestionController extends PaginationController<TQuestion> {
@PostMapping
(
"/update"
)
@PreAuthorize
(
"hasRole('ROLE_1002')"
)
public
Result
update
(
TQuestion
tQuestion
)
{
tQuestion
.
setToken
(
getToken
());
PersistModel
data
=
tQuestionServiceImpl
.
merge
(
tQuestion
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
...
@@ -128,7 +127,9 @@ public class TQuestionController extends PaginationController<TQuestion> {
}
@ApiOperation
(
value
=
"根据条件查询(不分页)"
,
notes
=
"根据URL中的参数查询全部"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"slId"
,
value
=
"课程ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"qtype"
,
value
=
"题型"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"qtitle"
,
value
=
"题干关键字"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryTQuestions"
)
@PreAuthorize
(
"hasRole('ROLE_1002')"
)
public
Result
queryTQuestion
(
TQuestion
tQuestion
)
{
...
...
src/main/java/org/rcisoft/business/tquestion/dao/TQuestionRepository.java
View file @
16a4119b
...
...
@@ -25,7 +25,7 @@ public interface TQuestionRepository extends BaseMapper<TQuestion> {
+
"<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+
"<if test=\"qtype != null and qtype != '' \">and qtype = #{qtype} </if>"
+
"<if test=\"qtitle != null and qtitle != '' \">and qtitle LIKE CONCAT ('%',#{qtitle},'%')</if>"
+
"</script>"
)
+
"
order by update_date desc
</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
TQuestion
>
queryTQuestions
(
TQuestion
tQuestion
);
...
...
src/main/java/org/rcisoft/business/tquestion/service/impl/TQuestionServiceImpl.java
View file @
16a4119b
...
...
@@ -99,8 +99,8 @@ public class TQuestionServiceImpl implements TQuestionService {
public
PersistModel
merge
(
TQuestion
tQuestion
){
UserUtil
.
setCurrentMergeOperation
(
tQuestion
);
int
line
=
tQuestionRepository
.
updateByPrimaryKeySelective
(
tQuestion
);
log
.
info
(
UserUtil
.
getUserInfoProp
(
tQuestion
.
getToken
(),
UserUtil
.
USER_USERNAME
)+
"修改了ID为"
+
tQuestion
.
getBusinessId
()+
"的信息"
);
/*
log.info(UserUtil.getUserInfoProp(tQuestion.getToken(),UserUtil.USER_USERNAME)+"修改了ID为"+
tQuestion.getBusinessId()+"的信息");
*/
return
new
PersistModel
(
line
);
}
...
...
@@ -126,6 +126,8 @@ public class TQuestionServiceImpl implements TQuestionService {
@Override
public
List
<
TQuestion
>
queryTQuestions
(
TQuestion
tQuestion
)
{
tQuestion
.
setStart
();
tQuestion
.
setNotDeleted
();
List
<
TQuestion
>
questions
=
tQuestionRepository
.
queryTQuestions
(
tQuestion
);
if
(
questions
.
size
()>
0
){
for
(
TQuestion
question
:
questions
)
{
...
...
src/main/resources/excel-template/lesson.xls
View file @
16a4119b
No preview for this file type
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