AccountInfo.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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.enterprise.modules.base.dao.AccountInfoDAO">
  6. <resultMap id="AccountInfoMap" type="com.jpsoft.enterprise.modules.base.entity.AccountInfo">
  7. <id property="id" column="id_" />
  8. <result property="accountName" column="account_name" />
  9. <result property="accountBank" column="account_bank" />
  10. <result property="accountNo" column="account_no" />
  11. <result property="wxMchid" column="wx_mchid" />
  12. <result property="appAuthToken" column="app_auth_token" />
  13. <result property="createBy" column="create_by" />
  14. <result property="createTime" column="create_time" />
  15. <result property="updateBy" column="update_by" />
  16. <result property="updateTime" column="update_time" />
  17. <result property="delFlag" column="del_flag" />
  18. </resultMap>
  19. <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.AccountInfo">
  20. <!--
  21. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  22. select sys_guid() from dual
  23. </selectKey>
  24. -->
  25. <![CDATA[
  26. insert into base_account_info
  27. (id_,account_name,account_bank,account_no,wx_mchid,app_auth_token,create_by,create_time,update_by,update_time,del_flag)
  28. values
  29. (
  30. #{id,jdbcType=VARCHAR}
  31. ,#{accountName,jdbcType=VARCHAR}
  32. ,#{accountBank,jdbcType=VARCHAR}
  33. ,#{accountNo,jdbcType=VARCHAR}
  34. ,#{wxMchid,jdbcType=VARCHAR}
  35. ,#{appAuthToken,jdbcType=VARCHAR}
  36. ,#{createBy,jdbcType=VARCHAR}
  37. ,#{createTime,jdbcType= TIMESTAMP }
  38. ,#{updateBy,jdbcType=VARCHAR}
  39. ,#{updateTime,jdbcType= TIMESTAMP }
  40. ,#{delFlag,jdbcType= NUMERIC }
  41. )
  42. ]]>
  43. </insert>
  44. <delete id="delete" parameterType="string">
  45. delete from base_account_info where id_=#{id,jdbcType=VARCHAR}
  46. </delete>
  47. <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.AccountInfo">
  48. update base_account_info
  49. <set>
  50. <if test="accountName!=null">
  51. account_name=#{accountName,jdbcType=VARCHAR},
  52. </if>
  53. <if test="accountBank!=null">
  54. account_bank=#{accountBank,jdbcType=VARCHAR},
  55. </if>
  56. <if test="accountNo!=null">
  57. account_no=#{accountNo,jdbcType=VARCHAR},
  58. </if>
  59. <if test="wxMchid!=null">
  60. wx_mchid=#{wxMchid,jdbcType=VARCHAR},
  61. </if>
  62. <if test="appAuthToken!=null">
  63. app_auth_token=#{appAuthToken,jdbcType=VARCHAR},
  64. </if>
  65. <if test="createBy!=null">
  66. create_by=#{createBy,jdbcType=VARCHAR},
  67. </if>
  68. <if test="createTime!=null">
  69. create_time=#{createTime,jdbcType= TIMESTAMP },
  70. </if>
  71. <if test="updateBy!=null">
  72. update_by=#{updateBy,jdbcType=VARCHAR},
  73. </if>
  74. <if test="updateTime!=null">
  75. update_time=#{updateTime,jdbcType= TIMESTAMP },
  76. </if>
  77. <if test="delFlag!=null">
  78. del_flag=#{delFlag,jdbcType= NUMERIC },
  79. </if>
  80. </set>
  81. where id_=#{id}
  82. </update>
  83. <select id="get" parameterType="string" resultMap="AccountInfoMap">
  84. select
  85. id_,account_name,account_bank,account_no,wx_mchid,app_auth_token,create_by,create_time,update_by,update_time,del_flag from base_account_info where id_=#{0}
  86. </select>
  87. <select id="exist" parameterType="string" resultType="int">
  88. select count(*) from base_account_info where id_=#{0}
  89. </select>
  90. <select id="list" resultMap="AccountInfoMap">
  91. select * from base_account_info
  92. </select>
  93. <select id="search" parameterType="hashmap" resultMap="AccountInfoMap">
  94. <![CDATA[
  95. select * from base_account_info
  96. ]]>
  97. <where>
  98. <if test="searchParams.id != null">
  99. and ID_ like #{searchParams.id}
  100. </if>
  101. </where>
  102. <foreach item="sort" collection="sortList" open="order by" separator=",">
  103. ${sort.name} ${sort.order}
  104. </foreach>
  105. </select>
  106. </mapper>