6a3398de9ded4: POST https://beta.jinchangxiao.com/v2/pre-sales/list at 2026-06-18 03:06:06 pm by 223.104.40.234

Database Queries

总计30条数据
TimeDurationTypeQuery
  
15:06:06.6990.8 msSELECTSELECT * FROM "global"."vw_user_login" WHERE "access_token"='R8ScrIY1ab3sgHgv8KlMKFukwMtD6QYC'

15:06:06.7010.5 msSELECTSELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000

15:06:06.7040.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_cases" WHERE "id"='9262'

15:06:06.7085.2 msSELECTSELECT d.nspname AS table_schema, c.relname AS table_name, a.attname AS column_name, t.typname AS data_type, a.attlen AS character_maximum_length, pg_catalog.col_description(c.oid, a.attnum) AS column_comment, a.atttypmod AS modifier, a.attnotnull = false AS is_nullable, CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default, coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc, array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values, CASE atttypid WHEN 21 /*int2*/ THEN 16 WHEN 23 /*int4*/ THEN 32 WHEN 20 /*int8*/ THEN 64 WHEN 1700 /*numeric*/ THEN CASE WHEN atttypmod = -1 THEN null ELSE ((atttypmod - 4) >> 16) & 65535 END WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/ WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/ ELSE null END AS numeric_precision, CASE WHEN atttypid IN (21, 23, 20) THEN 0 WHEN atttypid IN (1700) THEN CASE WHEN atttypmod = -1 THEN null ELSE (atttypmod - 4) & 65535 END ELSE null END AS numeric_scale, CAST( information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t)) AS numeric ) AS size, a.attnum = any (ct.conkey) as is_pkey FROM pg_class c LEFT JOIN pg_attribute a ON a.attrelid = c.oid LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_namespace d ON d.oid = c.relnamespace LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p' WHERE a.attnum > 0 and t.typname != '' and c.relname = 'tbl_pre_sales' and d.nspname = 'a57be577deb434' ORDER BY a.attnum;

15:06:06.71429.4 msSELECTselect ct.conname as constraint_name, a.attname as column_name, fc.relname as foreign_table_name, fns.nspname as foreign_table_schema, fa.attname as foreign_column_name from (SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s FROM pg_constraint ct ) AS ct inner join pg_class c on c.oid=ct.conrelid inner join pg_namespace ns on c.relnamespace=ns.oid inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s] left join pg_class fc on fc.oid=ct.confrelid left join pg_namespace fns on fc.relnamespace=fns.oid left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s] where ct.contype='f' and c.relname='tbl_pre_sales' and ns.nspname='a57be577deb434' order by fns.nspname, fc.relname, a.attnum

15:06:06.7451.5 msSELECTSELECT COUNT(*) FROM (SELECT p.*, p.end_at - p.start_at AS hours_spent FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=9262 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC) "c"

15:06:06.7461.3 msSELECTSELECT p.*, p.end_at - p.start_at AS hours_spent FROM "a57be577deb434"."tbl_pre_sales" "p" LEFT JOIN "a57be577deb434"."tbl_cases" "c" ON c.id = p.case_id WHERE "case_id"=9262 GROUP BY "p"."id" ORDER BY "is_draft" DESC, "p"."has_following_work" DESC, "p"."end_at" DESC LIMIT 10

15:06:06.7501.9 msSELECTSELECT "id", "id" AS "key", "name", "logo", "sales_rep" FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464

15:06:06.7530.3 msSELECTSELECT "id", "case_status", "client_id", "project_id" FROM "a57be577deb434"."tbl_cases" WHERE "id"=9262

15:06:06.7530.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464

15:06:06.7540.3 msSELECTSELECT "id", "id" AS "key", "project_title" AS "name" FROM "a57be577deb434"."tbl_projects" WHERE "id"=4176

15:06:06.7540.4 msSELECTSELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3464

15:06:06.7550.3 msSELECTSELECT "id", "id" AS "key", "name", "sex" FROM "a57be577deb434"."tbl_users" WHERE "id"=5064

15:06:06.7550.3 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5064)

15:06:06.7560.3 msSELECTSELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "a57be577deb434"."tbl_users" WHERE "id"=5064

15:06:06.7560.3 msSELECTSELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5064)

15:06:06.7570.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_departments" WHERE "id"=10

15:06:06.75711.7 msSELECTSELECT *, "product_type_id" AS "key", "description" AS "value" FROM "a57be577deb434"."tbl_pre_sales_product_types" WHERE "pre_sales_id"=1946

