Compare commits
No commits in common. "c76f39f0d0e54e6a214bc3965be2bb662ba568ed" and "86a1109333ddf4c2f90217ba3ff3eee176ebf5a9" have entirely different histories.
c76f39f0d0
...
86a1109333
@ -221,7 +221,7 @@ class CheckController extends PublicController
|
|||||||
*/
|
*/
|
||||||
public function getOrderList()
|
public function getOrderList()
|
||||||
{
|
{
|
||||||
$field = array('order_sn,food_sn,total_weight,total_num,total_price,transport_price,pack_price,refund_price,receiver,tel,receive_site_id,receive_site_name,remark,product_snapshot,main_status,shipment_status,refund_status,refund_remark,order_time,paid_time,refunded_time,completed_time,received_time,shipped_time,delivered_time,refundapply_time,refundagree_time,rejected_time');
|
$field = array('order_sn,food_sn,total_weight,total_num,total_price,transport_price,pack_price,refund_price,receiver,tel,receive_site_id,receive_site_name,remark,product_snapshot,main_status,shipment_status,refund_status,refund_remark,order_time,paid_time,refunded_time,completed_time,received_time,shipped_time,delivered_time,refundapply_time,rejected_time');
|
||||||
$where['openid'] = $this->openid;
|
$where['openid'] = $this->openid;
|
||||||
$where['main_status'] = array('neq', '已取消'); //排除已取消的订单
|
$where['main_status'] = array('neq', '已取消'); //排除已取消的订单
|
||||||
$orderDb = D('order');
|
$orderDb = D('order');
|
||||||
|
@ -740,7 +740,7 @@ class AdminController extends PublicController
|
|||||||
->alias('o') // 别名为 o
|
->alias('o') // 别名为 o
|
||||||
->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表
|
->join('lr_receive_site rs ON o.receive_site_id = rs.id') // 关联 lr_receive_site 表
|
||||||
->field('o.id,o.
|
->field('o.id,o.
|
||||||
shop_id,o.order_sn,o.food_sn,o.total_weight,o.total_num,o.total_price,transport_price,pack_price,o.apply_price,o.receiver,o.tel,o.by_plane_id,o.receive_site_id,o.receive_site_name,o.remark,o.product_snapshot,o.main_status,o.shipment_status,o.refund_status,o.refund_remark,o.order_time,o.paid_time,o.refundapply_time,o.refundagree_time,o.received_time,o.shipped_time, rs.bind_route, rs.runing') // 选择字段,包括 bind_route 和 runing
|
shop_id,o.order_sn,o.food_sn,o.total_weight,o.total_num,o.total_price,transport_price,pack_price,o.apply_price,o.receiver,o.tel,o.by_plane_id,o.receive_site_id,o.receive_site_name,o.remark,o.product_snapshot,o.main_status,o.shipment_status,o.refund_status,o.refund_remark,o.order_time,o.paid_time,o.refundapply_time,o.received_time,o.shipped_time, rs.bind_route, rs.runing') // 选择字段,包括 bind_route 和 runing
|
||||||
->where($where)
|
->where($where)
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
@ -831,7 +831,7 @@ class AdminController extends PublicController
|
|||||||
if ($_REQUEST['id']) {
|
if ($_REQUEST['id']) {
|
||||||
$where['id'] = $_REQUEST['id'];
|
$where['id'] = $_REQUEST['id'];
|
||||||
$orderDb = D('order');
|
$orderDb = D('order');
|
||||||
$field = array('id', 'order_sn', 'food_sn', 'total_weight', 'total_num', 'total_price', 'transport_price', 'pack_price', 'refund_price', 'apply_price', 'receiver', 'tel', 'by_plane_id', 'receive_site_id', 'receive_site_name', 'remark', 'product_snapshot', 'main_status', 'shipment_status', 'refund_status', 'refund_remark', 'canceled_time', 'order_time', 'paid_time', 'refunded_time', 'completed_time', 'received_time', 'shipped_time', 'delivered_time', 'refundapply_time', 'refundagree_time', 'rejected_time', 'describe');
|
$field = array('id', 'order_sn', 'food_sn', 'total_weight', 'total_num', 'total_price', 'transport_price', 'pack_price', 'refund_price', 'apply_price', 'receiver', 'tel', 'by_plane_id', 'receive_site_id', 'receive_site_name', 'remark', 'product_snapshot', 'main_status', 'shipment_status', 'refund_status', 'refund_remark', 'canceled_time', 'order_time', 'paid_time', 'refunded_time', 'completed_time', 'received_time', 'shipped_time', 'delivered_time', 'refundapply_time', 'rejected_time', 'describe');
|
||||||
if ($orderDetails = $orderDb->where($where)->field($field)->find()) {
|
if ($orderDetails = $orderDb->where($where)->field($field)->find()) {
|
||||||
echo json_encode(array('status' => 1, 'msg' => '访问成功', 'orderDetails' => $orderDetails));
|
echo json_encode(array('status' => 1, 'msg' => '访问成功', 'orderDetails' => $orderDetails));
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,17 +86,6 @@ class PayController extends PublicController
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更改订单状态 ps:此时只是商家同意申请 或 主动退 之后向微信服务器发起退款但不一定保证成功
|
|
||||||
if ($_REQUEST['refund_type'] == "buyer") { //买家申请
|
|
||||||
$data['refund_status'] = "已同意";
|
|
||||||
} elseif ($_REQUEST['refund_type'] == "seller") { //卖家主动退
|
|
||||||
$data['refund_status'] = "主动退";
|
|
||||||
}
|
|
||||||
$data['refundagree_time'] = time(); // 同意退款时间
|
|
||||||
if (!$orderDb->where($where)->data($data)->save()) {
|
|
||||||
echo json_encode(array('status' => 0, 'msg' => '操作退款失败'));
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置退款参数
|
// 设置退款参数
|
||||||
$refundParameter = [
|
$refundParameter = [
|
||||||
@ -134,13 +123,13 @@ class PayController extends PublicController
|
|||||||
$data['refunded_time'] = time(); // 标记退款时间
|
$data['refunded_time'] = time(); // 标记退款时间
|
||||||
$data['refund_sn'] = $result['resource']['ciphertext']['refund_id']; // 退款单号
|
$data['refund_sn'] = $result['resource']['ciphertext']['refund_id']; // 退款单号
|
||||||
$data['refund_price'] = $result['resource']['ciphertext']['amount']['refund'] / 100; // 退款金额,单位:元
|
$data['refund_price'] = $result['resource']['ciphertext']['amount']['refund'] / 100; // 退款金额,单位:元
|
||||||
// $outRefundNo = $result['resource']['ciphertext']['out_refund_no'];
|
$outRefundNo = $result['resource']['ciphertext']['out_refund_no'];
|
||||||
// $refundType = substr($outRefundNo, strrpos($outRefundNo, '_') + 1); //截取退款类型
|
$refundType = substr($outRefundNo, strrpos($outRefundNo, '_') + 1); //截取退款类型
|
||||||
// if ($refundType == "buyer") { //买家申请
|
if ($refundType == "buyer") { //买家申请
|
||||||
// $data['refund_status'] = "已同意";
|
$data['refund_status'] = "已同意";
|
||||||
// } elseif ($refundType == "seller") { //卖家主动退
|
} elseif ($refundType == "seller") { //卖家主动退
|
||||||
// $data['refund_status'] = "主动退";
|
$data['refund_status'] = "主动退";
|
||||||
// }
|
}
|
||||||
// 更新订单
|
// 更新订单
|
||||||
$orderDb->where($where)->data($data)->save();
|
$orderDb->where($where)->data($data)->save();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user