姜永辉 2 rokov pred
rodič
commit
b4a4ba1701

+ 3 - 3
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -1024,7 +1024,7 @@
     </select>
     <!--获取供应商和客户数据分页-->
     <select id="getSupplierAndCustomerByPage" resultType="java.util.Map">
-        select * from(
+        select * from (
         select tms.sup_id as "objId",
         tms.sup_code as "objCode",
         tms.sup_name as "objName",
@@ -1082,7 +1082,7 @@
         ) tt
         <where>
             <if test="objType != null and objType != ''">
-                AND tt.objType = #{objType}
+                AND tt."objType" = #{objType}
             </if>
         </where>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -1149,7 +1149,7 @@
         ) tt
         <where>
             <if test="objType != null and objType != ''">
-                AND tt.objType = #{objType}
+                AND tt."objType" = #{objType}
             </if>
         </where>
     </select>

+ 6 - 0
src/main/java/com/dk/mdm/service/common/CommonService.java

@@ -284,6 +284,12 @@ public class CommonService extends BaseService<Map<String, Object>> {
         }
         param.put("start", ((int) param.get("currentPage") - 1) * (int) param.get("pageSize"));
         param.put("end", param.get("pageSize"));
+        // 选择对象的时候用
+        if (param.get("supplier-customerList")!=null
+                && param.get("supplier-customerList")!=""
+                && !(param.get("supplier-customerList") + "").contains(",") ){
+            param.put("objType", Integer.parseInt(param.get("supplier-customerList").toString())   );
+        }
         return param;
     }