MessagePushMapper.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.order.mapper.MessagePushMapper">
  4. <insert id="insertShortLink">
  5. INSERT INTO cm_short_link (markId, shortLink, jumpLink, createTime)
  6. VALUES (#{markId}, #{shortLink}, #{url}, NOW())
  7. </insert>
  8. <insert id="insertNewLink">
  9. INSERT INTO cm_short_link (markId, clubId, userId, shortLink, jumpLink, createTime)
  10. VALUES (#{markId}, #{clubId}, #{userId}, #{shortLink}, #{jumpLink}, NOW())
  11. </insert>
  12. <update id="updateSmsSendCount">
  13. UPDATE cm_sms_statistics
  14. SET sendNum = (sendNum + #{count})
  15. WHERE markId = #{markId}
  16. </update>
  17. <select id="findIdByShortLink" resultType="java.lang.Integer">
  18. SELECT id
  19. FROM cm_short_link
  20. WHERE shortLink = #{shortLink}
  21. </select>
  22. <select id="findOldUser" resultType="com.caimei365.order.model.vo.PushMessageUserVo">
  23. select cb.mobile as mobile,
  24. cb.authUserId as userId
  25. from cm_brand_auth ca
  26. left join cm_brand_club_user cb on ca.id=cb.authid
  27. where cb.mobile
  28. is not null and ca.authUserId=12
  29. and ca.`STATUS`=1
  30. group by cb.mobile
  31. </select>
  32. <select id="findOldUserTow" resultType="com.caimei365.order.model.vo.PushMessageUserVo">
  33. SELECT
  34. a.clubID AS clubID,
  35. u.userID AS userID,
  36. a.contractMobile AS mobile
  37. FROM club a
  38. LEFT JOIN USER u ON u.userID = a.userID
  39. WHERE u.userID IN
  40. (6286,6737,7076,7793,8424,9622,10464,10510,10612,10989,10992,11102,11301,11313,12665,11662,11677,
  41. 12817,12819,12841,12935,12938,12962,12972,12993,12996,13009,13033,13120,13132,13164,13180,13189,13216,13229,13239,13287,13308,13406,
  42. 13442,13454,13459,13492,13554,13764,13792,13819,13834,13856,13863,13871,13876,13882,13892,13907,13928,13929,13938,13943,13949,13954,
  43. 13966,14017,14058,14060,14238,14260,14295,14302,14304,14316,14374,14394,14410,14427,14434,14438,14457,14474,14477,14499,14572,14591,
  44. 14659,14662,14674,14701,14716,14817,14823,14828,14861,14873,14910,14943,15043,15113,15144,15164,15177,15197,15215,15217,15221,15222,
  45. 15299,15302,15310,15317,15365,15389,15404,15435,15487,15677,15710,15721,15786,15796,15930,15991,15999,16010,16108,16123,16128,16155,
  46. 16158,16179,16186,16188,16206,16271,16295,16311,16383,16386,16404,16426,16435,16478,16534,16570,16581,16615,16634,16641,16665,16682,
  47. 16723,16827,16828,16831,16838,16866,16880,16881,16885,16888,16912,16921,16924,16925,16927,16934,16937,16940,16941,16950,16965,16971,
  48. 16976,16979,16981,16989,16995,17005,17025,17036,17047,17061,17062,17070,17071,17073,17075,17086,17089,17100,17113,17122,17141,17145,
  49. 17149,17155,17161,17162,17201,17209,17213,17217,17238,17239,17252,17268,17279,17280,17295,17297,17305,17315,17320,17328,17331,17339,
  50. 17341,17348,17371,17373,17376,17388,17396,17401,17428,17431,17436,17439,17460,17474,17482,17483,17489,17490,17486,17504,17509,17512,
  51. 17514,17518,17534,17538,17539,17540,17568,17582,17585,17586,17603,17606,17615,17625,17627,17631,17650,17658,17660,17672,17677,17688,17706,
  52. 17716,17720,17725,17763,17769,17780,17793,17797,17814,17816,17822,17848,17857,17860,17868,17875,17880,17883,17884,17888,17896,17898,
  53. 17901,17907,17911,17929,17947,17948,17950,17956,17973,17972,17975,17986,17994,17999,18014,18026,18030,18034,18056,18067,18068,18121,
  54. 18122,18129,18134,18148,18157,18160,18167,18170,18171,18175,18192,18195,18208,18246,18258,18277,10101,10276,10325,10421,11023,11026)
  55. </select>
  56. </mapper>