123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.css.simulation.resource.server.infra.db.mysql.mapper.SceneImportMapper" >
- <select id="checkName" parameterType="api.common.pojo.po.system.SceneImportPO" resultType="api.common.pojo.po.system.SceneImportPO">
- select
- id
- from scene_import_task
- where is_deleted = '0'
- and name = #{name,jdbcType=VARCHAR}
- and id <> #{id,jdbcType=VARCHAR}
- </select>
- <select id="querySceneImportByTaskId" parameterType="java.lang.String" resultType="api.common.pojo.po.system.SceneImportPO">
- select id,
- scene_type,
- scene_names
- from scene_import_task
- where id = #{id}
- </select>
- <insert id="insert" parameterType="api.common.pojo.po.system.SceneImportPO">
- INSERT INTO scene_import_task (
- id,
- name,
- data_directory,
- scene_type,
- status,
- create_user_id,
- create_time,
- modify_user_id,
- modify_time,
- evaluation_status,
- is_deleted
- )VALUES(
- #{id,jdbcType=VARCHAR},
- #{name,jdbcType=VARCHAR},
- #{dataDirectory,jdbcType=VARCHAR},
- #{sceneType,jdbcType=VARCHAR},
- #{status,jdbcType=VARCHAR},
- #{createUserId,jdbcType=VARCHAR},
- #{createTime,jdbcType=TIMESTAMP},
- #{modifyUserId,jdbcType=VARCHAR},
- #{modifyTime,jdbcType=TIMESTAMP},
- #{evaluationStatus,jdbcType=VARCHAR},
- #{isDeleted,jdbcType=VARCHAR}
- )
- </insert>
- <update id="update" parameterType="api.common.pojo.po.system.SceneImportPO">
- update scene_import_task set
- name = #{name,jdbcType=VARCHAR},
- data_directory = #{dataDirectory,jdbcType=VARCHAR},
- scene_type = #{sceneType,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
- evaluation_status = #{evaluationStatus,jdbcType=VARCHAR},
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateStatus" parameterType="api.common.pojo.po.system.SceneImportPO">
- update scene_import_task set
- status = #{status,jdbcType=VARCHAR},
- error_message = #{errorMessage},
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateInfo" parameterType="api.common.pojo.po.system.SceneImportPO">
- update simulation.scene_import_task
- set status = #{status,jdbcType=VARCHAR},
- false_num = #{falseNum},
- success_num = #{successNum},
- error_message = #{errorMessage},
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
- modify_time = #{modifyTime},
- scene_names = #{sceneNames},
- total_time = TIMESTAMPDIFF(SECOND,create_time, modify_time)
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="getSceneImporPagetList" parameterType="api.common.pojo.param.system.SceneImportPageParam" resultType="api.common.pojo.po.system.SceneImportPO">
- select
- id,
- name,
- scene_type,
- status,
- success_num,
- false_num,
- error_message,
- total_time,
- create_time,
- is_deleted,
- evaluation_status,
- evaluation_error_msg,
- start_evaluation_time,
- end_evaluation_time
- from simulation.scene_import_task
- where
- is_deleted = '0'
- <if test="name != null and name != ''">
- and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
- </if>
- <if test="timeBegin != null and timeBegin != ''">
- and DATE(create_time) >= #{timeBegin}
- </if>
- <if test="timeEnd != null and timeEnd != ''">
- and DATE(create_time) <= #{timeEnd}
- </if>
- order by create_time desc
- </select>
- <update id="deleteImportTask" parameterType="api.common.pojo.po.system.SceneImportPO">
- update scene_import_task
- set is_deleted = '1',
- modify_time = #{modifyTime},
- modify_user_id = #{modifyUserId}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- </mapper>
|