public String alipaySignNet() { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); try { jsonProtocol.put(ProtocolManager.COMMAND, "login"); jsonProtocol.put(ProtocolManager.REQUESTTYPE, "alipaySign"); return InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (JSONException e) { e.printStackTrace(); } return ""; }
public String queryCashNet(String cashdetailId) { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); try { jsonProtocol.put(ProtocolManager.COMMAND, "getCash"); jsonProtocol.put(ProtocolManager.CASHTYPE, "cashDetail"); jsonProtocol.put(ProtocolManager.CASHDETAILID, cashdetailId); return InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (JSONException e) { e.printStackTrace(); } return ""; }
/** * 获取所有的开奖信息 * * @return */ public JSONObject getLotteryAllNotice() { String result = ""; try { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); result = InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); return new JSONObject(result); } catch (JSONException e) { e.printStackTrace(); // 联网失败了 } return null; }
/** 提交服务器反馈内容 */ public static String feedback(String feedbackContent, String userno) { String reValue = ""; try { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); jsonProtocol.put(ProtocolManager.FEEDBACK_CONTENT, feedbackContent); jsonProtocol.put(ProtocolManager.USERNO, userno); reValue = InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (Exception e) { // Log.e(TAG, "softwareupeate error"); } return reValue; }
/** * 查询DNA充值的方法 * * @param phonenum 公共常量:用户手机号 * @param sessionid 公共常量:服务器返回的sessionid * @param userno 公共常量:用户的userno * @return error_code 如果error_code为"000047"为message="无记录";如果error_code为"070002", message="未登录" * 如果error_code为"999999",message="操作失败";如果error_code为"000000" ,message="成功" * */ public String queryintegration(String phonenum, String sessionid, String userno) { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); try { jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); jsonProtocol.put(ProtocolManager.USERNO, userno); jsonProtocol.put(ProtocolManager.TYPE, "userCenter"); jsonProtocol.put(ProtocolManager.SESSIONID, sessionid); jsonProtocol.put(ProtocolManager.PHONE_NUM, phonenum); return InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (JSONException e) { e.printStackTrace(); } return ""; }
/** * 根据彩种和彩种的期号来获取本期号对应的开奖详情 * * @param lotno 彩种编号 * @param batchcode 彩种的期号 * @return 返回一个还有开奖详情相关数据的JSONObject对象 */ public JSONObject getNoticePrizeDetail(String lotno, String batchcode) { String result = ""; try { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); jsonProtocol.put(ProtocolManager.TYPE, "winInfoDetail"); jsonProtocol.put(ProtocolManager.LOTNO, lotno); jsonProtocol.put(ProtocolManager.BATCHCODE, batchcode); result = InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); return new JSONObject(result); } catch (Exception e) { // TODO: handle exception } return null; }
/** * 积分明细 * * @param userno 用户编号 用户注册成功返回的用户编号<br> * @param startline 开始条数<br> * @param stopline 截止条数<br> * @param pageindex 第几页,比如第二页,pageindex=2<br> * @param sessionid <br> * @return error_code | message <br> * 000000 |成功<br> * 000047 |无记录<br> * 999999 |操作失败<br> * type_memo : 交易类型<br> * amount :变动金额 金额单位为分<br> * plattime : 交易时间 <br> */ public String setupnickname(String userno, String nickname) { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); try { jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); jsonProtocol.put(ProtocolManager.USERNO, userno); jsonProtocol.put(ProtocolManager.TYPE, "updateNickName"); // jsonProtocol.put(ProtocolManager.PHONE_NUM, phonenum); jsonProtocol.put("nickName", nickname); return InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (JSONException e) { e.printStackTrace(); } return ""; }
/** 合买详情的方法 */ public static String queryLotJoincanyu( String id, String userno, String phone, String pageIndex, String maxrsult) { JSONObject jsonProtocol = ProtocolManager.getInstance().getDefaultJsonProtocol(); try { jsonProtocol.put(ProtocolManager.COMMAND, COMMAND); jsonProtocol.put(ProtocolManager.TYPE, "caseLotBuys"); jsonProtocol.put(ProtocolManager.CASEID, id); jsonProtocol.put(ProtocolManager.USERNO, userno); jsonProtocol.put(ProtocolManager.PHONE_NUM, phone); jsonProtocol.put(ProtocolManager.PAGEINDEX, pageIndex); jsonProtocol.put(ProtocolManager.MAXRESULT, maxrsult); return InternetUtils.GetMethodOpenHttpConnectSecurity( Constants.LOT_SERVER, jsonProtocol.toString()); } catch (JSONException e) { e.printStackTrace(); } return ""; }