From 60806825951c111ac107dec87bd3acc5a7d6a707 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 03 三月 2026 10:07:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_kthg' into dev_New_kthg
---
src/main/resources/mapper/basic/ProductModelMapper.xml | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/basic/ProductModelMapper.xml b/src/main/resources/mapper/basic/ProductModelMapper.xml
index 317f5d9..9b1ade3 100644
--- a/src/main/resources/mapper/basic/ProductModelMapper.xml
+++ b/src/main/resources/mapper/basic/ProductModelMapper.xml
@@ -15,18 +15,26 @@
<result column="product_id" property="productId" />
</resultMap>
<select id="listPageProductModel" resultType="com.ruoyi.basic.pojo.ProductModel">
- select pm.*,p.product_name
+ select pm.*,p.product_name,p.parent_id,p1.product_name as parent_name,
+ case
+ when p1.product_name is null then 0 -- 鍘熸潗鏂�
+ when p1.product_name is not null and p1.product_name like '%鍗婃垚鍝�%' then 1 -- 鍗婃垚鍝�
+ when p1.product_name is not null and p1.product_name like '%鎴愬搧%' then 2 -- 鎴愬搧
+ else 0 -- 榛樿涓哄師鏉愭枡
+ end as product_type
from product_model pm
left join product p on pm.product_id = p.id
+ left join product p1 on p1.id = p.parent_id
<where>
<if test="c.model != null and c.model != ''">
- and pm.model like concat('%',#{c.model},'%')
+ and pm.model like concat('%',#{c.model},'%')
</if>
<if test="c.productName != null and c.productName != ''">
- and p.product_name like concat('%',#{c.productName},'%')
+ and p.product_name like concat('%',#{c.productName},'%')
</if>
</where>
- order by pm.id
+ order by pm.id
+
</select>
<select id="selectLatestRecord" resultType="com.ruoyi.basic.pojo.ProductModel">
SELECT * FROM product_model
--
Gitblit v1.9.3