CmBehaviorRecordMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  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.caimei365.tools.mapper.CmBehaviorRecordMapper">
  4. <insert id="insertRecord" parameterType="com.caimei365.tools.model.po.CmBehaviorRecordPo" useGeneratedKeys="true" keyProperty="recordID">
  5. INSERT INTO cm_behavior_record (IP, userID, pagePath, pageType, pageLabel, behaviorType, productID, accessTime, accessDuration, accessDate,referer,accessSource,accessClient,isReckon,region,userAgent,delFlag)
  6. VALUES(#{IP},#{userId},#{pagePath},#{pageType},#{pageLabel},#{behaviorType},#{productId},#{accessTime},#{accessDuration},#{accessDate},#{referer},#{accessSource},#{accessClient},#{isReckon},#{region},#{userAgent},#{delFlag})
  7. </insert>
  8. <select id="toDateRecode" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  9. SELECT IP, userID FROM cm_behavior_record WHERE accessDate = #{accessDate} GROUP BY IP, userID
  10. </select>
  11. <select id="toDateIPTimeRecode" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  12. SELECT recordID, IP, userID, accessTime FROM cm_behavior_record WHERE IP = #{IP} AND userID = #{userId} AND isReckon = 0
  13. AND accessTime BETWEEN #{startTime} and #{endTime}
  14. union
  15. SELECT recordID, IP, userID, accessTime FROM cm_behavior_record WHERE IP = #{IP} AND isReckon = 0 AND accessDate = #{accessDate} AND userID = #{userId}
  16. ORDER BY accessTime ASC
  17. </select>
  18. <update id="updateDuration">
  19. UPDATE cm_behavior_record
  20. SET accessDuration = #{accessDuration},
  21. isReckon = #{isReckon}
  22. WHERE recordID = #{recordID}
  23. </update>
  24. <select id="findList" resultType="com.caimei365.tools.model.po.CmUserPo">
  25. SELECT userID, registerIP FROM USER where userID between #{startId} and #{endId}
  26. </select>
  27. <select id="skuList" resultType="com.caimei365.tools.model.po.CmSkuPo">
  28. select
  29. skuId,
  30. productId,
  31. organizeId,
  32. normalPrice,
  33. price,
  34. ladderPriceFlag,
  35. costCheckFlag,
  36. ifnull(costPrice,0) as costPrice,
  37. shopPercent,
  38. organizePercent,
  39. cmPercent,
  40. stock,
  41. unit,
  42. minBuyNumber
  43. from cm_sku
  44. WHERE costCheckFlag = 1
  45. </select>
  46. <update id="updateSku">
  47. update cm_sku
  48. set shopPercent = #{shopPercent},
  49. organizePercent = #{organizePercent},
  50. cmPercent = #{cmPercent},
  51. costCheckFlag = #{costCheckFlag}
  52. where skuId = #{skuId}
  53. </update>
  54. <update id="updateOldData">
  55. UPDATE USER
  56. SET ipAddress = #{ipAddress}
  57. WHERE userID = #{userID}
  58. </update>
  59. <select id="selSvipCoupon" resultType="com.caimei365.tools.model.po.CmVipCouponPo">
  60. SELECT id,
  61. useTime,
  62. updateTime,
  63. status,
  64. delFlag
  65. FROM cm_svip_coupon_month WHERE delFlag != 0 AND useTime BETWEEN #{startTime} AND #{endTime}
  66. </select>
  67. <update id="updateSvipCoupon">
  68. UPDATE cm_svip_coupon_month
  69. SET delFlag = 0
  70. WHERE id = #{id}
  71. </update>
  72. <insert id="insertVipCouponMonth" parameterType="com.caimei365.tools.model.po.CmVipCouponPo" keyProperty="id" useGeneratedKeys="true" >
  73. INSERT INTO cm_svip_coupon_month (useTime, updateTime, status,delFlag)
  74. VALUES (#{useTime}, #{updateTime}, #{status}, #{delFlag})
  75. </insert>
  76. <select id="selCoupon" resultType="com.caimei365.tools.model.po.CmCouponPo">
  77. SELECT
  78. id,
  79. name,
  80. couponAmount,
  81. touchPrice,
  82. startDate,
  83. endDate,
  84. receivePeriod,
  85. useTimeFlag,
  86. receiveFlag,
  87. usePeriod,
  88. status,
  89. couponType,
  90. vipFlag,
  91. userId,
  92. shopId,
  93. productType,
  94. pcBanner,
  95. appletsBanner,
  96. categoryType,
  97. couponsMode,
  98. moneyCouponPrice,
  99. moneyCouponFlag,
  100. couponPayWay,
  101. moneyCouponType,
  102. createDate,
  103. delFlag
  104. FROM cm_coupon WHERE delFlag = 0 AND configure = 1
  105. </select>
  106. <update id="updateCoupon">
  107. UPDATE cm_coupon
  108. SET configure = #{configure}
  109. WHERE id = #{id}
  110. </update>
  111. <insert id="insertCoupon" parameterType="com.caimei365.tools.model.po.CmCouponPo" keyProperty="id" useGeneratedKeys="true">
  112. INSERT INTO cm_coupon(
  113. name,
  114. couponPayWay,
  115. couponAmount,
  116. touchPrice,
  117. startDate,
  118. endDate,
  119. receivePeriod,
  120. receiveFlag,
  121. useTimeFlag,
  122. usePeriod,
  123. status,
  124. couponType,
  125. vipFlag,
  126. userId,
  127. shopId,
  128. productType,
  129. pcBanner,
  130. appletsBanner,
  131. categoryType,
  132. couponsMode,
  133. createDate,
  134. moneyCouponPrice,
  135. moneyCouponFlag,
  136. moneyCouponType,
  137. delFlag,
  138. configure
  139. ) VALUES (
  140. #{name},
  141. #{couponPayWay},
  142. #{couponAmount},
  143. #{touchPrice},
  144. #{startDate},
  145. #{endDate},
  146. #{receivePeriod},
  147. #{receiveFlag},
  148. #{useTimeFlag},
  149. #{usePeriod},
  150. #{status},
  151. #{couponType},
  152. #{vipFlag},
  153. #{userId},
  154. #{shopId},
  155. #{productType},
  156. #{pcBanner},
  157. #{appletsBanner},
  158. #{categoryType},
  159. #{couponsMode},
  160. #{createDate},
  161. #{moneyCouponPrice},
  162. #{moneyCouponFlag},
  163. #{moneyCouponType},
  164. #{delFlag},
  165. #{configure}
  166. )
  167. </insert>
  168. <select id="selCouponPro" resultType="com.caimei365.tools.model.po.CmCouponAssociatePo">
  169. select * from cm_coupon_product where delFlag = 0 and couponId = #{couponId}
  170. </select>
  171. <insert id="insertCouponAssociate">
  172. INSERT INTO `cm_coupon_product` (
  173. `couponId`, `productId`, `pcStatus`,
  174. `appletsStatus`,
  175. `sort`, `addTime`, `delFlag`
  176. )
  177. VALUES
  178. (
  179. #{couponId}, #{productId}, #{pcStatus},
  180. #{appletsStatus},
  181. #{sort}, #{addTime}, #{delFlag}
  182. )
  183. </insert>
  184. <select id="selSvipCouponById" resultType="integer">
  185. SELECT max(id) as id FROM cm_svip_coupon_month
  186. </select>
  187. <insert id="insertRelation">
  188. INSERT INTO cm_svip_coupon(couponId, montId, updateTime,delFlag)
  189. VALUES(#{couponId}, #{montId}, #{updateTime},#{delFlag})
  190. </insert>
  191. <select id="countNum" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  192. SELECT IP as IP, COUNT(DISTINCT userID) as count FROM cm_behavior_record
  193. where accessDate = #{accessDate}
  194. GROUP BY IP, accessDate ORDER BY accessDate DESC
  195. </select>
  196. <select id="userIdAcc" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  197. SELECT IP as IP, userID as userId FROM cm_behavior_record WHERE IP = #{IP} AND accessDate = #{accessDate} GROUP BY IP ,userID ORDER BY userID DESC LIMIT 1
  198. </select>
  199. <select id="selBehaviorList" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  200. SELECT recordID as recordID, IP as IP, userID as userId FROM cm_behavior_record WHERE IP = #{IP} AND userID = 0 AND accessDate = #{accessDate}
  201. </select>
  202. <update id="updateBehavior">
  203. UPDATE cm_behavior_record
  204. SET IP = #{IP},
  205. userID = #{userId}
  206. WHERE recordID = #{recordID}
  207. </update>
  208. <select id="selYesterdayList" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  209. SELECT
  210. b.IP,
  211. b.userID,
  212. c.clubID,
  213. MAX(b.accessTime) AS lastAccessTime,
  214. (
  215. CASE WHEN u.userIdentity = 2 THEN 2
  216. WHEN u.userIdentity = 4 THEN 2
  217. WHEN u.userIdentity = 3 THEN 3
  218. WHEN b.userID = 0 THEN 1
  219. END)AS companyType,
  220. (
  221. CASE WHEN b.userID = 0 THEN ''
  222. WHEN u.userIdentity = 2 THEN c.name
  223. when u.userIdentity = 3 then s.name
  224. WHEN u.userIdentity = 4 THEN IF(c.name != u.userName,c.name,'')
  225. END)AS corporateName,
  226. (
  227. CASE WHEN b.userID = 0 THEN ''
  228. WHEN u.userIdentity = 2 THEN c.linkMan
  229. WHEN u.userIdentity = 3 THEN s.linkMan
  230. WHEN u.userIdentity = 4 THEN c.linkMan
  231. END)AS contacts,
  232. (CASE WHEN u.userIdentity = 2 THEN c.contractMobile
  233. WHEN u.userIdentity = 4 THEN c.contractMobile
  234. WHEN u.userIdentity = 3 THEN s.contractMobile
  235. END)AS phoneNumber,
  236. (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
  237. COUNT(b.IP) AS number,
  238. (SELECT consultName
  239. FROM cm_roos_information
  240. WHERE IP = b.IP AND createTime LIKE CONCAT('%',b.accessDate,'%') AND (consultName IS NOT NULL OR consultName = '') LIMIT 1) AS consultName,
  241. (SELECT consultMobile
  242. FROM cm_roos_information
  243. WHERE IP = b.IP AND createTime LIKE CONCAT('%',b.accessDate,'%') AND (consultName IS NOT NULL OR consultName = '') LIMIT 1) AS consultMobile,
  244. b.behaviorType,
  245. b.productID,
  246. b.accessTime,
  247. SUM(b.accessDuration) AS accessDuration,
  248. b.accessDate,
  249. b.accessClient,
  250. b.region AS region,
  251. u.registerTime AS addTime,
  252. b.delFlag
  253. FROM cm_behavior_record b
  254. LEFT JOIN USER u ON b.userID = u.userID
  255. LEFT JOIN club c ON b.userID = c.userID
  256. LEFT JOIN shop s ON b.userID = s.userID
  257. WHERE b.IP != '106.55.202.118' AND b.delFlag = 0 AND b.accessDate = #{accessDate}
  258. AND b.region NOT LIKE '%美国Microsoft公司%' AND b.region NOT LIKE '%亚马逊(Amazon)公司%'
  259. GROUP BY b.IP, b.accessDate,b.userID ORDER BY b.accessTime DESC
  260. </select>
  261. <select id="insertYesterdayList">
  262. INSERT INTO cm_behavior_record_index (
  263. IP,
  264. userID,
  265. clubID,
  266. lastAccessTime,
  267. companyType,
  268. corporateName,
  269. contacts,
  270. phoneNumber,
  271. spName,
  272. number,
  273. consultName,
  274. consultMobile,
  275. accessTime,
  276. accessDuration,
  277. accessDate,
  278. accessClient,
  279. region,
  280. relevanceShop,
  281. label,
  282. addTime,
  283. delFlag
  284. ) values (
  285. #{IP},
  286. #{userId},
  287. #{clubId},
  288. #{lastAccessTime},
  289. #{companyType},
  290. #{corporateName},
  291. #{contacts},
  292. #{phoneNumber},
  293. #{spName},
  294. #{number},
  295. #{consultName},
  296. #{consultMobile},
  297. #{accessTime},
  298. #{accessDuration},
  299. #{accessDate},
  300. #{accessClient},
  301. #{region},
  302. #{relevanceShop},
  303. #{label},
  304. #{addTime},
  305. '0'
  306. )
  307. </select>
  308. <select id="selTodayData" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  309. SELECT
  310. b.IP,
  311. b.userID,
  312. c.clubID,
  313. MAX(b.accessTime) AS lastAccessTime,
  314. (
  315. CASE WHEN u.userIdentity = 2 THEN 2
  316. WHEN u.userIdentity = 4 THEN 2
  317. WHEN u.userIdentity = 3 THEN 3
  318. WHEN b.userID = 0 THEN 1
  319. END)AS companyType,
  320. (
  321. CASE WHEN b.userID = 0 THEN ''
  322. WHEN u.userIdentity = 2 THEN c.name
  323. WHEN u.userIdentity = 3 THEN s.name
  324. WHEN u.userIdentity = 4 THEN c.name -- IF(c.name != u.userName,c.name,'')
  325. END)AS corporateName,
  326. (
  327. CASE WHEN b.userID = 0 THEN ''
  328. WHEN u.userIdentity = 2 THEN c.linkMan
  329. WHEN u.userIdentity = 3 THEN s.linkMan
  330. WHEN u.userIdentity = 4 THEN c.linkMan
  331. END)AS contacts,
  332. (
  333. CASE WHEN u.userIdentity = 2 THEN c.contractMobile
  334. WHEN u.userIdentity = 4 THEN c.contractMobile
  335. WHEN u.userIdentity = 3 THEN s.contractMobile
  336. END)AS phoneNumber,
  337. (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
  338. COUNT(b.IP) AS number,
  339. (SELECT consultName
  340. FROM cm_roos_information
  341. WHERE IP = b.IP AND createTime LIKE CONCAT('%',b.accessDate,'%') AND (consultName IS NOT NULL OR consultName = '') LIMIT 1) AS consultName,
  342. (SELECT consultMobile
  343. FROM cm_roos_information
  344. WHERE IP = b.IP AND createTime LIKE CONCAT('%',b.accessDate,'%') AND (consultName IS NOT NULL OR consultName = '') LIMIT 1) AS consultMobile,
  345. b.accessTime,
  346. SUM(b.accessDuration) AS accessDuration,
  347. b.accessDate,
  348. b.accessClient,
  349. b.region AS region,
  350. u.registerTime AS addTime
  351. FROM cm_behavior_record b
  352. LEFT JOIN USER u ON b.userID = u.userID
  353. LEFT JOIN club c ON b.userID = c.userID
  354. LEFT JOIN shop s ON b.userID = s.userID
  355. WHERE b.IP != '106.55.202.118' AND b.delFlag = 0 AND b.accessDate = #{accessDate}
  356. AND b.region NOT LIKE '%美国Microsoft公司%' AND b.region NOT LIKE '%亚马逊(Amazon)公司%'
  357. GROUP BY b.IP, b.accessDate,b.userID ORDER BY b.accessTime DESC
  358. </select>
  359. <select id="selDataList" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  360. SELECT s.name AS relevanceShop, cbs.userID, cbs.IP, cbs.pageLabel
  361. FROM cm_behavior_record cbs
  362. LEFT JOIN cm_behavior_shopid cbr ON cbs.recordID = cbr.recordID
  363. LEFT JOIN shop s ON s.shopID = cbr.shopID
  364. where cbs.accessDate = #{accessDate}
  365. order by cbs.accessTime
  366. </select>
  367. <insert id="inBehaviorToday">
  368. INSERT INTO cm_behavior_record_today (
  369. id,
  370. IP,
  371. userId,
  372. clubId,
  373. lastAccessTime,
  374. companyType,
  375. corporateName,
  376. contacts,
  377. phoneNumber,
  378. spName,
  379. number,
  380. consultName,
  381. consultMobile,
  382. accessTime,
  383. accessDuration,
  384. accessDate,
  385. accessClient,
  386. region,
  387. relevanceShop,
  388. label,
  389. addTime
  390. ) values (
  391. #{recordID},
  392. #{IP},
  393. #{userId},
  394. #{clubId},
  395. #{lastAccessTime},
  396. #{companyType},
  397. #{corporateName},
  398. #{contacts},
  399. #{phoneNumber},
  400. #{spName},
  401. #{number},
  402. #{consultName},
  403. #{consultMobile},
  404. #{accessTime},
  405. #{accessDuration},
  406. #{accessDate},
  407. #{accessClient},
  408. #{region},
  409. #{relevanceShop},
  410. #{label},
  411. #{addTime}
  412. )
  413. </insert>
  414. <delete id="delTodayData">
  415. TRUNCATE TABLE cm_behavior_record_today
  416. </delete>
  417. <select id="shopKeyword" resultType="java.lang.String">
  418. SELECT cusf.keyword FROM cm_shop_relevance csr
  419. LEFT JOIN cm_shop_label csl ON csr.id = csl.relevanceId
  420. LEFT JOIN cm_user_search_frequency cusf ON csl.keywordId = cusf.id
  421. WHERE csr.delFlag = 0 AND
  422. csl.delFlag = 0
  423. </select>
  424. <select id="shopIds" resultType="java.lang.Integer">
  425. SELECT DISTINCT csr.shopID FROM cm_shop_relevance csr
  426. LEFT JOIN cm_shop_label csl ON csr.id = csl.relevanceId
  427. LEFT JOIN cm_user_search_frequency cusf ON csl.keywordId = cusf.id
  428. <where>
  429. csr.delFlag = 0 and
  430. csl.delFlag = 0 and
  431. <if test="strList != null and strList.size > 0">
  432. <foreach collection="strList" item="keyword" open="(" close=")" separator="or">
  433. cusf.keyword = #{keyword}
  434. </foreach>
  435. </if>
  436. </where>
  437. </select>
  438. <select id="selShopId" resultType="java.lang.Integer">
  439. select id from cm_shop_relevance where delFlag = 0 and shopID = #{shopId}
  440. </select>
  441. <insert id="insertShopId">
  442. insert into cm_behavior_shopId (recordID, shopID) values (#{recordId}, #{shopId})
  443. </insert>
  444. <select id="selRegisterIP" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  445. SELECT u.userID as userId, u.registerIP as registerIp, c.clubID as clubId, c.provinceID as provinceId , c.cityID as cityId
  446. FROM USER u
  447. LEFT JOIN club c ON c.userID = u.userID
  448. WHERE u.userIdentity = 4 and c.clubID between #{startId} and #{endId}
  449. </select>
  450. <select id="selProvince" resultType="java.lang.Integer">
  451. SELECT provinceID as provinceId FROM province WHERE NAME LIKE concat('%', #{regionPro} ,'%') limit 1
  452. </select>
  453. <select id="selCity" resultType="com.caimei365.tools.model.po.AddressPo">
  454. SELECT cityID as cityId, provinceID as provinceId FROM city WHERE NAME LIKE concat('%', #{regionCity} ,'%') AND validFlag = 1 limit 1
  455. </select>
  456. <update id="upClubAddress">
  457. update club
  458. <set>
  459. <if test="provinceId != null and provinceId != ''">
  460. provinceID = #{provinceId},
  461. </if>
  462. <if test="cityId != null and cityId != ''">
  463. cityID = #{cityId}
  464. </if>
  465. </set>
  466. where clubID = #{clubId}
  467. </update>
  468. <select id="getShopId" resultType="java.lang.Integer">
  469. select shopId from cm_shop_statistics where delFlag= 0 and status = 0
  470. </select>
  471. <select id="getProductId" resultType="java.lang.Integer">
  472. SELECT productId FROM product WHERE shopId = #{shopId}
  473. </select>
  474. <select id="getShopInfoId" resultType="java.lang.Integer">
  475. select infoId from cm_shop_info where shopId = #{shopId} and delFlag = 0 and status = 0
  476. </select>
  477. <select id="getShopKeywordId" resultType="com.caimei365.tools.model.po.SearchFrequencyVo">
  478. SELECT ifnull(cusf.keyword, '') as keyword, ifnull(csk.searchId, 0) as id
  479. FROM cm_shop_keyword csk
  480. LEFT JOIN cm_user_search_frequency cusf ON cusf.id = csk.searchId
  481. WHERE csk.shopId = #{shopId} AND csk.delFlag = 0 AND csk.status = 0
  482. </select>
  483. <select id="getBehaviorList" resultType="com.caimei365.tools.model.po.CmBehaviorRecordPo">
  484. SELECT ifnull((select pagePath from cm_behavior_record where pagePath like concat('%',#{pagePath},'%') order by accessDate desc LIMIT 1), '') as pagePath,
  485. count(recordID) as number,
  486. ifnull(sum(accessDuration), 0) as accessDuration
  487. from cm_behavior_record
  488. <where>
  489. delFlag = 0 and accessDate = #{accessDate}
  490. <if test="pageType != null">
  491. and pageType = #{pageType}
  492. </if>
  493. <if test="pageType != 8">
  494. <if test="pagePath != null and pagePath != ''">
  495. and pagePath like concat('%',#{pagePath},'%')
  496. </if>
  497. </if>
  498. <if test="pageType == 8">
  499. and pageLabel like concat('%',#{pagePath},'%')
  500. </if>
  501. </where>
  502. </select>
  503. <insert id="insertPageShop">
  504. INSERT INTO cm_page_shop (shopId, shopLink, accessNumber, accessDuration, accessDate)
  505. VALUES (#{shopId}, #{shopLink}, #{accessNumber}, #{accessDuration}, #{accessDate})
  506. </insert>
  507. <insert id="insertPageProduct">
  508. insert into cm_page_shop_product (shopId, productId, link, accessNumber, accessDuration, accessDate)
  509. values (#{shopId}, #{productId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
  510. </insert>
  511. <insert id="insertPageInfo">
  512. insert into cm_page_shop_info (shopId, infoId, link, accessNumber, accessDuration, accessDate)
  513. values (#{shopId}, #{infoId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
  514. </insert>
  515. <insert id="insertPageKeyword">
  516. insert into cm_page_shop_keyword (shopId, searchId, link, accessNumber, accessDuration, accessDate)
  517. values (#{shopId}, #{searchId}, #{link}, #{accessNumber}, #{accessDuration}, #{accessDate})
  518. </insert>
  519. </mapper>