AppConnectMapper.xml 1.4 KB

123456789101112131415161718192021222324252627
  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.yami.shop.security.comment.dao.AppConnectMapper">
  4. <resultMap id="BaseResultMap" type="com.yami.shop.security.comment.model.AppConnect">
  5. <!--
  6. WARNING - @mbg.generated
  7. -->
  8. <id column="id" jdbcType="BIGINT" property="id" />
  9. <result column="user_id" jdbcType="VARCHAR" property="userId" />
  10. <result column="app_id" jdbcType="TINYINT" property="appId" />
  11. <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
  12. <result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
  13. <result column="biz_user_id" jdbcType="VARCHAR" property="bizUserId" />
  14. <result column="biz_unionid" jdbcType="VARCHAR" property="bizUnionid" />
  15. </resultMap>
  16. <select id="getByBizUserId" resultType="com.yami.shop.security.comment.model.AppConnect">
  17. select * from tz_app_connect where biz_user_id = #{bizUserId} and app_id = #{appId} limit 1
  18. </select>
  19. <select id="getByUserId" resultType="com.yami.shop.security.comment.model.AppConnect">
  20. select * from tz_app_connect where user_id = #{userId} and app_id = #{appId} limit 1
  21. </select>
  22. <select id="getUserIdByUnionId" resultType="java.lang.String">
  23. SELECT user_id from tz_app_connect where biz_unionid = #{bizUnionId} limit 1
  24. </select>
  25. </mapper>