1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
| expla SELECT a.external_user_related_id AS externalUserId, a.remark_mobiles mobiles, b.url, CASE b.`status` WHEN 1 THEN '填写表单' WHEN 2 THEN '付款' END AS isPay, c.state AS smartCodeName, e.`name` AS customerTags, f.NAME AS addUser, f.id AS addUserId, b.phone AS oderMobile, b.create_time AS oderCreatTime, a.create_time AS addTime FROM scrm_external_follow_user a LEFT JOIN scrm_marketing_form_order b ON a.source_id = b.id AND a.tenant_id = b.tenant_id AND b.tenant_id = 1356898121111711744 LEFT JOIN scrm_external_live_code_channel c ON a.code_channel_id = c.id AND c.tenant_id = 1356898121111711744 LEFT JOIN scrm_external_user_tag d ON a.external_user_related_id = d.external_user_related_id AND a.tenant_id = d.tenant_id AND d.tenant_id = 1356898121111711744 LEFT JOIN scrm_external_tag e ON e.id = d.tag_id AND e.tenant_id = d.tenant_id AND e.tenant_id = 1356898121111711744 LEFT JOIN scrm_admin_user f ON a.user_id = f.id AND a.tenant_id = f.tenant_id AND f.tenant_id = 1356898121111711744 WHERE a.tenant_id = 1356898121111711744 AND a.external_user_related_id IN ( 1414555946910363648, 1372095997781618688, 1371746071482609664, 1387342888324706304, 1358679833055473664, 1357243275345539072, 1381148437218734080, 1363055974327398400, 1385468971884621824, 1367678600614129664, 1367657180647534592, 1369229584574328832, 1419990924817227776, 1418502480903430144, 1422169825316331520, 1406897826746740736, 1357167653223018496, 1414103085705474048, 1405441543946514432, 1372096409456750592, 1410212398442360832, 1357171129940324352, 1413077754181726208, 1369992208337481728, 1393825269957144576, 1369122211830575104, 1372095822430351360, 1368404710561820672, 1367718878897123328, 1357174467155079168, 1364148134112014336, 1358248387585126400, 1388083894498242561, 1387995419438624768, 1387007537425035264, 1372095907482447872, 1363410181576339456, 1365221194722324480, 1357247693226913792, 1405046113333030912, 1381148148759670784, 1358677923489525760, 1405434556194107393, 1405436207340597248, 1372111637326213120, 1377932235235274752, 1408044509870305280, 1366679916824899584, 1413106138416820224, 1376071016547233792, 1398112812986937344, 1369624913224282112, 1365232708489457664, 1375333241283817472, 1369327507962212352, 1381148472731906048, 1423592556058533888, 1365221332568125440, 1357170867251064832, 1387965628593352705, 1357244521703944192, 1374978257807618048, 1407940173420965888, 1413375150254075904, 1390630309300678656, 1357287730245152768, 1390964815383638016, 1367676017401016320, 1364415433461084160, 1412936903854010368, 1407939421747163136, 1369327086963142656, 1380398173624872960, 1372364718324461568, 1387998157778071552, 1357152137334894592, 1357148559815880704, 1419945920505733120, 1413682933675470848 ) AND a.tenant_id = 1356898121111711744;
|