Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

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