17:34:56.688 | 4.0 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "access_token"='NwDlebRkXSJbZFNIiImHKy4sVWr3Lufc' |
17:34:56.693 | 1.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.697 | 1.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3338' |
17:34:56.699 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.699 | 2.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_cases" WHERE ("case_status" NOT IN (5, 6)) AND ("client_id"=3338) |
17:34:56.702 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.703 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.704 | 1.5 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_object_change_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "description") VALUES (5, 'sales_rep', 3338, 10, 1004, 'now()', '[""]', '["\u4f0a\u5cfb\u8fb0"]', '{"d1":"\u4f0a\u5cfb\u8fb0","d2":"\u653e\u5f03\u4e86","d3":"\u5ba2\u6237","d4":[]}') |
17:34:56.705 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.706 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1004 |
17:34:56.707 | 1.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_user_action_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "users", "description") VALUES (5, 'sales_rep', 3338, 10, 1004, 'now()', '[""]', '["\u4f0a\u5cfb\u8fb0"]', array[1004], '{"d1":"\u4f0a\u5cfb\u8fb0","d2":"\u653e\u5f03\u4e86","d3":"\u5ba2\u6237","d4":[]}') |
17:34:56.709 | 1.0 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_sales_contract_remind_receivers" WHERE ("contract_id" IN (SELECT "id" FROM "a57be577deb434"."tbl_sales_contracts" WHERE "client_id"=3338)) AND ("user_id"=1004) |
17:34:56.715 | 2.2 ms | UPDATE | UPDATE "a57be577deb434"."tbl_clients" SET "sales_rep"=NULL, "pick_at"=NULL WHERE "id"=3338 |
17:34:56.718 | 0.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_client_am_change_logs" WHERE ("client_id"=3338) AND ("sales_rep"=1004) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
17:34:56.719 | 0.8 ms | UPDATE | UPDATE "a57be577deb434"."tbl_client_am_change_logs" SET "end_at"='now()' WHERE "id"=165309 |
17:34:56.720 | 1.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ClientAmChangeLogs', 165309, 'a:1:{s:6:"end_at";s:19:"1970-01-01 08:00:00";}', '', 1004, '120.244.156.33') |
17:34:56.722 | 1.1 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_client_am_change_logs" ("client_id", "sales_rep", "start_from", "end_at") VALUES (3338, NULL, 'now()', NULL) RETURNING "id" |
17:34:56.723 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ClientAmChangeLogs', 165371, 'a:5:{s:2:"id";i:165371;s:9:"client_id";i:3338;s:9:"sales_rep";N;s:10:"start_from";s:5:"now()";s:6:"end_at";N;}', '', 1004, '120.244.156.33') |
17:34:56.724 | 0.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Clients', 3338, 'a:2:{s:9:"sales_rep";i:1004;s:7:"pick_at";s:29:"2025-07-10 16:30:25.823831+08";}', '', 1004, '120.244.156.33') |
17:34:56.725 | 1.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE ("project_status" IN (1, 2)) AND ("client_id"=3338) |
17:34:56.727 | 5.8 ms | SELECT | SELECT
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_client_sales_rep_rels'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
17:34:56.734 | 14.1 ms | SELECT | select
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_client_sales_rep_rels'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
17:34:56.749 | 3.6 ms | UPDATE | UPDATE "a57be577deb434"."tbl_client_sales_rep_rels" SET "end_at"='now()' WHERE ("client_id"=3338) AND ("end_at" IS NULL) |
17:34:56.755 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_schedules" SET "end_at"='now()', "is_complete"=TRUE, "complete_at"='now()', "is_closed"=TRUE WHERE ("client_id"=3338) AND ("is_complete"=FALSE) |
17:34:56.766 | 1.5 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', 1004, 2, 1141, 'v2/client/give-up', '{"access_token":"NwDlebRkXSJbZFNIiImHKy4sVWr3Lufc","device_type":"2","id":"3338","posttime":"1752399360","token":"e77eb3091de65efdc5ffdacbbd31b725","version_code":"1141"}', '{"code":200,"data":"","status":1,"msg":[{"name":"success","success":"\u5ba2\u6237\u5df2\u7ecf\u6210\u529f\u4ece\u60a8\u7684\u5ba2\u6237\u5217\u8868\u4e2d\u79fb\u9664\uff0c\u672a\u6765\u60a8\u4ecd\u7136\u53ef\u4ee5\u5728\u5ba2\u6237\u5171\u4eab\u6c60\u4e2d\u627e\u5230\u8be5\u5ba2\u6237","error":""}]}', FALSE, '2025-07-13 17:34:56') RETURNING "id" |