123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?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.project.mapper.SimulationAutomaticProjectMapper" >
- <!--根据id查询工作信息-->
- <select id="selectById" parameterType="string" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- select * from simulation_automatic_project where id=#{id,jdbcType=VARCHAR}
- </select>
- <!--根据条件查询工作信息-->
- <select id="selectAutomaticProjectByQuery" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- select * from simulation_automatic_project
- is_deleted = '0'
- <if test="projectName != null and projectName != ''">
- and project_name = #{projectName,jdbcType=VARCHAR}
- </if>
- </select>
- <!--查询最新项目id-->
- <select id="selectLastProjectId" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- select project_date, project_num, project_id
- from simulation_automatic_project
- where project_date=#{nowRq,jdbcType=INTEGER} and is_deleted = '0'
- order by project_date desc, project_num desc
- limit 1
- </select>
- <!--创建项目信息-->
- <insert id="add" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- insert into simulation_automatic_project
- (
- id,
- project_date,
- project_num,
- project_id,
- project_name,
- project_describe,
- algorithm,
- algorithm_type,
- vehicle,
- scene,
- operation_cycle,
- parallelism,
- rule_view,
- is_choice_gpu,
- automatic_run_times,
- last_run_time,
- automatic_run_state,
- create_time,
- create_user_id,
- modify_time,
- modify_user_id,
- is_deleted
- )
- values
- (
- #{id,jdbcType=VARCHAR},
- #{projectDate,jdbcType=INTEGER},
- #{projectNum,jdbcType=INTEGER},
- #{projectId,jdbcType=VARCHAR},
- #{projectName,jdbcType=VARCHAR},
- #{projectDescribe,jdbcType=VARCHAR},
- #{algorithm,jdbcType=VARCHAR},
- #{algorithmType,jdbcType=VARCHAR},
- #{vehicle,jdbcType=VARCHAR},
- #{scene,jdbcType=VARCHAR},
- #{operationCycle,jdbcType=VARCHAR},
- #{parallelism,jdbcType=VARCHAR},
- #{ruleView,jdbcType=VARCHAR},
- #{isChoiceGpu,jdbcType=VARCHAR},
- #{automaticRunTimes,jdbcType=BIGINT},
- #{lastRunTime,jdbcType=TIMESTAMP},
- #{automaticRunState,jdbcType=VARCHAR},
- #{createTime,jdbcType=TIMESTAMP},
- #{createUserId,jdbcType=VARCHAR},
- #{modifyTime,jdbcType=TIMESTAMP},
- #{modifyUserId,jdbcType=VARCHAR},
- #{isDeleted,jdbcType=VARCHAR}
- )
- </insert>
- <!--修改项目信息-->
- <update id="updateById" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- update simulation_automatic_project
- set
- project_name = #{projectName,jdbcType=VARCHAR},
- project_describe = #{projectDescribe,jdbcType=VARCHAR},
- algorithm = #{algorithm,jdbcType=VARCHAR},
- algorithm_type = #{algorithmType,jdbcType=VARCHAR},
- vehicle = #{vehicle,jdbcType=VARCHAR},
- scene = #{scene,jdbcType=VARCHAR},
- operation_cycle = #{operation_cycle,jdbcType=VARCHAR},
- parallelism = #{parallelism,jdbcType=VARCHAR},
- is_choice_gpu = #{isChoiceGpu,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
- </update>
- <!--查询项目状态-->
- <select id="selectProjectNowRunState" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
- select now_run_state
- from simulation_automatic_project
- where
- is_deleted='0' and
- id in
- <foreach collection="array" open="(" separator="," close=")" item="id">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </select>
- <!--删除-->
- <update id="deleteProject">
- update simulation_automatic_project
- set is_deleted='1'
- where id in
- <foreach collection="array" open="(" separator="," close=")" item="id">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </update>
- </mapper>
|