Bladeren bron

goods and fireUser

梁彦春 6 jaren geleden
bovenliggende
commit
4836a33829
2 gewijzigde bestanden met toevoegingen van 19 en 1 verwijderingen
  1. 18
    0
      src/main/resources/mapper/TaGoodsMapper.xml
  2. 1
    1
      src/main/resources/mapper/TdSpecMapper.xml

+ 18
- 0
src/main/resources/mapper/TaGoodsMapper.xml Bestand weergeven

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huiju.welcome.mapper.TaGoodsMapper">
4
+    <select id="goodsList" resultType="com.huiju.welcome.model.TaGoods">
5
+        select
6
+        *
7
+        from ta_goods
8
+        <where>
9
+            <if test="goodsName !=null and goodsName !=''">
10
+                goodsName LIKE CONCAT('%',#{goodsName},'%')
11
+            </if>
12
+            <if test="typeId !=null and typeId !=''">
13
+                typeId = CONCAT('%',#{typeId},'%')
14
+            </if>
15
+        </where>
16
+    </select>
17
+
18
+</mapper>

+ 1
- 1
src/main/resources/mapper/TdSpecMapper.xml Bestand weergeven

@@ -6,7 +6,7 @@
6 6
         *
7 7
         from td_spec
8 8
         <where>
9
-            <if test="specName !=null and typeName !=''">
9
+            <if test="specName !=null and specName !=''">
10 10
                 specName LIKE CONCAT('%',#{specName},'%')
11 11
             </if>
12 12
         </where>