ImageWall.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.base.dao.ImageWallDAO">
  6. <resultMap id="ImageWallMap" type="com.jpsoft.employment.modules.base.entity.ImageWall">
  7. <id property="id" column="id_" />
  8. <result property="images" column="images_" />
  9. <result property="createBy" column="create_by" />
  10. <result property="createTime" column="create_time" />
  11. <result property="updateBy" column="update_by" />
  12. <result property="updateTime" column="update_time" />
  13. <result property="delFlag" column="del_flag" />
  14. </resultMap>
  15. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.ImageWall">
  16. <!--
  17. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  18. select sys_guid() from dual
  19. </selectKey>
  20. -->
  21. <![CDATA[
  22. insert into base_image_wall
  23. (id_,images_,create_by,create_time,update_by,update_time,del_flag)
  24. values
  25. (
  26. #{id,jdbcType=VARCHAR}
  27. ,#{images,jdbcType=VARCHAR}
  28. ,#{createBy,jdbcType=VARCHAR}
  29. ,#{createTime,jdbcType= TIMESTAMP }
  30. ,#{updateBy,jdbcType=VARCHAR}
  31. ,#{updateTime,jdbcType= TIMESTAMP }
  32. ,#{delFlag,jdbcType= NUMERIC }
  33. )
  34. ]]>
  35. </insert>
  36. <delete id="delete" parameterType="string">
  37. delete from base_image_wall where id_=#{id,jdbcType=VARCHAR}
  38. </delete>
  39. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.ImageWall">
  40. update base_image_wall
  41. <set>
  42. <if test="images!=null">
  43. images_=#{images,jdbcType=VARCHAR},
  44. </if>
  45. <if test="createBy!=null">
  46. create_by=#{createBy,jdbcType=VARCHAR},
  47. </if>
  48. <if test="createTime!=null">
  49. create_time=#{createTime,jdbcType= TIMESTAMP },
  50. </if>
  51. <if test="updateBy!=null">
  52. update_by=#{updateBy,jdbcType=VARCHAR},
  53. </if>
  54. <if test="updateTime!=null">
  55. update_time=#{updateTime,jdbcType= TIMESTAMP },
  56. </if>
  57. <if test="delFlag!=null">
  58. del_flag=#{delFlag,jdbcType= NUMERIC },
  59. </if>
  60. </set>
  61. where id_=#{id}
  62. </update>
  63. <select id="get" parameterType="string" resultMap="ImageWallMap">
  64. select * from base_image_wall where id_=#{0}
  65. </select>
  66. <select id="exist" parameterType="string" resultType="int">
  67. select count(*) from base_image_wall where id_=#{0}
  68. </select>
  69. <select id="list" resultMap="ImageWallMap">
  70. select * from base_image_wall
  71. </select>
  72. <select id="search" parameterType="hashmap" resultMap="ImageWallMap">
  73. <![CDATA[
  74. select * from base_image_wall
  75. ]]>
  76. <where>
  77. <if test="searchParams.id != null">
  78. and ID_ like #{searchParams.id}
  79. </if>
  80. </where>
  81. <foreach item="sort" collection="sortList" open="order by" separator=",">
  82. ${sort.name} ${sort.order}
  83. </foreach>
  84. </select>
  85. </mapper>