Browse Source

存储视频地址

master
yanyan 3 years ago
parent
commit
284b1b117a
  1. 10
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/SceneQuestion.java
  2. 4
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/SceneQuestionServiceImpl.java
  3. 6
      lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/SceneQuestionMapper.xml

10
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/domain/SceneQuestion.java

@ -82,6 +82,8 @@ public class SceneQuestion implements Serializable {
*/
private String answer;
private String uploadPath;
/**
* 答案
*/
@ -235,4 +237,12 @@ public class SceneQuestion implements Serializable {
public void setOption(String option) {
this.option = option;
}
public String getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) {
this.uploadPath = uploadPath;
}
}

4
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/java/com/zdxt/knowledge/service/impl/SceneQuestionServiceImpl.java

@ -108,13 +108,13 @@ public class SceneQuestionServiceImpl implements ISceneQuestionService {
sceneQuestion.setCreator(userBean.getUserName());
sceneQuestion.setCreateTime(DateUtils.getNowDate());
}
sceneQuestion.setName(uploadFilePath);
sceneQuestion.setUploadPath(uploadFilePath);
result = sceneQuestionMapper.insertSceneQuestion(sceneQuestion);
} else {
if (Objects.nonNull(userBean)) {
sceneQuestion.setUpdateTime(DateUtils.getNowDate());
}
sceneQuestion.setName(uploadFilePath);
sceneQuestion.setUploadPath(uploadFilePath);
result = sceneQuestionMapper.updateSceneQuestion(sceneQuestion);
zdxtFileCommonApi.deleteZdxtFileByIds(sceneQuestion.getGuid());
}

6
lib/EmergencyService/zdxtEmergencyKnowledgeService/src/main/resources/mapper/SceneQuestionMapper.xml

@ -14,13 +14,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="creator" column="creator" />
<result property="option" column="option" />
<result property="answer" column="answer" />
<result property="uploadPath" column="upload_path" />
<result property="nextQuestionId" column="next_question_id" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSceneQuestionVo">
select guid, code, name, parent_id, role_id, status, creator, create_time, answer, `option`, next_question_id, update_time from scene_question
select guid, code, name, parent_id, role_id, status, creator, create_time, answer, upload_path, `option`, next_question_id, update_time from scene_question
</sql>
<select id="selectSceneQuestionList" parameterType="SceneQuestion" resultMap="SceneQuestionResult">
@ -56,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null ">status,</if>
<if test="option != null and option != ''">`option`,</if>
<if test="answer != null and answer != ''">answer,</if>
<if test="uploadPath != null and uploadPath != ''">upload_path,</if>
<if test="creator != null and creator != ''">creator,</if>
<if test="createTime != null ">create_time,</if>
<if test="updateTime != null ">update_time,</if>
@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null ">#{status},</if>
<if test="option != null and option != ''">#{option},</if>
<if test="answer != null and creator != ''">#{answer},</if>
<if test="uploadPath != null and uploadPath != ''">#{uploadPath},</if>
<if test="creator != null and creator != ''">#{creator},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="updateTime != null ">#{updateTime},</if>
@ -83,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null ">status = #{status},</if>
<if test="option != null and option != ''">`option` = #{option},</if>
<if test="answer != null and answer != ''">answer = #{answer},</if>
<if test="uploadPath != null and uploadPath != ''">upload_path = #{uploadPath},</if>
<if test="creator != null and creator != ''">creator = #{creator},</if>
<if test="updateTime != null ">update_time = #{updateTime},</if>
</trim>

Loading…
Cancel
Save