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

扫码支付错误错误修复

沈静伟 3 лет назад
Родитель
Сommit
8b68d92de1

+ 11 - 0
src/dsb/com/cnd3b/common/BaseClass.java

@@ -166,6 +166,17 @@ public class BaseClass {
         return paoSetRemote;
     }
 
+    public ArrayList<Object> getP2FieldValues(PaoSetRemote paoSetRemote, String fieldname) throws P2Exception {
+        ArrayList<Object> list = new ArrayList<>();
+        int i = 0;
+        PaoRemote pao = null;
+        while ((pao = paoSetRemote.getPao(i)) != null) {
+            list.add(pao.getDatabaseValue(fieldname));
+            i++;
+        }
+        return list;
+    }
+
 
     public HashMap<String, PaoRemote> getPaoMap(PaoSetRemote paoSetRemote, String keyfieldname) throws P2Exception {
         HashMap<String, PaoRemote> map = new HashMap<>();

+ 1 - 1
src/dsb/com/cnd3b/common/D3BReturnObject_Suc.java

@@ -71,7 +71,7 @@ public class D3BReturnObject_Suc extends D3BReturnObject {
     }
 
     public D3BReturnObject_Suc setData(String data) {
-        this.put("msg", data);
+        this.put("data", data);
         return this;
     }
 

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/webclient/workers/analysis.java

@@ -16,7 +16,7 @@ public class analysis extends Controller {
      * @return
      */
     public String worker_analysis(){
-        SQLFactory queryworker = new SQLFactory(this, "统计_经销商合伙人信息统计",pageSize,pageNumber,"t3.fsubmitcount desc");
+        SQLFactory queryworker = new SQLFactory(this, "统计_经销商合伙人信息统计",pageSize,pageNumber,"t1.tagentsid desc");
         queryworker.addParameter("siteid", siteid);
         Rows workerrows = dbConnect.runSqlQuery(queryworker.getSQL());
         return getSucReturnObject().setDataByPaging(workerrows).saveToDataPool().preloading(1).toString();

+ 29 - 24
src/dsb/com/cnd3b/utility/kujiale/kujiale.java

@@ -8,75 +8,78 @@ import com.cnd3b.utility.WebRequest;
 import java.util.ArrayList;
 
 public class kujiale {
-    private String appKey="";
-    private String appSecret="";
+    private String appKey = "";
+    private String appSecret = "";
 
-
-    public kujiale(String appKey,String appSecret){
-        this.appKey=appKey;
-        this.appSecret=appSecret;
+    public kujiale(String appKey, String appSecret) {
+        this.appKey = appKey;
+        this.appSecret = appSecret;
     }
 
     /**
      * 获取用户列表
+     *
      * @param start
      * @param num
      */
-    public  void getUserList(int start,int num) {
+    public void getUserList(int start, int num) {
         final long timestamp = System.currentTimeMillis();
         // 签名生成的两种方式之一,在有appuid入参的情况下,需要将appuid也加入计算。
         Encryption encryption = new Encryption();
         final String sign = encryption.Encode_MD5(this.appSecret + this.appKey + timestamp);
         WebRequest webRequest = new WebRequest();
-        String a = webRequest.doGet("https://openapi.kujiale.com/v2/user?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start="+start+"&num="+num);
+        String a = webRequest.doGet("https://openapi.kujiale.com/v2/user?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start=" + start + "&num=" + num);
         System.err.println(a);
     }
 
     /**
      * 获取方案分类列表
+     *
      * @param start
      * @param num
      * @param appuid
      */
-    public void getClassList(int start,int num,String appuid) {
+    public void getClassList(int start, int num, String appuid) {
         final long timestamp = System.currentTimeMillis();
         // 签名生成的两种方式之一,在有appuid入参的情况下,需要将appuid也加入计算。
         Encryption encryption = new Encryption();
-        final String sign = encryption.Encode_MD5(appSecret + appKey +appuid+ timestamp);
+        final String sign = encryption.Encode_MD5(appSecret + appKey + appuid + timestamp);
         WebRequest webRequest = new WebRequest();
-        String a = webRequest.doGet("https://openapi.kujiale.com/v2/design/tag/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start="+start+"&num="+num+"&appuid="+appuid);
+        String a = webRequest.doGet("https://openapi.kujiale.com/v2/design/tag/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start=" + start + "&num=" + num + "&appuid=" + appuid);
         System.err.println(a);
     }
 
     /**
      * 获取用户方案
+     *
      * @param start
      * @param num
      * @param appuid
      */
-    public void getDesignList(int start,int num,String appuid) {
+    public void getDesignList(int start, int num, String appuid) {
         final long timestamp = System.currentTimeMillis();
         // 签名生成的两种方式之一,在有appuid入参的情况下,需要将appuid也加入计算。
         Encryption encryption = new Encryption();
-        final String sign = encryption.Encode_MD5(appSecret + appKey +appuid+ timestamp);
+        final String sign = encryption.Encode_MD5(appSecret + appKey + appuid + timestamp);
         WebRequest webRequest = new WebRequest();
-        String a = webRequest.doGet("https://openapi.kujiale.com/v2/design/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start="+start+"&num="+num+"&appuid="+appuid);
+        String a = webRequest.doGet("https://openapi.kujiale.com/v2/design/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start=" + start + "&num=" + num + "&appuid=" + appuid);
         System.err.println(a);
     }
 
     /**
      * 获取用户方案渲染图
+     *
      * @param start
      * @param num
      * @param design_id
      */
-    public void getDesignRender(int start,int num,String design_id) {
+    public void getDesignRender(int start, int num, String design_id) {
         final long timestamp = System.currentTimeMillis();
         // 签名生成的两种方式之一,在有appuid入参的情况下,需要将appuid也加入计算。
         Encryption encryption = new Encryption();
         final String sign = encryption.Encode_MD5(appSecret + appKey + timestamp);
         WebRequest webRequest = new WebRequest();
-        String a = webRequest.doGet("https://openapi.kujiale.com/v2/renderpic/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start="+start+"&num="+num+"&design_id="+design_id);
+        String a = webRequest.doGet("https://openapi.kujiale.com/v2/renderpic/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign + "&start=" + start + "&num=" + num + "&design_id=" + design_id);
         System.err.println(a);
     }
 
@@ -94,24 +97,26 @@ public class kujiale {
 //        String a = webRequest.doGet("https://openapi.kujiale.com/v2/pano/roam/list?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign+"&appuid="+appuid +"&design_id="+design_id);
 //        System.err.println(a);
 //    }
+
     /**
      * 创建全屋漫游链接
+     *
      * @param picIds
      */
-    public void createDesignRoam(ArrayList<String>picIds) {
+    public void createDesignRoam(ArrayList<String> picIds) {
         final long timestamp = System.currentTimeMillis();
         // 签名生成的两种方式之一,在有appuid入参的情况下,需要将appuid也加入计算。
         Encryption encryption = new Encryption();
         final String sign = encryption.Encode_MD5(appSecret + appKey + timestamp);
         WebRequest webRequest = new WebRequest();
 
-        JSONObject requestObject=new JSONObject();
-        requestObject.put("override",false);
-        JSONArray picIdsArray=new JSONArray();
+        JSONObject requestObject = new JSONObject();
+        requestObject.put("override", false);
+        JSONArray picIdsArray = new JSONArray();
         picIdsArray.addAll(picIds);
-        requestObject.put("picIds",picIdsArray);
+        requestObject.put("picIds", picIdsArray);
         System.err.println(requestObject.toJSONString());
-        String a = webRequest.doPostKuJiaLe(requestObject.toJSONString(),"https://openapi.kujiale.com/v2/renderpic/pano?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign);
+        String a = webRequest.doPostKuJiaLe(requestObject.toJSONString(), "https://openapi.kujiale.com/v2/renderpic/pano?appkey=" + this.appKey + "&timestamp=" + timestamp + "&sign=" + sign);
         System.err.println(a);
     }
 
@@ -123,12 +128,12 @@ public class kujiale {
 //        new kujiale(appKey,appSecret).getDesignList(0,10,"102415");
 //        new kujiale(appKey,appSecret).getDesignRender(0,10,"3FO49BG1RTW7");
 //        new kujiale(appKey,appSecret).getDesignRoam("102415","3FO49BG1RTW7");
-        ArrayList<String>list =new ArrayList<>();
+        ArrayList<String> list = new ArrayList<>();
         list.add("3FNYSU9NDR0R");
         list.add("3FNYSUBGODHE");
         list.add("3FNYYJ5N2WH1");
         list.add("3FNYYJ63OGMH");
-        new kujiale(appKey,appSecret).createDesignRoam(list);
+        new kujiale(appKey, appSecret).createDesignRoam(list);
 
     }