From 4f84f1d45e0624685a558436359bfff7b754ecb1 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期二, 23 一月 2024 10:55:59 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/.idea/dataSources.local.xml                                        |   11 -
 north-glass-erp/src/main/java/com/example/erp/ErpApplication.java                  |    4 
 north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java |    1 
 north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml                    |    0 
 north-glass-erp/src/main/java/com/example/erp/mapper/sd/ProductMapper.java         |    2 
 north-glass-erp/src/main/resources/mapper/sd/Product.xml                           |   52 ++++++++--
 north-glass-erp/.idea/dataSources.xml                                              |    4 
 north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue              |  127 ++++++++++++++++--------
 north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java       |    7 
 north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java    |    3 
 north-glass-erp/target/classes/mapper/sd/Product.xml                               |   50 +++++++--
 north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml                |    0 
 12 files changed, 179 insertions(+), 82 deletions(-)

diff --git a/north-glass-erp/.idea/dataSources.local.xml b/north-glass-erp/.idea/dataSources.local.xml
index 2e7ac21..2b874a0 100644
--- a/north-glass-erp/.idea/dataSources.local.xml
+++ b/north-glass-erp/.idea/dataSources.local.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
-    <data-source name="@localhost" uuid="521b6701-da00-48a8-bf4f-cf6bbb7d685d">
+  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
+    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
       <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
         <extra-name-characters>#@</extra-name-characters>
         <identifier-quote-string>`</identifier-quote-string>
@@ -13,15 +13,13 @@
         <introspection-scope>
           <node kind="schema">
             <name qname="@" />
+            <name qname="erp_sd" />
             <name qname="erp_user_info" />
-            <name qname="mm" />
-            <name qname="pp" />
-            <name qname="sd" />
           </node>
         </introspection-scope>
       </schema-mapping>
     </data-source>
-    <data-source name="@10.153.19.150" uuid="2f24a638-142d-4401-9e71-359f1be8d502">
+    <data-source name="@10.153.19.150" uuid="1becdbe6-0c8e-40b3-a9c0-8b2c968172ca">
       <database-info product="MySQL" version="8.0.19" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.19" exact-driver-version="8.0">
         <extra-name-characters>#@</extra-name-characters>
         <identifier-quote-string>`</identifier-quote-string>
@@ -32,7 +30,6 @@
       <schema-mapping>
         <introspection-scope>
           <node kind="schema">
-            <name qname="@" />
             <name qname="erp_user_info" />
             <name qname="mm" />
             <name qname="pp" />
diff --git a/north-glass-erp/.idea/dataSources.xml b/north-glass-erp/.idea/dataSources.xml
index db562e3..91124a0 100644
--- a/north-glass-erp/.idea/dataSources.xml
+++ b/north-glass-erp/.idea/dataSources.xml
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
-    <data-source source="LOCAL" name="@localhost" uuid="521b6701-da00-48a8-bf4f-cf6bbb7d685d">
+    <data-source source="LOCAL" name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
       <driver-ref>mysql.8</driver-ref>
       <synchronize>true</synchronize>
       <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
       <jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
       <working-dir>$ProjectFileDir$</working-dir>
     </data-source>
-    <data-source source="LOCAL" name="@10.153.19.150" uuid="2f24a638-142d-4401-9e71-359f1be8d502">
+    <data-source source="LOCAL" name="@10.153.19.150" uuid="1becdbe6-0c8e-40b3-a9c0-8b2c968172ca">
       <driver-ref>mysql.8</driver-ref>
       <synchronize>true</synchronize>
       <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
index 30561cf..a1358c4 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -14,20 +14,32 @@
 let router=useRouter()
 //鐩戝惉鐜荤拑绫诲瀷鏀瑰彉
 let productList = ref([])