15:06:06.7693.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_contact_attend_pre_sales" WHERE "pre_sales_id"=1946

15:06:06.7730.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_contacts" WHERE "id"=6258

15:06:06.7733.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=4) AND ("object_id"=1946)

15:06:06.7763.2 msSELECTSELECT * FROM "a57be577deb434"."tbl_attachement_relationships" WHERE ("object_type"=23) AND ("object_id"=1946)

15:06:06.7800.3 msSELECTSELECT * FROM "a57be577deb434"."tbl_services" WHERE "id"=273

15:06:06.7810.3 msSELECTSELECT "id", "id" AS "key", "name" FROM "a57be577deb434"."tbl_product_brands" WHERE "id"=33

15:06:06.7810.2 msSELECTSELECT "id", "id" AS "key", "title" AS "name" FROM "a57be577deb434"."tbl_service_type" WHERE "id"=9

15:06:06.78132.9 msSELECTSELECT "object_id", count(*) as comment FROM "a57be577deb434"."tbl_comments" WHERE ("object_type"=4) AND ("object_id"=1946) GROUP BY "object_id"

15:06:06.81530.4 msSELECTSELECT "object_id", count(*) AS unread FROM "a57be577deb434"."tbl_unread_comments" WHERE ("object_type"=4) AND (remind_user_id = 1000 AND is_read = false) AND ("object_id"=1946) GROUP BY "object_id"

15:06:06.8452.0 msSELECTSELECT "pre_sales_id", sum(amount) as count FROM "a57be577deb434"."tbl_reimbursements" WHERE ("status" IN (1, 2, 3)) AND ("pre_sales_id"=1946) GROUP BY "pre_sales_id"

15:06:06.8481.9 msSELECTSELECT * FROM "a57be577deb434"."tbl_reimbursements" WHERE "pre_sales_id"=1946

15:06:06.8541.5 msINSERTINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1000, 2, 1159, 'v2/pre-sales/list', '{"access_token":"R8ScrIY1ab3sgHgv8KlMKFukwMtD6QYC","device_type":"2","id":"9262","posttime":"1781766400","token":"81d06fe549f67cf9fb3f2a5a3c1f46e1","version_code":"1159"}', '{"code":200,"data":{"list":[{"id":1946,"client_id":3464,"start_at":"2026-06-02 00:00:00","description":"","client_concerns":"","pre_sales_assessment":"","engineer_id":5064,"created_by":5064,"created_at":"2026-06-02 18:10:00","updated_at":"2026-06-02 18:10:00","following_work_content":"","project_status":null,"end_at":"2026-06-02 02:00:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":9262,"service_id":273,"location_in_id":null,"location_out_id":null,"ticket_no":"PS260602001001","client_document_id":null,"client_document_file":null,"indistance":999999999,"outdistance":999999999,"hours_spent":"02:00:00","client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42","logo":null,"sales_rep":null,"salesRep":null},"case":{"id":9262,"case_status":3,"client_id":3464,"project_id":4176,"client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42"},"project":{"id":4176,"key":4176,"name":"\u9500\u552e\u7ebf\u7d22\u751f\u621020260602003"}},"salesRep":null,"engineer":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"}},"createdBy":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","department_id":10,"avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"location":null,"locationIn":null,"locationOut":null,"preSalesProductTypes":[],"attendedContacts":[{"id":6258,"key":6258,"name":"12"}],"attachmentRelationships":[],"files":[],"service":{"id":273,"serial_no":"FA01","title":"\u6280\u672f\u65b9\u6848-\u4e00\u7ea7\u6587\u6863","brand_id":33,"type_id":9,"points":150,"points_off_time":150,"points_holiday":150,"description":"\u6280\u672f\u65b9\u6848-\u6587\u6863","created_by":1013,"created_at":"2021-05-31 07:39:33","updated_at":"2026-04-23 16:32:29","is_delete":false,"sort":3,"is_stop":false,"brand":{"id":33,"key":33,"name":"Toast"},"type":{"id":9,"key":9,"name":"\u6280\u672f\u57f9\u8bad"}},"clientDocument":null,"commentCount":null,"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"2\u5c0f\u65f6","can_update":true,"can_delete":true,"can_complete":false,"can_create_reimbursement":false,"unread":0,"bgcolor":"#89c541","can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":1,"thispage":1,"pagesize":10},"can_create":false},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"ip":"223.104.40.234","ua":"jinchangxiao\/2.3.156 (iPhone 12; iOS 26.5; Scale\/3.00)"}', FALSE, '2026-06-18 15:06:06', 206106112) RETURNING "id"