Sfoglia il codice sorgente

代码生成器 生成分页查询语句错误修改

wuxw 7 anni fa
parent
commit
d0b7aa783a

+ 2 - 0
WebService/src/main/resources/components/edit-unit/editUnit.js

@@ -4,6 +4,7 @@
         data:{
         data:{
             editUnitInfo:{
             editUnitInfo:{
                 floorId:'',
                 floorId:'',
+                unitId:'',
                 unitNum:'',
                 unitNum:'',
                 layerCount:'',
                 layerCount:'',
                 lift:'',
                 lift:'',
@@ -109,6 +110,7 @@
             refreshEditUnitInfo:function(){
             refreshEditUnitInfo:function(){
                 vc.component.editUnitInfo= {
                 vc.component.editUnitInfo= {
                   floorId:'',
                   floorId:'',
+                  unitId:'',
                   unitNum:'',
                   unitNum:'',
                   layerCount:'',
                   layerCount:'',
                   lift:'',
                   lift:'',

+ 1 - 1
java110-code-generator/src/main/java/com/java110/code/GeneratorServiceDaoImplMapperListener.java

@@ -180,7 +180,7 @@ public class GeneratorServiceDaoImplMapperListener extends BaseGenerator {
         //加入分页功能<if test="page != -1">
         //加入分页功能<if test="page != -1">
         //            limit page,row
         //            limit page,row
         //        </if>
         //        </if>
-        sqlValue += "<if test=\"page != -1\">\n";
+        sqlValue += "<if test=\"page != -1 and page != null and page != ''\">\n";
         sqlValue += "   limit page,row\n";
         sqlValue += "   limit page,row\n";
         sqlValue += "</if> \n";
         sqlValue += "</if> \n";
 
 

+ 1 - 1
java110-config/src/main/resources/mapper/unit/UnitServiceDaoImplMapper.xml

@@ -120,7 +120,7 @@ where 1 =1
 <if test="userId !=null and userId != ''">
 <if test="userId !=null and userId != ''">
    and t.user_id= #{userId}
    and t.user_id= #{userId}
 </if> 
 </if> 
-<if test="page != -1">
+<if test="page != -1 and page != null and page != ''">
    limit page,row
    limit page,row
 </if> 
 </if>