ScenePackageSublistMapper.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.css.simulation.resource.scene.mapper.ScenePackageSublistMapper" >
  4. <insert id="saveScenePackageSublist" parameterType="api.common.pojo.po.scene.ScenePackageSublistPO">
  5. insert into simulation.scene_package_sublist
  6. (sublist_id,sublist_name,weight,rules_name,package_and_rules,
  7. scene_natural_ids,scene_traffic_ids,scene_statue_ids,scene_generalization_ids
  8. scene_num,parent_id,root_id,seq,package_level,remarks,
  9. create_user_id,create_time,modify_user_id,modify_time,
  10. is_deleted,share)
  11. values (#{sublistId,jdbcType=VARCHAR},#{sublistName,jdbcType=VARCHAR},#{weight,jdbcType=VARCHAR},#{rulesName,jdbcType=VARCHAR},
  12. #{packageAndRules,jdbcType=VARCHAR},
  13. #{sceneNaturalIds}, #{sceneTrafficIds}, #{sceneStatueIds}, #{sceneGeneralizationIds},
  14. #{sceneNum},#{parentId,jdbcType=VARCHAR},#{rootId,jdbcType=VARCHAR},#{seq},
  15. #{packageLevel},#{remarks,jdbcType=VARCHAR},
  16. #{createUserId,jdbcType=VARCHAR},#{createTime},#{modifyUserId,jdbcType=VARCHAR},#{modifyTime},
  17. #{isDeleted,jdbcType=VARCHAR}, #{share,jdbcType=VARCHAR})
  18. </insert>
  19. <insert id="saveScenePackageSublistAll" parameterType="java.util.List">
  20. <foreach collection="list" index="index" item="item" separator=";">
  21. insert into simulation.scene_package_sublist
  22. (sublist_id,sublist_name,weight,rules_name,package_and_rules,
  23. scene_natural_ids,scene_traffic_ids,scene_statue_ids,scene_generalization_ids
  24. scene_num,parent_id,root_id,seq,package_level,remarks,
  25. create_user_id,create_time,modify_user_id,modify_time,
  26. is_deleted,share)
  27. values (#{sublistId,jdbcType=VARCHAR},#{sublistName,jdbcType=VARCHAR},#{weight,jdbcType=VARCHAR},#{rulesName,jdbcType=VARCHAR},
  28. #{packageAndRules,jdbcType=VARCHAR},
  29. #{sceneNaturalIds}, #{sceneTrafficIds}, #{sceneStatueIds}, #{sceneGeneralizationIds},
  30. #{sceneNum},#{parentId,jdbcType=VARCHAR},#{rootId,jdbcType=VARCHAR},#{seq},
  31. #{packageLevel},#{remarks,jdbcType=VARCHAR},
  32. #{createUserId,jdbcType=VARCHAR},#{createTime},#{modifyUserId,jdbcType=VARCHAR},#{modifyTime},
  33. #{isDeleted,jdbcType=VARCHAR}, #{share,jdbcType=VARCHAR})
  34. </foreach>
  35. </insert>
  36. <select id="queryScenePackageSublistList" parameterType="api.common.pojo.po.scene.ScenePackageSublistPO" resultType="api.common.pojo.vo.scene.ScenePackageSublistVO">
  37. select
  38. a.sublist_id,a.sublist_name,a.weight,b.rule_name,
  39. a.scene_num,a.parent_id,a.root_id,a.package_level,a.remarks,a.seq
  40. from simulation.scene_package_sublist as a left join simulation.scoring_rules as b on a.package_and_rules=b.rules_id
  41. <where>
  42. a.is_deleted = '0'
  43. <if test="sublistId != null and sublistId != ''">
  44. and a.sublist_id = #{sublistId,jdbcType=VARCHAR}
  45. </if>
  46. <if test="sublistName != null and sublistName != ''">
  47. and a.sublist_name = #{sublistName,jdbcType=VARCHAR}
  48. </if>
  49. <if test="parentId != null and parentId != ''">
  50. and a.parent_id = #{parentId}
  51. </if>
  52. <if test="rootId != null and rootId != ''">
  53. and a.root_id = #{rootId}
  54. </if>
  55. order by a.seq
  56. </where>
  57. </select>
  58. <update id="updateScenePackageSublist" parameterType="java.lang.String">
  59. update simulation.scene_package_sublist
  60. set is_deleted='1'
  61. where root_id = #{rootId,jdbcType=VARCHAR}
  62. </update>
  63. </mapper>