Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
15a3642a
Commit
15a3642a
authored
Jan 10, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'master' of D:\项目\正元安全生产\zhengyuan-danger-chemistry-manage with conflicts.
parent
1decead9
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
172 additions
and
88 deletions
+172
-88
TTrainCourseController.java
...m/zehong/web/controller/train/TTrainCourseController.java
+1
-2
application-dev.yml
danger-manage-admin/src/main/resources/application-dev.yml
+3
-3
application-prd.yml
danger-manage-admin/src/main/resources/application-prd.yml
+1
-1
application-test.yml
danger-manage-admin/src/main/resources/application-test.yml
+3
-3
TTrainCourse.java
.../src/main/java/com/zehong/system/domain/TTrainCourse.java
+62
-25
TTrainCourseTopic.java
...main/java/com/zehong/system/domain/TTrainCourseTopic.java
+47
-16
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+15
-13
TTrainCourseTopicServiceImpl.java
...ong/system/service/impl/TTrainCourseTopicServiceImpl.java
+9
-9
TTrainCourseMapper.xml
...m/src/main/resources/mapper/system/TTrainCourseMapper.xml
+18
-8
TTrainCourseTopicMapper.xml
.../main/resources/mapper/system/TTrainCourseTopicMapper.xml
+11
-7
package.json
danger-manage-web/package.json
+2
-0
vue.config.js
danger-manage-web/vue.config.js
+0
-1
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/train/TTrainCourseController.java
View file @
15a3642a
...
...
@@ -25,7 +25,7 @@ import java.util.Map;
/**
* 培训课程Controller
*
*
* @author zehong
* @date 2022-09-19
*/
...
...
@@ -65,7 +65,6 @@ public class TTrainCourseController extends BaseController
@ApiOperation
(
"用户课程考试"
)
@GetMapping
(
"/examination"
)
public
AjaxResult
examination
(
Long
userCourseId
,
String
answers
){
Map
<
String
,
Object
>
map
=
tTrainCourseService
.
examination
(
userCourseId
,
answers
.
split
(
","
));
return
AjaxResult
.
success
(
map
);
}
...
...
danger-manage-admin/src/main/resources/application-dev.yml
View file @
15a3642a
...
...
@@ -21,7 +21,7 @@ spring:
druid
:
# 主库数据源
master
:
url
:
jdbc:mysql://36.138.181.113:33060/danger_manage_area_
a
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://36.138.181.113:33060/danger_manage_area_
test
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
zehong_/sjz!D
# 从库数据源
...
...
@@ -75,11 +75,11 @@ spring:
# 地址
host
:
127.0.0.1
# 端口,默认为6379
port
:
637
8
port
:
637
9
# 数据库索引
database
:
1
# 密码
password
:
Redis@2021
password
:
# 连接超时时间
timeout
:
10s
lettuce
:
...
...
danger-manage-admin/src/main/resources/application-prd.yml
View file @
15a3642a
...
...
@@ -73,7 +73,7 @@ spring:
# redis 配置
redis
:
# 地址
host
:
localhost
host
:
127.0.0.1
# 端口,默认为6379
port
:
6379
# 数据库索引
...
...
danger-manage-admin/src/main/resources/application-test.yml
View file @
15a3642a
...
...
@@ -21,7 +21,7 @@ spring:
druid
:
# 主库数据源
master
:
url
:
jdbc:mysql://36.138.181.113:3306/danger_manage_area_
b
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://36.138.181.113:3306/danger_manage_area_
test
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
root@123
# 从库数据源
...
...
@@ -75,11 +75,11 @@ spring:
# 地址
host
:
127.0.0.1
# 端口,默认为6379
port
:
637
8
port
:
637
9
# 数据库索引
database
:
0
# 密码
password
:
Redis@2021
password
:
# 连接超时时间
timeout
:
10s
lettuce
:
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TTrainCourse.java
View file @
15a3642a
...
...
@@ -11,7 +11,7 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 培训课程对象 t_train_course
*
*
* @author zehong
* @date 2022-09-19
*/
...
...
@@ -54,7 +54,7 @@ public class TTrainCourse extends BaseEntity
private
String
video
;
/** 答题合格数 */
@Excel
(
name
=
"答题合格数"
)
@Excel
(
name
=
"答题合格
分
数"
)
private
Integer
qualifiedNum
;
/** 录入题数量 */
...
...
@@ -91,6 +91,43 @@ public class TTrainCourse extends BaseEntity
private
Integer
duration
;
/** 多选题分数*/
private
Integer
multipleChoiceScore
;
/**单选题分数*/
private
Integer
singleChoiceScore
;
/**判断题分数*/
private
Integer
judgmentScore
;
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
Integer
getMultipleChoiceScore
()
{
return
multipleChoiceScore
;
}
public
void
setMultipleChoiceScore
(
Integer
multipleChoiceScore
)
{
this
.
multipleChoiceScore
=
multipleChoiceScore
;
}
public
Integer
getSingleChoiceScore
()
{
return
singleChoiceScore
;
}
public
void
setSingleChoiceScore
(
Integer
singleChoiceScore
)
{
this
.
singleChoiceScore
=
singleChoiceScore
;
}
public
Integer
getJudgmentScore
()
{
return
judgmentScore
;
}
public
void
setJudgmentScore
(
Integer
judgmentScore
)
{
this
.
judgmentScore
=
judgmentScore
;
}
public
Integer
getDuration
()
{
return
duration
;
}
...
...
@@ -120,106 +157,106 @@ public class TTrainCourse extends BaseEntity
this
.
courseId
=
courseId
;
}
public
Long
getCourseId
()
public
Long
getCourseId
()
{
return
courseId
;
}
public
void
setCourseName
(
String
courseName
)
public
void
setCourseName
(
String
courseName
)
{
this
.
courseName
=
courseName
;
}
public
String
getCourseName
()
public
String
getCourseName
()
{
return
courseName
;
}
public
void
setCourseType
(
Long
courseType
)
public
void
setCourseType
(
Long
courseType
)
{
this
.
courseType
=
courseType
;
}
public
Long
getCourseType
()
public
Long
getCourseType
()
{
return
courseType
;
}
public
void
setCourseConent
(
String
courseConent
)
public
void
setCourseConent
(
String
courseConent
)
{
this
.
courseConent
=
courseConent
;
}
public
String
getCourseConent
()
public
String
getCourseConent
()
{
return
courseConent
;
}
public
void
setStatus
(
Integer
status
)
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
public
Integer
getStatus
()
{
return
status
;
}
public
void
setReleaseTime
(
Date
releaseTime
)
public
void
setReleaseTime
(
Date
releaseTime
)
{
this
.
releaseTime
=
releaseTime
;
}
public
Date
getReleaseTime
()
public
Date
getReleaseTime
()
{
return
releaseTime
;
}
public
void
setEnclosure
(
String
enclosure
)
public
void
setEnclosure
(
String
enclosure
)
{
this
.
enclosure
=
enclosure
;
}
public
String
getEnclosure
()
public
String
getEnclosure
()
{
return
enclosure
;
}
public
void
setVideo
(
String
video
)
public
void
setVideo
(
String
video
)
{
this
.
video
=
video
;
}
public
String
getVideo
()
public
String
getVideo
()
{
return
video
;
}
public
void
setQualifiedNum
(
Integer
qualifiedNum
)
public
void
setQualifiedNum
(
Integer
qualifiedNum
)
{
this
.
qualifiedNum
=
qualifiedNum
;
}
public
Integer
getQualifiedNum
()
public
Integer
getQualifiedNum
()
{
return
qualifiedNum
;
}
public
void
setTopicNum
(
Integer
topicNum
)
public
void
setTopicNum
(
Integer
topicNum
)
{
this
.
topicNum
=
topicNum
;
}
public
Integer
getTopicNum
()
public
Integer
getTopicNum
()
{
return
topicNum
;
}
public
void
setCreateUser
(
String
createUser
)
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
}
public
String
getCreateUser
()
public
String
getCreateUser
()
{
return
createUser
;
}
public
void
setIsDel
(
Integer
isDel
)
public
void
setIsDel
(
Integer
isDel
)
{
this
.
isDel
=
isDel
;
}
public
Integer
getIsDel
()
public
Integer
getIsDel
()
{
return
isDel
;
}
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TTrainCourseTopic.java
View file @
15a3642a
...
...
@@ -5,9 +5,11 @@ import com.zehong.common.core.domain.BaseEntity;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
java.util.List
;
/**
* 培训课程题库对象 t_train_course_topic
*
*
* @author zehong
* @date 2022-09-19
*/
...
...
@@ -31,55 +33,84 @@ public class TTrainCourseTopic extends BaseEntity
private
String
topicOption
;
/** 答案 */
// @Excel(name = "答案")
// private Integer answer;
/** 答案 */
@Excel
(
name
=
"答案"
)
private
Integer
answer
;
private
String
answer
;
/** 题目类型 1单选 2多选 3判断 */
private
Integer
topicType
;
/** 答题合格分数*/
private
Integer
qualifiedNum
;
public
Integer
getQualifiedNum
()
{
return
qualifiedNum
;
}
public
void
setQualifiedNum
(
Integer
qualifiedNum
)
{
this
.
qualifiedNum
=
qualifiedNum
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
Integer
getTopicType
()
{
return
topicType
;
}
public
void
setTopicType
(
Integer
topicType
)
{
this
.
topicType
=
topicType
;
}
public
void
setTopicId
(
Long
topicId
)
public
void
setTopicId
(
Long
topicId
)
{
this
.
topicId
=
topicId
;
}
public
Long
getTopicId
()
public
Long
getTopicId
()
{
return
topicId
;
}
public
void
setCourseId
(
Long
courseId
)
public
void
setCourseId
(
Long
courseId
)
{
this
.
courseId
=
courseId
;
}
public
Long
getCourseId
()
public
Long
getCourseId
()
{
return
courseId
;
}
public
void
setTopicTitle
(
String
topicTitle
)
public
void
setTopicTitle
(
String
topicTitle
)
{
this
.
topicTitle
=
topicTitle
;
}
public
String
getTopicTitle
()
public
String
getTopicTitle
()
{
return
topicTitle
;
}
public
void
setTopicOption
(
String
topicOption
)
public
void
setTopicOption
(
String
topicOption
)
{
this
.
topicOption
=
topicOption
;
}
public
String
getTopicOption
()
public
String
getTopicOption
()
{
return
topicOption
;
}
public
void
setAnswer
(
Integer
answer
)
{
this
.
answer
=
answer
;
}
public
Integer
getAnswer
()
{
public
String
getAnswer
()
{
return
answer
;
}
public
void
setAnswer
(
String
answer
)
{
this
.
answer
=
answer
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
15a3642a
...
...
@@ -23,12 +23,12 @@ import java.util.stream.Collectors;
/**
* 培训课程Service业务层处理
*
*
* @author zehong
* @date 2022-09-19
*/
@Service
public
class
TTrainCourseServiceImpl
implements
ITTrainCourseService
public
class
TTrainCourseServiceImpl
implements
ITTrainCourseService
{
@Autowired
private
TTrainCourseMapper
tTrainCourseMapper
;
...
...
@@ -41,7 +41,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
/**
* 查询培训课程
*
*
* @param courseId 培训课程ID
* @return 培训课程
*/
...
...
@@ -70,7 +70,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
}
/**
* 查询培训课程列表
*
*
* @param tTrainCourse 培训课程
* @return 培训课程
*/
...
...
@@ -82,7 +82,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
/**
* 新增培训课程
*
*
* @param tTrainCourse 培训课程
* @return 结果
*/
...
...
@@ -105,7 +105,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
/**
* 修改培训课程
*
*
* @param tTrainCourse 培训课程
* @return 结果
*/
...
...
@@ -126,7 +126,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
/**
* 批量删除培训课程
*
*
* @param courseIds 需要删除的培训课程ID
* @return 结果
*/
...
...
@@ -138,7 +138,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
/**
* 删除培训课程信息
*
*
* @param courseId 培训课程ID
* @return 结果
*/
...
...
@@ -184,16 +184,18 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Map
<
String
,
Object
>
examination
(
Long
userCourseId
,
String
[]
answers
){
System
.
out
.
println
(
answers
[
0
]);
TTrainUserCourse
userCourse
=
tTrainUserCourseMapper
.
selectTTrainUserCourseById
(
userCourseId
);
TTrainCourseTopic
topic
=
new
TTrainCourseTopic
();
topic
.
setCourseId
(
userCourse
.
getCourseId
());
List
<
TTrainCourseTopic
>
list
=
tTrainCourseTopicMapper
.
selectTTrainCourseTopicList
(
topic
);
int
num
=
0
;
for
(
Integer
i
=
0
;
i
<
answers
.
length
;
i
++){
if
(
Integer
.
parseInt
(
answers
[
i
])==
list
.
get
(
i
).
getAnswer
()){
num
++;
}
}
// for(Integer i=0;i<answers.length;i++){
// String demosub = list.get(i).getAnswer().substring(1,list.get(i).getAnswer().length()-1);
// if(Integer.parseInt(answers[i])==demosub){
// num++;
// }
// }
userCourse
.
setExaminationResult
(
num
);
userCourse
.
setExaminationTime
(
new
Date
());
TTrainCourse
c
=
tTrainCourseMapper
.
selectTTrainCourseById
(
userCourse
.
getCourseId
());
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseTopicServiceImpl.java
View file @
15a3642a
...
...
@@ -23,12 +23,12 @@ import java.util.List;
/**
* 培训课程题库Service业务层处理
*
*
* @author zehong
* @date 2022-09-19
*/
@Service
public
class
TTrainCourseTopicServiceImpl
implements
ITTrainCourseTopicService
public
class
TTrainCourseTopicServiceImpl
implements
ITTrainCourseTopicService
{
@Autowired
private
TTrainCourseTopicMapper
tTrainCourseTopicMapper
;
...
...
@@ -39,7 +39,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 查询培训课程题库
*
*
* @param topicId 培训课程题库ID
* @return 培训课程题库
*/
...
...
@@ -51,7 +51,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 查询培训课程题库列表
*
*
* @param tTrainCourseTopic 培训课程题库
* @return 培训课程题库
*/
...
...
@@ -68,7 +68,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 新增培训课程题库
*
*
* @param tTrainCourseTopic 培训课程题库
* @return 结果
*/
...
...
@@ -87,7 +87,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 修改培训课程题库
*
*
* @param tTrainCourseTopic 培训课程题库
* @return 结果
*/
...
...
@@ -99,7 +99,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 批量删除培训课程题库
*
*
* @param topicIds 需要删除的培训课程题库ID
* @return 结果
*/
...
...
@@ -111,7 +111,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
/**
* 删除培训课程题库信息
*
*
* @param topicId 培训课程题库ID
* @return 结果
*/
...
...
@@ -156,7 +156,7 @@ public class TTrainCourseTopicServiceImpl implements ITTrainCourseTopicService
courseTopic
.
setCourseId
(
batchTopicVo
.
getCourseId
());
courseTopic
.
setTopicTitle
(
bankSubjects
.
get
(
i
).
getTopicTitle
());
courseTopic
.
setTopicOption
(
bankSubjects
.
get
(
i
).
getTopicOption
());
courseTopic
.
setAnswer
(
bankSubjects
.
get
(
i
).
getAnswer
(
));
courseTopic
.
setAnswer
(
String
.
valueOf
(
bankSubjects
.
get
(
i
).
getAnswer
()
));
courseTopic
.
setCreateTime
(
new
Date
());
topics
.
add
(
courseTopic
);
}
...
...
danger-manage-system/src/main/resources/mapper/system/TTrainCourseMapper.xml
View file @
15a3642a
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TTrainCourseMapper"
>
<resultMap
type=
"TTrainCourse"
id=
"TTrainCourseResult"
>
<result
property=
"courseId"
column=
"course_id"
/>
<result
property=
"courseName"
column=
"course_name"
/>
...
...
@@ -25,6 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"testEndTime"
column=
"test_end_time"
/>
<result
property=
"testPersons"
column=
"test_persons"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"multipleChoiceScore"
column=
"multiple_choice_score"
/>
<result
property=
"singleChoiceScore"
column=
"single_choice_score"
/>
<result
property=
"judgmentScore"
column=
"judgment_score"
/>
</resultMap>
<resultMap
id=
"StatisticsTrainCourseResult"
type=
"StatisticsTrainCourse"
>
...
...
@@ -39,14 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTTrainCourseVo"
>
select course_id, course_name, course_type, course_conent, status,personnel_type, release_time, enclosure, video, qualified_num, topic_num, create_time, create_user, is_del, data_kind, test_start_time, test_end_time, test_persons,duration from t_train_course
select
multiple_choice_score,single_choice_score,judgment_score,
course_id, course_name, course_type, course_conent, status,personnel_type, release_time, enclosure, video, qualified_num, topic_num, create_time, create_user, is_del, data_kind, test_start_time, test_end_time, test_persons,duration from t_train_course
</sql>
<select
id=
"selectTTrainCourseList"
parameterType=
"TTrainCourse"
resultMap=
"TTrainCourseResult"
>
select c.*,p.plan_name from t_train_course c
LEFT JOIN t_train_plan p on p.plan_id = c.course_type
<where>
<where>
<if
test=
"courseName != null and courseName != ''"
>
and c.course_name like concat('%', #{courseName}, '%')
</if>
<if
test=
"courseType != null "
>
and c.course_type = #{courseType}
</if>
<if
test=
"courseConent != null and courseConent != ''"
>
and c.course_conent = #{courseConent}
</if>
...
...
@@ -63,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"testPersons != null and testPersons != ''"
>
and test_persons = #{testPersons}
</if>
</where>
</select>
<select
id=
"selectTTrainCourseById"
parameterType=
"Long"
resultMap=
"TTrainCourseResult"
>
<include
refid=
"selectTTrainCourseVo"
/>
where course_id = #{courseId}
...
...
@@ -90,7 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"testEndTime != null"
>
test_end_time,
</if>
<if
test=
"testPersons != null"
>
test_persons,
</if>
<if
test=
"duration != null"
>
duration,
</if>
<if
test=
"multipleChoiceScore != null"
>
multiple_choice_score,
</if>
<if
test=
"singleChoiceScore != null"
>
single_choice_score,
</if>
<if
test=
"judgmentScore != null"
>
judgment_score,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"courseName != null"
>
#{courseName},
</if>
...
...
@@ -111,7 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"testEndTime != null"
>
#{testEndTime},
</if>
<if
test=
"testPersons != null"
>
#{testPersons},
</if>
<if
test=
"duration != null"
>
#{duration},
</if>
<if
test=
"multipleChoiceScore != null"
>
#{multipleChoiceScore},
</if>
<if
test=
"singleChoiceScore != null"
>
#{singleChoiceScore},
</if>
<if
test=
"judgmentScore != null"
>
#{judgmentScore},
</if>
</trim>
</insert>
...
...
@@ -136,6 +143,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"testEndTime != null"
>
test_end_time = #{testEndTime},
</if>
<if
test=
"testPersons != null"
>
test_persons = #{testPersons},
</if>
<if
test=
"duration != null"
>
duration = #{duration},
</if>
<if
test=
"multipleChoiceScore != null"
>
multiple_choice_score = #{multipleChoiceScore},
</if>
<if
test=
"singleChoiceScore != null"
>
single_choice_score = #{singleChoiceScore},
</if>
<if
test=
"judgmentScore != null"
>
judgment_score = #{judgmentScore},
</if>
</trim>
where course_id = #{courseId}
</update>
...
...
@@ -145,7 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteTTrainCourseByIds"
parameterType=
"String"
>
delete from t_train_course where course_id in
delete from t_train_course where course_id in
<foreach
item=
"courseId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{courseId}
</foreach>
...
...
@@ -198,4 +208,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
GROUP BY course.course_id
</select>
</mapper>
\ No newline at end of file
</mapper>
danger-manage-system/src/main/resources/mapper/system/TTrainCourseTopicMapper.xml
View file @
15a3642a
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TTrainCourseTopicMapper"
>
<resultMap
type=
"TTrainCourseTopic"
id=
"TTrainCourseTopicResult"
>
<result
property=
"topicId"
column=
"topic_id"
/>
<result
property=
"courseId"
column=
"course_id"
/>
...
...
@@ -11,15 +11,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"topicOption"
column=
"topic_option"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"topicType"
column=
"topic_type"
/>
</resultMap>
<sql
id=
"selectTTrainCourseTopicVo"
>
select topic_id, course_id, topic_title, topic_option, answer, create_time from t_train_course_topic
select topic_id, course_id, topic_title, topic_option, answer, create_time
,topic_type
from t_train_course_topic
</sql>
<select
id=
"selectTTrainCourseTopicList"
parameterType=
"TTrainCourseTopic"
resultMap=
"TTrainCourseTopicResult"
>
<include
refid=
"selectTTrainCourseTopicVo"
/>
<where>
<where>
<if
test=
"courseId != null "
>
and course_id = #{courseId}
</if>
<if
test=
"topicTitle != null and topicTitle != ''"
>
and topic_title = #{topicTitle}
</if>
<if
test=
"topicOption != null and topicOption != ''"
>
and topic_option = #{topicOption}
</if>
...
...
@@ -27,14 +28,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select
id=
"selectCourseTopicList"
resultMap=
"TTrainCourseTopicResult"
>
select topic_id, course_id, topic_title, topic_option, answer, create_time from t_train_course_topic
select topic_id, course_id, topic_title, topic_option, answer, create_time
,topic_type
from t_train_course_topic
WHERE course_id = #{courseId}
</select>
<select
id=
"selectTTrainCourseTopicById"
parameterType=
"Long"
resultMap=
"TTrainCourseTopicResult"
>
<include
refid=
"selectTTrainCourseTopicVo"
/>
where topic_id = #{topicId}
</select>
<insert
id=
"insertTTrainCourseTopic"
parameterType=
"TTrainCourseTopic"
>
insert into t_train_course_topic
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -44,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"topicOption != null"
>
topic_option,
</if>
<if
test=
"answer != null"
>
answer,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"topicType != null"
>
topic_type
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"topicId != null"
>
#{topicId},
</if>
...
...
@@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"topicOption != null"
>
#{topicOption},
</if>
<if
test=
"answer != null"
>
#{answer},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"topicType != null"
>
#{topicType},
</if>
</trim>
</insert>
...
...
@@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"topicOption != null"
>
topic_option = #{topicOption},
</if>
<if
test=
"answer != null"
>
answer = #{answer},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"topicType != null"
>
topic_type= #{topicType}
</if>
</trim>
where topic_id = #{topicId}
</update>
...
...
@@ -72,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteTTrainCourseTopicByIds"
parameterType=
"String"
>
delete from t_train_course_topic where topic_id in
delete from t_train_course_topic where topic_id in
<foreach
item=
"topicId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{topicId}
</foreach>
...
...
@@ -84,4 +88,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(#{topic.courseId},#{topic.topicTitle},#{topic.topicOption},#{topic.answer},#{topic.createTime})
</foreach>
</insert>
</mapper>
\ No newline at end of file
</mapper>
danger-manage-web/package.json
View file @
15a3642a
...
...
@@ -46,6 +46,7 @@
"js-cookie"
:
"2.2.1"
,
"jsencrypt"
:
"3.0.0-rc.1"
,
"nprogress"
:
"0.2.0"
,
"qrcodejs2"
:
"^0.0.2"
,
"quill"
:
"1.3.7"
,
"screenfull"
:
"5.0.2"
,
"sortablejs"
:
"1.10.2"
,
...
...
@@ -54,6 +55,7 @@
"vue-cropper"
:
"0.5.5"
,
"vue-esign"
:
"^1.1.4"
,
"vue-print-nb"
:
"^1.7.5"
,
"vue-qr"
:
"^4.0.9"
,
"vue-router"
:
"3.4.9"
,
"vue-video-player"
:
"5.0.2"
,
"vuedraggable"
:
"2.24.3"
,
...
...
danger-manage-web/vue.config.js
View file @
15a3642a
...
...
@@ -35,7 +35,6 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
process
.
env
.
VUE_APP_TARGET
,
target
:
`http://192.168.2.21:8908/dangerManage`
,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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