repair: get error code

This commit is contained in:
2025-12-02 15:58:06 +07:00
parent 790b949302
commit 867976030a
2 changed files with 3 additions and 41 deletions

View File

@@ -108,13 +108,8 @@ const getAllErrorCodesDb = async (searchParams = {}) => {
const queryText = `
SELECT
COUNT(*) OVER() AS total_data,
a.*,
b.brand_name,
b.brand_type,
b.brand_manufacture,
b.brand_model
a.*
FROM brand_code a
LEFT JOIN m_brands b ON a.brand_id = b.brand_id
WHERE a.deleted_at IS NULL
${whereConditions.length > 0 ? `AND ${whereConditions.join(' AND ')}` : ''}
${whereOrConditions ? whereOrConditions : ''}