FsDfAccountMapper.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.his.mapper.FsDfAccountMapper">
  6. <resultMap type="FsDfAccount" id="FsDfAccountResult">
  7. <result property="id" column="id" />
  8. <result property="dfAppKey" column="df_app_key" />
  9. <result property="dfAppsecret" column="df_appsecret" />
  10. <result property="loginAccount" column="login_account" />
  11. <result property="callBackUrl" column="call_back_url" />
  12. <result property="monthlyCard" column="monthly_card" />
  13. <result property="expressProductCode" column="express_product_code" />
  14. <result property="senderName" column="sender_name" />
  15. <result property="senderPhone" column="sender_phone" />
  16. <result property="cityIds" column="city_ids" />
  17. <result property="senderProvince" column="sender_province" />
  18. <result property="senderCity" column="sender_city" />
  19. <result property="senderDistrict" column="sender_district" />
  20. <result property="senderAddress" column="sender_address" />
  21. <result property="createTime" column="create_time" />
  22. <result property="updateTime" column="update_time" />
  23. </resultMap>
  24. <sql id="selectFsDfAccountVo">
  25. select id, df_app_key, df_appsecret, login_account, call_back_url, monthly_card, express_product_code, sender_name, sender_phone, city_ids,sender_province, sender_city, sender_district, sender_address, create_time, update_time from fs_df_account
  26. </sql>
  27. <select id="selectFsDfAccountList" parameterType="FsDfAccount" resultMap="FsDfAccountResult">
  28. <include refid="selectFsDfAccountVo"/>
  29. <where>
  30. <if test="dfAppKey != null and dfAppKey != ''"> and df_app_key = #{dfAppKey}</if>
  31. <if test="dfAppsecret != null and dfAppsecret != ''"> and df_appsecret = #{dfAppsecret}</if>
  32. <if test="loginAccount != null and loginAccount != ''"> and login_account = #{loginAccount}</if>
  33. <if test="callBackUrl != null and callBackUrl != ''"> and call_back_url = #{callBackUrl}</if>
  34. <if test="monthlyCard != null and monthlyCard != ''"> and monthly_card = #{monthlyCard}</if>
  35. <if test="expressProductCode != null and expressProductCode != ''"> and express_product_code = #{expressProductCode}</if>
  36. <if test="senderName != null and senderName != ''"> and sender_name like concat('%', #{senderName}, '%')</if>
  37. <if test="senderPhone != null and senderPhone != ''"> and sender_phone = #{senderPhone}</if>
  38. <if test="cityIds != null and cityIds != ''"> and city_ids = #{cityIds}</if>
  39. <if test="senderProvince != null and senderProvince != ''"> and sender_province = #{senderProvince}</if>
  40. <if test="senderCity != null and senderCity != ''"> and sender_city = #{senderCity}</if>
  41. <if test="senderDistrict != null and senderDistrict != ''"> and sender_district = #{senderDistrict}</if>
  42. <if test="senderAddress != null and senderAddress != ''"> and sender_address = #{senderAddress}</if>
  43. </where>
  44. </select>
  45. <select id="selectFsDfAccountById" parameterType="Long" resultMap="FsDfAccountResult">
  46. <include refid="selectFsDfAccountVo"/>
  47. where id = #{id}
  48. </select>
  49. <select id="selectFsDfAccountByAccount" resultType="com.fs.his.domain.FsDfAccount">
  50. <include refid="selectFsDfAccountVo"/>
  51. where login_account like #{loginAccount}
  52. </select>
  53. <insert id="insertFsDfAccount" parameterType="FsDfAccount" useGeneratedKeys="true" keyProperty="id">
  54. insert into fs_df_account
  55. <trim prefix="(" suffix=")" suffixOverrides=",">
  56. <if test="dfAppKey != null and dfAppKey != ''">df_app_key,</if>
  57. <if test="dfAppsecret != null and dfAppsecret != ''">df_appsecret,</if>
  58. <if test="loginAccount != null and loginAccount != ''">login_account,</if>
  59. <if test="callBackUrl != null and callBackUrl != ''">call_back_url,</if>
  60. <if test="monthlyCard != null and monthlyCard != ''">monthly_card,</if>
  61. <if test="expressProductCode != null and expressProductCode != ''">express_product_code,</if>
  62. <if test="senderName != null and senderName != ''">sender_name,</if>
  63. <if test="senderPhone != null and senderPhone != ''">sender_phone,</if>
  64. <if test="cityIds != null and cityIds != ''">city_ids,</if>
  65. <if test="senderProvince != null and senderProvince != ''">sender_province,</if>
  66. <if test="senderCity != null and senderCity != ''">sender_city,</if>
  67. <if test="senderDistrict != null and senderDistrict != ''">sender_district,</if>
  68. <if test="senderAddress != null and senderAddress != ''">sender_address,</if>
  69. <if test="createTime != null">create_time,</if>
  70. <if test="updateTime != null">update_time,</if>
  71. </trim>
  72. <trim prefix="values (" suffix=")" suffixOverrides=",">
  73. <if test="dfAppKey != null and dfAppKey != ''">#{dfAppKey},</if>
  74. <if test="dfAppsecret != null and dfAppsecret != ''">#{dfAppsecret},</if>
  75. <if test="loginAccount != null and loginAccount != ''">#{loginAccount},</if>
  76. <if test="callBackUrl != null and callBackUrl != ''">#{callBackUrl},</if>
  77. <if test="monthlyCard != null and monthlyCard != ''">#{monthlyCard},</if>
  78. <if test="expressProductCode != null and expressProductCode != ''">#{expressProductCode},</if>
  79. <if test="senderName != null and senderName != ''">#{senderName},</if>
  80. <if test="senderPhone != null and senderPhone != ''">#{senderPhone},</if>
  81. <if test="cityIds != null and cityIds != ''">#{cityIds},</if>
  82. <if test="senderProvince != null and senderProvince != ''">#{senderProvince},</if>
  83. <if test="senderCity != null and senderCity != ''">#{senderCity},</if>
  84. <if test="senderDistrict != null and senderDistrict != ''">#{senderDistrict},</if>
  85. <if test="senderAddress != null and senderAddress != ''">#{senderAddress},</if>
  86. <if test="createTime != null">#{createTime},</if>
  87. <if test="updateTime != null">#{updateTime},</if>
  88. </trim>
  89. </insert>
  90. <update id="updateFsDfAccount" parameterType="FsDfAccount">
  91. update fs_df_account
  92. <trim prefix="SET" suffixOverrides=",">
  93. <if test="dfAppKey != null and dfAppKey != ''">df_app_key = #{dfAppKey},</if>
  94. <if test="dfAppsecret != null and dfAppsecret != ''">df_appsecret = #{dfAppsecret},</if>
  95. <if test="loginAccount != null and loginAccount != ''">login_account = #{loginAccount},</if>
  96. <if test="callBackUrl != null and callBackUrl != ''">call_back_url = #{callBackUrl},</if>
  97. <if test="monthlyCard != null and monthlyCard != ''">monthly_card = #{monthlyCard},</if>
  98. <if test="expressProductCode != null and expressProductCode != ''">express_product_code = #{expressProductCode},</if>
  99. <if test="senderName != null and senderName != ''">sender_name = #{senderName},</if>
  100. <if test="senderPhone != null and senderPhone != ''">sender_phone = #{senderPhone},</if>
  101. <if test="cityIds != null">city_ids = #{cityIds},</if>
  102. <if test="senderProvince != null and senderProvince != ''">sender_province = #{senderProvince},</if>
  103. <if test="senderCity != null and senderCity != ''">sender_city = #{senderCity},</if>
  104. <if test="senderDistrict != null and senderDistrict != ''">sender_district = #{senderDistrict},</if>
  105. <if test="senderAddress != null and senderAddress != ''">sender_address = #{senderAddress},</if>
  106. <if test="createTime != null">create_time = #{createTime},</if>
  107. <if test="updateTime != null">update_time = #{updateTime},</if>
  108. </trim>
  109. where id = #{id}
  110. </update>
  111. <delete id="deleteFsDfAccountById" parameterType="Long">
  112. delete from fs_df_account where id = #{id}
  113. </delete>
  114. <delete id="deleteFsDfAccountByIds" parameterType="String">
  115. delete from fs_df_account where id in
  116. <foreach item="id" collection="array" open="(" separator="," close=")">
  117. #{id}
  118. </foreach>
  119. </delete>
  120. </mapper>