diff --git a/TestFile/inbox/channel_select.py b/TestFile/inbox/channel_select.py index eb57eefb6e5005f804d569c1a05bbe561eb5d77f..b5aa95e9a8ccadb725137a722e915827842bb7b4 100644 --- a/TestFile/inbox/channel_select.py +++ b/TestFile/inbox/channel_select.py @@ -18,16 +18,16 @@ channel_open_room_select_result = test_env_conn.select_many_value(sql=channel_op setattr(channelData, 'channel_open_room_num', len(channel_open_room_select_result)) setattr(channelData, 'channel_open_room_num_add', len(channel_open_room_select_result) + 1) -customer_service_select_sql = f'select * from `rel_customerservice_brand` where brand_id = {channelData.brandId} and is_delete = 0' +customer_service_select_sql = f'select * from `rel_customerservice_brand` where brand_id = {channelData.brandId} and is_delete = 0 and is_activation = 1' customer_service_select_result = test_env_conn.select_many_value(sql=customer_service_select_sql) customer_service_id_list = set([i['customer_service_id'] for i in customer_service_select_result]) -customer_service_list_select_sql = f'select * from `customer_service` where id in {tuple(customer_service_id_list)} and customer_type = 0' +customer_service_list_select_sql = f'select * from `customer_service` where id in {tuple(customer_service_id_list)}' customer_service_list_select_result = test_env_conn.select_many_value(sql=customer_service_list_select_sql) end = 0 for cs in customer_service_list_select_result: for customer in customer_service_select_result: - if customer['customer_service_id'] == cs['id'] and customer['is_activation']: + if customer['customer_service_id'] == cs['id'] and cs['customer_type'] == 0: customer_service_id = customer['customer_service_id'] setattr(channelData, 'customer_service_name', cs['name']) setattr(channelData, 'customer_service_image', cs['profile'])