Browse Source

去掉TODO

master
李可松 4 years ago
parent
commit
988894a538
  1. 2
      app/Admin/Extensions/Grid/AuditAgent.php
  2. 2
      app/AdminSupplier/Controllers/OrderController.php
  3. 7
      app/Http/Controllers/Api/OrderController.php
  4. 4
      app/Http/Controllers/Api/WxpayController.php

2
app/Admin/Extensions/Grid/AuditAgent.php

@ -120,8 +120,6 @@ class AuditAgent extends RowAction
->insertOrIgnore(['role_id' => $roleArr[$user->type], 'user_id' => $this->getKey()]);
}
//TODO 还需要插入 演示产品、公告、专题等
DB::commit();
return $this->response()->success("审核成功")->refresh();
} catch (\Exception $e) {

2
app/AdminSupplier/Controllers/OrderController.php

@ -95,7 +95,7 @@ class OrderController extends AdminController
$show->disableQuickEdit();
$show->disableEditButton();
//不允许查看非自己的数据 TODO 待筛选
//不允许查看非自己的数据
$show->model()->whereHas('orderProductItem', function ($query) {
return $query->where('supplier_id', Admin::user()->id);
});

7
app/Http/Controllers/Api/OrderController.php

@ -254,7 +254,7 @@ class OrderController extends Controller
} else {
return $this->error($config['err_code_des'] ?? join(',', $config));
}*/
// TODO 跳转支付专用
// 跳转支付专用
return $this->success(['id' => $order->id, 'jump' => true, 'jump_appid' => AdminSetting::val('payee_appid')]);
}
}
@ -279,7 +279,6 @@ class OrderController extends Controller
$v = str_replace($prefix, '', $v);
}
//TODO 需要后台处理,然后向微信发起退款申请
$order = Order::firstWhere(['id' => $formData['id'], 'user_id' => $this->user_id]);
if (!$order) {
return $this->error('订单不存在');
@ -356,7 +355,7 @@ class OrderController extends Controller
return $this->error('订单已支付或已超时');
}
// TODO 跳转支付专用
// 跳转支付专用
return $this->success(['id' => $id, 'jump' => true, 'jump_appid' => AdminSetting::val('payee_appid')]);
/*$ap = AgentProduct::with('coupon')->find($order->agent_product_id);
@ -492,7 +491,7 @@ class OrderController extends Controller
$coupon = $coupon->toArray();
foreach ($coupon as $v) {
// TODO 未判断优惠券有效期
// 未判断优惠券有效期
if ($v['type'] == 1 && !empty($v['detail']['full']) && !empty($v['detail']['reduction'])) { //满减
if ($total_price >= $v['detail']['full']) {
$total_price -= $v['detail']['reduction'];

4
app/Http/Controllers/Api/WxpayController.php

@ -38,7 +38,7 @@ class WxpayController
$app = Factory::payment($config);
try {
$response = $app->handlePaidNotify(function ($message, $fail) use ($agent_id) {
//TODO 仅测试用
//仅测试用,回调记录
DB::table('pay_debugs')->insert(['agent_id' => $agent_id, 'type' => 1, 'content' => json_encode($message)]);
$this->log($message);
@ -176,7 +176,7 @@ class WxpayController
$app = Factory::payment($config);
try {
$response = $app->handleRefundedNotify(function ($message, $reqInfo, $fail) use ($agent_id) {
//TODO 仅测试用
//仅测试用,回调记录
DB::table('pay_debugs')->insert(['agent_id' => $agent_id, 'type' => 2, 'content' => json_encode($message)]);
// 记录一下本地调试

Loading…
Cancel
Save