+let date=ref(['',''])
+
+
 
 let glassType = ref([])
 watch(productGlassTypeStore,(newVal,oldVal) => {
-  request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
+
+
+})
+const getProduct = () => {
+  request.post(`/product/1/100/${productGlassTypeStore.GlassType}`,filterData.value).then((res) => {
     if(res.code==200){
-      xGrid.value.loadData(res.data)
+      pageTotal.value=res.data.total
+      xGrid.value.loadData(res.data.data)
       gridOptions.loading=false
     }else{
       ElMessage.warning(res.msg)
     }
   })
+}
 
-})
 
+
+
+
+//瀹氫箟婊氬姩鏉¢珮搴�
 let scrollTop =ref(null)
 let scrollHeight =ref(null)
 let clientHeight =ref(null)
@@ -37,13 +49,17 @@
   scrollHeight.value = row.$event.target.scrollHeight
   clientHeight.value = row.$event.target.clientHeight
 }
+//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
 let filterData = ref({
   basicGlassType:{
     typeName:''
   }
 })
-
+//瀹氫箟椤甸潰鎬婚〉鏁�
+let pageTotal=ref('')
+//瀹氫箟鏁版嵁杩斿洖缁撴灉
 let produceList = ref([])
+//瀹氫箟褰撳墠椤垫暟
 let pageNum=$ref(1)
 let pageState = null
 //鐩戝惉浜у搧婊氬姩鏉$姸鎬侊紝婊氬姩鍒板簳閮ㄥ悜鍚庣璇锋眰鏁版嵁
@@ -63,7 +79,13 @@
       if(produceList.length===500 && pageNum<(produceList.length/100)){
         pageNum=pageNum+5
       }else{
+        //鍒ゆ柇鏄惁鏄渶澶ч〉闈�
+        if (pageNum>=pageTotal.value){
+          //ElMessage.warning("娌℃湁鏇村鏁版嵁浜�")
+          return
+        }
         pageNum=pageNum+1
+
       }
       pageState=true
     }
@@ -84,12 +106,12 @@
       try{
         if(res.code==200){
           if(pageState){
-            produceList = produceList.concat(res.data)
+            produceList = produceList.concat(res.data.data)
             if(produceList.length>500){
               produceList=produceList.slice(100,600)
             }
           }else{
-            produceList = res.data.concat(produceList)
+            produceList = res.data.data.concat(produceList)
             if(produceList.length>500){
               produceList=produceList.slice(0,500)
             }
@@ -109,9 +131,14 @@
 
 
 })
+
+
+//绗竴娆″姞杞芥暟鎹�
 request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
   if(res.code==200){
-    produceList = produceList.value.concat(deepClone(res.data))
+    console.log(res.data.data)
+    pageTotal.value=res.data.total
+    produceList = produceList.value.concat(deepClone(res.data.data))
     xGrid.value.reloadData(produceList)
     gridOptions.loading=false
   }else{
@@ -123,7 +150,7 @@
 
 
 
-const getTableRow = (row,type) =>{
+/*const getTableRow = (row,type) =>{
   switch (type) {
     case 'edit' : {
       router.push({path: '/main/product/createProduct', query: { id: row.id }})
@@ -134,7 +161,7 @@
       break
     }
   }
-}
+}*/
 
 // const getCheckList = (row) =>{
 //   alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑纭澶嶉�夋淇℃伅鍙湪鎺у埗鍙版煡鐪�')
@@ -197,8 +224,9 @@
     return[
       columns.map((column, columnIndex) => {
         if (columnIndex === 0) {
-          return '椤垫暟:'
+          return `椤垫暟:${pageNum}/${pageTotal.value}`
         }
+
         return ''
       })
     ]
@@ -206,7 +234,50 @@
 
 })
 
-//琛ㄦ牸鎷栨嫿
+
+/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
+const changeFilterEvent = (event, option, $panel,) => {
+  // 鎵嬪姩瑙﹀彂绛涢��
+  $panel.changeOption(event, !!option.data, option)
+}
+function filterChanged(column){
+  gridOptions.loading=true
+  //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
+  let value = column.datas[0]!=undefined?column.datas[0]:''
+  value = value.trim()
+  //鍒ゆ柇鏄惁瀛樺湪澶栭敭
+  if (column.property.indexOf('.')>-1){
+    const  columnArr = column.property.split('.')
+    filterData.value[columnArr[0]] = {
+      [columnArr[1]]:value
+    }
+  }else{
+    filterData.value[column.property] = value
+  }
+  request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
+    if(res.code==200){
+      pageTotal.value=res.data.total
+      pageNum=1
+      produceList = deepClone(res.data.data)
+      xGrid.value.loadData(produceList)
+      gridOptions.loading=false
+    }else{
+      ElMessage.warning(res.msg)
+    }
+  })
+}
+
+
+
+
+
+/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
+const hasDecimal = (value) => {
+  const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+  return regex.test(value); // 杩斿洖true/false
+}
+
+/*琛ㄦ牸鎷栨嫿*/
 let sortable2: any
 
 const columnDrop2 = () => {
@@ -257,39 +328,6 @@
   }
 })
 
