|
|
@@ -24,10 +24,10 @@ public class OrderService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 提交订单
|
|
|
+ * 提交订单
|
|
|
*/
|
|
|
- public static Callback.Cancelable submitOrder(ModelOrder order,String workName,String contact,String phone,String workAddr,String mark, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ public static Callback.Cancelable submitOrder(ModelOrder order, String workName, String contact, String phone, String workAddr, String mark, RequestCallback callback) {
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "doPutOrder");
|
|
|
params.addQueryStringParameter("PK", user.pk);
|
|
|
@@ -36,15 +36,15 @@ public class OrderService {
|
|
|
params.addQueryStringParameter("LederPK", "0");
|
|
|
params.addQueryStringParameter("ODate", DateUtils.formatHourDate(order.startTime));
|
|
|
params.addQueryStringParameter("SDate", DateUtils.formatHourDate(order.endTime));
|
|
|
- params.addQueryStringParameter("SCount","" + order.hour);
|
|
|
- params.addQueryStringParameter("SName",workName);
|
|
|
- params.addQueryStringParameter("SPrice",order.skill.price);
|
|
|
- params.addQueryStringParameter("coin",""+ String.valueOf(order.totalPrice));
|
|
|
- params.addQueryStringParameter("OrderState","0");
|
|
|
- params.addQueryStringParameter("intro",mark);
|
|
|
- params.addQueryStringParameter("skillpk",order.skill.skillpk);
|
|
|
+ params.addQueryStringParameter("SCount", "" + order.hour);
|
|
|
+ params.addQueryStringParameter("SName", workName);
|
|
|
+ params.addQueryStringParameter("SPrice", order.skill.price);
|
|
|
+ params.addQueryStringParameter("coin", "" + String.valueOf(order.totalPrice));
|
|
|
+ params.addQueryStringParameter("OrderState", "0");
|
|
|
+ params.addQueryStringParameter("intro", mark);
|
|
|
+ params.addQueryStringParameter("skillpk", order.skill.skillpk);
|
|
|
params.addQueryStringParameter("linkman", contact);
|
|
|
- params.addQueryStringParameter("linkphone",phone);
|
|
|
+ params.addQueryStringParameter("linkphone", phone);
|
|
|
params.addQueryStringParameter("addr", workAddr);
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
@@ -72,31 +72,30 @@ public class OrderService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static Callback.Cancelable getOrderList(String state,int page, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ public static Callback.Cancelable getOrderList(String state, int page, RequestCallback callback) {
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "doGetOrder");
|
|
|
params.addQueryStringParameter("pk", user.pk);
|
|
|
params.addQueryStringParameter("state", state);
|
|
|
- params.addQueryStringParameter("index", page+"");
|
|
|
- params.addQueryStringParameter("size", Constants.PAGE_SIZE+"");
|
|
|
+ params.addQueryStringParameter("index", page + "");
|
|
|
+ params.addQueryStringParameter("size", Constants.PAGE_SIZE + "");
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
|
|
|
public static Callback.Cancelable getVideoOrder(int page, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "getMemberVideoRecordOrder");
|
|
|
params.addQueryStringParameter("memberpk", user.pk);
|
|
|
- params.addQueryStringParameter("index", page+"");
|
|
|
- params.addQueryStringParameter("size", Constants.PAGE_SIZE+"");
|
|
|
+ params.addQueryStringParameter("index", page + "");
|
|
|
+ params.addQueryStringParameter("size", Constants.PAGE_SIZE + "");
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
public static Callback.Cancelable beginVChat(String modelPk, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "dobegvchat");
|
|
|
params.addQueryStringParameter("pk", user.pk);
|
|
|
@@ -107,7 +106,7 @@ public class OrderService {
|
|
|
}
|
|
|
|
|
|
public static Callback.Cancelable answerVChat(String modelPk, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "doansvchat");
|
|
|
params.addQueryStringParameter("videopk", "0");
|
|
|
@@ -122,7 +121,7 @@ public class OrderService {
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "doendvchat");
|
|
|
params.addQueryStringParameter("videopk", videoPk);
|
|
|
- params.addQueryStringParameter("duration", ""+duration);
|
|
|
+ params.addQueryStringParameter("duration", "" + duration);
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
|
|
|
@@ -130,24 +129,25 @@ public class OrderService {
|
|
|
RequestParams params = getRequestParams();
|
|
|
params.addQueryStringParameter("action", "dovchattest");
|
|
|
params.addQueryStringParameter("videopk", videoPk);
|
|
|
- params.addQueryStringParameter("duration", ""+duration);
|
|
|
+ params.addQueryStringParameter("duration", "" + duration);
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 支付宝提交订单
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
public static Callback.Cancelable alipay(float money, RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
- RequestParams params = new RequestParams(HttpApi.BASE_URL + "pay");
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ RequestParams params = new RequestParams(HttpApi.BASE_URL + "pay");
|
|
|
params.addQueryStringParameter("action", "alipay");
|
|
|
params.addQueryStringParameter("memberpk", user.pk);
|
|
|
- params.addQueryStringParameter("totalamount", ""+money);
|
|
|
+ params.addQueryStringParameter("totalamount", "" + money);
|
|
|
params.addQueryStringParameter("timeoutexpress", "3m");
|
|
|
params.addQueryStringParameter("body", "账户充值");
|
|
|
- params.addQueryStringParameter("subject", "充值金额"+money);
|
|
|
+ params.addQueryStringParameter("subject", "充值金额" + money);
|
|
|
return HttpApi.GET(params, callback);
|
|
|
}
|
|
|
|
|
|
@@ -155,9 +155,9 @@ public class OrderService {
|
|
|
/**
|
|
|
* 支付宝成功回调
|
|
|
*/
|
|
|
- public static Callback.Cancelable alipayResult(String payPk, String outtradeno, int result,RequestCallback callback) {
|
|
|
- LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
- RequestParams params = new RequestParams(HttpApi.BASE_URL + "pay");
|
|
|
+ public static Callback.Cancelable alipayResult(String payPk, String outtradeno, int result, RequestCallback callback) {
|
|
|
+ LoginUser user = ChmoApplication.getApp().getLoginUser();
|
|
|
+ RequestParams params = new RequestParams(HttpApi.BASE_URL + "pay");
|
|
|
params.addQueryStringParameter("action", "alipaycallback");
|
|
|
params.addQueryStringParameter("pk", payPk);
|
|
|
params.addQueryStringParameter("outtradeno", outtradeno);
|