wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`height`,wcubi.`weight`,wcubi.`id_card`,wcubi.`email`,
wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`,
wcubi.`final_tenant_id`,wcubi.`tenant_id`,wcubi.`parent_tenant_id`,wcubi.`name`,wcubi.`nick_name`,
wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record`,
wcubi.score_date,wcubi.status
where wcubi.`final_tenant_id` = #{finalTenantId}
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
and wcubi.`id` = #{id}
and wcubi.`phone` like concat('%', #{phone},'%')
and wcubi.`birthdate` = #{birthdate}
and wcubi.`education` like concat('%', #{education},'%')
and wcubi.`sex` = #{sex}
and wcubi.`email` like concat('%', #{email},'%')
and wcubi.`address` like concat('%', #{address},'%')
and wcubi.poins >= #{levelStartScore}
and wcubi.poins < #{levelEndScore}
and wcubi.`tag_id` = #{tagId}
and wcubi.`create_date` = #{createDate}
and wcubi.`update_date` = #{updateDate}
and wcubi.`act_record` = #{actRecord}
and wcubi.`name` like concat('%', #{name},'%')
and wcubi.`create_date` between #{startTime} and #{endTime}
and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime}
and wcubi.`status` = #{status}
and wcubi.id in
#{idItem}
order by ${sortColumns}
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}
wcubi.id,wcubi.phone,wcubi.birthdate,wcubi.education,wcubi.sex,wcubi.`height`,wcubi.`weight`,wcubi.`id_card`,wcubi.email,wcubi.address,wcubi.poins,wcubi.tag_id,
wcubi.create_date,wcubi.update_date,wcubi.name,wcubi.level,wcubi.nick_name,wcubi.score_date,wcubi.final_tenant_id
where wcubi.`final_tenant_id` = #{finalTenantId}
and wcubi.`id` = #{id}
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
and wcubi.`phone` like concat('%', #{phone},'%')
and wcubi.`birthdate` = #{birthdate}
and wcubi.`education` like concat('%', #{education},'%')
and wcubi.`sex` = #{sex}
and wcubi.`email` like concat('%', #{email},'%')
and wcubi.`address` like concat('%', #{address},'%')
and wcubi.`poins` = #{poins}
and wcubi.`tag_id` = #{tagId}
and wcubi.`create_date` = #{createDate}
and wcubi.`update_date` = #{updateDate}
and wcubi.`act_record` = #{actRecord}
and wcubi.`name` like concat('%', #{name},'%')
and wcubi.`create_date` between #{startTime} and #{endTime}
and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime}
and wcubi.id in
#{idItem}
order by wcubi.`active_time` DESC
where wcubi.`final_tenant_id` = #{finalTenantId}
and wcubi.`tenant_id` like concat('%,', #{tenantId},',%')
and wcubi.create_date >= #{startTime}
and wcubi.create_date <= #{endTime}
and wcubi.birthdate >= #{birthStartTime}
and wcubi.birthdate < #{birthEndTime}
and wcubi.active_time >= #{loginStartTime}
and wcubi.active_time <= #{loginEndTime}
and wcubi.phone in (${phones})
and wcubi.poins >= #{levelStartScore}
and wcubi.poins < #{levelEndScore}
and (wcubi.poins is null or
(wcubi.poins >= #{levelStartScore}
and wcubi.poins < #{levelEndScore}
))
and wcubi.id in
#{idItem}
and wcubi.`tag_id` in
#{tagIdItem}
order by ${sortColumns}
UPDATE wx_c_user_basic_info set act_record = act_record +1 where id = #{id} and final_tenant_id = #{finalTenantId}
{call cuser_old_to_new(#{oldCuserId},#{newCuserId},#{tableIndex},#{finalTableIndex})}