-const changeFilterEvent = (event, option, $panel,) => {
-  // 鎵嬪姩瑙﹀彂绛涢��
-  $panel.changeOption(event, !!option.data, option)
-}
-function filterChanged(column){
-  gridOptions.loading=true
-  //绛涢�夋潯浠跺彂鐢熷彉鍖栨潯浠跺彂鐢熷彉鍖�
-  let value = column.datas[0]!=undefined?column.datas[0]:''
-  value = value.trim()
-  //鍒ゆ柇鏄惁瀛樺湪澶栭敭
-  if (column.property.indexOf('.')>-1){
-    const  columnArr = column.property.split('.')
-    filterData.value[columnArr[0]] = {
-      [columnArr[1]]:value
-    }
-  }else{
-    filterData.value[column.property] = value
-  }
-  request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
-    if(res.code==200){
-      produceList = deepClone(res.data)
-      xGrid.value.loadData(produceList)
-      gridOptions.loading=false
-    }else{
-      ElMessage.warning(res.msg)
-    }
-  })
-}
-const hasDecimal = (value) => {
-  const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
-  return regex.test(value); // 杩斿洖true/false
-  }
-
 
 </script>
 
@@ -298,6 +336,7 @@
   <div style="width: 100%;height: 100%">
       <glass-type   style="float: left" />
       <el-button
+          @click="getProduct"
           id="select"
           type="primary" :icon="Search">鏌ヨ</el-button>
 
diff --git a/north-glass-erp/src/main/java/com/example/erp/ErpApplication.java b/north-glass-erp/src/main/java/com/example/erp/ErpApplication.java
index 066700f..f413bed 100644
--- a/north-glass-erp/src/main/java/com/example/erp/ErpApplication.java
+++ b/north-glass-erp/src/main/java/com/example/erp/ErpApplication.java
@@ -4,10 +4,14 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.transaction.annotation.Transactional;
 
 //springboot 鍚姩鍏ュ彛
 @SpringBootApplication
 @EnableCaching
+@EnableTransactionManagement//浜嬪姟娉ㄨВ
+//@Transactional//鍦╯ervice閲岄潰鏈夊琛ㄦ搷浣滐紝寮�鍚簨鍔℃敞瑙�
 public class ErpApplication {
     public static void main(String[] args) {
         SpringApplication.run(ErpApplication.class, args);
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
index 5f7724d..9674f9b 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -17,7 +17,6 @@
 
     @PostMapping  ("/{pageNum}/{pageSize}/{glassType}")
     public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){
-
         return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product));
     }
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/ProductMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/ProductMapper.java
index 8f5866e..f06dbb8 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/sd/ProductMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/sd/ProductMapper.java
@@ -12,4 +12,6 @@
                                  @Param("pageSize") Integer pageSiz,
                                  @Param("glassTypeId") String glassTypeId,
                                  @Param("product") Product product);
