InvalidRecord.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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="cn.cslg.report.mapper.InvalidRecordMapper">
  4. <delete id="deleteInvalidRecord">
  5. delete from INVALID_RECORD where ID=#{id}
  6. </delete>
  7. <update id="updateInvalidRecord">
  8. update INVALID_RECORD set
  9. PATENT_NO=#{patentNo},PERSON=#{person},PERSON_ID=#{personId},INVALID_TIME={invalidTime},JUDGMENT_TIME=#{judgmentTime},`RESULT`=#{resultS},FILE_ID=#{fileId},REPORT_ID=#{reportId}
  10. where ID=#{id}
  11. </update>
  12. <insert id="addInvalidRecord" >
  13. insert into INVALID_RECORD (PATENT_NO,PERSON,PERSON_ID,INVALID_TIME,JUDGMENT_TIME,`RESULT`,FILE_ID,REPORT_ID)
  14. values(#{patentNo},#{person},#{personId},#{invalidTime},#{judgmentTime},#{resultS},#{fileId},#{reportId})
  15. </insert>
  16. <select id="select" resultType="cn.cslg.report.entity.InvalidRecord">
  17. <bind name="n" value="(pageNO-1)pageSize"/>
  18. select * from INVALID_RECORD
  19. <where>
  20. <if test="patentNo !='' and patentNo !=null">
  21. PATENT_NO like concat('%', #{patentNo}, '%')
  22. </if>
  23. <if test="person !='' and person !=null">
  24. and PERSON like concat('%', #{person}, '%')
  25. </if>
  26. <if test="personId !='' and personId !=null">
  27. and PERSON_ID like concat('%', #{personId}, '%')
  28. </if>
  29. <if test="invalidTime !='' and invalidTime !=null">
  30. and INVALID_TIME like concat('%', #{invalidTime}, '%')
  31. </if>
  32. <if test="judgmentTime !='' and judgmentTime !=null">
  33. and `JUDGMENT_TIME` like concat('%', #{judgmentTime}, '%')
  34. </if>
  35. <if test="resultS !='' and resultS !=null">
  36. and `RESULT` like concat('%', #{resultS}, '%')
  37. </if>
  38. <if test="caseDetails !='' and caseDetails !=null">
  39. and CASE_DETAILS like concat('%', #{caseDetails}, '%')
  40. </if>
  41. <if test="fileId !='' and fileId !=null">
  42. and FILE_ID like concat('%', #{fileId}, '%')
  43. </if>
  44. </where>
  45. </select>
  46. </mapper>