BaseActiveMapper.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.abi.qms.platform.dao.mapper.BaseActiveMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.abi.qms.platform.dao.entity.BaseActive">
  6. <id column="id" property="id" />
  7. <result column="active_code" property="activeCode" />
  8. <result column="active_name" property="activeName" />
  9. <result column="active_type" property="activeType" />
  10. <result column="audit_status" property="auditStatus" />
  11. <result column="apply_time" property="applyTime" />
  12. <result column="apply_user_id" property="applyUserId" />
  13. <result column="apply_user_name" property="applyUserName" />
  14. <result column="audit_user_id" property="auditUserId" />
  15. <result column="audit_user_name" property="auditUserName" />
  16. <result column="begin_time" property="beginTime" />
  17. <result column="end_time" property="endTime" />
  18. <result column="url_tab" property="urlTab" />
  19. <result column="active_url" property="activeUrl" />
  20. <result column="create_time" property="createTime" />
  21. <result column="create_by" property="createBy" />
  22. <result column="update_time" property="updateTime" />
  23. <result column="update_by" property="updateBy" />
  24. <result column="is_delete" property="isDelete" />
  25. <result column="valid" property="valid" />
  26. <result column="is_modify_apply" property="isModifyApply" />
  27. </resultMap>
  28. <!-- 通用查询结果列 -->
  29. <sql id="Base_Column_List">
  30. id, active_code, active_name, active_type, audit_status, apply_time, apply_user_id, apply_user_name, audit_user_id, audit_user_name, begin_time, end_time, brand_code, sub_brand_code, url_tab, active_url, create_time, create_by, update_time, update_by, is_delete, valid, is_modify_apply
  31. </sql>
  32. <select id="listActivePage" resultType="com.abi.qms.platform.dao.vo.result.ListActiveVO">
  33. select active.id, active.active_name, active.active_type, active.audit_status,
  34. active.apply_time, active.apply_user_name, active.begin_time, active.end_time,
  35. active.active_url, active.valid, active.is_modify_apply,
  36. active.url_tab,
  37. apply.audit_status as apply_audit_status
  38. from base_active active
  39. left join base_active_modify_apply apply on active.id = apply.active_id and apply.is_delete = 0
  40. <where>
  41. active.is_delete = 0
  42. <if test="param.activeName != null and param.activeName != ''">
  43. AND active.active_name like concat('%',#{param.activeName},'%')
  44. </if>
  45. <if test="param.activeType != null">
  46. AND active.active_type = #{param.activeType}
  47. </if>
  48. <if test="param.auditStatus != null ">
  49. AND active.audit_status = #{param.auditStatus}
  50. </if>
  51. <if test="param.valid != null ">
  52. AND active.valid = #{param.valid}
  53. </if>
  54. </where>
  55. order by active.apply_time desc
  56. </select>
  57. <select id="getPackageActive" resultType="com.abi.qms.platform.dao.vo.result.PackageActiveVO">
  58. -- SELECT
  59. -- ba.id,
  60. -- ba.active_code,
  61. -- ba.active_name,
  62. -- ba.active_url,
  63. -- ba.active_type,
  64. -- ba.begin_time,
  65. -- ba.end_time,
  66. -- ba.brand_code
  67. -- FROM
  68. -- base_active ba
  69. -- left join base_active act on act.id = ba.
  70. -- WHERE
  71. -- bam.qr_package_id = #{materialId} limit 1
  72. </select>
  73. </mapper>