AuditReasonMapper.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.yonge.cooleshow.biz.dal.dao.AuditReasonDao">
  4. <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.AuditReason">
  5. <result column="id_" property="id" />
  6. <result column="name_" property="name" />
  7. <result column="type_" property="type" />
  8. <result column="del_flag_" property="delFlag" />
  9. <result column="create_time_" property="createTime" />
  10. <result column="update_time_" property="updateTime" />
  11. <result column="update_by_" property="updateBy" />
  12. <result column="create_by_" property="createBy" />
  13. </resultMap>
  14. <!-- 表字段 -->
  15. <sql id="baseColumns">
  16. t.id_ as id
  17. , t.name_ as name
  18. , t.type_ as type
  19. , t.del_flag_ as delFlag
  20. , t.create_time_ as createTime
  21. , t.update_time_ as updateTime
  22. , t.update_by_ as updateBy
  23. , t.create_by_ as createBy
  24. </sql>
  25. <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.AuditReasonVo">
  26. SELECT
  27. <include refid="baseColumns"/>
  28. FROM audit_reason t
  29. where t.id_ = #{id}
  30. </select>
  31. <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.AuditReasonVo">
  32. SELECT
  33. <include refid="baseColumns" />
  34. ,su.username_ as updateName
  35. FROM audit_reason t
  36. left join sys_user su on su.id_ = t.update_by_
  37. <where>
  38. t.del_flag_ = 0
  39. <if test="param.type != null and param.type != ''">
  40. and t.type_ = #{param.type}
  41. </if>
  42. <if test="param.search != null and param.search != ''">
  43. and t.name_ like concat('%', #{param.search},'%')
  44. </if>
  45. </where>
  46. </select>
  47. </mapper>