Просмотр исходного кода

1:经销商信息查询时新增是否正在认证中字段
2:代码整理

沈静伟 4 лет назад
Родитель
Сommit
e23c3c571c

+ 17 - 1
src/dsb/com/cnd3b/common/Controller.java

@@ -645,11 +645,27 @@ public class Controller extends BaseClass {
     /**
      * 通知前端执行指定方法
      */
-    public void sendSystemMessage(String classname, String method) {
+    public void sendSystemWebSocketMessage(String classname, String method) {
         JSONObject methodobject = new JSONObject();
         methodobject.put("type", "callmethod");
         methodobject.put("classname", classname);
         methodobject.put("method", method);
         parameter.websocketClients.get(userid).sendSystemMessage(methodobject);
     }
+
+
+    /**
+     * 生成系统消息
+     *
+     * @param userid   用户ID,传0表示全部用户
+     * @param fmessage 消息内容
+     */
+    public String createSystemMessage(long userid, String fmessage) {
+        SQLFactory factory = new SQLFactory("系统消息插入");
+        factory.addParameter("siteid", siteid);
+        factory.addParameter("ftype", "系统");
+        factory.addParameter("fmessage", fmessage);
+        factory.addParameter("tenterprise_userid", userid);
+        return dbConnect.runSqlUpdate(factory.getSQL());
+    }
 }

+ 0 - 0
src/dsb/com/cnd3b/restcontroller/system/message/SQL/消息插入.sql → src/dsb/com/cnd3b/common/data/SQL/系统消息插入.sql


+ 2 - 0
src/dsb/com/cnd3b/restcontroller/customer/tagents/SQL/经销商修改申请查询.sql

@@ -0,0 +1,2 @@
+select t1.changedate,t1.fchangemsg,t1.ftype from tagents_msgchangeapp t1
+where t1.siteid =$siteid$ and tagentsid=$tagentsid$ and t1.fstatus='ÉêÇë' and ftype='ÉÌ»§ÈÏÖ¤'

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

@@ -35,6 +35,12 @@ public class tagents extends Controller {
             Rows prodclassrows = dbConnect.runSqlQuery(saleprodclass.getSQL());
             row.put("saleprodclass", prodclassrows.toArray("fprodclassname"));
             row.put("attinfos", getAttachmentUrl("tagents", String.valueOf(tagentsid), "brandlogo"));
+
+            SQLFactory modifyapp = new SQLFactory(this, "¾­ÏúÉÌÐÞ¸ÄÉêÇë²éѯ");
+            modifyapp.addParameter("siteid", siteid);
+            modifyapp.addParameter("tagentsid", tagentsid);
+            Rows modifyapprows = dbConnect.runSqlQuery(modifyapp.getSQL());
+            row.put("fisauthenticating", modifyapprows.isEmpty() ? 0 : 1);
         }
         return getSucReturnObject().setData(rows).toString();
     }

+ 0 - 17
src/dsb/com/cnd3b/restcontroller/system/message/Message.java

@@ -52,21 +52,4 @@ public class Message extends Controller {
         Rows rows = dbConnect.runSqlQuery(unread.getSQL());
         return getSucReturnObject().setData(rows).toString();
     }
-
-
-    /**
-     * 消息发送
-     *
-     * @param userid   用户ID,传0表示全部用户
-     * @param ftype    消息类型,素材|系统
-     * @param fmessage 消息内容
-     */
-    public String createMessage(Long userid, String ftype, String fmessage) {
-        SQLFactory factory = new SQLFactory(this, "消息插入");
-        factory.addParameter("siteid", siteid);
-        factory.addParameter("ftype", ftype);
-        factory.addParameter("fmessage", fmessage);
-        factory.addParameter("tenterprise_userid", userid);
-        return dbConnect.runSqlUpdate(factory.getSQL());
-    }
 }