后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

57 righe
2.1 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.UserBasicGlodConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.UserBasicGlodConfig">
  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="project_type" jdbcType="INTEGER" property="projectType" />
  9. <result column="type" jdbcType="INTEGER" property="type" />
  10. <result column="glod_num" jdbcType="INTEGER" property="glodNum" />
  11. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`tenant_id`,`parent_tenant_id`,
  16. `project_type`,`type`,`glod_num`,
  17. `create_date`,`update_date`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where 1 = 1
  21. <if test=" null != id "> and `id` = #{id} </if>
  22. <if test=" null != tenantId and '' != tenantId">
  23. and `tenant_id` = #{tenantId}
  24. </if>
  25. <if test=" null != parentTenantId and '' != parentTenantId">
  26. and `parent_tenant_id` = #{parentTenantId}
  27. </if>
  28. <if test=" null != projectType "> and `project_type` = #{projectType} </if>
  29. <if test=" null != type "> and `type` = #{type} </if>
  30. <if test=" null != ids ">
  31. and id in
  32. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  33. #{idItem}
  34. </foreach>
  35. </if>
  36. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  37. </sql>
  38. <select id="findList" parameterType="com.iformall.domain.po.UserBasicGlodConfig" resultMap="BaseResultMap">
  39. select <include refid="allColumns" />
  40. from user_basic_glod_config
  41. <include refid="dynamicWhereConditions" />
  42. </select>
  43. <select id="selectGlodConfig" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  44. select <include refid="allColumns" />
  45. from user_basic_glod_config
  46. where `project_type` = #{projectType}
  47. and `type` = #{type}
  48. </select>
  49. </mapper>