后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

  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.WxCAuthorMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCAuthor">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="user_id" jdbcType="BIGINT" property="userId"/>
  7. <result column="user_name" jdbcType="VARCHAR" property="userName"/>
  8. <result column="type" jdbcType="INTEGER" property="type"/>
  9. <result column="resource_id" jdbcType="BIGINT" property="resourceId"/>
  10. <result column="expire_time" jdbcType="TIMESTAMP" property="expireTime"/>
  11. </resultMap>
  12. <sql id="allColumns">
  13. id,user_id,user_name,type,resource_id,expire_time
  14. </sql>
  15. <sql id="dynamicWhereConditions">
  16. where 1=1
  17. <if test=" null != id ">
  18. and `id` = #{id}
  19. </if>
  20. <if test=" null != userId ">
  21. and `user_id` = #{userId}
  22. </if>
  23. <if test=" null != ids ">
  24. and id in
  25. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  26. #{idItem}
  27. </foreach>
  28. </if>
  29. <if test=" null != sortColumns">order by ${sortColumns}</if>
  30. </sql>
  31. <select id="findList" parameterType="com.iformall.domain.po.WxCAuthor" resultMap="BaseResultMap">
  32. select <include refid="allColumns"/>
  33. from wx_c_author
  34. <include refid="dynamicWhereConditions"/>
  35. </select>
  36. <delete id="deleteByUserId" parameterType="java.util.HashMap">
  37. delete from wx_c_author where user_id = #{userId}
  38. </delete>
  39. </mapper>