admin
2019-07-15 be44007f1ffdd4d391fd360dce24a3423e37bcc6
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java
@@ -1946,9 +1946,38 @@
   }
   /**
    * 淘口令转商品ID
    *
    * @param token
    * @return
    */
   public static Long tokenConvertAuctionId(String token) {
      Map<String, String> map = new HashMap<>();
      map.put("method", "taobao.tbk.tpwd.convert");
      map.put("password_content", token);
      map.put("adzone_id", TaoBaoConstant.TAOBAO_SPECIAL_PID_DEFAULT.split("_")[3]);
      TaoKeAppInfo app = new TaoKeAppInfo();
      app.setAppKey(TaoBaoConstant.TAOBAO_AUTH_APPKEY);
      app.setAppSecret(TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
      try {
         JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
         try {
            return json.optJSONObject("tbk_tpwd_convert_response").optJSONObject("data").optLong("num_iid");
         } catch (Exception e) {
            return null;
         }
      } catch (TaoKeApiException e) {
         e.printStackTrace();
      }
      return null;
   }
   // 淘礼金创建
   public static TaoLiJinDTO createTaoLiJin(Long auctionId, String name, BigDecimal perface, int totalNum,
         Date sendStartTime, Date sendEndTime, Date useStartTime, Date useEndTime,TaoKeAppInfo app) throws TaoKeApiException{
         Date sendStartTime, Date sendEndTime, Date useStartTime, Date useEndTime, TaoKeAppInfo app)
         throws TaoKeApiException {
      Map<String, String> map = new HashMap<>();
      map.put("method", "taobao.tbk.dg.vegas.tlj.create");
      map.put("adzone_id", app.getPid().split("_")[3]);
@@ -1959,7 +1988,6 @@
      map.put("security_switch", "false");
      map.put("per_face", perface.toString());
      map.put("send_start_time", TimeUtil.getGernalTime(sendStartTime.getTime(), "yyyy-MM-dd HH:mm:ss"));
      
      if(sendEndTime != null)
         map.put("send_end_time", TimeUtil.getGernalTime(sendEndTime.getTime(), "yyyy-MM-dd HH:mm:ss"));
@@ -2011,7 +2039,6 @@
      return null;
   }
   // 淘礼金报告
   public static UserTaoLiJinReport getTaoLiJinEffective(String rightsId) {
      Map<String, String> map = new HashMap<>();
@@ -2028,7 +2055,6 @@
         System.out.println(json);
         
         JSONObject root = json.optJSONObject("tbk_dg_vegas_tlj_instance_report_response");
         
         if (root != null && root.optJSONObject("result") != null) {
            if (root.optJSONObject("result").optBoolean("success")) {