Selaa lähdekoodia

供需列表查询根据状态进行排序

沈静伟 4 vuotta sitten
vanhempi
commit
b3123236dc

+ 4 - 4
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/supplyanddemand.java

@@ -27,8 +27,8 @@ public class supplyanddemand extends Controller {
         /**
          *排序条件设置
          */
-        String[] sortfield = {"t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
-        String sort = getSort(sortfield, "t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
+        String[] sortfield = {"case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
+        String sort = getSort(sortfield, "case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
         /**
          * 过滤条件设置
          */
@@ -130,8 +130,8 @@ public class supplyanddemand extends Controller {
         /**
          *排序条件设置
          */
-        String[] sortfield = {"t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
-        String sort = getSort(sortfield, "t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
+        String[] sortfield = {"case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
+        String sort = getSort(sortfield, "case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
         /**
          * 过滤条件设置
          */

+ 2 - 2
src/dsb/com/cnd3b/restcontroller/enterprise/supplyanddemand/supplyanddemand.java

@@ -19,8 +19,8 @@ public class supplyanddemand extends Controller {
         /**
          *排序条件设置
          */
-        String[] sortfield = {"t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
-        String sort = getSort(sortfield, "t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
+        String[] sortfield = {"case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc"};
+        String sort = getSort(sortfield, "case when t1.fstatus='已解决'then 0 when t1.fstatus='对接中'then 1 else 2 end desc, t1.tsupplyanddemandid desc");
         /**
          * 过滤条件设置
          */