HfMerchantConfigMapper.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. <!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
  4. <mapper namespace="com.ym.mec.biz.dal.dao.HfMerchantConfigDao">
  5. <resultMap type="com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig"
  6. id="HfMerchantConfig">
  7. <result column="id_" property="id" />
  8. <result column="app_id_" property="appId" />
  9. <result column="mer_key_" property="merKey" />
  10. <result column="api_key_" property="apiKey" />
  11. <result column="mock_api_key_" property="mockApiKey" />
  12. <result column="rsa_private_key_" property="rsaPrivateKey" />
  13. <result column="rsa_public_key_" property="rsaPublicKey" />
  14. <result column="expend_params_" property="expendParams" />
  15. <result column="wx_app_id_" property="wxAppId" />
  16. <result column="wx_app_secret_" property="wxAppSecret" />
  17. <result column="platform_payee_member_id_" property="platformPayeeMemberId" />
  18. <result column="create_time_" property="createTime" />
  19. <result column="update_time_" property="updateTime" />
  20. <result column="tenant_id_" property="tenantId" />
  21. </resultMap>
  22. <!-- 根据主键查询一条记录 -->
  23. <select id="get" resultMap="HfMerchantConfig">
  24. SELECT * FROM
  25. hf_merchant_config WHERE id_ = #{id}
  26. </select>
  27. <!-- 全查询 -->
  28. <select id="findAll" resultMap="HfMerchantConfig">
  29. SELECT * FROM hf_merchant_config ORDER
  30. BY id_
  31. </select>
  32. <!-- 向数据库增加一条记录 -->
  33. <insert id="insert" parameterType="com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig"
  34. useGeneratedKeys="true" keyColumn="id" keyProperty="id">
  35. <!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
  36. AS ID FROM DUAL </selectKey> -->
  37. INSERT INTO hf_merchant_config
  38. (id_,app_id_,mer_key_,api_key_,mock_api_key_,rsa_private_key_,rsa_public_key_,expend_params_,wx_app_id_,wx_app_secret_,create_time_,update_time_,tenant_id_,platform_payee_member_id_)
  39. VALUES(#{id},#{appId},#{merKey},#{apiKey},#{mockApiKey},#{rsaPrivateKey},#{rsaPublicKey},#{expendParams},#{wxAppId},#{wxAppSecret},#{createTime},#{updateTime},#{tenantId},#{platformPayeeMemberId})
  40. </insert>
  41. <!-- 根据主键查询一条记录 -->
  42. <update id="update" parameterType="com.ym.mec.thirdparty.adapay.entity.HfMerchantConfig">
  43. UPDATE hf_merchant_config
  44. <set>
  45. <if test="apiKey != null">
  46. api_key_ = #{apiKey},
  47. </if>
  48. <if test="appId != null">
  49. app_id_ = #{appId},
  50. </if>
  51. <if test="rsaPublicKey != null">
  52. rsa_public_key_ = #{rsaPublicKey},
  53. </if>
  54. <if test="mockApiKey != null">
  55. mock_api_key_ = #{mockApiKey},
  56. </if>
  57. <if test="expendParams != null">
  58. expend_params_ = #{expendParams},
  59. </if>
  60. <if test="id != null">
  61. id_ = #{id},
  62. </if>
  63. <if test="tenantId != null">
  64. tenant_id_ = #{tenantId},
  65. </if>
  66. <if test="updateTime != null">
  67. update_time_ = #{updateTime},
  68. </if>
  69. <if test="merKey != null">
  70. mer_key_ = #{merKey},
  71. </if>
  72. <if test="rsaPrivateKey != null">
  73. rsa_private_key_ = #{rsaPrivateKey},
  74. </if>
  75. <if test="platformPayeeMemberId != null">
  76. platform_payee_member_id_ = #{platformPayeeMemberId},
  77. </if>
  78. <if test="createTime != null">
  79. create_time_ = #{createTime},
  80. </if>
  81. <if test="wxAppId != null">
  82. wx_app_id_ = #{wxAppId},
  83. </if>
  84. <if test="wxAppSecret != null">
  85. wx_app_secret_ = #{wxAppSecret},
  86. </if>
  87. </set>
  88. WHERE id_ = #{id}
  89. </update>
  90. <!-- 根据主键删除一条记录 -->
  91. <delete id="delete">
  92. DELETE FROM hf_merchant_config WHERE id_ = #{id}
  93. </delete>
  94. <!-- 分页查询 -->
  95. <select id="queryPage" resultMap="HfMerchantConfig" parameterType="map">
  96. SELECT * FROM hf_merchant_config
  97. <include refid="queryPageSql"/>
  98. ORDER BY id_
  99. <include refid="global.limit" />
  100. </select>
  101. <!-- 查询当前表的总记录数 -->
  102. <select id="queryCount" resultType="int">
  103. SELECT COUNT(*) FROM hf_merchant_config
  104. <include refid="queryPageSql"/>
  105. </select>
  106. <select id="queryByTenantId" resultMap="HfMerchantConfig">
  107. SELECT * FROM hf_merchant_config where tenant_id_ = #{tenantId}
  108. </select>
  109. <sql id="queryPageSql">
  110. <where>
  111. <if test="tenantId != null">
  112. AND tenant_id_ = #{tenantId}
  113. </if>
  114. </where>
  115. </sql>
  116. </mapper>