后台服务
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

WxCUserFromBMapper.xml 2.8 KiB

pirms 2 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. <mapper namespace="com.iformall.mapper.WxCUserFromBMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserFromB">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  8. <result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
  9. <result column="b_user_id" jdbcType="BIGINT" property="bUserId" />
  10. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  11. <result column="info" jdbcType="VARCHAR" property="info" />
  12. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  13. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  14. <result column="openid" jdbcType="VARCHAR" property="openid" />
  15. <result column="app_id" jdbcType="VARCHAR" property="appId" />
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`b_user_id`,`c_user_id`,`info`,`create_time`,`update_time`,`openid`,`app_id`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where 1 = 1
  22. <if test=" null != id "> and `id` = #{id} </if>
  23. <if test=" null != tenantId and '' != tenantId">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != parentTenantId and '' != parentTenantId">
  27. and `parent_tenant_id` = #{parentTenantId}
  28. </if>
  29. <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if>
  30. <if test=" null != bUserId "> and `b_user_id` = #{bUserId} </if>
  31. <if test=" null != cUserId "> and `c_user_id` = #{cUserId} </if>
  32. <if test=" null != info "> and `info` = #{info} </if>
  33. <if test=" null != createTime "> and `create_time` = #{createTime} </if>
  34. <if test=" null != updateTime "> and `update_time` = #{updateTime} </if>
  35. <if test=" null != openid "> and `openid` = #{openid} </if>
  36. <if test=" null != appId "> and `app_id` = #{appId} </if>
  37. <if test=" null != ids ">
  38. and id in
  39. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  40. #{idItem}
  41. </foreach>
  42. </if>
  43. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  44. </sql>
  45. <select id="findList" parameterType="com.iformall.domain.po.WxCUserFromB" resultMap="BaseResultMap">
  46. select <include refid="allColumns" /> from wx_c_user_from_b
  47. <include refid="dynamicWhereConditions" />
  48. order by id desc
  49. </select>
  50. <select id="getByOpenidAndAppId" resultMap="BaseResultMap" parameterType="com.iformall.domain.dto.WxCUserFromBDto">
  51. select * from wx_c_user_from_b where app_id=#{appId} and openid=#{openid} and merchant_id=#{merchantId}
  52. </select>
  53. </mapper>