Przeglądaj źródła

增加验证合作商户的合法性

沈静伟 4 lat temu
rodzic
commit
71b7f6ee8c

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

@@ -185,6 +185,9 @@ public class tagents extends Controller {
         if (tcooperationagentsid == tagentsid) {
         if (tcooperationagentsid == tagentsid) {
             return getErrReturnObject().setErrMsg("无法和自己建立合作关系!").toString();
             return getErrReturnObject().setErrMsg("无法和自己建立合作关系!").toString();
         }
         }
+        if(dbConnect.runSqlQuery("select *from tagents where tagentsid='"+tcooperationagentsid+"'").isEmpty()){
+            return getErrReturnObject().setErrMsg("找不到该合作商户信息!").toString();
+        }
         int ftype = content.getInteger("ftype");//合作类型
         int ftype = content.getInteger("ftype");//合作类型
         PaoSetRemote tagents_cooperationSet = getP2ServerSystemPaoSet("tagents_cooperation", "tagentsid='" + tcooperationagentsid + "' and tcooperationagentsid='" + tagentsid + "'");
         PaoSetRemote tagents_cooperationSet = getP2ServerSystemPaoSet("tagents_cooperation", "tagentsid='" + tcooperationagentsid + "' and tcooperationagentsid='" + tagentsid + "'");
         if (!tagents_cooperationSet.isEmpty()) {
         if (!tagents_cooperationSet.isEmpty()) {