后台服务
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

80 wiersze
2.8 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.PosOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.PosOrder">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="pos_order_no" jdbcType="VARCHAR" property="posOrderNo" />
  8. <result column="type" jdbcType="INTEGER" property="type" />
  9. <result column="order_status" jdbcType="INTEGER" property="orderStatus" />
  10. <result column="bu_user_id" jdbcType="BIGINT" property="buUserId" />
  11. <result column="payment_type" jdbcType="INTEGER" property="paymentType" />
  12. <result column="payment" jdbcType="INTEGER" property="payment" />
  13. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  14. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`parent_tenant_id`,`pos_order_no`,`type`,`order_status`,`bu_user_id`,`create_date`,`update_date`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where 1 = 1
  21. <if test=" null != id ">
  22. and `id` = #{id}
  23. </if>
  24. <if test=" null != tenantId and '' != tenantId">
  25. and `tenant_id` = #{tenantId}
  26. </if>
  27. <if test=" null != parentTenantId and '' != parentTenantId">
  28. and `parent_tenant_id` = #{parentTenantId}
  29. </if>
  30. <if test=" null != posOrderNo ">
  31. and `pos_order_no` like concat('%', #{posOrderNo},'%')
  32. </if>
  33. <if test=" null != type ">
  34. and `type` = #{type}
  35. </if>
  36. <if test=" null != orderStatus ">
  37. and `order_status` = #{orderStatus}
  38. </if>
  39. <if test=" null != buUserId ">
  40. and `bu_user_id` = #{buUserId}
  41. </if>
  42. <if test=" null != paymentType ">
  43. and `payment_type` = #{paymentType}
  44. </if>
  45. <if test=" null != payment ">
  46. and `payment` = #{payment}
  47. </if>
  48. <if test=" null != createDate ">
  49. and `create_date` = #{createDate}
  50. </if>
  51. <if test=" null != updateDate ">
  52. and `update_date` = #{updateDate}
  53. </if>
  54. <if test=" null != ids ">
  55. and id in
  56. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  57. #{idItem}
  58. </foreach>
  59. </if>
  60. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  61. </sql>
  62. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  63. select <include refid="allColumns" /> from pos_order where id =#{id} and tenant_id = #{tenantId}
  64. </select>
  65. <select id="findList" parameterType="com.iformall.domain.po.PosOrder" resultMap="BaseResultMap">
  66. select <include refid="allColumns" /> from pos_order
  67. <include refid="dynamicWhereConditions" />
  68. </select>
  69. </mapper>