You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

601 lines
22 KiB

  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.iformall.mapper.WxCUserBasicInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserBasicInfo">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="phone" jdbcType="VARCHAR" property="phone"/>
  7. <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
  8. <result column="education" jdbcType="VARCHAR" property="education"/>
  9. <result column="sex" jdbcType="INTEGER" property="sex"/>
  10. <result column="email" jdbcType="VARCHAR" property="email"/>
  11. <result column="address" jdbcType="VARCHAR" property="address"/>
  12. <result column="poins" jdbcType="INTEGER" property="poins"/>
  13. <result column="tag_id" jdbcType="BIGINT" property="tagId"/>
  14. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  15. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  16. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  17. <result column="name" jdbcType="VARCHAR" property="name"/>
  18. <result column="level" jdbcType="VARCHAR" property="level"/>
  19. <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
  20. <result column="credit" jdbcType="INTEGER" property="credit"/>
  21. <result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/>
  22. <result column="act_record" jdbcType="INTEGER" property="actRecord"/>
  23. <result column="score_date" jdbcType="TIMESTAMP" property="scoreDate"/>
  24. <result column="status" jdbcType="INTEGER" property="status"/>
  25. </resultMap>
  26. <sql id="allColumns">
  27. cub.`id`,cub.`phone`,cub.`birthdate`,cub.`education`,cub.`sex`,cub.`email`,cub.`address`,cub.`poins`,cub.`tag_id`,
  28. cub.`create_date`,cub.`update_date`,cub.`tenant_id`,cub.`name`,cub.`nick_name`,cub.`credit`,cub.`active_time`,cub.`act_record`
  29. ,(select level from wx_level_config
  30. where poins >= points and tenant_id=cub.tenant_id
  31. order by points desc limit 1 ) level,status
  32. </sql>
  33. <sql id="dynamicWhereConditions">
  34. where 1 = 1
  35. <if test=" null != id ">
  36. and cub.`id` = #{id}
  37. </if>
  38. <if test=" null != tenantId and '' != tenantId">
  39. and cub.`tenant_id` = #{tenantId}
  40. </if>
  41. <if test=" null != parentTenantId and '' != parentTenantId">
  42. and cu.`parent_tenant_id` = #{parentTenantId}
  43. </if>
  44. <if test=" null != phone ">
  45. and cub.`phone` like concat('%', #{phone},'%')
  46. </if>
  47. <if test=" null != birthdate ">
  48. and cub.`birthdate` = #{birthdate}
  49. </if>
  50. <if test=" null != education ">
  51. and cub.`education` like concat('%', #{education},'%')
  52. </if>
  53. <if test=" null != sex ">
  54. and cub.`sex` = #{sex}
  55. </if>
  56. <if test=" null != email ">
  57. and cub.`email` like concat('%', #{email},'%')
  58. </if>
  59. <if test=" null != address ">
  60. and cub.`address` like concat('%', #{address},'%')
  61. </if>
  62. <if test=" null != poins ">
  63. and cub.`poins` = #{poins}
  64. </if>
  65. <if test=" null != credit ">
  66. and cub.`credit` = #{credit}
  67. </if>
  68. <if test=" null != tagId ">
  69. and cub.`tag_id` = #{tagId}
  70. </if>
  71. <if test=" null != createDate ">
  72. and cub.`create_date` = #{createDate}
  73. </if>
  74. <if test=" null != updateDate ">
  75. and cub.`update_date` = #{updateDate}
  76. </if>
  77. <if test=" null != actRecord ">
  78. and cub.`act_record` = #{actRecord}
  79. </if>
  80. <if test=" null != name ">
  81. and cub.`name` like concat('%', #{name},'%')
  82. </if>
  83. <if test=" null != startTime and null!=endTime">
  84. and cub.`create_date` between #{startTime} and #{endTime}
  85. </if>
  86. <if test=" null != status ">
  87. and cub.`status` = #{status}
  88. </if>
  89. <if test=" null != ids ">
  90. and cub.id in
  91. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  92. #{idItem}
  93. </foreach>
  94. </if>
  95. <if test=" null != sortColumns">order by ${sortColumns}</if>
  96. </sql>
  97. <select id="findList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap">
  98. select r.* from (
  99. select
  100. <include refid="allColumns"/>
  101. from wx_c_user_basic_info cub
  102. inner join wx_c_user cu on cu.id = cub.id
  103. <include refid="dynamicWhereConditions"/>
  104. ) r where 1=1
  105. <if test="null != level and '' != level">
  106. and r.level =#{level}
  107. </if>
  108. </select>
  109. <sql id="allUserColumns">
  110. c.`id`,c.`phone`,cb.`birthdate`,cb.`education`,cb.`sex`,cb.`email`,cb.`address`,cb.`poins`,cb.`tag_id`,
  111. cb.`create_date`,cb.`update_date`,c.`tenant_id`,cb.`name`,cb.level,cb.nick_name,`cb.act_record`
  112. </sql>
  113. <update id="updateScore" parameterType="com.iformall.domain.po.WxCUserBasicInfo">
  114. update wx_c_user_basic_info set poins=#{poins}
  115. where phone=#{phone}
  116. and id=#{id}
  117. </update>
  118. <update id="updateNewId" parameterType="com.iformall.domain.vo.CUserBaseVo">
  119. update wx_c_user_basic_info set id=#{newId} , credit=#{credit} , poins=#{poins}
  120. where id = #{id}
  121. </update>
  122. <select id="findCountBySex" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  123. select count(cub.id) from wx_c_user_basic_info cub
  124. inner join wx_c_user cu on cu.id = cub.id
  125. where cub.sex =#{sex}
  126. <if test=" null != startTime ">
  127. and cub.create_date &gt;= #{startTime}
  128. </if>
  129. <if test=" null != endTime">
  130. and cub.create_date &lt;= #{endTime}
  131. </if>
  132. <if test=" null != tenantId and '' != tenantId">
  133. and cub.`tenant_id` = #{tenantId}
  134. </if>
  135. <if test=" null != parentTenantId and '' != parentTenantId">
  136. and cu.`parent_tenant_id` = #{parentTenantId}
  137. </if>
  138. </select>
  139. <select id="findCountByAge" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  140. select count(cub.id) from wx_c_user_basic_info cub
  141. inner join wx_c_user cu on cu.id = cub.id
  142. where 1=1
  143. <if test=" null != startTime ">
  144. and cub.create_date &gt;= #{startTime}
  145. </if>
  146. <if test=" null != endTime">
  147. and cub.create_date &lt;= #{endTime}
  148. </if>
  149. <if test=" null != birthStartTime ">
  150. and cub.birthdate &gt;= #{birthStartTime}
  151. </if>
  152. <if test=" null != birthEndTime">
  153. and cub.birthdate &lt;= #{birthEndTime}
  154. </if>
  155. <if test=" null == birthStartTime and null == birthEndTime">
  156. and cub.birthdate is null
  157. </if>
  158. <if test=" null != tenantId and '' != tenantId">
  159. and cub.`tenant_id` = #{tenantId}
  160. </if>
  161. <if test=" null != parentTenantId and '' != parentTenantId">
  162. and cu.`parent_tenant_id` = #{parentTenantId}
  163. </if>
  164. </select>
  165. <select id="findCountByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  166. select count(cub.id) from wx_c_user_basic_info cub
  167. inner join wx_c_user cu on cu.id = cub.id
  168. where 1=1
  169. <if test=" null != startTime ">
  170. and cub.create_date &gt;= #{startTime}
  171. </if>
  172. <if test=" null != endTime">
  173. and cub.create_date &lt;= #{endTime}
  174. </if>
  175. <if test=" null != levelStartScore ">
  176. and cub.poins &gt;= #{levelStartScore}
  177. </if>
  178. <if test=" null != levelEndScore">
  179. and cub.poins &lt; #{levelEndScore}
  180. </if>
  181. <if test=" null == levelStartScore and null == levelEndScore">
  182. and cub.poins is null
  183. </if>
  184. <if test=" null != tenantId and '' != tenantId">
  185. and cub.`tenant_id` = #{tenantId}
  186. </if>
  187. <if test=" null != parentTenantId and '' != parentTenantId">
  188. and cu.`parent_tenant_id` = #{parentTenantId}
  189. </if>
  190. </select>
  191. <sql id="allColumnsOfScoreList">
  192. cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id,
  193. cub.create_date,cub.update_date,cub.tenant_id,cub.name,cub.level,cub.nick_name,cub.score_date
  194. </sql>
  195. <select id="findListByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultMap="BaseResultMap">
  196. select <include refid="allColumnsOfScoreList"/>
  197. from wx_c_user_basic_info cub
  198. inner join wx_c_user cu on cu.id = cub.id
  199. where 1=1 and cub.status=0
  200. <if test=" null != levelStartScore ">
  201. and cub.poins &gt;= #{levelStartScore}
  202. </if>
  203. <if test=" null != levelEndScore">
  204. and cub.poins &lt;= #{levelEndScore}
  205. </if>
  206. <if test=" null == levelStartScore and null == levelEndScore">
  207. and cub.poins is null
  208. </if>
  209. <if test=" null != tenantId and '' != tenantId">
  210. and cub.`tenant_id` = #{tenantId}
  211. </if>
  212. <if test=" null != parentTenantId and '' != parentTenantId">
  213. and cu.`parent_tenant_id` = #{parentTenantId}
  214. </if>
  215. </select>
  216. <select id="findBirthdayList" resultMap="BaseResultMap">
  217. select <include refid="allColumnsOfScoreList"/>
  218. from wx_c_user_basic_info cub
  219. inner join wx_c_user cu on cu.id = cub.id
  220. where cub.status = 0 and cu.phone is not null
  221. AND DATE_FORMAT(cub.birthdate,'%m-%d') &gt;= #{begin}
  222. AND DATE_FORMAT(cub.birthdate,'%m-%d') &lt;= #{end}
  223. <if test=" null != tenantId and '' != tenantId">
  224. and cub.`tenant_id` = #{tenantId}
  225. </if>
  226. <if test=" null != parentTenantId and '' != parentTenantId">
  227. and cu.`parent_tenant_id` = #{parentTenantId}
  228. </if>
  229. </select>
  230. <select id="findCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  231. select count(cub.id) from wx_c_user_basic_info cub
  232. inner join wx_c_user cu on cu.id = cub.id
  233. where 1=1
  234. <if test=" null != startTime ">
  235. and cub.create_date &gt;= #{startTime}
  236. </if>
  237. <if test=" null != endTime">
  238. and cub.create_date &lt; #{endTime}
  239. </if>
  240. <if test="1 == queryImport">
  241. and cub.create_date like '%00:00:00'
  242. </if>
  243. <if test=" null != tenantId and '' != tenantId">
  244. and cub.`tenant_id` = #{tenantId}
  245. </if>
  246. <if test=" null != parentTenantId and '' != parentTenantId">
  247. and cu.`parent_tenant_id` = #{parentTenantId}
  248. </if>
  249. </select>
  250. <select id="findCountHistory" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="com.iformall.domain.vo.UserCountVo">
  251. select count(cub.id) as incCount,
  252. <if test="1 == reportType ">
  253. date_format(create_date, '%Y-%m-%d') as reportTime,
  254. </if>
  255. <if test="2 == reportType ">
  256. date_format(create_date, '%Y-%m') as reportTime,
  257. </if>
  258. <if test="3 == reportType ">
  259. date_format(create_date, '%Y') as reportTime,
  260. </if>
  261. <if test="1 == reportType or 2 == reportType or 3 == reportType">
  262. (select count(cubi.id) from wx_c_user_basic_info cubi
  263. inner join wx_c_user cu1 on cu1.id = cubi.id
  264. where 1=1
  265. <if test="1 == reportType ">
  266. and cubi.date_format(create_date, '%Y-%m-%d') &lt;= reportTime
  267. </if>
  268. <if test="2 == reportType ">
  269. and cubi.date_format(create_date, '%Y-%m') &lt;= reportTime
  270. </if>
  271. <if test="3 == reportType ">
  272. and cubi.date_format(create_date, '%Y') &lt;= reportTime
  273. </if>
  274. <if test=" null != tenantId and '' != tenantId">
  275. and cubi.`tenant_id` = #{tenantId}
  276. </if>
  277. <if test=" null != parentTenantId and '' != parentTenantId">
  278. and cu1.`parent_tenant_id` = #{parentTenantId}
  279. </if>
  280. ) as totalCount
  281. </if>
  282. from wx_c_user_basic_info cub
  283. inner join wx_c_user cu on cu.id = cub.id
  284. where 1=1
  285. <if test=" null != tenantId and '' != tenantId">
  286. and cub.`tenant_id` = #{tenantId}
  287. </if>
  288. <if test=" null != parentTenantId and '' != parentTenantId">
  289. and cu.`parent_tenant_id` = #{parentTenantId}
  290. </if>
  291. <if test=" null != startTime ">
  292. and cub.create_date &gt;= #{startTime}
  293. </if>
  294. <if test=" null != endTime">
  295. and cub.create_date &lt; #{endTime}
  296. </if>
  297. <if test="1 == reportType or 2 == reportType or 3 == reportType">
  298. group by cub.reportTime
  299. </if>
  300. </select>
  301. <resultMap id="VoBaseResultMap" type="com.iformall.domain.vo.WxCUserBasicInfoVo">
  302. <id column="id" jdbcType="BIGINT" property="id"/>
  303. <result column="phone" jdbcType="VARCHAR" property="phone"/>
  304. <result column="birthdate" jdbcType="TIMESTAMP" property="birthdate"/>
  305. <result column="education" jdbcType="VARCHAR" property="education"/>
  306. <result column="sex" jdbcType="INTEGER" property="sex"/>
  307. <result column="email" jdbcType="VARCHAR" property="email"/>
  308. <result column="address" jdbcType="VARCHAR" property="address"/>
  309. <result column="poins" jdbcType="INTEGER" property="poins"/>
  310. <result column="tag_id" jdbcType="BIGINT" property="tagId"/>
  311. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  312. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  313. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  314. <result column="name" jdbcType="VARCHAR" property="name"/>
  315. <result column="level" jdbcType="VARCHAR" property="level"/>
  316. <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
  317. <result column="credit" jdbcType="INTEGER" property="credit"/>
  318. <result column="tags" jdbcType="VARCHAR" property="tags"/>
  319. <result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/>
  320. </resultMap>
  321. <sql id="allVoColumns">
  322. cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`,
  323. cu.`create_date`,cu.`update_date`,cu.`tenant_id`,cu.`name`,cu.`level`,cu.`nick_name`,
  324. cut.`tags`,cu.`credit`,cu.`active_time`,cu.`act_record`
  325. </sql>
  326. <sql id="dynamicVoWhereConditions">
  327. where 1 = 1
  328. <if test=" null != id ">
  329. and cu.`id` = #{id}
  330. </if>
  331. <if test=" null != tenantId and '' != tenantId">
  332. and cu.`tenant_id` = #{tenantId}
  333. </if>
  334. <if test=" null != parentTenantId and '' != parentTenantId">
  335. and c.`parent_tenant_id` = #{parentTenantId}
  336. </if>
  337. <if test=" null != phone ">
  338. and cu.`phone` like concat('%', #{phone},'%')
  339. </if>
  340. <if test=" null != birthdate ">
  341. and cu.`birthdate` = #{birthdate}
  342. </if>
  343. <if test=" null != education ">
  344. and cu.`education` like concat('%', #{education},'%')
  345. </if>
  346. <if test=" null != sex ">
  347. and cu.`sex` = #{sex}
  348. </if>
  349. <if test=" null != email ">
  350. and cu.`email` like concat('%', #{email},'%')
  351. </if>
  352. <if test=" null != address ">
  353. and cu.`address` like concat('%', #{address},'%')
  354. </if>
  355. <if test=" null != poins ">
  356. and cu.`poins` = #{poins}
  357. </if>
  358. <if test=" null != tagId ">
  359. and cu.`tag_id` = #{tagId}
  360. </if>
  361. <if test=" null != createDate ">
  362. and cu.`create_date` = #{createDate}
  363. </if>
  364. <if test=" null != updateDate ">
  365. and cu.`update_date` = #{updateDate}
  366. </if>
  367. <if test=" null != actRecord ">
  368. and cu.`act_record` = #{actRecord}
  369. </if>
  370. <if test=" null != name ">
  371. and `name` like concat('%', #{name},'%')
  372. </if>
  373. <if test=" null != startTime and null!=endTime">
  374. and cu.`create_date` between #{startTime} and #{endTime}
  375. </if>
  376. <if test=" null != ids ">
  377. and id in
  378. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  379. #{idItem}
  380. </foreach>
  381. </if>
  382. <if test=" null != sortColumns">order by ${sortColumns}</if>
  383. </sql>
  384. <select id="findVoList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="VoBaseResultMap">
  385. select
  386. <include refid="allVoColumns"/>
  387. from wx_c_user_basic_info cu
  388. inner join wx_c_user c on c.id = cu.id
  389. left join wx_c_user_tags cut on cut.`id` = cu.`tag_id`
  390. <include refid="dynamicVoWhereConditions"/>
  391. </select>
  392. <select id="countVoList" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultType="java.lang.Integer">
  393. select
  394. count(*)
  395. from wx_c_user_basic_info cu
  396. inner join wx_c_user c on c.id = cu.id
  397. left join wx_c_user_tags cut on cut.`id` = cu.`tag_id`
  398. <include refid="dynamicVoWhereConditions"/>
  399. </select>
  400. <sql id="msgColumns">
  401. cu.`id`,cu.`phone`,cu.`email`
  402. </sql>
  403. <sql id="filterWhereConditions">
  404. where 1=1
  405. <if test=" null != tenantId and '' != tenantId">
  406. and cu.`tenant_id` = #{tenantId}
  407. </if>
  408. <if test=" null != parentTenantId and '' != parentTenantId">
  409. and c.`parent_tenant_id` = #{parentTenantId}
  410. </if>
  411. <if test=" null != startTime ">
  412. and cu.create_date &gt;= #{startTime}
  413. </if>
  414. <if test=" null != endTime">
  415. and cu.create_date &lt;= #{endTime}
  416. </if>
  417. <if test=" null != birthStartTime ">
  418. and cu.birthdate &gt;= #{birthStartTime}
  419. </if>
  420. <if test=" null != birthEndTime">
  421. and cu.birthdate &lt; #{birthEndTime}
  422. </if>
  423. <if test=" null != loginStartTime ">
  424. and cu.active_time &gt;= #{loginStartTime}
  425. </if>
  426. <if test=" null != loginEndTime">
  427. and cu.active_time &lt;= #{loginEndTime}
  428. </if>
  429. <if test=" null != verifiedStartTime and null != verifiedEndTime ">
  430. and 0&lt;
  431. (select count(*) from wx_coupon_order co
  432. where cu.id = co.c_user_id
  433. and co.coupon_order_status = 1
  434. and co.update_date &gt;= #{verifiedStartTime}
  435. and co.update_date &lt;= #{verifiedEndTime})
  436. </if>
  437. <if test=" null != phones">
  438. and cu.phone in (${phones})
  439. </if>
  440. <if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)">
  441. and cu.poins &gt;= #{levelStartScore}
  442. <if test=" null != levelEndScore">
  443. and cu.poins &lt; #{levelEndScore}
  444. </if>
  445. </if>
  446. <if test=" null != levelStartScore and (0 == levelStartScore or '' == levelStartScore)">
  447. and (cu.poins is null or
  448. (cu.poins &gt;= #{levelStartScore}
  449. <if test=" null != levelEndScore">
  450. and cu.poins &lt; #{levelEndScore}
  451. </if>
  452. ))
  453. </if>
  454. <if test=" null != tagIds ">
  455. and JSON_CONTAINS(JSON_ARRAY(cut.tags),JSON_ARRAY
  456. <foreach collection="tagIds" index="index" item="idItem" open="(" separator="," close=")">
  457. #{idItem}
  458. </foreach>
  459. )
  460. </if>
  461. <if test=" null != sortColumns">order by ${sortColumns}</if>
  462. </sql>
  463. <select id="findCountByFilter" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  464. select count(*) from wx_c_user_basic_info cu
  465. inner join wx_c_user c on c.id = cu.id
  466. <if test=" null != tagIds ">
  467. join wx_c_user_tags cut on cut.`id` = cu.`tag_id`
  468. </if>
  469. <include refid="filterWhereConditions"/>
  470. </select>
  471. <select id="findListByFilter" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultMap="BaseResultMap">
  472. select <include refid="msgColumns"/>
  473. from wx_c_user_basic_info cu
  474. inner join wx_c_user c on c.id = cu.id
  475. <if test=" null != tagIds ">
  476. join wx_c_user_tags cut on cut.`id` = cu.`tag_id`
  477. </if>
  478. <include refid="filterWhereConditions"/>
  479. </select>
  480. <select id="findImportUserCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  481. SELECT count(*) FROM wx_c_user_basic_info cubi left join wx_c_user cu on cubi.id=cu.id where cu.id is null
  482. <if test=" null != tenantId and '' != tenantId">
  483. and cubi.`tenant_id` = #{tenantId}
  484. </if>
  485. <if test=" null != parentTenantId and '' != parentTenantId">
  486. and cu.`parent_tenant_id` = #{parentTenantId}
  487. </if>
  488. </select>
  489. <select id="findGrowUserCount" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultType="java.lang.Long">
  490. SELECT count(*) FROM wx_c_user_basic_info cubi left join wx_c_user cu on cubi.id=cu.id where cu.id is not null
  491. <if test=" null != tenantId and '' != tenantId">
  492. and cubi.`tenant_id` = #{tenantId}
  493. </if>
  494. <if test=" null != parentTenantId and '' != parentTenantId">
  495. and cu.`parent_tenant_id` = #{parentTenantId}
  496. </if>
  497. </select>
  498. <update id="incActRecordById" parameterType="java.lang.Long">
  499. UPDATE wx_c_user_basic_info set act_record = act_record +1 where id = #{id}
  500. </update>
  501. <select id="selectNotCUserList" resultMap="BaseResultMap">
  502. select id,credit from wx_c_user_basic_info cub where not exists (select * from wx_c_user c where c.id=cub.id) and cub.credit is null
  503. </select>
  504. </mapper>