SalaryMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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.bootdo.activiti.dao.SalaryDao">
  4. <select id="get" resultType="com.bootdo.activiti.domain.SalaryDO">
  5. select `id`,`PROC_INS_ID`,`USER_ID`,`OFFICE_ID`,`POST`,`AGE`,`EDU`,`CONTENT`,`OLDA`,`OLDB`,`OLDC`,`NEWA`,`NEWB`,`NEWC`,`ADD_NUM`,`EXE_DATE`,`HR_TEXT`,`LEAD_TEXT`,`MAIN_LEAD_TEXT`,`create_by`,`create_date`,`update_by`,`update_date`,`remarks`,`del_flag` from salary where id = #{value}
  6. </select>
  7. <select id="list" resultType="com.bootdo.activiti.domain.SalaryDO">
  8. select `id`,`PROC_INS_ID`,`USER_ID`,`OFFICE_ID`,`POST`,`AGE`,`EDU`,`CONTENT`,`OLDA`,`OLDB`,`OLDC`,`NEWA`,`NEWB`,`NEWC`,`ADD_NUM`,`EXE_DATE`,`HR_TEXT`,`LEAD_TEXT`,`MAIN_LEAD_TEXT`,`create_by`,`create_date`,`update_by`,`update_date`,`remarks`,`del_flag` from salary
  9. <where>
  10. <if test="id != null and id != ''"> and id = #{id} </if>
  11. <if test="procInsId != null and procInsId != ''"> and PROC_INS_ID = #{procInsId} </if>
  12. <if test="userId != null and userId != ''"> and USER_ID = #{userId} </if>
  13. <if test="officeId != null and officeId != ''"> and OFFICE_ID = #{officeId} </if>
  14. <if test="post != null and post != ''"> and POST = #{post} </if>
  15. <if test="age != null and age != ''"> and AGE = #{age} </if>
  16. <if test="edu != null and edu != ''"> and EDU = #{edu} </if>
  17. <if test="content != null and content != ''"> and CONTENT = #{content} </if>
  18. <if test="olda != null and olda != ''"> and OLDA = #{olda} </if>
  19. <if test="oldb != null and oldb != ''"> and OLDB = #{oldb} </if>
  20. <if test="oldc != null and oldc != ''"> and OLDC = #{oldc} </if>
  21. <if test="newa != null and newa != ''"> and NEWA = #{newa} </if>
  22. <if test="newb != null and newb != ''"> and NEWB = #{newb} </if>
  23. <if test="newc != null and newc != ''"> and NEWC = #{newc} </if>
  24. <if test="addNum != null and addNum != ''"> and ADD_NUM = #{addNum} </if>
  25. <if test="exeDate != null and exeDate != ''"> and EXE_DATE = #{exeDate} </if>
  26. <if test="hrText != null and hrText != ''"> and HR_TEXT = #{hrText} </if>
  27. <if test="leadText != null and leadText != ''"> and LEAD_TEXT = #{leadText} </if>
  28. <if test="mainLeadText != null and mainLeadText != ''"> and MAIN_LEAD_TEXT = #{mainLeadText} </if>
  29. <if test="createBy != null and createBy != ''"> and create_by = #{createBy} </if>
  30. <if test="createDate != null and createDate != ''"> and create_date = #{createDate} </if>
  31. <if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy} </if>
  32. <if test="updateDate != null and updateDate != ''"> and update_date = #{updateDate} </if>
  33. <if test="remarks != null and remarks != ''"> and remarks = #{remarks} </if>
  34. <if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag} </if>
  35. </where>
  36. <choose>
  37. <when test="sort != null and sort.trim() != ''">
  38. order by ${sort} ${order}
  39. </when>
  40. <otherwise>
  41. order by id desc
  42. </otherwise>
  43. </choose>
  44. <if test="offset != null and limit != null">
  45. limit #{offset}, #{limit}
  46. </if>
  47. </select>
  48. <select id="count" resultType="int">
  49. select count(*) from salary
  50. <where>
  51. <if test="id != null and id != ''"> and id = #{id} </if>
  52. <if test="procInsId != null and procInsId != ''"> and PROC_INS_ID = #{procInsId} </if>
  53. <if test="userId != null and userId != ''"> and USER_ID = #{userId} </if>
  54. <if test="officeId != null and officeId != ''"> and OFFICE_ID = #{officeId} </if>
  55. <if test="post != null and post != ''"> and POST = #{post} </if>
  56. <if test="age != null and age != ''"> and AGE = #{age} </if>
  57. <if test="edu != null and edu != ''"> and EDU = #{edu} </if>
  58. <if test="content != null and content != ''"> and CONTENT = #{content} </if>
  59. <if test="olda != null and olda != ''"> and OLDA = #{olda} </if>
  60. <if test="oldb != null and oldb != ''"> and OLDB = #{oldb} </if>
  61. <if test="oldc != null and oldc != ''"> and OLDC = #{oldc} </if>
  62. <if test="newa != null and newa != ''"> and NEWA = #{newa} </if>
  63. <if test="newb != null and newb != ''"> and NEWB = #{newb} </if>
  64. <if test="newc != null and newc != ''"> and NEWC = #{newc} </if>
  65. <if test="addNum != null and addNum != ''"> and ADD_NUM = #{addNum} </if>
  66. <if test="exeDate != null and exeDate != ''"> and EXE_DATE = #{exeDate} </if>
  67. <if test="hrText != null and hrText != ''"> and HR_TEXT = #{hrText} </if>
  68. <if test="leadText != null and leadText != ''"> and LEAD_TEXT = #{leadText} </if>
  69. <if test="mainLeadText != null and mainLeadText != ''"> and MAIN_LEAD_TEXT = #{mainLeadText} </if>
  70. <if test="createBy != null and createBy != ''"> and create_by = #{createBy} </if>
  71. <if test="createDate != null and createDate != ''"> and create_date = #{createDate} </if>
  72. <if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy} </if>
  73. <if test="updateDate != null and updateDate != ''"> and update_date = #{updateDate} </if>
  74. <if test="remarks != null and remarks != ''"> and remarks = #{remarks} </if>
  75. <if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag} </if>
  76. </where>
  77. </select>
  78. <insert id="save" parameterType="com.bootdo.activiti.domain.SalaryDO">
  79. insert into salary
  80. (
  81. `id`,
  82. `PROC_INS_ID`,
  83. `USER_ID`,
  84. `OFFICE_ID`,
  85. `POST`,
  86. `AGE`,
  87. `EDU`,
  88. `CONTENT`,
  89. `OLDA`,
  90. `OLDB`,
  91. `OLDC`,
  92. `NEWA`,
  93. `NEWB`,
  94. `NEWC`,
  95. `ADD_NUM`,
  96. `EXE_DATE`,
  97. `HR_TEXT`,
  98. `LEAD_TEXT`,
  99. `MAIN_LEAD_TEXT`,
  100. `create_by`,
  101. `create_date`,
  102. `update_by`,
  103. `update_date`,
  104. `remarks`,
  105. `del_flag`
  106. )
  107. values
  108. (
  109. #{id},
  110. #{procInsId},
  111. #{userId},
  112. #{officeId},
  113. #{post},
  114. #{age},
  115. #{edu},
  116. #{content},
  117. #{olda},
  118. #{oldb},
  119. #{oldc},
  120. #{newa},
  121. #{newb},
  122. #{newc},
  123. #{addNum},
  124. #{exeDate},
  125. #{hrText},
  126. #{leadText},
  127. #{mainLeadText},
  128. #{createBy},
  129. #{createDate},
  130. #{updateBy},
  131. #{updateDate},
  132. #{remarks},
  133. #{delFlag}
  134. )
  135. </insert>
  136. <update id="update" parameterType="com.bootdo.activiti.domain.SalaryDO">
  137. update salary
  138. <set>
  139. <if test="procInsId != null">`PROC_INS_ID` = #{procInsId}, </if>
  140. <if test="userId != null">`USER_ID` = #{userId}, </if>
  141. <if test="officeId != null">`OFFICE_ID` = #{officeId}, </if>
  142. <if test="post != null">`POST` = #{post}, </if>
  143. <if test="age != null">`AGE` = #{age}, </if>
  144. <if test="edu != null">`EDU` = #{edu}, </if>
  145. <if test="content != null">`CONTENT` = #{content}, </if>
  146. <if test="olda != null">`OLDA` = #{olda}, </if>
  147. <if test="oldb != null">`OLDB` = #{oldb}, </if>
  148. <if test="oldc != null">`OLDC` = #{oldc}, </if>
  149. <if test="newa != null">`NEWA` = #{newa}, </if>
  150. <if test="newb != null">`NEWB` = #{newb}, </if>
  151. <if test="newc != null">`NEWC` = #{newc}, </if>
  152. <if test="addNum != null">`ADD_NUM` = #{addNum}, </if>
  153. <if test="exeDate != null">`EXE_DATE` = #{exeDate}, </if>
  154. <if test="hrText != null">`HR_TEXT` = #{hrText}, </if>
  155. <if test="leadText != null">`LEAD_TEXT` = #{leadText}, </if>
  156. <if test="mainLeadText != null">`MAIN_LEAD_TEXT` = #{mainLeadText}, </if>
  157. <if test="createBy != null">`create_by` = #{createBy}, </if>
  158. <if test="createDate != null">`create_date` = #{createDate}, </if>
  159. <if test="updateBy != null">`update_by` = #{updateBy}, </if>
  160. <if test="updateDate != null">`update_date` = #{updateDate}, </if>
  161. <if test="remarks != null">`remarks` = #{remarks}, </if>
  162. <if test="delFlag != null">`del_flag` = #{delFlag}</if>
  163. </set>
  164. where id = #{id}
  165. </update>
  166. <delete id="remove">
  167. delete from salary where id = #{value}
  168. </delete>
  169. <delete id="batchRemove">
  170. delete from salary where id in
  171. <foreach item="id" collection="array" open="(" separator="," close=")">
  172. #{id}
  173. </foreach>
  174. </delete>
  175. </mapper>