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.`nick_name`,cub.`credit`,cub.`active_time`,cub.`act_record` ,(select level from wx_level_config where poins >= points and tenant_id=cub.tenant_id order by points desc limit 1 ) level,status where 1 = 1 and cub.`id` = #{id} and cub.`tenant_id` = #{tenantId} and cu.`parent_tenant_id` = #{parentTenantId} and cub.`phone` like concat('%', #{phone},'%') and cub.`birthdate` = #{birthdate} and cub.`education` like concat('%', #{education},'%') and cub.`sex` = #{sex} and cub.`email` like concat('%', #{email},'%') and cub.`address` like concat('%', #{address},'%') and cub.`poins` = #{poins} and cub.`credit` = #{credit} and cub.`tag_id` = #{tagId} and cub.`create_date` = #{createDate} and cub.`update_date` = #{updateDate} and cub.`act_record` = #{actRecord} and cub.`name` like concat('%', #{name},'%') and cub.`create_date` between #{startTime} and #{endTime} and cub.`status` = #{status} and cub.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` update wx_c_user_basic_info set poins=#{poins} where phone=#{phone} and 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 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` where 1 = 1 and cu.`id` = #{id} and cu.`tenant_id` = #{tenantId} and c.`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 c.`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}