ScheduleJobLogDao.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.kmall.schedule.dao.ScheduleJobLogDao">
  4. <select id="queryObject" resultType="com.kmall.schedule.entity.ScheduleJobLogEntity" >
  5. select * from schedule_job_log where log_id = #{value}
  6. </select>
  7. <select id="queryList" resultType="com.kmall.schedule.entity.ScheduleJobLogEntity" >
  8. select * from schedule_job_log
  9. <where>
  10. <if test="jobId != null and jobId != ''">
  11. and job_id = #{jobId}
  12. </if>
  13. </where>
  14. order by log_id desc
  15. <if test="offset != null and limit != null ">
  16. limit #{offset}, #{limit}
  17. </if>
  18. </select>
  19. <select id="queryTotal" resultType="int">
  20. select count(1) from schedule_job_log
  21. <where>
  22. <if test="jobId != null and jobId != ''">
  23. and job_id = #{jobId}
  24. </if>
  25. </where>
  26. </select>
  27. <insert id="save" parameterType="com.kmall.schedule.entity.ScheduleJobLogEntity">
  28. insert into schedule_job_log
  29. (
  30. `job_id`,
  31. `bean_name`,
  32. `method_name`,
  33. `params`,
  34. `status`,
  35. `error`,
  36. `times`,
  37. `create_time`
  38. )
  39. values
  40. (
  41. #{jobId},
  42. #{beanName},
  43. #{methodName},
  44. #{params},
  45. #{status},
  46. #{error},
  47. #{times},
  48. #{createTime}
  49. )
  50. </insert>
  51. </mapper>