| 16:53:07.646 | 0.7 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "id"=5493 |
| 16:53:07.649 | 0.5 ms | SELECT | SELECT * FROM "o6a13e2c574d5a"."tbl_users" WHERE "id"=5493 |
| 16:53:07.655 | 8.4 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_products'
and d.nspname = 'o6a13e2c574d5a'
ORDER BY
a.attnum; |
| 16:53:07.664 | 47.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_products'
and ns.nspname='o6a13e2c574d5a'
order by
fns.nspname, fc.relname, a.attnum |
| 16:53:07.720 | 3.2 ms | SELECT | SELECT COUNT(*) FROM (SELECT "p".* FROM "o6a13e2c574d5a"."tbl_products" "p" LEFT JOIN "o6a13e2c574d5a"."tbl_product_brands" "pb" ON p.product_brand = pb.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_types" "pt" ON p.product_type = pt.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_series" "ps" ON p.product_serie = ps.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_components" "pc" ON p.product_component = pc.id ORDER BY "updated_at" DESC) "c" |
| 16:53:07.724 | 0.6 ms | SELECT | SELECT "p".* FROM "o6a13e2c574d5a"."tbl_products" "p" LEFT JOIN "o6a13e2c574d5a"."tbl_product_brands" "pb" ON p.product_brand = pb.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_types" "pt" ON p.product_type = pt.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_series" "ps" ON p.product_serie = ps.id LEFT JOIN "o6a13e2c574d5a"."tbl_product_components" "pc" ON p.product_component = pc.id ORDER BY "updated_at" DESC LIMIT 20 |
| 16:53:07.729 | 0.4 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "o6a13e2c574d5a"."tbl_product_types" WHERE "id"=1 |
| 16:53:07.730 | 0.3 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "o6a13e2c574d5a"."tbl_product_components" WHERE "id"=1 |
| 16:53:07.730 | 0.3 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "o6a13e2c574d5a"."tbl_product_brands" WHERE "id"=1 |
| 16:53:07.731 | 0.3 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "o6a13e2c574d5a"."tbl_product_series" WHERE "id"=1 |
| 16:53:07.731 | 0.4 ms | SELECT | SELECT "id", "id" AS "key", "name", "sex", "department_id" FROM "o6a13e2c574d5a"."tbl_users" WHERE "id"=5493 |
| 16:53:07.732 | 0.7 ms | SELECT | SELECT "id", "user_id", "meta_value" AS "name" FROM "o6a13e2c574d5a"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=5493) |
| 16:53:07.733 | 6.2 ms | SELECT | SELECT "id", "id" AS "key", "name" FROM "o6a13e2c574d5a"."tbl_departments" WHERE "id"=1 |
| 16:53:07.740 | 10.9 ms | SELECT | SELECT "eip"."product_id", sum(outbound) as outbound, sum(number) as number, sum(inventory) as inventory, avg(actual_amount) as avg_amount, avg(actual_amount * inventory) as avg_total_amount, sum(actual_amount * inventory) as amount FROM "o6a13e2c574d5a"."tbl_erp_inventory_products" "eip" WHERE "product_id"=1 GROUP BY "eip"."product_id" |
| 16:53:07.752 | 2.8 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'o6a13e2c574d5a', 5493, 5, 'vue/product/list', '{"ProductSearch":{"product_type":"","product_component":"","product_brand":"","product_serie":"","is_renew":""},"Filter":{"name":"updated_at","sort":"DESC"},"page":"1","web_access_token":"KJ3qRUjTV-VFiU1eML0s6lPHlLH-H1W3"}', '{"code":2000,"result":{"list":[{"id":1,"name":"\u6df1\u4fe1\u670d AF-1210-A","product_type":1,"product_component":1,"product_brand":1,"product_serie":1,"product_misc":"","product_qa":"","pn":"","description":"","created_by":5493,"created_at":"2026-05-25 13:48:53","updated_at":"2026-06-01 15:21:10","pinyin_shortcut":"","product_unit":"","is_renew":false,"in_out_at":"2026-06-01 15:21:10.749785+08","productType":{"id":1,"key":1,"name":"\u9632\u706b\u5899"},"productComponent":{"id":1,"key":1,"name":"\u786c\u4ef6\u4e3b\u673a"},"productBrand":{"id":1,"key":1,"name":"\u6df1\u4fe1\u670d"},"productSerie":{"id":1,"key":1,"name":"\u6df1\u4fe1\u670dAF-1210"},"productMisc":{},"productUnit":{},"createdBy":{"id":5493,"key":5493,"name":"97289742","sex":"M","department_id":1,"avatar":{},"department":{"id":1,"key":1,"name":"\u603b\u7ecf\u7406"}},"productQa":{},"erpInventoryCount":{"product_id":1,"outbound":"0","number":"2","inventory":"2","avg_amount":"200.0000000000000000","avg_total_amount":"80.0000000000000000","amount":"400"},"bgcolor":"#89c541","can_update":true,"can_delete":true}],"can_import":true,"can_create":true,"can_update":true,"can_delete":true,"can_manage":true,"pagenation":{"totalcount":1,"thispage":1,"pagesize":20}},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"mod":0,"ip":"39.156.194.178","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko\/20100101 Firefox\/151.0"}', FALSE, '2026-06-12 16:53:07', 109086976) RETURNING "id" |