customer_channel_open_room_select_sql=f'select * from `im_room` where site_id = {channel_rel_id} and status = 1 and is_ignore = 0 and allocation_uid = {customer_service_id}'
customer_channel_open_room_select_sql=f'select * from `im_room` where site_id = {channel_rel_id} and status = 1 and room_type != 2 and is_ignore = 0 and allocation_uid = {customer_service_id}'
customer_open_room_select_sql=f'select * from `im_room` where status = 1 and is_ignore = 0 and allocation_uid = {customer_service_id}'
customer_open_room_select_sql=f'select * from `im_room` where status = 1 and room_type != 2 and is_ignore = 0 and allocation_uid = {customer_service_id}'
other_room_select_sql=f'select * from `im_room` where allocation_uid != {customer_service_id} and cate_id = {channelData.brandId} and status = 1 limit 10'
other_room_select_sql=f'select * from `im_room` where allocation_uid != {customer_service_id} and room_type != 2 and cate_id = {channelData.brandId} and status = 1 limit 10'
other_room_select_sql=f'select * from `im_room` where room_id not in {team_room_list} and site_id = {teamData.shopId} and status = 1 limit 10'
other_room_select_sql=f'select * from `im_room` where room_id not in {team_room_list} and site_id = {teamData.shopId} and room_type != 2 and status = 1 limit 10'
else:
else:
setattr(teamData,'open_room_num',0)
setattr(teamData,'open_room_num',0)
setattr(teamData,'pending_room_num',0)
setattr(teamData,'pending_room_num',0)
setattr(teamData,'close_room_num',0)
setattr(teamData,'close_room_num',0)
other_room_select_sql=f'select * from `im_room` where `cate_id` = {teamData.brandId} and site_id = {teamData.shopId} and status = 1 limit 10'
other_room_select_sql=f'select * from `im_room` where `cate_id` = {teamData.brandId} and room_type != 2 and site_id = {teamData.shopId} and status = 1 limit 10'
team_member_open_room_select_sql=f'select * from `im_room` where room_id in {team_room_list} and status = 1 and allocation_uid = {team_member_id}'
team_member_open_room_select_sql=f'select * from `im_room` where room_id in {team_room_list} and room_type != 2 and status = 1 and allocation_uid = {team_member_id}'
all_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `is_ignore` = 0'
all_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `is_ignore` = 0 and room_type != 2'
wait_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `is_ignore` = 0'
wait_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `is_ignore` = 0 and room_type != 2'
close_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `is_ignore` = 0'
close_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `is_ignore` = 0 and room_type != 2'
your_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0'
your_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 1 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and room_type != 2'
your_wait_ticket_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0'
your_wait_ticket_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 2 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and room_type != 2'
your_close_ticket_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0'
your_close_ticket_sql=f'select * from `im_room` where `cate_id` = {ticketInfoData.brandId} and `status` = 3 and `allocation_uid` = {ticketInfoData.userId} and `is_ignore` = 0 and room_type != 2'
all_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `is_ignore` = 0'
all_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `is_ignore` = 0 and room_type != 2'
your_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = {ticketStatusData.userId} and `is_ignore` = 0'
your_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = {ticketStatusData.userId} and `is_ignore` = 0 and room_type != 2'
unread_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 1 and `is_ignore` = 0'
unread_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 1 and `is_ignore` = 0 and room_type != 2'
unassigned_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = 0 and `is_ignore` = 0'
unassigned_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `allocation_uid` = 0 and `is_ignore` = 0 and room_type != 2'
read_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 2 and `room_platform` = "willdesk" and `is_ignore` = 0 and `site_id` = {ticketStatusData.shopId}'
read_ticket_select_sql=f'select * from `im_room` where `cate_id` = {ticketStatusData.brandId} and `status` = 1 and `read_status` = 2 and `room_platform` = "willdesk" and `is_ignore` = 0 and `site_id` = {ticketStatusData.shopId} and room_type != 2'