AttendanceSetMapper.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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="com.boman.web.core.mapper.AttendanceSetMapper">
  6. <resultMap type="AttendanceSet" id="AttendanceSetResult">
  7. <result property="id" column="id" />
  8. <result property="attendanceAdd" column="attendance_add" />
  9. <result property="lgt" column="lgt" />
  10. <result property="lat" column="lat" />
  11. <result property="limitRange" column="limit_range" />
  12. <result property="createBy" column="create_by" />
  13. <result property="createTime" column="create_time" />
  14. <result property="updateBy" column="update_by" />
  15. <result property="updateTime" column="update_time" />
  16. <result property="isDel" column="is_del" />
  17. </resultMap>
  18. <sql id="selectAttendanceSetVo">
  19. select id, attendance_add, lgt, lat, limit_range, create_by, create_time, update_by, update_time, is_del from attendance_set
  20. </sql>
  21. <select id="selectAttendanceSetList" parameterType="AttendanceSet" resultMap="AttendanceSetResult">
  22. <include refid="selectAttendanceSetVo"/>
  23. <where>
  24. is_del = 'N'
  25. <if test="attendanceAdd != null and attendanceAdd != ''"> and attendance_add = #{attendanceAdd}</if>
  26. <if test="lgt != null and lgt != ''"> and lgt = #{lgt}</if>
  27. <if test="lat != null and lat != ''"> and lat = #{lat}</if>
  28. <if test="limitRange != null and limitRange != ''"> and limit_range = #{limitRange}</if>
  29. </where>
  30. </select>
  31. <select id="selectAttendanceSetById" parameterType="Long" resultMap="AttendanceSetResult">
  32. <include refid="selectAttendanceSetVo"/>
  33. where id = #{id}
  34. </select>
  35. <insert id="insertAttendanceSet" parameterType="AttendanceSet">
  36. insert into attendance_set
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="id != null">id,</if>
  39. <if test="attendanceAdd != null">attendance_add,</if>
  40. <if test="lgt != null">lgt,</if>
  41. <if test="lat != null">lat,</if>
  42. <if test="limitRange != null">limit_range,</if>
  43. <if test="createBy != null">create_by,</if>
  44. <if test="createTime != null">create_time,</if>
  45. <if test="updateBy != null">update_by,</if>
  46. <if test="updateTime != null">update_time,</if>
  47. <if test="isDel != null">is_del,</if>
  48. </trim>
  49. <trim prefix="values (" suffix=")" suffixOverrides=",">
  50. <if test="id != null">#{id},</if>
  51. <if test="attendanceAdd != null">#{attendanceAdd},</if>
  52. <if test="lgt != null">#{lgt},</if>
  53. <if test="lat != null">#{lat},</if>
  54. <if test="limitRange != null">#{limit_range},</if>
  55. <if test="createBy != null">#{createBy},</if>
  56. <if test="createTime != null">#{createTime},</if>
  57. <if test="updateBy != null">#{updateBy},</if>
  58. <if test="updateTime != null">#{updateTime},</if>
  59. <if test="isDel != null">#{isDel},</if>
  60. </trim>
  61. </insert>
  62. <update id="updateAttendanceSet" parameterType="AttendanceSet">
  63. update attendance_set
  64. <trim prefix="SET" suffixOverrides=",">
  65. <if test="attendanceAdd != null">attendance_add = #{attendanceAdd},</if>
  66. <if test="lgt != null">lgt = #{lgt},</if>
  67. <if test="lat != null">lat = #{lat},</if>
  68. <if test="limitRange != null">limit_range = #{limitRange},</if>
  69. <if test="createBy != null">create_by = #{createBy},</if>
  70. <if test="createTime != null">create_time = #{createTime},</if>
  71. <if test="updateBy != null">update_by = #{updateBy},</if>
  72. <if test="updateTime != null">update_time = #{updateTime},</if>
  73. <if test="isDel != null">is_del = #{isDel},</if>
  74. </trim>
  75. where id = #{id}
  76. </update>
  77. <delete id="deleteAttendanceSetById" parameterType="Long">
  78. delete from attendance_set where id = #{id}
  79. </delete>
  80. <delete id="deleteAttendanceSetByIds" parameterType="String">
  81. delete from attendance_set where id in
  82. <foreach item="id" collection="array" open="(" separator="," close=")">
  83. #{id}
  84. </foreach>
  85. </delete>
  86. </mapper>