From ca0565e53494417b3779759f8d3898e07bfd5929 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 20 一月 2026 14:09:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/jtwy' into sqd-hb
---
src/main/resources/mapper/basic/ProductModelMapper.xml | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/basic/ProductModelMapper.xml b/src/main/resources/mapper/basic/ProductModelMapper.xml
new file mode 100644
index 0000000..afdfc4a
--- /dev/null
+++ b/src/main/resources/mapper/basic/ProductModelMapper.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.basic.mapper.ProductModelMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.ProductModel">
+ <id column="id" property="id" />
+ <result column="product_id" property="productId" />
+ <result column="model" property="model" />
+ <result column="unit" property="unit" />
+ <result column="speculative_trading_name" property="speculativeTradingName" />
+ <result column="tenant_id" property="tenantId" />
+ <result column="product_name" property="productName" />
+ <result column="product_id" property="productId" />
+ <result column="product_code" property="productCode" />
+ </resultMap>
+ <select id="listPageProductModel" resultType="com.ruoyi.basic.pojo.ProductModel">
+ select pm.*,p.product_name
+ from product_model pm
+ left join product p on pm.product_id = p.id
+ <where>
+ <if test="c.model != null and 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},'%')
+ </if>
+ </where>
+ order by pm.id
+ </select>
+ <select id="selectLatestRecord" resultType="com.ruoyi.basic.pojo.ProductModel">
+ SELECT * FROM product_model
+ ORDER BY create_time DESC, id DESC
+ LIMIT 1
+ </select>
+
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.3