PcDoworkMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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.hz.employmentsite.mapper.PcDoworkMapper">
  4. <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcDowork">
  5. <id column="DoworkID" jdbcType="VARCHAR" property="doworkID" />
  6. <result column="SiteUserID" jdbcType="VARCHAR" property="siteUserID" />
  7. <result column="DoTypeID" jdbcType="INTEGER" property="doTypeID" />
  8. <result column="WorkContent" jdbcType="VARCHAR" property="workContent" />
  9. <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID" />
  10. <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID" />
  12. <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime" />
  13. <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
  14. <result column="StreetCode" jdbcType="VARCHAR" property="streetCode" />
  15. <result column="WorkTime" jdbcType="TIMESTAMP" property="workTime" />
  16. <result column="SiteID" jdbcType="VARCHAR" property="siteID"/>
  17. </resultMap>
  18. <resultMap id="RecordsCountMap" type="com.hz.employmentsite.vo.taskAndLog.RecordsCountVo">
  19. <result column="RecordsCompanyNum" jdbcType="INTEGER" property="RecordsCompanyNum" />
  20. <result column="RecordsJobuserNum" jdbcType="INTEGER" property="RecordsJobuserNum" />
  21. <result column="RecordsPostNum" jdbcType="INTEGER" property="siteUserID" />
  22. <result column="RecordsJobhuntNum" jdbcType="INTEGER" property="RecordsJobhuntNum" />
  23. </resultMap>
  24. <sql id="Example_Where_Clause">
  25. <where>
  26. <foreach collection="oredCriteria" item="criteria" separator="or">
  27. <if test="criteria.valid">
  28. <trim prefix="(" prefixOverrides="and" suffix=")">
  29. <foreach collection="criteria.criteria" item="criterion">
  30. <choose>
  31. <when test="criterion.noValue">
  32. and ${criterion.condition}
  33. </when>
  34. <when test="criterion.singleValue">
  35. and ${criterion.condition} #{criterion.value}
  36. </when>
  37. <when test="criterion.betweenValue">
  38. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  39. </when>
  40. <when test="criterion.listValue">
  41. and ${criterion.condition}
  42. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  43. #{listItem}
  44. </foreach>
  45. </when>
  46. </choose>
  47. </foreach>
  48. </trim>
  49. </if>
  50. </foreach>
  51. </where>
  52. </sql>
  53. <sql id="Update_By_Example_Where_Clause">
  54. <where>
  55. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  56. <if test="criteria.valid">
  57. <trim prefix="(" prefixOverrides="and" suffix=")">
  58. <foreach collection="criteria.criteria" item="criterion">
  59. <choose>
  60. <when test="criterion.noValue">
  61. and ${criterion.condition}
  62. </when>
  63. <when test="criterion.singleValue">
  64. and ${criterion.condition} #{criterion.value}
  65. </when>
  66. <when test="criterion.betweenValue">
  67. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  68. </when>
  69. <when test="criterion.listValue">
  70. and ${criterion.condition}
  71. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  72. #{listItem}
  73. </foreach>
  74. </when>
  75. </choose>
  76. </foreach>
  77. </trim>
  78. </if>
  79. </foreach>
  80. </where>
  81. </sql>
  82. <sql id="Base_Column_List">
  83. DoworkID, SiteUserID, DoTypeID, WorkContent, CreateUserID, CreateTime, ModifyUserID,
  84. ModifyTime, RegionCode, StreetCode, WorkTime, SiteID
  85. </sql>
  86. <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultMap="BaseResultMap">
  87. select
  88. <if test="distinct">
  89. distinct
  90. </if>
  91. <include refid="Base_Column_List" />
  92. from pc_dowork
  93. <if test="_parameter != null">
  94. <include refid="Example_Where_Clause" />
  95. </if>
  96. <if test="orderByClause != null">
  97. order by ${orderByClause}
  98. </if>
  99. </select>
  100. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  101. select
  102. <include refid="Base_Column_List" />
  103. from pc_dowork
  104. where DoworkID = #{doworkID,jdbcType=VARCHAR}
  105. </select>
  106. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  107. delete from pc_dowork
  108. where DoworkID = #{doworkID,jdbcType=VARCHAR}
  109. </delete>
  110. <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample">
  111. delete from pc_dowork
  112. <if test="_parameter != null">
  113. <include refid="Example_Where_Clause" />
  114. </if>
  115. </delete>
  116. <insert id="insert" parameterType="com.hz.employmentsite.model.PcDowork">
  117. insert into pc_dowork (DoworkID, SiteUserID, DoTypeID,
  118. WorkContent, CreateUserID, CreateTime,
  119. ModifyUserID, ModifyTime, RegionCode,
  120. StreetCode, WorkTime, SiteID)
  121. values (#{doworkID,jdbcType=VARCHAR}, #{siteUserID,jdbcType=VARCHAR}, #{doTypeID,jdbcType=INTEGER},
  122. #{workContent,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  123. #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{regionCode,jdbcType=VARCHAR},
  124. #{streetCode,jdbcType=VARCHAR}, #{workTime,jdbcType=TIMESTAMP}, #{siteID,jdbcType=VARCHAR})
  125. </insert>
  126. <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcDowork">
  127. insert into pc_dowork
  128. <trim prefix="(" suffix=")" suffixOverrides=",">
  129. <if test="doworkID != null">
  130. DoworkID,
  131. </if>
  132. <if test="siteUserID != null">
  133. SiteUserID,
  134. </if>
  135. <if test="doTypeID != null">
  136. DoTypeID,
  137. </if>
  138. <if test="workContent != null">
  139. WorkContent,
  140. </if>
  141. <if test="createUserID != null">
  142. CreateUserID,
  143. </if>
  144. <if test="createTime != null">
  145. CreateTime,
  146. </if>
  147. <if test="modifyUserID != null">
  148. ModifyUserID,
  149. </if>
  150. <if test="modifyTime != null">
  151. ModifyTime,
  152. </if>
  153. <if test="regionCode != null">
  154. RegionCode,
  155. </if>
  156. <if test="streetCode != null">
  157. StreetCode,
  158. </if>
  159. <if test="workTime != null">
  160. WorkTime,
  161. </if>
  162. <if test="siteID != null">
  163. SiteID,
  164. </if>
  165. </trim>
  166. <trim prefix="values (" suffix=")" suffixOverrides=",">
  167. <if test="doworkID != null">
  168. #{doworkID,jdbcType=VARCHAR},
  169. </if>
  170. <if test="siteUserID != null">
  171. #{siteUserID,jdbcType=VARCHAR},
  172. </if>
  173. <if test="doTypeID != null">
  174. #{doTypeID,jdbcType=INTEGER},
  175. </if>
  176. <if test="workContent != null">
  177. #{workContent,jdbcType=VARCHAR},
  178. </if>
  179. <if test="createUserID != null">
  180. #{createUserID,jdbcType=VARCHAR},
  181. </if>
  182. <if test="createTime != null">
  183. #{createTime,jdbcType=TIMESTAMP},
  184. </if>
  185. <if test="modifyUserID != null">
  186. #{modifyUserID,jdbcType=VARCHAR},
  187. </if>
  188. <if test="modifyTime != null">
  189. #{modifyTime,jdbcType=TIMESTAMP},
  190. </if>
  191. <if test="regionCode != null">
  192. #{regionCode,jdbcType=VARCHAR},
  193. </if>
  194. <if test="streetCode != null">
  195. #{streetCode,jdbcType=VARCHAR},
  196. </if>
  197. <if test="workTime != null">
  198. #{workTime,jdbcType=TIMESTAMP},
  199. </if>
  200. <if test="siteID != null">
  201. #{siteID,jdbcType=VARCHAR},
  202. </if>
  203. </trim>
  204. </insert>
  205. <select id="countByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultType="java.lang.Long">
  206. select count(*) from pc_dowork
  207. <if test="_parameter != null">
  208. <include refid="Example_Where_Clause" />
  209. </if>
  210. </select>
  211. <update id="updateByExampleSelective" parameterType="map">
  212. update pc_dowork
  213. <set>
  214. <if test="row.doworkID != null">
  215. DoworkID = #{row.doworkID,jdbcType=VARCHAR},
  216. </if>
  217. <if test="row.siteUserID != null">
  218. SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
  219. </if>
  220. <if test="row.doTypeID != null">
  221. DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
  222. </if>
  223. <if test="row.workContent != null">
  224. WorkContent = #{row.workContent,jdbcType=VARCHAR},
  225. </if>
  226. <if test="row.createUserID != null">
  227. CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
  228. </if>
  229. <if test="row.createTime != null">
  230. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  231. </if>
  232. <if test="row.modifyUserID != null">
  233. ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
  234. </if>
  235. <if test="row.modifyTime != null">
  236. ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
  237. </if>
  238. <if test="row.regionCode != null">
  239. RegionCode = #{row.regionCode,jdbcType=VARCHAR},
  240. </if>
  241. <if test="row.streetCode != null">
  242. StreetCode = #{row.streetCode,jdbcType=VARCHAR},
  243. </if>
  244. <if test="row.workTime != null">
  245. WorkTime = #{row.workTime,jdbcType=TIMESTAMP},
  246. </if>
  247. <if test="row.siteID != null">
  248. SiteID = #{row.siteID,jdbcType=VARCHAR},
  249. </if>
  250. </set>
  251. <if test="example != null">
  252. <include refid="Update_By_Example_Where_Clause" />
  253. </if>
  254. </update>
  255. <update id="updateByExample" parameterType="map">
  256. update pc_dowork
  257. set DoworkID = #{row.doworkID,jdbcType=VARCHAR},
  258. SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
  259. DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
  260. WorkContent = #{row.workContent,jdbcType=VARCHAR},
  261. CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
  262. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  263. ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
  264. ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
  265. RegionCode = #{row.regionCode,jdbcType=VARCHAR},
  266. StreetCode = #{row.streetCode,jdbcType=VARCHAR},
  267. WorkTime = #{row.workTime,jdbcType=TIMESTAMP},
  268. SiteID = #{row.siteID,jdbcType=TIMESTAMP}
  269. <if test="example != null">
  270. <include refid="Update_By_Example_Where_Clause" />
  271. </if>
  272. </update>
  273. <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.PcDowork">
  274. update pc_dowork
  275. <set>
  276. <if test="siteUserID != null">
  277. SiteUserID = #{siteUserID,jdbcType=VARCHAR},
  278. </if>
  279. <if test="doTypeID != null">
  280. DoTypeID = #{doTypeID,jdbcType=INTEGER},
  281. </if>
  282. <if test="workContent != null">
  283. WorkContent = #{workContent,jdbcType=VARCHAR},
  284. </if>
  285. <if test="createUserID != null">
  286. CreateUserID = #{createUserID,jdbcType=VARCHAR},
  287. </if>
  288. <if test="createTime != null">
  289. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  290. </if>
  291. <if test="modifyUserID != null">
  292. ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
  293. </if>
  294. <if test="modifyTime != null">
  295. ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
  296. </if>
  297. <if test="regionCode != null">
  298. RegionCode = #{regionCode,jdbcType=VARCHAR},
  299. </if>
  300. <if test="streetCode != null">
  301. StreetCode = #{streetCode,jdbcType=VARCHAR},
  302. </if>
  303. <if test="workTime != null">
  304. WorkTime = #{workTime,jdbcType=TIMESTAMP},
  305. </if>
  306. <if test="siteID != null">
  307. SiteID = #{siteID,jdbcType=VARCHAR},
  308. </if>
  309. </set>
  310. where DoworkID = #{doworkID,jdbcType=VARCHAR}
  311. </update>
  312. <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcDowork">
  313. update pc_dowork
  314. set SiteUserID = #{siteUserID,jdbcType=VARCHAR},
  315. DoTypeID = #{doTypeID,jdbcType=INTEGER},
  316. WorkContent = #{workContent,jdbcType=VARCHAR},
  317. CreateUserID = #{createUserID,jdbcType=VARCHAR},
  318. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  319. ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
  320. ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
  321. RegionCode = #{regionCode,jdbcType=VARCHAR},
  322. StreetCode = #{streetCode,jdbcType=VARCHAR},
  323. WorkTime = #{workTime,jdbcType=TIMESTAMP},
  324. SiteID = #{siteID,jdbcType=VARCHAR}
  325. where DoworkID = #{doworkID,jdbcType=VARCHAR}
  326. </update>
  327. <select id="getRecordCounts" resultType="com.hz.employmentsite.vo.taskAndLog.RecordsCountVo">
  328. SELECT
  329. ( SELECT COUNT(*) FROM pc_company WHERE CreateUserID = #{CreateUserId} AND DATE(CreateTime) = #{WorkTime} ) AS RECORDSCOMPANYNUM,
  330. ( SELECT COUNT(*) FROM pc_jobuser WHERE CreateUserID = #{CreateUserId} AND DATE(CreateTime) = #{WorkTime} ) AS RECORDSJOBUSERNUM,
  331. ( SELECT COUNT(*) FROM pc_post WHERE CreateUserID = #{CreateUserId} AND DATE(CreateTime) = #{WorkTime} ) AS RECORDSPOSTNUM,
  332. ( SELECT COUNT(*) FROM pc_jobhunt WHERE CreateUserID = #{CreateUserId} AND DATE(CreateTime) = #{WorkTime} ) AS RECORDSJOBHUNTNUM
  333. </select>
  334. </mapper>