AboutUs.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.AboutUsDAO">
  6. <resultMap id="AboutUsMap" type="com.jpsoft.employment.modules.base.entity.AboutUs">
  7. <id property="id" column="id_" />
  8. <result property="userAgreement" column="user_agreement" />
  9. <result property="privacyPolicy" column="privacy_policy" />
  10. <result property="disclaimer" column="disclaimer" />
  11. <result property="createTime" column="create_time" />
  12. <result property="updateTime" column="update_time" />
  13. <result property="delFlag" column="del_flag" />
  14. <result property="createBy" column="create_by" />
  15. <result property="updateBy" column="update_by" />
  16. <result property="receivingAccount" column="receiving_account" />
  17. <result property="bank" column="bank_" />
  18. <result property="accountNumber" column="account_number" />
  19. <result property="paymentCode" column="payment_code" />
  20. <result property="phone" column="phone_" />
  21. </resultMap>
  22. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.AboutUs">
  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 base_about_us
  30. (id_,user_agreement,privacy_policy,disclaimer,create_time,update_time,del_flag,create_by,update_by
  31. ,receiving_account,bank_,account_number,payment_code,phone_)
  32. values
  33. (
  34. #{id,jdbcType=VARCHAR}
  35. ,#{userAgreement,jdbcType=VARCHAR}
  36. ,#{privacyPolicy,jdbcType=VARCHAR}
  37. ,#{disclaimer,jdbcType=VARCHAR}
  38. ,#{createTime,jdbcType= TIMESTAMP }
  39. ,#{updateTime,jdbcType= TIMESTAMP }
  40. ,#{delFlag,jdbcType= NUMERIC }
  41. ,#{createBy,jdbcType=VARCHAR}
  42. ,#{updateBy,jdbcType=VARCHAR}
  43. ,#{receivingAccount,jdbcType=VARCHAR}
  44. ,#{bank,jdbcType=VARCHAR}
  45. ,#{accountNumber,jdbcType=VARCHAR}
  46. ,#{paymentCode,jdbcType=VARCHAR}
  47. ,#{phone,jdbcType=VARCHAR}
  48. )
  49. ]]>
  50. </insert>
  51. <delete id="delete" parameterType="string">
  52. delete from base_about_us where id_=#{id,jdbcType=VARCHAR}
  53. </delete>
  54. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.AboutUs">
  55. update base_about_us
  56. <set>
  57. <if test="userAgreement!=null">
  58. user_agreement=#{userAgreement,jdbcType=VARCHAR},
  59. </if>
  60. <if test="privacyPolicy!=null">
  61. privacy_policy=#{privacyPolicy,jdbcType=VARCHAR},
  62. </if>
  63. <if test="disclaimer!=null">
  64. disclaimer=#{disclaimer,jdbcType=VARCHAR},
  65. </if>
  66. <if test="createTime!=null">
  67. create_time=#{createTime,jdbcType= TIMESTAMP },
  68. </if>
  69. <if test="updateTime!=null">
  70. update_time=#{updateTime,jdbcType= TIMESTAMP },
  71. </if>
  72. <if test="delFlag!=null">
  73. del_flag=#{delFlag,jdbcType= NUMERIC },
  74. </if>
  75. <if test="createBy!=null">
  76. create_by=#{createBy,jdbcType=VARCHAR},
  77. </if>
  78. <if test="updateBy!=null">
  79. update_by=#{updateBy,jdbcType=VARCHAR},
  80. </if>
  81. <if test="receivingAccount!=null">
  82. receiving_account=#{receivingAccount,jdbcType=VARCHAR},
  83. </if>
  84. <if test="bank!=null">
  85. bank_=#{bank,jdbcType=VARCHAR},
  86. </if>
  87. <if test="accountNumber!=null">
  88. account_number=#{accountNumber,jdbcType=VARCHAR},
  89. </if>
  90. <if test="paymentCode!=null">
  91. payment_code=#{paymentCode,jdbcType=VARCHAR},
  92. </if>
  93. <if test="phone!=null">
  94. phone_=#{phone,jdbcType=VARCHAR},
  95. </if>
  96. </set>
  97. where id_=#{id}
  98. </update>
  99. <select id="get" parameterType="string" resultMap="AboutUsMap">
  100. select * from base_about_us where id_=#{0}
  101. </select>
  102. <select id="exist" parameterType="string" resultType="int">
  103. select count(*) from base_about_us where id_=#{0}
  104. </select>
  105. <select id="list" resultMap="AboutUsMap">
  106. select * from base_about_us where del_flag=false limit 1
  107. </select>
  108. <select id="search" parameterType="hashmap" resultMap="AboutUsMap">
  109. <![CDATA[
  110. select * from base_about_us
  111. ]]>
  112. <where>
  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>