14:55:42.067 | 2.9 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "access_token"='oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH' |
14:55:42.071 | 1.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000 |
14:55:42.076 | 23.8 ms | SELECT | SELECT COUNT(*) FROM (SELECT c.*, abs(c.expire_date - current_date) AS b_date, CASE WHEN c.expire_date IS NULL THEN 1 ELSE 2 END AS passed FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = c.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.id = c.from_project LEFT JOIN "a57be577deb434"."tbl_sales_group_relationships" "sgr" ON sgr.sales_id = client.sales_rep LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "cs" ON cs.object_id = c.id AND cs.object_type = 105 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "rs" ON rs.object_id = c.id AND rs.object_type = 106 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "vs" ON vs.object_id = c.id AND vs.object_type = 107 LEFT JOIN "a57be577deb434"."tbl_projects" "project" ON "project"."id" = "c"."project_id" WHERE (true) AND (("c"."serial_no" ILIKE '%test%') OR ("c"."description" ILIKE '%test%') OR ("client"."name" ILIKE '%test%') OR ("client"."en_name" ILIKE '%test%') OR ("client"."pinyin_shortcut" ILIKE '%test%') OR ("project"."project_title" ILIKE '%test%') OR ("project"."pinyin_shortcut" ILIKE '%test%')) AND (("client"."sales_rep" IN (5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 1001, 5037, 5087, 1008, 5048, 5043, 5045, 5230, 5031, 5088, 5208, 1003, 5294, 5357, 5044, 1030, 5076, 5300, 5027, 5089, 5311, 5066, 5069, 5364, 1009, 5295, 1013, 5128, 5203, 1025, 5032, 5075, 1004, 5072, 5033, 5359, 5412, 5409, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) OR ("client"."sales_rep" IS NULL) OR ("client"."id" IN (SELECT "client_id" FROM "a57be577deb434"."tbl_user_visit_clients" WHERE "user_id"=1000))) GROUP BY "c"."id" ORDER BY "c"."signed_at" DESC, "c"."created_at" DESC) "c" |
14:55:42.100 | 12.0 ms | SELECT | SELECT c.*, abs(c.expire_date - current_date) AS b_date, CASE WHEN c.expire_date IS NULL THEN 1 ELSE 2 END AS passed FROM "a57be577deb434"."tbl_sales_contracts" "c" LEFT JOIN "a57be577deb434"."tbl_clients" "client" ON client.id = c.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.id = c.from_project LEFT JOIN "a57be577deb434"."tbl_sales_group_relationships" "sgr" ON sgr.sales_id = client.sales_rep LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "cs" ON cs.object_id = c.id AND cs.object_type = 105 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "rs" ON rs.object_id = c.id AND rs.object_type = 106 LEFT JOIN "a57be577deb434"."tbl_attachement_relationships" "vs" ON vs.object_id = c.id AND vs.object_type = 107 LEFT JOIN "a57be577deb434"."tbl_projects" "project" ON "project"."id" = "c"."project_id" WHERE (true) AND (("c"."serial_no" ILIKE '%test%') OR ("c"."description" ILIKE '%test%') OR ("client"."name" ILIKE '%test%') OR ("client"."en_name" ILIKE '%test%') OR ("client"."pinyin_shortcut" ILIKE '%test%') OR ("project"."project_title" ILIKE '%test%') OR ("project"."pinyin_shortcut" ILIKE '%test%')) AND (("client"."sales_rep" IN (5049, 5301, 5022, 5209, 5026, 5293, 5309, 5356, 5329, 5299, 5303, 5302, 5332, 5047, 1026, 5096, 5070, 5448, 5420, 1029, 1001, 5037, 5087, 1008, 5048, 5043, 5045, 5230, 5031, 5088, 5208, 1003, 5294, 5357, 5044, 1030, 5076, 5300, 5027, 5089, 5311, 5066, 5069, 5364, 1009, 5295, 1013, 5128, 5203, 1025, 5032, 5075, 1004, 5072, 5033, 5359, 5412, 5409, 5229, 1005, 5304, 5449, 5358, 1006, 5093)) OR ("client"."sales_rep" IS NULL) OR ("client"."id" IN (SELECT "client_id" FROM "a57be577deb434"."tbl_user_visit_clients" WHERE "user_id"=1000))) GROUP BY "c"."id" ORDER BY "c"."signed_at" DESC, "c"."created_at" DESC LIMIT 10 |
14:55:42.112 | 1.1 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 2, 1141, 'v2/sales-contract/list', '{"Filter":{"name":"signed_at","sort":"DESC"},"SalesContractSearch":{"contract_type":"","handler":"","keyword":"test"},"access_token":"oTtlK_p5ZOBpvQJd1tf5AoUbRaTdQ7qH","device_type":"2","posttime":"1752216960","token":"cbcd3996302da7da96de647fdaf4ad7b","version_code":"1141"}', '{"code":200,"data":{"list":[],"pagenation":{"totalcount":0,"thispage":1,"pagesize":10}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-07-11 14:55:42') RETURNING "id" |