Przeglądaj źródła

Merge remote-tracking branch 'origin/develop' into develop

沈静伟 4 lat temu
rodzic
commit
abcfb85fd7

+ 3 - 2
src/dsb/com/cnd3b/restcontroller/customer/tagents/SQL/合作经销商详情查询.sql

@@ -1,5 +1,6 @@
-select t1.fbrand, t1.fcontact, t1.faddress, t1.siteid, t1.fphonenumber, t1.fdutyparagraph, t1.saleprodclass,t2.ftype
+select top 1 t1.fbrand, t1.fcontact, t1.faddress, t1.siteid, t1.fphonenumber, t1.fdutyparagraph, t1.saleprodclass,t2.ftype,t2.createby,t1.fintroduction,t1.fagentname
 from tagents AS t1
          INNER JOIN tagents_cooperation AS t2 ON t1.tagentsid = t2.tagentsid
 where t1.siteid = $siteid$
-  and t1.tagentsid = $tagentsid$
+  and t1.tagentsid = $tagentsid$
+ORDER BY $orderby$

+ 3 - 0
src/dsb/com/cnd3b/restcontroller/customer/tagents/tagents.java

@@ -276,9 +276,12 @@ public class tagents extends Controller {
      * @return
      */
     public String query_cooperationAgentsMain() {
+
         SQLFactory sql = new SQLFactory(this, "ºÏ×÷¾­ÏúÉÌÏêÇé²éѯ");
         sql.addParameter("siteid", siteid);
         sql.addParameter("tagentsid", content.getString("tagentsid"));
+        sql.addParameter_SQL("orderby"," t2.changedate DESC,t1.changedate DESC");
+        System.err.println(sql.getSQL());
         Rows rows = dbConnect.runSqlQuery(sql.getSQL());
         for (Row row : rows) {
             row.put("saleprodclass", JSONArray.parseArray(row.getString("saleprodclass")));