StaffGroupStatisticsTotalMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  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.tzld.piaoquan.growth.common.dao.mapper.StaffGroupStatisticsTotalMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="date" jdbcType="VARCHAR" property="date" />
  7. <result column="corp_id" jdbcType="BIGINT" property="corpId" />
  8. <result column="staff_id" jdbcType="BIGINT" property="staffId" />
  9. <result column="user_id" jdbcType="VARCHAR" property="userId" />
  10. <result column="stat_time" jdbcType="BIGINT" property="statTime" />
  11. <result column="new_chat_cnt" jdbcType="INTEGER" property="newChatCnt" />
  12. <result column="chat_total" jdbcType="INTEGER" property="chatTotal" />
  13. <result column="chat_has_msg" jdbcType="INTEGER" property="chatHasMsg" />
  14. <result column="new_member_cnt" jdbcType="INTEGER" property="newMemberCnt" />
  15. <result column="member_total" jdbcType="INTEGER" property="memberTotal" />
  16. <result column="member_has_msg" jdbcType="INTEGER" property="memberHasMsg" />
  17. <result column="msg_total" jdbcType="INTEGER" property="msgTotal" />
  18. <result column="migrate_trainee_chat_cnt" jdbcType="INTEGER" property="migrateTraineeChatCnt" />
  19. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  20. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  21. </resultMap>
  22. <sql id="Example_Where_Clause">
  23. <where>
  24. <foreach collection="oredCriteria" item="criteria" separator="or">
  25. <if test="criteria.valid">
  26. <trim prefix="(" prefixOverrides="and" suffix=")">
  27. <foreach collection="criteria.criteria" item="criterion">
  28. <choose>
  29. <when test="criterion.noValue">
  30. and ${criterion.condition}
  31. </when>
  32. <when test="criterion.singleValue">
  33. and ${criterion.condition} #{criterion.value}
  34. </when>
  35. <when test="criterion.betweenValue">
  36. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  37. </when>
  38. <when test="criterion.listValue">
  39. and ${criterion.condition}
  40. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  41. #{listItem}
  42. </foreach>
  43. </when>
  44. </choose>
  45. </foreach>
  46. </trim>
  47. </if>
  48. </foreach>
  49. </where>
  50. </sql>
  51. <sql id="Update_By_Example_Where_Clause">
  52. <where>
  53. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  54. <if test="criteria.valid">
  55. <trim prefix="(" prefixOverrides="and" suffix=")">
  56. <foreach collection="criteria.criteria" item="criterion">
  57. <choose>
  58. <when test="criterion.noValue">
  59. and ${criterion.condition}
  60. </when>
  61. <when test="criterion.singleValue">
  62. and ${criterion.condition} #{criterion.value}
  63. </when>
  64. <when test="criterion.betweenValue">
  65. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  66. </when>
  67. <when test="criterion.listValue">
  68. and ${criterion.condition}
  69. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  70. #{listItem}
  71. </foreach>
  72. </when>
  73. </choose>
  74. </foreach>
  75. </trim>
  76. </if>
  77. </foreach>
  78. </where>
  79. </sql>
  80. <sql id="Base_Column_List">
  81. id, `date`, corp_id, staff_id, user_id, stat_time, new_chat_cnt, chat_total, chat_has_msg,
  82. new_member_cnt, member_total, member_has_msg, msg_total, migrate_trainee_chat_cnt,
  83. create_time, update_time
  84. </sql>
  85. <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample" resultMap="BaseResultMap">
  86. select
  87. <if test="distinct">
  88. distinct
  89. </if>
  90. <include refid="Base_Column_List" />
  91. from we_com_staff_group_statistics_total
  92. <if test="_parameter != null">
  93. <include refid="Example_Where_Clause" />
  94. </if>
  95. <if test="orderByClause != null">
  96. order by ${orderByClause}
  97. </if>
  98. <if test="page != null">
  99. limit #{page.offset} , #{page.pageSize}
  100. </if>
  101. </select>
  102. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  103. select
  104. <include refid="Base_Column_List" />
  105. from we_com_staff_group_statistics_total
  106. where id = #{id,jdbcType=BIGINT}
  107. </select>
  108. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  109. delete from we_com_staff_group_statistics_total
  110. where id = #{id,jdbcType=BIGINT}
  111. </delete>
  112. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample">
  113. delete from we_com_staff_group_statistics_total
  114. <if test="_parameter != null">
  115. <include refid="Example_Where_Clause" />
  116. </if>
  117. </delete>
  118. <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
  119. insert into we_com_staff_group_statistics_total (id, `date`, corp_id,
  120. staff_id, user_id, stat_time,
  121. new_chat_cnt, chat_total, chat_has_msg,
  122. new_member_cnt, member_total, member_has_msg,
  123. msg_total, migrate_trainee_chat_cnt, create_time,
  124. update_time)
  125. values (#{id,jdbcType=BIGINT}, #{date,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT},
  126. #{staffId,jdbcType=BIGINT}, #{userId,jdbcType=VARCHAR}, #{statTime,jdbcType=BIGINT},
  127. #{newChatCnt,jdbcType=INTEGER}, #{chatTotal,jdbcType=INTEGER}, #{chatHasMsg,jdbcType=INTEGER},
  128. #{newMemberCnt,jdbcType=INTEGER}, #{memberTotal,jdbcType=INTEGER}, #{memberHasMsg,jdbcType=INTEGER},
  129. #{msgTotal,jdbcType=INTEGER}, #{migrateTraineeChatCnt,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  130. #{updateTime,jdbcType=TIMESTAMP})
  131. </insert>
  132. <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
  133. insert into we_com_staff_group_statistics_total
  134. <trim prefix="(" suffix=")" suffixOverrides=",">
  135. <if test="id != null">
  136. id,
  137. </if>
  138. <if test="date != null">
  139. `date`,
  140. </if>
  141. <if test="corpId != null">
  142. corp_id,
  143. </if>
  144. <if test="staffId != null">
  145. staff_id,
  146. </if>
  147. <if test="userId != null">
  148. user_id,
  149. </if>
  150. <if test="statTime != null">
  151. stat_time,
  152. </if>
  153. <if test="newChatCnt != null">
  154. new_chat_cnt,
  155. </if>
  156. <if test="chatTotal != null">
  157. chat_total,
  158. </if>
  159. <if test="chatHasMsg != null">
  160. chat_has_msg,
  161. </if>
  162. <if test="newMemberCnt != null">
  163. new_member_cnt,
  164. </if>
  165. <if test="memberTotal != null">
  166. member_total,
  167. </if>
  168. <if test="memberHasMsg != null">
  169. member_has_msg,
  170. </if>
  171. <if test="msgTotal != null">
  172. msg_total,
  173. </if>
  174. <if test="migrateTraineeChatCnt != null">
  175. migrate_trainee_chat_cnt,
  176. </if>
  177. <if test="createTime != null">
  178. create_time,
  179. </if>
  180. <if test="updateTime != null">
  181. update_time,
  182. </if>
  183. </trim>
  184. <trim prefix="values (" suffix=")" suffixOverrides=",">
  185. <if test="id != null">
  186. #{id,jdbcType=BIGINT},
  187. </if>
  188. <if test="date != null">
  189. #{date,jdbcType=VARCHAR},
  190. </if>
  191. <if test="corpId != null">
  192. #{corpId,jdbcType=BIGINT},
  193. </if>
  194. <if test="staffId != null">
  195. #{staffId,jdbcType=BIGINT},
  196. </if>
  197. <if test="userId != null">
  198. #{userId,jdbcType=VARCHAR},
  199. </if>
  200. <if test="statTime != null">
  201. #{statTime,jdbcType=BIGINT},
  202. </if>
  203. <if test="newChatCnt != null">
  204. #{newChatCnt,jdbcType=INTEGER},
  205. </if>
  206. <if test="chatTotal != null">
  207. #{chatTotal,jdbcType=INTEGER},
  208. </if>
  209. <if test="chatHasMsg != null">
  210. #{chatHasMsg,jdbcType=INTEGER},
  211. </if>
  212. <if test="newMemberCnt != null">
  213. #{newMemberCnt,jdbcType=INTEGER},
  214. </if>
  215. <if test="memberTotal != null">
  216. #{memberTotal,jdbcType=INTEGER},
  217. </if>
  218. <if test="memberHasMsg != null">
  219. #{memberHasMsg,jdbcType=INTEGER},
  220. </if>
  221. <if test="msgTotal != null">
  222. #{msgTotal,jdbcType=INTEGER},
  223. </if>
  224. <if test="migrateTraineeChatCnt != null">
  225. #{migrateTraineeChatCnt,jdbcType=INTEGER},
  226. </if>
  227. <if test="createTime != null">
  228. #{createTime,jdbcType=TIMESTAMP},
  229. </if>
  230. <if test="updateTime != null">
  231. #{updateTime,jdbcType=TIMESTAMP},
  232. </if>
  233. </trim>
  234. </insert>
  235. <select id="countByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample" resultType="java.lang.Long">
  236. select count(*) from we_com_staff_group_statistics_total
  237. <if test="_parameter != null">
  238. <include refid="Example_Where_Clause" />
  239. </if>
  240. </select>
  241. <update id="updateByExampleSelective" parameterType="map">
  242. update we_com_staff_group_statistics_total
  243. <set>
  244. <if test="record.id != null">
  245. id = #{record.id,jdbcType=BIGINT},
  246. </if>
  247. <if test="record.date != null">
  248. `date` = #{record.date,jdbcType=VARCHAR},
  249. </if>
  250. <if test="record.corpId != null">
  251. corp_id = #{record.corpId,jdbcType=BIGINT},
  252. </if>
  253. <if test="record.staffId != null">
  254. staff_id = #{record.staffId,jdbcType=BIGINT},
  255. </if>
  256. <if test="record.userId != null">
  257. user_id = #{record.userId,jdbcType=VARCHAR},
  258. </if>
  259. <if test="record.statTime != null">
  260. stat_time = #{record.statTime,jdbcType=BIGINT},
  261. </if>
  262. <if test="record.newChatCnt != null">
  263. new_chat_cnt = #{record.newChatCnt,jdbcType=INTEGER},
  264. </if>
  265. <if test="record.chatTotal != null">
  266. chat_total = #{record.chatTotal,jdbcType=INTEGER},
  267. </if>
  268. <if test="record.chatHasMsg != null">
  269. chat_has_msg = #{record.chatHasMsg,jdbcType=INTEGER},
  270. </if>
  271. <if test="record.newMemberCnt != null">
  272. new_member_cnt = #{record.newMemberCnt,jdbcType=INTEGER},
  273. </if>
  274. <if test="record.memberTotal != null">
  275. member_total = #{record.memberTotal,jdbcType=INTEGER},
  276. </if>
  277. <if test="record.memberHasMsg != null">
  278. member_has_msg = #{record.memberHasMsg,jdbcType=INTEGER},
  279. </if>
  280. <if test="record.msgTotal != null">
  281. msg_total = #{record.msgTotal,jdbcType=INTEGER},
  282. </if>
  283. <if test="record.migrateTraineeChatCnt != null">
  284. migrate_trainee_chat_cnt = #{record.migrateTraineeChatCnt,jdbcType=INTEGER},
  285. </if>
  286. <if test="record.createTime != null">
  287. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  288. </if>
  289. <if test="record.updateTime != null">
  290. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  291. </if>
  292. </set>
  293. <if test="_parameter != null">
  294. <include refid="Update_By_Example_Where_Clause" />
  295. </if>
  296. </update>
  297. <update id="updateByExample" parameterType="map">
  298. update we_com_staff_group_statistics_total
  299. set id = #{record.id,jdbcType=BIGINT},
  300. `date` = #{record.date,jdbcType=VARCHAR},
  301. corp_id = #{record.corpId,jdbcType=BIGINT},
  302. staff_id = #{record.staffId,jdbcType=BIGINT},
  303. user_id = #{record.userId,jdbcType=VARCHAR},
  304. stat_time = #{record.statTime,jdbcType=BIGINT},
  305. new_chat_cnt = #{record.newChatCnt,jdbcType=INTEGER},
  306. chat_total = #{record.chatTotal,jdbcType=INTEGER},
  307. chat_has_msg = #{record.chatHasMsg,jdbcType=INTEGER},
  308. new_member_cnt = #{record.newMemberCnt,jdbcType=INTEGER},
  309. member_total = #{record.memberTotal,jdbcType=INTEGER},
  310. member_has_msg = #{record.memberHasMsg,jdbcType=INTEGER},
  311. msg_total = #{record.msgTotal,jdbcType=INTEGER},
  312. migrate_trainee_chat_cnt = #{record.migrateTraineeChatCnt,jdbcType=INTEGER},
  313. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  314. update_time = #{record.updateTime,jdbcType=TIMESTAMP}
  315. <if test="_parameter != null">
  316. <include refid="Update_By_Example_Where_Clause" />
  317. </if>
  318. </update>
  319. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
  320. update we_com_staff_group_statistics_total
  321. <set>
  322. <if test="date != null">
  323. `date` = #{date,jdbcType=VARCHAR},
  324. </if>
  325. <if test="corpId != null">
  326. corp_id = #{corpId,jdbcType=BIGINT},
  327. </if>
  328. <if test="staffId != null">
  329. staff_id = #{staffId,jdbcType=BIGINT},
  330. </if>
  331. <if test="userId != null">
  332. user_id = #{userId,jdbcType=VARCHAR},
  333. </if>
  334. <if test="statTime != null">
  335. stat_time = #{statTime,jdbcType=BIGINT},
  336. </if>
  337. <if test="newChatCnt != null">
  338. new_chat_cnt = #{newChatCnt,jdbcType=INTEGER},
  339. </if>
  340. <if test="chatTotal != null">
  341. chat_total = #{chatTotal,jdbcType=INTEGER},
  342. </if>
  343. <if test="chatHasMsg != null">
  344. chat_has_msg = #{chatHasMsg,jdbcType=INTEGER},
  345. </if>
  346. <if test="newMemberCnt != null">
  347. new_member_cnt = #{newMemberCnt,jdbcType=INTEGER},
  348. </if>
  349. <if test="memberTotal != null">
  350. member_total = #{memberTotal,jdbcType=INTEGER},
  351. </if>
  352. <if test="memberHasMsg != null">
  353. member_has_msg = #{memberHasMsg,jdbcType=INTEGER},
  354. </if>
  355. <if test="msgTotal != null">
  356. msg_total = #{msgTotal,jdbcType=INTEGER},
  357. </if>
  358. <if test="migrateTraineeChatCnt != null">
  359. migrate_trainee_chat_cnt = #{migrateTraineeChatCnt,jdbcType=INTEGER},
  360. </if>
  361. <if test="createTime != null">
  362. create_time = #{createTime,jdbcType=TIMESTAMP},
  363. </if>
  364. <if test="updateTime != null">
  365. update_time = #{updateTime,jdbcType=TIMESTAMP},
  366. </if>
  367. </set>
  368. where id = #{id,jdbcType=BIGINT}
  369. </update>
  370. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
  371. update we_com_staff_group_statistics_total
  372. set `date` = #{date,jdbcType=VARCHAR},
  373. corp_id = #{corpId,jdbcType=BIGINT},
  374. staff_id = #{staffId,jdbcType=BIGINT},
  375. user_id = #{userId,jdbcType=VARCHAR},
  376. stat_time = #{statTime,jdbcType=BIGINT},
  377. new_chat_cnt = #{newChatCnt,jdbcType=INTEGER},
  378. chat_total = #{chatTotal,jdbcType=INTEGER},
  379. chat_has_msg = #{chatHasMsg,jdbcType=INTEGER},
  380. new_member_cnt = #{newMemberCnt,jdbcType=INTEGER},
  381. member_total = #{memberTotal,jdbcType=INTEGER},
  382. member_has_msg = #{memberHasMsg,jdbcType=INTEGER},
  383. msg_total = #{msgTotal,jdbcType=INTEGER},
  384. migrate_trainee_chat_cnt = #{migrateTraineeChatCnt,jdbcType=INTEGER},
  385. create_time = #{createTime,jdbcType=TIMESTAMP},
  386. update_time = #{updateTime,jdbcType=TIMESTAMP}
  387. where id = #{id,jdbcType=BIGINT}
  388. </update>
  389. </mapper>