Browse Source

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

沈静伟 4 years ago
parent
commit
71b7f6ee8c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/dsb/com/cnd3b/restcontroller/customer/tagents/tagents.java

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

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