+
+    Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product);
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
index 6d05b9d..15f2563 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
@@ -22,9 +22,10 @@
             glassTypeId = glassType.get(1);
         }
         Map<String,Object> map = new HashMap<>();
-        map.put("list",productMapper.defaultProduct(offset,pageSize,glassTypeId,product));
-        map.put("pageNum",pageNum);
-
+        map.put("data",productMapper.defaultProduct(offset,pageSize,glassTypeId,product));
+        map.put("total",productMapper.getPageTotal(offset,pageSize,glassTypeId,product));
         return map;
     }
+
+
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
index 6bcfea4..7bc8f6b 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
@@ -13,6 +13,7 @@
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
@@ -54,7 +55,7 @@
         return userMapper.getUserByID(userId);
     }
 
-
+    @Transactional
     public User register(User user) {
         User returnUser = new User();
         if(userMapper.register(user)){
diff --git a/north-glass-erp/src/main/resources/mapper/sd/Product.xml b/north-glass-erp/src/main/resources/mapper/sd/Product.xml
index 0a9096a..1815692 100644
--- a/north-glass-erp/src/main/resources/mapper/sd/Product.xml
+++ b/north-glass-erp/src/main/resources/mapper/sd/Product.xml
@@ -3,13 +3,10 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.example.erp.mapper.sd.ProductMapper">
-    <resultMap id="productmap" type="com.example.erp.entity.sd.Product" >
+    <resultMap id="productMap" type="com.example.erp.entity.sd.Product" >
         <id column="id" property="id"/>
-<<<<<<< HEAD
         <result column="product_name" property="productName"/>
-=======
-        <result column="product" property="product"/>
->>>>>>> 2bf272a9d41a2b6c67910b23371af9537a9153a5
+        <result column="product" property="productName"/>
         <result column="total_thickness" property="totalThickness"/>
         <result column="thickness" property="thickness"/>
         <result column="query" property="query"/>
@@ -18,22 +15,19 @@
         <result column="creator" property="creator"/>
         <result column="create_time" property="createTime"/>
         <result column="update_time" property="updateTime"/>
-<<<<<<< HEAD
+        <!--鎺ユ敹鍏朵粬澶栭敭瀹炰綋绫绘暟鎹�-->
         <association property="basicGlassType" javaType="com.example.erp.entity.sd.BasicGlassType">
             <result column="type_id" property="typeID"/>
-=======
-        <association property="glassType" javaType="com.example.erp.entity.sd.GlassType">
-            <result column="type_id" property="typeId"/>
->>>>>>> 2bf272a9d41a2b6c67910b23371af9537a9153a5
             <result column="type_name" property="typeName"/>
         </association>
+
         <!--<result column="g_typeId" property="glassTypes.typeId"/>
         <result column="g_type" property="glassTypes.type"/>-->
 
     </resultMap>
 
-    <select id="defaultProduct" resultMap="productmap">
-        select a.id as id,
+    <select id="defaultProduct" resultMap="productMap">
+        select a.id ,
         a.product_name,
         a.total_thickness,
         a.thickness,
@@ -75,4 +69,38 @@
         limit #{offset},#{pageSize}
         ;
     </select>
+
+    <select id="getPageTotal" >
+        select
+            CEILING(count(a.id)/#{pageSize})
+        from product as a
+        left join basic_glass_type bgt on bgt.type_id = a.type_id
+        <where>
+            <if test="glassTypeId != null and glassTypeId != ''">
+                and a.type_id regexp #{glassTypeId}
+            </if>
+            <if test="product.id != null and product.id != ''">
+                and a.id regexp #{product.id}
+            </if>
+            <if test="product.productName != null and product.productName != ''">
+                and a.product_name regexp #{product.productName}
+            </if>
+            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">
+                and bgt.type_name regexp #{product.basicGlassType.typeName}
+            </if>
+            <if test="product.query != null and product.query != ''">
+                and a.query regexp #{product.query}
+            </if>
+            <if test="product.creator != null and product.creator != ''">
+                and a.creator regexp #{product.creator}
+            </if>
+            <if test="product.createTime != null and product.createTime != ''">
+                and date(a.create_time) regexp #{product.createTime}
+            </if>
+        </where>
+
+        order by a.id desc
+        limit #{offset},#{pageSize}
+        ;
+    </select>
 </mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml b/north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
similarity index 100%
rename from north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
rename to north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml b/north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
similarity index 100%
rename from north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
rename to north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
diff --git a/north-glass-erp/target/classes/mapper/sd/Product.xml b/north-glass-erp/target/classes/mapper/sd/Product.xml
index 0a9096a..ae51f90 100644
--- a/north-glass-erp/target/classes/mapper/sd/Product.xml
+++ b/north-glass-erp/target/classes/mapper/sd/Product.xml
@@ -3,13 +3,10 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.example.erp.mapper.sd.ProductMapper">
-    <resultMap id="productmap" type="com.example.erp.entity.sd.Product" >
+    <resultMap id="productMap" type="com.example.erp.entity.sd.Product" >
         <id column="id" property="id"/>
-<<<<<<< HEAD
         <result column="product_name" property="productName"/>
-=======
-        <result column="product" property="product"/>
->>>>>>> 2bf272a9d41a2b6c67910b23371af9537a9153a5
+        <result column="product" property="productName"/>
         <result column="total_thickness" property="totalThickness"/>
         <result column="thickness" property="thickness"/>
         <result column="query" property="query"/>
@@ -18,13 +15,8 @@
         <result column="creator" property="creator"/>
         <result column="create_time" property="createTime"/>
         <result column="update_time" property="updateTime"/>
-<<<<<<< HEAD
         <association property="basicGlassType" javaType="com.example.erp.entity.sd.BasicGlassType">
             <result column="type_id" property="typeID"/>
-=======
-        <association property="glassType" javaType="com.example.erp.entity.sd.GlassType">
-            <result column="type_id" property="typeId"/>
->>>>>>> 2bf272a9d41a2b6c67910b23371af9537a9153a5
             <result column="type_name" property="typeName"/>
         </association>
         <!--<result column="g_typeId" property="glassTypes.typeId"/>
@@ -32,8 +24,8 @@
 
     </resultMap>
 
-    <select id="defaultProduct" resultMap="productmap">
-        select a.id as id,
+    <select id="defaultProduct" resultMap="productMap">
+        select a.id ,
         a.product_name,
         a.total_thickness,
         a.thickness,
@@ -75,4 +67,38 @@
         limit #{offset},#{pageSize}
         ;
     </select>
+
+    <select id="getPageTotal" >
+        select
+            CEILING(count(a.id)/#{pageSize})
+        from product as a
+        left join basic_glass_type bgt on bgt.type_id = a.type_id
+        <where>
+            <if test="glassTypeId != null and glassTypeId != ''">
+                and a.type_id regexp #{glassTypeId}
+            </if>
+            <if test="product.id != null and product.id != ''">
+                and a.id regexp #{product.id}
+            </if>
+            <if test="product.productName != null and product.productName != ''">
+                and a.product_name regexp #{product.productName}
+            </if>
+            <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">
+                and bgt.type_name regexp #{product.basicGlassType.typeName}
+            </if>
+            <if test="product.query != null and product.query != ''">
+                and a.query regexp #{product.query}
+            </if>
+            <if test="product.creator != null and product.creator != ''">
+                and a.creator regexp #{product.creator}
+            </if>
+            <if test="product.createTime != null and product.createTime != ''">
+                and date(a.create_time) regexp #{product.createTime}
+            </if>
+        </where>
+
+        order by a.id desc
+        limit #{offset},#{pageSize}
+        ;
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0