`id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`,
`create_date`,`update_date`,`tenant_id`,`parent_tenant_id`,`final_tenant_id`,`name`,`nick_name`,
`credit`,`active_time`,`login_count`,`act_record`
,(select level from wx_level_config
where poins >= points and tenant_id=wcubi.tenant_id
order by points desc limit 1 ) level,status
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `final_tenant_id` = #{finalTenantId}
and `phone` like concat('%', #{phone},'%')
and `birthdate` = #{birthdate}
and `education` like concat('%', #{education},'%')
and `sex` = #{sex}
and `email` like concat('%', #{email},'%')
and `address` like concat('%', #{address},'%')
and `poins` = #{poins}
and `credit` = #{credit}
and `tag_id` = #{tagId}
and `create_date` = #{createDate}
and `update_date` = #{updateDate}
and `act_record` = #{actRecord}
and `name` like concat('%', #{name},'%')
and `create_date` between #{startTime} and #{endTime}
and `status` = #{status}
and id in
#{idItem}
order by ${sortColumns}
c.`id`,c.`phone`,cb.`birthdate`,cb.`education`,cb.`sex`,cb.`email`,cb.`address`,cb.`poins`,cb.`tag_id`,
cb.`create_date`,cb.`update_date`,c.`tenant_id`,cb.`name`,cb.`level`,cb.`nick_name`,cb.`act_record`,cb.`parent_tenant_id`
update wx_c_user_basic_info set poins=#{poins}
where id=#{id}
update wx_c_user_basic_info set poins=poins+#{poins}
where id=#{id}
update wx_c_user_basic_info set poins=poins-#{poins}
where id=#{id}
update wx_c_user_basic_info set id=#{newId} , credit=#{credit} , poins=#{poins}
where id = #{id}
cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id,
cub.create_date,cub.update_date,cub.tenant_id,cub.name,cub.level,cub.nick_name,cub.score_date,cub.parent_tenant_id
cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`,
cu.`create_date`,cu.`update_date`,cu.`tenant_id`,cu.`name`,cu.`level`,cu.`nick_name`,
cut.`tags`,cu.`credit`,cu.`active_time`,cu.`act_record`,cu.`parent_tenant_id`
where 1 = 1
and cu.`id` = #{id}
and cu.`tenant_id` = #{tenantId}
and cu.`parent_tenant_id` = #{parentTenantId}
and cu.`phone` like concat('%', #{phone},'%')
and cu.`birthdate` = #{birthdate}
and cu.`education` like concat('%', #{education},'%')
and cu.`sex` = #{sex}
and cu.`email` like concat('%', #{email},'%')
and cu.`address` like concat('%', #{address},'%')
and cu.`poins` = #{poins}
and cu.`tag_id` = #{tagId}
and cu.`create_date` = #{createDate}
and cu.`update_date` = #{updateDate}
and cu.`act_record` = #{actRecord}
and `name` like concat('%', #{name},'%')
and cu.`create_date` between #{startTime} and #{endTime}
and id in
#{idItem}
order by ${sortColumns}
cu.`id`,cu.`phone`,cu.`email`
where 1=1
and cu.`tenant_id` = #{tenantId}
and cu.`parent_tenant_id` = #{parentTenantId}
and cu.create_date >= #{startTime}
and cu.create_date <= #{endTime}
and cu.birthdate >= #{birthStartTime}
and cu.birthdate < #{birthEndTime}
and cu.active_time >= #{loginStartTime}
and cu.active_time <= #{loginEndTime}
and 0<
(select count(*) from wx_coupon_order co
where cu.id = co.c_user_id
and co.coupon_order_status = 1
and co.update_date >= #{verifiedStartTime}
and co.update_date <= #{verifiedEndTime})
and cu.phone in (${phones})
and cu.poins >= #{levelStartScore}
and cu.poins < #{levelEndScore}
and (cu.poins is null or
(cu.poins >= #{levelStartScore}
and cu.poins < #{levelEndScore}
))
and JSON_CONTAINS(JSON_ARRAY(cut.tags),JSON_ARRAY
#{idItem}
)
order by ${sortColumns}
UPDATE wx_c_user_basic_info set act_record = act_record +1 where id = #{id}