|
@@ -12,234 +12,244 @@ import com.iamberry.wechat.core.entity.order.OrderOperation;
|
|
|
@Component
|
|
|
public class OrderUtil {
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- public final String[] orderStatusStrList =
|
|
|
- {
|
|
|
- "quitOrder", "etcOrder", "paySuccess", "returnOrder",
|
|
|
- "returnOrderSuccess", "sendOrder", "returnOrderEtc", "returnOrderEtcAdmin", "returnOrderThe",
|
|
|
- "theOrderSuccess", "theOrderSuccessAdmin", "inOrder", "inFinish"
|
|
|
- };
|
|
|
-
|
|
|
- public String[] getOrderStatusStrList() {
|
|
|
- return orderStatusStrList;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public final String[] orderStatusView =
|
|
|
- {
|
|
|
- "取消订单", "待支付", "已支付、待发货", "退款申请中",
|
|
|
- "已退款", "已发货", "申请退货中", "退货中", "订单退货,订单关闭" ,
|
|
|
- "换货中", "换货完成", "申请换货中", "已完成"
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
- private final String [] orderActin =
|
|
|
- {
|
|
|
- "quitOrderAction",
|
|
|
- "getShopOrderByOrderId",
|
|
|
- "sendOrder",
|
|
|
- "remark",
|
|
|
- "rejectedRefund",
|
|
|
- "agreedRefund",
|
|
|
- "rejectedOrder",
|
|
|
- "agreedOrder",
|
|
|
- "successInOrder",
|
|
|
- "insertPostInfoAndSend",
|
|
|
- "rejectedReturn",
|
|
|
- "rejectedInOrder",
|
|
|
- "select_efast_order"
|
|
|
- };
|
|
|
-
|
|
|
- public String[] getOrderActin() {
|
|
|
- return orderActin;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public final MD5 md5 = new MD5("orderact");
|
|
|
-
|
|
|
-
|
|
|
- private AdminUtils adminUtils;
|
|
|
- public void setAdminUtils(AdminUtils adminUtils) {
|
|
|
- this.adminUtils = adminUtils;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- * 根据订单因为标识,获取订单的数字标识
|
|
|
- * @param status
|
|
|
- * @return
|
|
|
- */
|
|
|
- public Integer getOrderStatusByStr(String status) {
|
|
|
- for(int i = 0; i < orderStatusStrList.length; i++) {
|
|
|
- if (orderStatusStrList[i].equals(status)) {
|
|
|
- return i;
|
|
|
- }
|
|
|
- }
|
|
|
- return 2;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- * 转换订单类型为字母表示
|
|
|
- * @param orderStatus
|
|
|
- * @return
|
|
|
- */
|
|
|
- public String orderStatusIntToOrderStatusString(Integer orderStatus) {
|
|
|
- if (orderStatus == null || orderStatus >= orderStatusStrList.length) {
|
|
|
- return "订单状态有误";
|
|
|
- }
|
|
|
- if (orderStatus == -1) {
|
|
|
- return "allOrder";
|
|
|
- }
|
|
|
- return orderStatusStrList[orderStatus];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- * 订单状态修改为文字
|
|
|
- * @param status
|
|
|
- * @return
|
|
|
- */
|
|
|
- public String orderStatusToString(Integer status) {
|
|
|
-
|
|
|
- if (status == null || status >= orderStatusView.length) {
|
|
|
- return "订单状态有误";
|
|
|
- }
|
|
|
-
|
|
|
- if (status == -1) {
|
|
|
- return "所有订单";
|
|
|
- }
|
|
|
-
|
|
|
- return orderStatusView[status];
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- * 后台:根据订单状态,获取订单的操作
|
|
|
- * @param status
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- public List<OrderOperation> orderStatusToOperation(Integer status, String orderId) throws Exception {
|
|
|
- if (status == null) {
|
|
|
- return null;
|
|
|
- }
|
|
|
-
|
|
|
- List<OrderOperation> operations = new ArrayList<OrderOperation>();
|
|
|
-
|
|
|
- OrderOperation orderDesc = new OrderOperation("", "查看订单详情",
|
|
|
- "/admin/order/" + orderActin[1] + "/" + orderId);
|
|
|
- operations.add(orderDesc);
|
|
|
- OrderOperation orderRemank = new OrderOperation("", "备注",
|
|
|
- "/admin/order/" + orderActin[3] + "/" + orderId);
|
|
|
- operations.add(orderRemank);
|
|
|
- OrderOperation orderSync = new OrderOperation("", "同步订单状态", "/admin/order/" + orderActin[12] + "/" + orderId + "/1");
|
|
|
- operations.add(orderSync);
|
|
|
-
|
|
|
- switch (status) {
|
|
|
- case 0:
|
|
|
- return operations;
|
|
|
- case 1:
|
|
|
-
|
|
|
- OrderOperation operation1 = new OrderOperation("", "取消订单" ,
|
|
|
- "/admin/order/" + orderActin[0] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=quitOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[0] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(operation1);
|
|
|
- case 2:
|
|
|
-
|
|
|
- OrderOperation operation3 = new OrderOperation("", "发货" ,
|
|
|
- "/admin/order/" + orderActin[2] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[2] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(operation3);
|
|
|
- return operations;
|
|
|
- case 3:
|
|
|
-
|
|
|
- OrderOperation returnPay = new OrderOperation("", "驳回退款" ,
|
|
|
- "/admin/order/" + orderActin[4] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=paySuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[4] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(returnPay);
|
|
|
- OrderOperation agreedRefund = new OrderOperation("", "确认退款" ,
|
|
|
- "/admin/order/" + orderActin[5] + "/" +orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=returnOrderSuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[5] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(agreedRefund);
|
|
|
- return operations;
|
|
|
- case 4:
|
|
|
-
|
|
|
- return operations;
|
|
|
- case 5:
|
|
|
-
|
|
|
- return operations;
|
|
|
- case 6:
|
|
|
-
|
|
|
- OrderOperation ruturnOrderError = new OrderOperation("", "同意退货,等待收货" ,
|
|
|
- "/admin/order/" + orderActin[6] + "/" + orderId + "?orderStatus=" +
|
|
|
- orderStatusStrList[status] + "&toOrderStatus=returnOrderEtcAdmin&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[6] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(ruturnOrderError);
|
|
|
- OrderOperation rejectedReturn = new OrderOperation("", "驳回退货" ,
|
|
|
- "/admin/order/" + orderActin[10] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[10] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(rejectedReturn);
|
|
|
- return operations;
|
|
|
- case 7:
|
|
|
-
|
|
|
- OrderOperation quitOrderSuccess = new OrderOperation("", "确认退货,已经收到货物" ,
|
|
|
- "/admin/order/" + orderActin[7] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=returnOrderThe&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[7] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(quitOrderSuccess);
|
|
|
- return operations;
|
|
|
- case 8:
|
|
|
-
|
|
|
- return operations;
|
|
|
- case 9:
|
|
|
-
|
|
|
- OrderOperation inOrderSuccess = new OrderOperation("", "录入物流信息并发货" ,
|
|
|
- "/admin/order/" + orderActin[9] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[9] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(inOrderSuccess);
|
|
|
- return operations;
|
|
|
- case 11:
|
|
|
-
|
|
|
- OrderOperation inOrder = new OrderOperation("", "同意换货" ,
|
|
|
- "/admin/order/" + orderActin[8] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=theOrderSuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[8] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(inOrder);
|
|
|
- OrderOperation rejectedInOrder = new OrderOperation("", "驳回换货" ,
|
|
|
- "/admin/order/" + orderActin[11] + "/" + orderId + "?orderStatus="
|
|
|
- + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[11] + "-"
|
|
|
- + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
- operations.add(rejectedInOrder);
|
|
|
- return operations;
|
|
|
-
|
|
|
- case 12:
|
|
|
-
|
|
|
- return operations;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- return operations;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ public final String[] orderStatusStrList =
|
|
|
+ {
|
|
|
+ "quitOrder", "etcOrder", "paySuccess", "returnOrder",
|
|
|
+ "returnOrderSuccess", "sendOrder", "returnOrderEtc", "returnOrderEtcAdmin", "returnOrderThe",
|
|
|
+ "theOrderSuccess", "theOrderSuccessAdmin", "inOrder", "inFinish"
|
|
|
+ };
|
|
|
+
|
|
|
+ public String[] getOrderStatusStrList() {
|
|
|
+ return orderStatusStrList;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public final String[] orderStatusView =
|
|
|
+ {
|
|
|
+ "取消订单", "待支付", "已支付、待发货", "退款申请中",
|
|
|
+ "已退款", "已发货", "申请退货中", "退货中", "订单退货,订单关闭",
|
|
|
+ "换货中", "换货完成", "申请换货中", "已完成"
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ private final String[] orderActin =
|
|
|
+ {
|
|
|
+ "quitOrderAction",
|
|
|
+ "getShopOrderByOrderId",
|
|
|
+ "sendOrder",
|
|
|
+ "remark",
|
|
|
+ "rejectedRefund",
|
|
|
+ "agreedRefund",
|
|
|
+ "rejectedOrder",
|
|
|
+ "agreedOrder",
|
|
|
+ "successInOrder",
|
|
|
+ "insertPostInfoAndSend",
|
|
|
+ "rejectedReturn",
|
|
|
+ "rejectedInOrder",
|
|
|
+ "select_efast_order"
|
|
|
+ };
|
|
|
+
|
|
|
+ public String[] getOrderActin() {
|
|
|
+ return orderActin;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public final MD5 md5 = new MD5("orderact");
|
|
|
+
|
|
|
+
|
|
|
+ private AdminUtils adminUtils;
|
|
|
+
|
|
|
+ public void setAdminUtils(AdminUtils adminUtils) {
|
|
|
+ this.adminUtils = adminUtils;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 根据订单因为标识,获取订单的数字标识
|
|
|
+ *
|
|
|
+ * @param status
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer getOrderStatusByStr(String status) {
|
|
|
+ for (int i = 0; i < orderStatusStrList.length; i++) {
|
|
|
+ if (orderStatusStrList[i].equals(status)) {
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 2;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 转换订单类型为字母表示
|
|
|
+ *
|
|
|
+ * @param orderStatus
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String orderStatusIntToOrderStatusString(Integer orderStatus) {
|
|
|
+ if (orderStatus == null || orderStatus >= orderStatusStrList.length) {
|
|
|
+ return "订单状态有误";
|
|
|
+ }
|
|
|
+ if (orderStatus == -1) {
|
|
|
+ return "allOrder";
|
|
|
+ }
|
|
|
+ return orderStatusStrList[orderStatus];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 订单状态修改为文字
|
|
|
+ *
|
|
|
+ * @param status
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String orderStatusToString(Integer status) {
|
|
|
+
|
|
|
+ if (status == null || status >= orderStatusView.length) {
|
|
|
+ return "订单状态有误";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (status == -1) {
|
|
|
+ return "所有订单";
|
|
|
+ }
|
|
|
+
|
|
|
+ return orderStatusView[status];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * 后台:根据订单状态,获取订单的操作
|
|
|
+ *
|
|
|
+ * @param status
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ public List<OrderOperation> orderStatusToOperation(Integer status, String orderId) throws Exception {
|
|
|
+ if (status == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<OrderOperation> operations = new ArrayList<OrderOperation>();
|
|
|
+
|
|
|
+ OrderOperation orderDesc = new OrderOperation("", "查看订单详情",
|
|
|
+ "/admin/order/" + orderActin[1] + "/" + orderId);
|
|
|
+ operations.add(orderDesc);
|
|
|
+ OrderOperation orderRemank = new OrderOperation("", "备注",
|
|
|
+ "/admin/order/" + orderActin[3] + "/" + orderId);
|
|
|
+ operations.add(orderRemank);
|
|
|
+
|
|
|
+
|
|
|
+ switch (status) {
|
|
|
+ case 0:
|
|
|
+ return operations;
|
|
|
+ case 1:
|
|
|
+
|
|
|
+ OrderOperation operation1 = new OrderOperation("", "取消订单",
|
|
|
+ "/admin/order/" + orderActin[0] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=quitOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[0] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(operation1);
|
|
|
+ return operations;
|
|
|
+ case 2:
|
|
|
+
|
|
|
+ OrderOperation operation3 = new OrderOperation("", "发货",
|
|
|
+ "/admin/order/" + orderActin[2] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[2] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(operation3);
|
|
|
+
|
|
|
+ OrderOperation orderSync = new OrderOperation("", "同步订单状态", "/admin/order/" + orderActin[12] + "/" + orderId + "/1");
|
|
|
+ operations.add(orderSync);
|
|
|
+
|
|
|
+ return operations;
|
|
|
+ case 3:
|
|
|
+
|
|
|
+ OrderOperation returnPay = new OrderOperation("", "驳回退款",
|
|
|
+ "/admin/order/" + orderActin[4] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=paySuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[4] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(returnPay);
|
|
|
+ OrderOperation agreedRefund = new OrderOperation("", "确认退款",
|
|
|
+ "/admin/order/" + orderActin[5] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=returnOrderSuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[5] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(agreedRefund);
|
|
|
+ return operations;
|
|
|
+ case 4:
|
|
|
+
|
|
|
+ return operations;
|
|
|
+ case 5:
|
|
|
+
|
|
|
+ return operations;
|
|
|
+ case 6:
|
|
|
+
|
|
|
+ OrderOperation ruturnOrderError = new OrderOperation("", "同意退货,等待收货",
|
|
|
+ "/admin/order/" + orderActin[6] + "/" + orderId + "?orderStatus=" +
|
|
|
+ orderStatusStrList[status] + "&toOrderStatus=returnOrderEtcAdmin&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[6] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(ruturnOrderError);
|
|
|
+ OrderOperation rejectedReturn = new OrderOperation("", "驳回退货",
|
|
|
+ "/admin/order/" + orderActin[10] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[10] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(rejectedReturn);
|
|
|
+ return operations;
|
|
|
+ case 7:
|
|
|
+
|
|
|
+ OrderOperation quitOrderSuccess = new OrderOperation("", "确认退货,已经收到货物",
|
|
|
+ "/admin/order/" + orderActin[7] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=returnOrderThe&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[7] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(quitOrderSuccess);
|
|
|
+ return operations;
|
|
|
+ case 8:
|
|
|
+
|
|
|
+ return operations;
|
|
|
+ case 9:
|
|
|
+
|
|
|
+ OrderOperation inOrderSuccess = new OrderOperation("", "录入物流信息并发货",
|
|
|
+ "/admin/order/" + orderActin[9] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[9] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(inOrderSuccess);
|
|
|
+ return operations;
|
|
|
+ case 11:
|
|
|
+
|
|
|
+ OrderOperation inOrder = new OrderOperation("", "同意换货",
|
|
|
+ "/admin/order/" + orderActin[8] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=theOrderSuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[8] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(inOrder);
|
|
|
+ OrderOperation rejectedInOrder = new OrderOperation("", "驳回换货",
|
|
|
+ "/admin/order/" + orderActin[11] + "/" + orderId + "?orderStatus="
|
|
|
+ + orderStatusStrList[status] + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[11] + "-"
|
|
|
+ + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ operations.add(rejectedInOrder);
|
|
|
+ return operations;
|
|
|
+
|
|
|
+ case 12:
|
|
|
+
|
|
|
+ return operations;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return operations;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
* 后台:根据租赁订单状态,获取租赁订单的操作
|
|
|
+ *
|
|
|
* @param status
|
|
|
* @return
|
|
|
- * @throws Exception
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
public List<OrderOperation> rentOrderStatusToOperation(Integer status, String orderId) throws Exception {
|
|
|
if (status == null) {
|
|
@@ -248,42 +258,42 @@ public class OrderUtil {
|
|
|
|
|
|
List<OrderOperation> operations = new ArrayList<OrderOperation>();
|
|
|
|
|
|
- OrderOperation orderDesc = new OrderOperation("", "查看订单详情", "/admin/rent_order/" + orderActin[1] + "/" + orderId);
|
|
|
+ OrderOperation orderDesc = new OrderOperation("", "查看订单详情", "/admin/rent_order/" + orderActin[1] + "/" + orderId);
|
|
|
operations.add(orderDesc);
|
|
|
- OrderOperation orderRemank = new OrderOperation("", "备注", "/admin/rent_order/" + orderActin[3] + "/" + orderId);
|
|
|
+ OrderOperation orderRemank = new OrderOperation("", "备注", "/admin/rent_order/" + orderActin[3] + "/" + orderId);
|
|
|
operations.add(orderRemank);
|
|
|
- OrderOperation orderSync = new OrderOperation("", "同步订单状态", "/admin/rent/efast/" + orderActin[12] + "/" + orderId + "/1");
|
|
|
- operations.add(orderSync);
|
|
|
+ OrderOperation orderSync = new OrderOperation("", "同步订单状态", "/admin/rent/efast/" + orderActin[12] + "/" + orderId + "/1");
|
|
|
+ operations.add(orderSync);
|
|
|
|
|
|
switch (status) {
|
|
|
case 0:
|
|
|
return operations;
|
|
|
case 1:
|
|
|
- OrderOperation operation1 = new OrderOperation("", "取消订单" ,
|
|
|
- "/admin/rent_order/" + orderActin[0]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status] + "&toOrderStatus=quitOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[0] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation operation1 = new OrderOperation("", "取消订单",
|
|
|
+ "/admin/rent_order/" + orderActin[0]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status] + "&toOrderStatus=quitOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[0] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(operation1);
|
|
|
case 2:
|
|
|
- OrderOperation operation3 = new OrderOperation("", "发货" ,
|
|
|
- "/admin/rent_order/" + orderActin[2] +
|
|
|
- "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[2] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation operation3 = new OrderOperation("", "发货",
|
|
|
+ "/admin/rent_order/" + orderActin[2] +
|
|
|
+ "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[2] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(operation3);
|
|
|
return operations;
|
|
|
case 3:
|
|
|
- OrderOperation returnPay = new OrderOperation("", "驳回退款" ,
|
|
|
- "/admin/rent_order/" + orderActin[4]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=paySuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[4] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation returnPay = new OrderOperation("", "驳回退款",
|
|
|
+ "/admin/rent_order/" + orderActin[4]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=paySuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[4] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(returnPay);
|
|
|
- OrderOperation agreedRefund = new OrderOperation("", "确认退款" ,
|
|
|
- "/admin/rent_order/" + orderActin[5]
|
|
|
- + "/" +orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=returnOrderSuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[5] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation agreedRefund = new OrderOperation("", "确认退款",
|
|
|
+ "/admin/rent_order/" + orderActin[5]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=returnOrderSuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[5] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(agreedRefund);
|
|
|
return operations;
|
|
|
case 4:
|
|
@@ -291,49 +301,49 @@ public class OrderUtil {
|
|
|
case 5:
|
|
|
return operations;
|
|
|
case 6:
|
|
|
- OrderOperation ruturnOrderError = new OrderOperation("", "同意退货,等待收货" ,
|
|
|
- "/admin/rent_order/" + orderActin[6]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=returnOrderEtcAdmin&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[6] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation ruturnOrderError = new OrderOperation("", "同意退货,等待收货",
|
|
|
+ "/admin/rent_order/" + orderActin[6]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=returnOrderEtcAdmin&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[6] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(ruturnOrderError);
|
|
|
- OrderOperation rejectedReturn = new OrderOperation("", "驳回退货" ,
|
|
|
- "/admin/rent_order/" + orderActin[10]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[10] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation rejectedReturn = new OrderOperation("", "驳回退货",
|
|
|
+ "/admin/rent_order/" + orderActin[10]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[10] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(rejectedReturn);
|
|
|
return operations;
|
|
|
case 7:
|
|
|
- OrderOperation quitOrderSuccess = new OrderOperation("", "确认退货,已经收到货物" ,
|
|
|
- "/admin/rent_order/" + orderActin[7]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=returnOrderThe&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[7] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation quitOrderSuccess = new OrderOperation("", "确认退货,已经收到货物",
|
|
|
+ "/admin/rent_order/" + orderActin[7]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=returnOrderThe&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[7] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(quitOrderSuccess);
|
|
|
return operations;
|
|
|
case 8:
|
|
|
return operations;
|
|
|
case 9:
|
|
|
OrderOperation inOrderSuccess = new OrderOperation("", "录入物流信息并发货",
|
|
|
- "/admin/rent_order/" + orderActin[9]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[9] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ "/admin/rent_order/" + orderActin[9]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[9] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(inOrderSuccess);
|
|
|
return operations;
|
|
|
case 11:
|
|
|
- OrderOperation inOrder = new OrderOperation("", "同意换货" ,
|
|
|
- "/admin/rent_order/" + orderActin[8]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=theOrderSuccess&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[8] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation inOrder = new OrderOperation("", "同意换货",
|
|
|
+ "/admin/rent_order/" + orderActin[8]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=theOrderSuccess&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[8] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(inOrder);
|
|
|
- OrderOperation rejectedInOrder = new OrderOperation("", "驳回换货" ,
|
|
|
- "/admin/rent_order/" + orderActin[11]
|
|
|
- + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
- + "&toOrderStatus=sendOrder&osid="
|
|
|
- + md5.encrypt(orderId + "_" + orderActin[11] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
+ OrderOperation rejectedInOrder = new OrderOperation("", "驳回换货",
|
|
|
+ "/admin/rent_order/" + orderActin[11]
|
|
|
+ + "/" + orderId + "?orderStatus=" + orderStatusStrList[status]
|
|
|
+ + "&toOrderStatus=sendOrder&osid="
|
|
|
+ + md5.encrypt(orderId + "_" + orderActin[11] + "-" + adminUtils.byte2hex(adminUtils.createRandomByte())));
|
|
|
operations.add(rejectedInOrder);
|
|
|
return operations;
|
|
|
case 12:
|