DeviceConfiguration.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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.manage.dao.DeviceConfigurationDAO">
  6. <resultMap id="DeviceConfigurationMap" type="com.jpsoft.employment.modules.manage.entity.DeviceConfiguration">
  7. <id property="id" column="id_" />
  8. <result property="createTime" column="create_time" />
  9. <result property="createBy" column="create_by" />
  10. <result property="updateTime" column="update_time" />
  11. <result property="updateBy" column="update_by" />
  12. <result property="delFlag" column="del_flag" />
  13. <result property="dmWelcomeWords" column="dm_welcome_words" />
  14. <result property="jobFairId" column="job_fair_id" />
  15. <result property="dtTemplate" column="dt_template" />
  16. <result property="dtWelcomeWords" column="dt__welcome_words" />
  17. <result property="dtImgUrl" column="dt_img_url" />
  18. <result property="dtDataTemplate" column="dt_data_template" />
  19. <result property="xwWelcomeWords" column="xw_welcome_words" />
  20. <result property="xwImgUrl" column="xw_img_url" />
  21. </resultMap>
  22. <insert id="insert" parameterType="com.jpsoft.employment.modules.manage.entity.DeviceConfiguration">
  23. <!--
  24. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  25. select sys_guid() from dual
  26. </selectKey>
  27. -->
  28. <![CDATA[
  29. insert into manage_device_configuration
  30. (id_,create_time,create_by,update_time,update_by,del_flag,dm_welcome_words,job_fair_id,dt_template,dt__welcome_words,dt_img_url,dt_data_template,xw_welcome_words,xw_img_url)
  31. values
  32. (
  33. #{id,jdbcType=VARCHAR}
  34. ,#{createTime,jdbcType= TIMESTAMP }
  35. ,#{createBy,jdbcType=VARCHAR}
  36. ,#{updateTime,jdbcType= TIMESTAMP }
  37. ,#{updateBy,jdbcType=VARCHAR}
  38. ,#{delFlag,jdbcType= NUMERIC }
  39. ,#{dmWelcomeWords,jdbcType= NUMERIC }
  40. ,#{jobFairId,jdbcType=VARCHAR}
  41. ,#{dtTemplate,jdbcType=VARCHAR}
  42. ,#{dtWelcomeWords,jdbcType= NUMERIC }
  43. ,#{dtImgUrl,jdbcType=VARCHAR}
  44. ,#{dtDataTemplate,jdbcType=VARCHAR}
  45. ,#{xwWelcomeWords,jdbcType= NUMERIC }
  46. ,#{xwImgUrl,jdbcType=VARCHAR}
  47. )
  48. ]]>
  49. </insert>
  50. <delete id="delete" parameterType="string">
  51. delete from manage_device_configuration where id_=#{id,jdbcType=VARCHAR}
  52. </delete>
  53. <update id="update" parameterType="com.jpsoft.employment.modules.manage.entity.DeviceConfiguration">
  54. update manage_device_configuration
  55. <set>
  56. <if test="createTime!=null">
  57. create_time=#{createTime,jdbcType= TIMESTAMP },
  58. </if>
  59. <if test="createBy!=null">
  60. create_by=#{createBy,jdbcType=VARCHAR},
  61. </if>
  62. <if test="updateTime!=null">
  63. update_time=#{updateTime,jdbcType= TIMESTAMP },
  64. </if>
  65. <if test="updateBy!=null">
  66. update_by=#{updateBy,jdbcType=VARCHAR},
  67. </if>
  68. <if test="delFlag!=null">
  69. del_flag=#{delFlag,jdbcType= NUMERIC },
  70. </if>
  71. <if test="dmWelcomeWords!=null">
  72. dm_welcome_words=#{dmWelcomeWords,jdbcType= NUMERIC },
  73. </if>
  74. <if test="jobFairId!=null">
  75. job_fair_id=#{jobFairId,jdbcType=VARCHAR},
  76. </if>
  77. <if test="dtTemplate!=null">
  78. dt_template=#{dtTemplate,jdbcType=VARCHAR},
  79. </if>
  80. <if test="dtWelcomeWords!=null">
  81. dt__welcome_words=#{dtWelcomeWords,jdbcType= NUMERIC },
  82. </if>
  83. <if test="dtImgUrl!=null">
  84. dt_img_url=#{dtImgUrl,jdbcType=VARCHAR},
  85. </if>
  86. <if test="dtDataTemplate!=null">
  87. dt_data_template=#{dtDataTemplate,jdbcType=VARCHAR},
  88. </if>
  89. <if test="xwWelcomeWords!=null">
  90. xw_welcome_words=#{xwWelcomeWords,jdbcType= NUMERIC },
  91. </if>
  92. <if test="xwImgUrl!=null">
  93. xw_img_url=#{xwImgUrl,jdbcType=VARCHAR},
  94. </if>
  95. </set>
  96. where id_=#{id}
  97. </update>
  98. <select id="get" parameterType="string" resultMap="DeviceConfigurationMap">
  99. select * from manage_device_configuration where id_=#{0}
  100. </select>
  101. <select id="exist" parameterType="string" resultType="int">
  102. select count(*) from manage_device_configuration where id_=#{0}
  103. </select>
  104. <select id="list" resultMap="DeviceConfigurationMap">
  105. select * from manage_device_configuration
  106. </select>
  107. <select id="search" parameterType="hashmap" resultMap="DeviceConfigurationMap">
  108. <![CDATA[
  109. select * from manage_device_configuration
  110. ]]>
  111. <where>
  112. del_flag = 0
  113. <if test="searchParams.id != null">
  114. and ID_ like #{searchParams.id}
  115. </if>
  116. </where>
  117. <foreach item="sort" collection="sortList" open="order by" separator=",">
  118. ${sort.name} ${sort.order}
  119. </foreach>
  120. </select>
  121. </mapper>