BizArchiveReceiveTicketMapper.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="cn.ezhizao.project.business.archiveTicket.mapper.BizArchiveReceiveTicketMapper">
  6. <resultMap type="cn.ezhizao.project.business.archiveTicket.domain.BizArchiveReceiveTicket"
  7. id="BizArchiveReceiveTicketResult">
  8. <id column="id" jdbcType="BIGINT" property="id"/>
  9. </resultMap>
  10. <select id="getList" parameterType="BizArchiveReceiveTicket" resultMap="BizArchiveReceiveTicketResult">
  11. SELECT t1.* FROM biz_archive_receive_ticket t1
  12. LEFT JOIN biz_company t2 ON t2.id = t2.id = t1.company_id
  13. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  14. t1.deleted = 0
  15. <if test="companyId != null ">AND t1.company_id = #{companyId}</if>
  16. <if test="year != null and year != ''">AND t1.year = #{year}</if>
  17. <if test="month != null and month != ''">AND t1.month = #{month}</if>
  18. <if test="fileUrl != null and fileUrl != ''">AND t1.file_url = #{fileUrl}</if>
  19. <if test="fileName != null and fileName != ''">AND t1.file_name like concat('%', #{fileName}, '%')</if>
  20. </trim>
  21. </select>
  22. <delete id="physicalDelete">
  23. DELETE FROM biz_archive_receive_ticket
  24. <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
  25. <if test="id != null">
  26. id = #{id} AND
  27. </if>
  28. <if test="companyId != null">
  29. company_id = #{companyId} AND
  30. </if>
  31. <if test="year != null and year != ''">year = #{year} AND</if>
  32. <if test="month != null and month != ''">month = #{month} AND</if>
  33. <!-- 删除条件为其他外键可以在这里加 -->
  34. </trim>
  35. </delete>
  36. </mapper>