Browse Source

order

master
ZLW-PC\Administrator 6 years ago
parent
commit
5ceacfe9ca
  1. 3319
      API文档.html
  2. 95
      app/Http/Controllers/Api/CommentController.php
  3. 102
      app/Http/Controllers/Api/NotifyController.php
  4. 60
      app/Http/Controllers/Api/OrderController.php
  5. 51
      app/Http/Controllers/Weixin/OrderController.php
  6. 2
      app/Http/Controllers/Weixin/UserController.php
  7. 88
      app/Http/Controllers/Weixin/WxPayController.php
  8. 30
      app/Http/Logic/CommentLogic.php
  9. 155
      app/Http/Logic/OrderLogic.php
  10. 3
      app/Http/Logic/UserLogic.php
  11. 6
      app/Http/Logic/UserMoneyLogic.php
  12. 11
      app/Http/Model/Arctype.php
  13. 11
      app/Http/Model/Article.php
  14. 11
      app/Http/Model/Bonus.php
  15. 11
      app/Http/Model/Cart.php
  16. 11
      app/Http/Model/CollectGoods.php
  17. 11
      app/Http/Model/Comment.php
  18. 11
      app/Http/Model/FeedBack.php
  19. 11
      app/Http/Model/Friendlink.php
  20. 11
      app/Http/Model/Goods.php
  21. 11
      app/Http/Model/GoodsBrand.php
  22. 11
      app/Http/Model/GoodsImg.php
  23. 11
      app/Http/Model/GoodsSearchword.php
  24. 11
      app/Http/Model/GoodsType.php
  25. 11
      app/Http/Model/Guestbook.php
  26. 11
      app/Http/Model/Keyword.php
  27. 11
      app/Http/Model/Kuaidi.php
  28. 11
      app/Http/Model/Menu.php
  29. 14
      app/Http/Model/Order.php
  30. 11
      app/Http/Model/OrderGoods.php
  31. 11
      app/Http/Model/Page.php
  32. 11
      app/Http/Model/Payment.php
  33. 11
      app/Http/Model/Region.php
  34. 11
      app/Http/Model/Searchword.php
  35. 11
      app/Http/Model/Slide.php
  36. 11
      app/Http/Model/SmsLog.php
  37. 11
      app/Http/Model/Sysconfig.php
  38. 11
      app/Http/Model/Tagindex.php
  39. 11
      app/Http/Model/Taglist.php
  40. 11
      app/Http/Model/User.php
  41. 11
      app/Http/Model/UserAddress.php
  42. 11
      app/Http/Model/UserBonus.php
  43. 11
      app/Http/Model/UserGoodsHistory.php
  44. 11
      app/Http/Model/UserMessage.php
  45. 11
      app/Http/Model/UserMoney.php
  46. 11
      app/Http/Model/UserPoint.php
  47. 11
      app/Http/Model/UserRecharge.php
  48. 11
      app/Http/Model/UserRole.php
  49. 11
      app/Http/Model/UserWithdraw.php
  50. 11
      app/Http/Model/VerifyCode.php
  51. 11
      app/Http/Model/WeixinMenu.php
  52. 7
      app/Http/Requests/CommentRequest.php
  53. 150
      lqycms.sql
  54. 29
      resources/org/alipay_app/demo.php
  55. 2
      resources/org/wxpay/WxPayPubHelper.class.php
  56. 4
      resources/views/weixin/index/index.blade.php
  57. 12
      resources/views/weixin/order/orderDetail.blade.php
  58. 20
      resources/views/weixin/order/orderList.blade.php
  59. 2
      resources/views/weixin/user/userRecharge.blade.php
  60. 8
      routes/web.php

3319
API文档.html
File diff suppressed because it is too large
View File

95
app/Http/Controllers/Api/CommentController.php

@ -79,7 +79,7 @@ class CommentController extends CommonController
//评价批量添加
public function commentBatchAdd(Request $request)
{
if($request->input('comment',null)==null){return ReturnData::create(ReturnData::PARAMS_ERROR);}
if($request->input('comment',null)==null || $request->input('order_id',null)==null){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$comment = json_decode($request->input('comment'),true);
if($comment)
@ -89,6 +89,7 @@ class CommentController extends CommonController
$comment[$k]['user_id'] = Token::$uid;
$comment[$k]['ip_address'] = Helper::getRemoteIp();
$comment[$k]['add_time'] = time();
$comment[$k]['order_id'] = $request->input('order_id');
}
}
@ -125,96 +126,4 @@ class CommentController extends CommonController
return $this->getLogic()->del($where);
}
}
/* public function commentList(Request $request)
{
//参数
$data['limit'] = $request->input('limit', 10);
$data['offset'] = $request->input('offset', 0);
$data['user_id'] = Token::$uid;
$data['comment_type'] = $request->input('comment_type', 0); //0商品评价,1文章评价
if($request->input('comment_rank', '') != ''){$data['comment_rank'] = $request->input('comment_rank');}
if($request->input('id_value', '') != ''){$data['id_value'] = $request->input('id_value');}
if($request->input('parent_id', '') != ''){$data['parent_id'] = $request->input('parent_id');}
$res = Comment::getList($data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL,null,$res);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
//添加一条评价
public function commentAdd(Request $request)
{
//参数
$data['comment_type'] = $request->input('comment_type',0);
$data['id_value'] = $request->input('id_value',null);
$data['content'] = $request->input('content',null);
$data['comment_rank'] = $request->input('comment_rank',null);
if($request->input('ip_address', null) !== null){$data['ip_address'] = $request->input('ip_address');}else{$data['ip_address'] = Helper::getRemoteIp();}
if($request->input('parent_id', null) !== null){$data['parent_id'] = $request->input('parent_id');}
$data['add_time'] = time();
$data['user_id'] = Token::$uid;
if($data['comment_type']===null || $data['id_value']===null || $data['content']===null || $data['comment_rank']===null)
{
return ReturnData::create(ReturnData::PARAMS_ERROR);
}
return Comment::add($data);
}
public function commentUpdate(Request $request)
{
//参数
$id = $request->input('id',null);
if($request->input('content', null) !== null){$data['content'] = $request->input('content');}
if($request->input('comment_rank', null) !== null){$data['comment_rank'] = $request->input('comment_rank');}
if($request->input('ip_address', null) !== null){$data['ip_address'] = $request->input('ip_address');}
if($request->input('parent_id', null) !== null){$data['parent_id'] = $request->input('parent_id');}
if($id===null)
{
return ReturnData::create(ReturnData::PARAMS_ERROR);
}
if(isset($data))
{
$data['user_id'] = Token::$uid;
Comment::modify(array('id'=>$id),$data);
}
return ReturnData::create(ReturnData::SUCCESS);
}
//删除评价
public function commentDelete(Request $request)
{
//参数
$data['comment_type'] = $request->input('comment_type',null);
$data['id_value'] = $request->input('id_value',null);
$data['user_id'] = Token::$uid;
if($data['comment_type']===null || $data['id_value']===null)
{
return ReturnData::create(ReturnData::PARAMS_ERROR);
}
$res = Comment::remove($data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL,null,$res);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
} */
}

102
app/Http/Controllers/Api/NotifyController.php

@ -0,0 +1,102 @@
<?php
namespace App\Http\Controllers\Api;
use Log;
use DB;
use Illuminate\Http\Request;
use App\Common\ReturnData;
use App\Common\Helper;
class NotifyController extends CommonController
{
public function __construct()
{
parent::__construct();
}
/**
* 微信支付回调
*/
public function wxpayJsapi(Request $request)
{
$res = "SUCCESS"; //支付成功返回SUCCESS,失败返回FAILE
//file_put_contents("1.txt",$GLOBALS['HTTP_RAW_POST_DATA']);
Log::info('微信支付回调数据:'.$GLOBALS['HTTP_RAW_POST_DATA']);
//获取通知的数据
$xml = $GLOBALS['HTTP_RAW_POST_DATA'];
//将XML转为array
//禁止引用外部xml实体
libxml_disable_entity_loader(true);
$post_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
if(isset($post_data['attach']) && !empty($post_data['attach']))
{
$get_arr = explode('&',$post_data['attach']);
foreach($get_arr as $value)
{
$tmp_arr = explode('=',$value);
$post_data[$tmp_arr[0]] = $tmp_arr[1];
}
}
if($post_data['result_code'] == 'SUCCESS')
{
$pay_money = $post_data['total_fee']/100; //支付金额
$pay_time_timestamp = strtotime(date_format(date_create($post_data['time_end']),"Y-m-d H:i:s")); //支付完成时间,时间戳格式
$pay_time_date = date_format(date_create($post_data['time_end']),"Y-m-d H:i:s"); //支付完成时间,date格式Y-m-d H:i:s
//$post_data['out_trade_no'] //商户订单号
//$post_data['transaction_id'] //微信支付订单号
//附加参数pay_type:1充值支付,2订单支付
if($post_data['pay_type'] == 1)
{
//获取充值支付记录
$user_recharge = DB::table('user_recharge')->where(array('recharge_sn'=>$post_data['out_trade_no'],'status'=>0))->first();
if(!$user_recharge){Log::info('充值记录不存在');echo "FAILE";exit;}
if($pay_money < $user_recharge->money){Log::info('充值金额不匹配');echo "FAILE";exit;} //如果支付金额小于要充值的金额
//更新充值支付记录状态
DB::table('user_recharge')->where(array('recharge_sn'=>$post_data['out_trade_no'],'status'=>0))->update(array('pay_time'=>$pay_time_timestamp,'updated_at'=>time(),'pay_type'=>1,'status'=>1,'trade_no'=>$post_data['transaction_id'],'pay_money'=>$pay_money));
//增加用户余额
DB::table('user')->where(array('id'=>$user_recharge->user_id))->increment('money', $pay_money);
//添加用户余额记录
DB::table('user_money')->insert(array('user_id'=>$user_recharge->user_id,'type'=>0,'money'=>$pay_money,'des'=>'充值','user_money'=>DB::table('user')->where(array('id'=>$user_recharge->user_id))->value('money'),'add_time'=>time()));
}
elseif($post_data['pay_type'] == 2)
{
//获取订单记录
$order = DB::table('order')->where(array('order_sn'=>$post_data['out_trade_no'],'order_status'=>0,'pay_status'=>0))->first();
if(!$order){Log::info('订单不存在');echo "FAILE";exit;}
if($pay_money < $order->order_amount){Log::info('订单金额不匹配');exit;} //如果支付金额小于订单金额
//修改订单状态
$order_update_data['pay_status'] = 1;
$order_update_data['pay_money'] = $pay_money; //支付金额
$order_update_data['pay_id'] = 2;
$order_update_data['pay_time'] = $pay_time_timestamp;
$order_update_data['pay_name'] = 'wxpay_jsapi';
$order_update_data['out_trade_no'] = $post_data['transaction_id'];
$order_update_data['updated_at'] = time();
DB::table('order')->where(array('order_sn'=>$post_data['out_trade_no'],'order_status'=>0,'pay_status'=>0))->update($order_update_data);
}
elseif($post_data['pay_type'] == 3)
{
$res = "FAILE";
}
elseif($post_data['pay_type'] == 4)
{
$res = "FAILE";
}
else
{
$res = "FAILE";
}
//file_put_contents("2.txt",$post_data['total_fee'].'--'.$post_data['out_trade_no'].'--'.$post_data['attach'].'--'.$post_data['pay_type']);
}
echo $res;
}
}

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

@ -138,6 +138,66 @@ class OrderController extends CommonController
}
}
//用户-取消订单
public function userCancelOrder(Request $request)
{
if(!checkIsNumber($request->input('id',null))){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$id = $request->input('id');
$where['id'] = $id;
$where['user_id'] = Token::$uid;
return $this->getLogic()->userCancelOrder($where);
}
//订单-余额支付
public function orderYuepay(Request $request)
{
if(!checkIsNumber($request->input('id',null))){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$id = $request->input('id');
$where['id'] = $id;
$where['user_id'] = Token::$uid;
return $this->getLogic()->orderYuepay($where);
}
//用户-确认收货
public function userReceiptConfirm(Request $request)
{
if(!checkIsNumber($request->input('id',null))){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$id = $request->input('id');
$where['id'] = $id;
$where['user_id'] = Token::$uid;
return $this->getLogic()->orderReceiptConfirm($where);
}
//用户-退款退货
public function userOrderRefund(Request $request)
{
if(!checkIsNumber($request->input('id',null))){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$id = $request->input('id');
$where['id'] = $id;
$where['user_id'] = Token::$uid;
return $this->getLogic()->orderRefund($where);
}
//用户-删除订单
public function userOrderDelete(Request $request)
{
if(!checkIsNumber($request->input('id',null))){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$id = $request->input('id');
$where['id'] = $id;
$where['user_id'] = Token::$uid;
return $this->getLogic()->del($where);
}
//订单状态修改
public function orderStatusUpdate(Request $request)
{

51
app/Http/Controllers/Weixin/OrderController.php

@ -1,7 +1,6 @@
<?php
namespace App\Http\Controllers\Weixin;
use App\Http\Controllers\Weixin\CommonController;
use Illuminate\Http\Request;
use App\Common\ReturnData;
use App\Common\Helper;
@ -101,15 +100,6 @@ class OrderController extends CommonController
$res = curl_request($url,$postdata,'POST');
if($res['code']!=0){$this->error_jump('评论失败');}
//订单状态设为已评价
$postdata = array(
'id' => $_POST['order_id'],
'type' => 6,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/order_status_update";
$res = curl_request($url,$postdata,'POST');
$this->success_jump('评论成功',route('weixin_order_list'));
}
@ -168,7 +158,7 @@ class OrderController extends CommonController
$order_id = $request->input('order_id','');
$payment_id = $request->input('payment_id','');
if($order_id == '' || $order_id == '')
if($order_id == '' || $payment_id == '')
{
$this->error_jump(ReturnData::PARAMS_ERROR);
}
@ -199,42 +189,17 @@ class OrderController extends CommonController
public function orderYuepay(Request $request)
{
$order_id = $request->input('order_id','');
//获取订单详情
$postdata = array(
'id' => $order_id, //要支付的订单id
'order_status' => 0,
'pay_status' => 0,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/order_detail";
$res = curl_request($url,$postdata,'GET');
$order_detail = $res['data'];
if($res['code']!=0){$this->error_jump('订单不存在或已过期');}
//获取会员信息
$postdata = array(
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/user_info";
$res = curl_request($url,$postdata,'GET');
$user_info = $res['data'];
if($order_detail['order_amount']>$user_info['money']){$this->error_jump('余额不足');}
//修改订单状态
$postdata = array(
'id' => $order_detail['id'],
'type' => 1,
'pay_id' => 1,
'pay_name' => '余额支付',
'id' => $order_id,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/order_status_update";
$url = env('APP_API_URL')."/order_yue_pay";
$res = curl_request($url,$postdata,'POST');
if($res['code']!=0){$this->error_jump('支付失败');}
if($res['code']==ReturnData::SUCCESS){$this->success_jump('支付成功',route('weixin_order_list'));}
$this->success_jump('支付成功',route('weixin_order_list'));
$this->error_jump('支付失败');
}
//订单-微信支付
@ -251,9 +216,9 @@ class OrderController extends CommonController
);
$url = env('APP_API_URL')."/order_detail";
$res = curl_request($url,$postdata,'GET');
if($res['code']!=0){$this->error_jump('订单不存在或已过期');}
$data['order_detail'] = $res['data'];
$data['order_id'] = $order_id;
if($res['code']!=0){$this->error_jump('订单不存在或已过期');}
//微信支付-start
require_once(resource_path('org/wxpay/WxPayConfig.php')); // 导入微信配置类
@ -263,7 +228,7 @@ class OrderController extends CommonController
$out_trade_no = $data['order_detail']['order_sn'];//订单号
$total_fee = floatval($data['order_detail']['order_amount']*100);//价格0.01
$attach = 'pay_type=2'; //附加数据,pay_type=2订单支付,示例:xxx=1&yyy=2
$notify_url = route('weixin_wxpay_notify');//通知地址
$notify_url = route('notify_wxpay_jsapi');//通知地址
$wxconfig= \WxPayConfig::wxconfig();
//=========步骤1:网页授权获取用户openid============

2
app/Http/Controllers/Weixin/UserController.php

@ -237,7 +237,7 @@ class UserController extends CommonController
$out_trade_no = $user_recharge['recharge_sn'];//订单号
$total_fee = floatval($user_recharge['money']*100);//价格0.01
$attach = 'pay_type=1'; //附加数据,pay_type=1充值支付,示例:xxx=1&yyy=2
$notify_url = route('weixin_wxpay_notify');//通知地址
$notify_url = route('notify_wxpay_jsapi');//通知地址
$wxconfig= \WxPayConfig::wxconfig();
//=========步骤1:网页授权获取用户openid============

88
app/Http/Controllers/Weixin/WxPayController.php

@ -1,7 +1,6 @@
<?php
namespace App\Http\Controllers\Weixin;
use App\Http\Controllers\Weixin\CommonController;
use Illuminate\Http\Request;
use DB;
use Log;
@ -13,93 +12,6 @@ class WxPayController extends CommonController
parent::__construct();
}
/**
* 微信支付回调
*/
public function wxpayNotify(Request $request)
{
$res = "SUCCESS"; //支付成功返回SUCCESS,失败返回FAILE
//file_put_contents("1.txt",$GLOBALS['HTTP_RAW_POST_DATA']);
Log::info('微信支付回调数据:'.$GLOBALS['HTTP_RAW_POST_DATA']);
//获取通知的数据
$xml = $GLOBALS['HTTP_RAW_POST_DATA'];
//将XML转为array
//禁止引用外部xml实体
libxml_disable_entity_loader(true);
$post_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
if(isset($post_data['attach']) && !empty($post_data['attach']))
{
$get_arr = explode('&',$post_data['attach']);
foreach($get_arr as $value)
{
$tmp_arr = explode('=',$value);
$post_data[$tmp_arr[0]] = $tmp_arr[1];
}
}
if($post_data['result_code'] == 'SUCCESS')
{
$pay_money = $post_data['total_fee']/100; //支付金额
$pay_time_timestamp = strtotime(date_format(date_create($post_data['time_end']),"Y-m-d H:i:s")); //支付完成时间,时间戳格式
$pay_time_date = date_format(date_create($post_data['time_end']),"Y-m-d H:i:s"); //支付完成时间,date格式Y-m-d H:i:s
//$post_data['out_trade_no'] //商户订单号
//$post_data['transaction_id'] //微信支付订单号
//附加参数pay_type:1充值支付,2订单支付
if($post_data['pay_type'] == 1)
{
//获取充值支付记录
$user_recharge = DB::table('user_recharge')->where(array('recharge_sn'=>$post_data['out_trade_no'],'status'=>0))->first();
if(!$user_recharge){Log::info('充值记录不存在');echo "FAILE";exit;}
if($pay_money < $user_recharge->money){Log::info('充值金额不匹配');echo "FAILE";exit;} //如果支付金额小于要充值的金额
//更新充值支付记录状态
DB::table('user_recharge')->where(array('recharge_sn'=>$post_data['out_trade_no'],'status'=>0))->update(array('pay_time'=>$pay_time_timestamp,'updated_at'=>time(),'pay_type'=>1,'status'=>1,'trade_no'=>$post_data['transaction_id'],'pay_money'=>$pay_money));
//增加用户余额
DB::table('user')->where(array('id'=>$user_recharge->user_id))->increment('money', $pay_money);
//添加用户余额记录
DB::table('user_money')->insert(array('user_id'=>$user_recharge->user_id,'type'=>0,'money'=>$pay_money,'des'=>'充值','user_money'=>DB::table('user')->where(array('id'=>$user_recharge->user_id))->value('money'),'add_time'=>time()));
}
elseif($post_data['pay_type'] == 2)
{
//获取订单记录
$order = DB::table('order')->where(array('order_sn'=>$post_data['out_trade_no'],'order_status'=>0,'pay_status'=>0))->first();
if(!$order){Log::info('订单不存在');echo "FAILE";exit;}
if($pay_money < $order->order_amount){Log::info('订单金额不匹配');exit;} //如果支付金额小于订单金额
//修改订单状态
$order_update_data['pay_status'] = 1;
$order_update_data['pay_money'] = $pay_money; //支付金额
$order_update_data['pay_id'] = 2;
$order_update_data['pay_time'] = $pay_time_timestamp;
$order_update_data['pay_name'] = 'wxpay_jsapi';
$order_update_data['out_trade_no'] = $post_data['transaction_id'];
$order_update_data['updated_at'] = time();
DB::table('order')->where(array('order_sn'=>$post_data['out_trade_no'],'order_status'=>0,'pay_status'=>0))->update($order_update_data);
}
elseif($post_data['pay_type'] == 3)
{
$res = "FAILE";
}
elseif($post_data['pay_type'] == 4)
{
$res = "FAILE";
}
else
{
$res = "FAILE";
}
//file_put_contents("2.txt",$post_data['total_fee'].'--'.$post_data['out_trade_no'].'--'.$post_data['attach'].'--'.$post_data['pay_type']);
}
echo $res;
}
/**
* 发微信红包
* @param string $openid 用户openid

30
app/Http/Logic/CommentLogic.php

@ -1,7 +1,10 @@
<?php
namespace App\Http\Logic;
use Log;
use DB;
use App\Common\ReturnData;
use App\Http\Model\Comment;
use App\Http\Model\Order;
use App\Http\Requests\CommentRequest;
use Validator;
@ -83,7 +86,7 @@ class CommentLogic extends BaseLogic
$validator = $this->getValidate($data, 'add');
if ($validator->fails()){return ReturnData::create(ReturnData::PARAMS_ERROR, null, $validator->errors()->first());}
$comment = $this->getModel()->getOne(['comment_type'=>$data['comment_type'],'id_value'=>$data['id_value'],'user_id'=>$data['user_id']]);
$comment = $this->getModel()->getOne(['comment_type'=>$data['comment_type'],'id_value'=>$data['id_value'],'user_id'=>$data['user_id'],'order_id'=>$data['order_id']]);
if($comment){return ReturnData::create(ReturnData::FAIL,null,'您已经评论过了');}
$res = $this->getModel()->add($data,$type);
@ -130,19 +133,34 @@ class CommentLogic extends BaseLogic
return getDataAttr($this->getModel(),$data);
}
//批量添加
public function batchAdd(array $data)
/**
* 评价-批量添加
* @return array
*/
public function batchAdd($data)
{
if(empty($data)){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$order_id = 0;
DB::beginTransaction();
foreach($data as $k=>$v)
{
$res = $this->add($v);
if($res['code'] == ReturnData::SUCCESS){}else{DB::rollBack();return $res;}
$order_id = $v['order_id'];
if($res['code'] != ReturnData::SUCCESS){DB::rollBack();return $res;}
}
DB::commit();
return ReturnData::create(ReturnData::SUCCESS);
//设为已评价
$data2['is_comment'] = Order::ORDER_IS_COMMENT;
$data2['updated_at'] = time();
if(model('Order')->edit($data2,['id'=>$order_id]))
{
DB::commit();
return ReturnData::create(ReturnData::SUCCESS,null,'评价成功');
}
DB::rollBack();
return ReturnData::create(ReturnData::FAIL);
}
}

155
app/Http/Logic/OrderLogic.php

@ -1,5 +1,7 @@
<?php
namespace App\Http\Logic;
use Log;
use DB;
use App\Common\ReturnData;
use App\Http\Model\Order;
use App\Http\Requests\OrderRequest;
@ -257,12 +259,163 @@ class OrderLogic extends BaseLogic
$validator = $this->getValidate($where,'del');
if ($validator->fails()){return ReturnData::create(ReturnData::PARAMS_ERROR, null, $validator->errors()->first());}
$res = $this->getModel()->del($where);
$where2 = function ($query) use ($where) {
$query->where($where)->where(function ($query2) {$query2->where(array('order_status'=>3,'refund_status'=>0))->orWhere(array('order_status'=>1))->orWhere(array('order_status'=>2));});
};
$data['is_delete'] = 1;
$res = $this->getModel()->edit($data, $where2);
if($res){return ReturnData::create(ReturnData::SUCCESS,$res);}
return ReturnData::create(ReturnData::FAIL);
}
/**
* 用户-取消订单
* @param int $data['id'] 订单id
* @param int $data['user_id'] 用户id
* @return array
*/
public function userCancelOrder($where = array())
{
if(empty($where)){return ReturnData::create(ReturnData::SUCCESS);}
$where['order_status'] = 0;
$where['pay_status'] = 0;
$order = $this->getModel()->getOne($where);
if(!$order){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'订单不存在');}
$data['order_status'] = 1;
$data['updated_at'] = time();
$res = $this->getModel()->edit($data,$where);
if($res){return ReturnData::create(ReturnData::SUCCESS,$res);}
return ReturnData::create(ReturnData::FAIL);
}
/**
* 订单-余额支付
* @param int $data['id'] 订单id
* @param int $data['user_id'] 用户id
* @return array
*/
public function orderYuepay($where = array())
{
if(empty($where)){return ReturnData::create(ReturnData::SUCCESS);}
$where['order_status'] = 0;
$where['pay_status'] = 0;
$order = $this->getModel()->getOne($where);
if(!$order){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'订单不存在');}
DB::beginTransaction();
$data['pay_status'] = 1;
$data['pay_money'] = $order->order_amount; //支付金额
$data['pay_id'] = 1;
$data['pay_time'] = time();
$data['updated_at'] = time();
$res = $this->getModel()->edit($data,$where);
if($res)
{
$user_money_data['user_id'] = $where['user_id'];
$user_money_data['type'] = 1;
$user_money_data['money'] = $order->order_amount;
$user_money_data['des'] = '订单余额支付';
if(!logic('UserMoney')->add($user_money_data)){DB::rollBack();}
DB::commit();
return ReturnData::create(ReturnData::SUCCESS,$res,'支付成功');
}
DB::rollBack();
return ReturnData::create(ReturnData::FAIL);
}
/**
* 订单-确认收货
* @param int $data['id'] 订单id
* @param int $data['user_id'] 用户id
* @return array
*/
public function orderReceiptConfirm($where = array())
{
if(empty($where)){return ReturnData::create(ReturnData::PARAMS_ERROR);}
//判断订单是否存在或本人
$where['order_status'] = 0;
$where['refund_status'] = 0;
$where['pay_status'] = 1;
$order = $this->getModel()->getOne($where);
if(!$order){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'订单不存在');}
$data['order_status'] = 3;
$data['shipping_status'] = 2;
$data['refund_status'] = 0;
$data['is_comment'] = 0;
$data['updated_at'] = time();
$res = $this->getModel()->edit($data,$where);
if($res)
{
return ReturnData::create(ReturnData::SUCCESS);
}
return ReturnData::create(ReturnData::FAIL);
}
/**
* 订单-退款退货
* @param int $data['id'] 订单id
* @param int $data['user_id'] 用户id
* @return array
*/
public function orderRefund($where = array())
{
if(empty($where)){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$where['order_status'] = 3;
$where['refund_status'] = 0;
$order = $this->getModel()->getOne($where);
if(!$order){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'订单不存在');}
$data['refund_status'] = 1;
$data['updated_at'] = time();
$res = $this->getModel()->edit($data,$where);
if($res)
{
return ReturnData::create(ReturnData::SUCCESS);
}
return ReturnData::create(ReturnData::FAIL);
}
/**
* 订单-设为评价
* @param int $data['id'] 订单id
* @param int $data['user_id'] 用户id
* @return array
*/
public function orderSetComment($where = array())
{
if(empty($where)){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$where['order_status'] = 3;
$where['refund_status'] = 0;
$data['is_comment'] = Order::ORDER_UN_COMMENT;
$order = $this->getModel()->getOne($where);
if(!$order){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'订单不存在,或已评价');}
$data['is_comment'] = Order::ORDER_IS_COMMENT;
$data['updated_at'] = time();
$res = $this->getModel()->edit($data,$where);
if($res)
{
return ReturnData::create(ReturnData::SUCCESS);
}
return ReturnData::create(ReturnData::FAIL);
}
/**
* 数据获取器
* @param array $data 要转化的数据

3
app/Http/Logic/UserLogic.php

@ -1,10 +1,13 @@
<?php
namespace App\Http\Logic;
use Log;
use DB;
use App\Common\ReturnData;
use App\Common\Token;
use App\Http\Model\User;
use App\Http\Requests\UserRequest;
use Validator;
use App\Http\Model\UserMoney;
class UserLogic extends BaseLogic
{

6
app/Http/Logic/UserMoneyLogic.php

@ -93,6 +93,9 @@ class UserMoneyLogic extends BaseLogic
if($data['money']<=0){return ReturnData::create(ReturnData::PARAMS_ERROR);}
$user = model('User')->getOne(['id'=>$data['user_id']]);
if(!$user){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'用户不存在');}
$data['add_time'] = time();
DB::beginTransaction(); //启动事务
@ -104,6 +107,9 @@ class UserMoneyLogic extends BaseLogic
}
elseif($data['type'] == UserMoney::USER_MONEY_DECREMENT)
{
//判断用户余额是否足够
if($data['money']>$user->money){return ReturnData::create(ReturnData::FAIL,null,'余额不足');}
//减少用户余额
model('User')->getDb()->where(array('id'=>$data['user_id']))->decrement('money', $data['money']);
}

11
app/Http/Model/Arctype.php

@ -161,19 +161,12 @@ class Arctype extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Article.php

@ -177,19 +177,12 @@ class Article extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Bonus.php

@ -143,19 +143,12 @@ class Bonus extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Cart.php

@ -153,19 +153,12 @@ class Cart extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/CollectGoods.php

@ -141,19 +141,12 @@ class CollectGoods extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Comment.php

@ -147,19 +147,12 @@ class Comment extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/FeedBack.php

@ -141,19 +141,12 @@ class FeedBack extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Friendlink.php

@ -141,19 +141,12 @@ class Friendlink extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Goods.php

@ -177,19 +177,12 @@ class Goods extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/GoodsBrand.php

@ -144,19 +144,12 @@ class GoodsBrand extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/GoodsImg.php

@ -141,19 +141,12 @@ class GoodsImg extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/GoodsSearchword.php

@ -141,19 +141,12 @@ class GoodsSearchword extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/GoodsType.php

@ -156,19 +156,12 @@ class GoodsType extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Guestbook.php

@ -141,19 +141,12 @@ class Guestbook extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Keyword.php

@ -141,19 +141,12 @@ class Keyword extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Kuaidi.php

@ -141,19 +141,12 @@ class Kuaidi extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Menu.php

@ -139,19 +139,12 @@ class Menu extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

14
app/Http/Model/Order.php

@ -12,6 +12,9 @@ class Order extends BaseModel
protected $hidden = array();
protected $guarded = array(); //$guarded包含你不想被赋值的字段数组。
const ORDER_UN_COMMENT = 0;//未评价
const ORDER_IS_COMMENT = 1;//是否评论,1已评价
public function getDb()
{
return DB::table($this->table);
@ -141,19 +144,12 @@ class Order extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/OrderGoods.php

@ -141,19 +141,12 @@ class OrderGoods extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Page.php

@ -141,19 +141,12 @@ class Page extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Payment.php

@ -143,19 +143,12 @@ class Payment extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Region.php

@ -141,19 +141,12 @@ class Region extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Searchword.php

@ -141,19 +141,12 @@ class Searchword extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Slide.php

@ -143,19 +143,12 @@ class Slide extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/SmsLog.php

@ -163,19 +163,12 @@ class SmsLog extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Sysconfig.php

@ -141,19 +141,12 @@ class Sysconfig extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Tagindex.php

@ -141,19 +141,12 @@ class Tagindex extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/Taglist.php

@ -139,19 +139,12 @@ class Taglist extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/User.php

@ -143,19 +143,12 @@ class User extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserAddress.php

@ -143,19 +143,12 @@ class UserAddress extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserBonus.php

@ -141,19 +141,12 @@ class UserBonus extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserGoodsHistory.php

@ -141,19 +141,12 @@ class UserGoodsHistory extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserMessage.php

@ -141,19 +141,12 @@ class UserMessage extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserMoney.php

@ -144,19 +144,12 @@ class UserMoney extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserPoint.php

@ -144,19 +144,12 @@ class UserPoint extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserRecharge.php

@ -145,19 +145,12 @@ class UserRecharge extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserRole.php

@ -141,19 +141,12 @@ class UserRole extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/UserWithdraw.php

@ -144,19 +144,12 @@ class UserWithdraw extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/VerifyCode.php

@ -154,19 +154,12 @@ class VerifyCode extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

11
app/Http/Model/WeixinMenu.php

@ -147,19 +147,12 @@ class WeixinMenu extends BaseModel
* 修改
* @param array $data 数据
* @param array $where 条件
* @return bool
* @return int
*/
public function edit($data, $where = array())
{
$res = $this->getDb();
$res = $res->where($where)->update(parent::filterTableColumn($data, $this->table));
if ($res === false)
{
return false;
}
return true;
return $res->where($where)->update(parent::filterTableColumn($data, $this->table));
}
/**

7
app/Http/Requests/CommentRequest.php

@ -15,6 +15,7 @@ class CommentRequest extends BaseRequest
'parent_id' => 'integer',
'user_id' => 'required|integer',
'is_anonymous' => 'integer|between:0,1',
'order_id' => 'required|integer',
];
//总的自定义错误信息
@ -38,12 +39,14 @@ class CommentRequest extends BaseRequest
'user_id.integer' => '用户ID必须为数字',
'is_anonymous.integer' => '是否匿名必须是数字',
'is_anonymous.between' => '是否匿名,0否',
'order_id.required' => '订单ID必填',
'order_id.integer' => '订单ID必须为数字',
];
//场景验证规则
protected $scene = [
'add' => ['comment_type', 'id_value', 'comment_rank', 'ip_address', 'status', 'parent_id', 'user_id', 'is_anonymous'],
'edit' => ['comment_type', 'id_value', 'comment_rank', 'ip_address', 'status', 'parent_id', 'user_id', 'is_anonymous'],
'add' => ['comment_type', 'id_value', 'comment_rank', 'ip_address', 'status', 'parent_id', 'user_id', 'is_anonymous', 'order_id'],
'edit' => ['comment_type', 'id_value', 'comment_rank', 'ip_address', 'status', 'parent_id', 'user_id', 'is_anonymous', 'order_id'],
'del' => ['id'],
];

150
lqycms.sql
File diff suppressed because it is too large
View File

29
resources/org/alipay_app/demo.php

@ -7,12 +7,12 @@ public function AlipayTradeAppPayRequest()
$aop = new \AopClient;
$aop->gatewayUrl = "https://openapi.alipay.com/gateway.do";
$aop->appId = "2017070707673008";
$aop->rsaPrivateKey = '1fengMIIEpAIBAAKCAQEA5Eccv1+NjMMEMYC9ePnldw8MgCvIsXq1A4VUTlfzCpLpEAe8Losf4lDqZhcwJOhk6+ZC6dWi1rKE7P+huG0Mh88PpXQAy9zPcbbdFqcuijZFxLNj0qcZGhurS6m0cWofAJxVcuSYpHNwJF24kCPrUje46mpNd3J8hsGXjZQBQpU3BdB4DM0hRA7BopR8WTaiGrNIzJSrAi6hIwDqjMFez3AYD4RhQRt9k7NPY04uKI7UR0D6Me+f6Cu0exodB87L1EXTm/ICG/F8rj+4xUXgqWOWw0QuUHMEYB0S5dSxy2sQg/2A67PogsxIUkOB+UdcsI0W2ZmpO5MKSusPlV6VwwIDAQABAoIBAQCscwBHnkLLtMNlNjFsw7PSln7GEM2DLgSzDTUcHhrPwR3p6z4BFz7V9HSu/RN0vk8HWqLwDWD/ukrq007ziQXvTsAuKI01dLEN4avxoghphwh7yV0+1NcEvyRPe3uCNj4HcxKmQgUCLubnwhlcYpYyPUAnbnjpJIboMjVwUgAFsFBlm5aQ1cCTR2aPg/KkC+VlxWOEBaY6Y2RH59sMon+G2LPIvzYJW8Ive+rccyZ0ly7dqEiaW5+dhcLRUC7z/Z4R9ZZm5zrzwFhI+v4vDN+oaTUSjijVbRkZN4U+PGvNYj+OyYd3rQvGS41EmCiO1L23jI7ve0XnbfXYpnpILVN5AoGBAPRF/4uc2ug3HFfP7jgmxuZHJR6GXZz9S9Au6CFi6SQ3D5bgvIN4RiZ8kIXnf1FAJ+/Gi97QPFpozAbNWgBj42w25FRXCe60HKV7K89ovSyeKcbKQ/PhV4MQnsyUU+bkqVzTK5uCedwYPG9rDGHkS3t0kvtvL+QtaK5FRXjtmmHnAoGBAO88iQsw3cE6Xf4B5byj1C3NaIvW7G8ZqLLKc190aNrMtDym8HPw4H2h0MrQ12fRIU/v06DzKII2SbywaICEpMQnAg2WS+X9oeiFGwVB8L2npHz6TX+TGgC8zjJuzW2wVX5NYATP5nSUbZE5oVEYh44gyE4JkY/iwesupO1PGunFAoGAW81qytd6VcdQeZgFmUjJe4XFZ4Fr8TIoqebXCqUXpaqjyzpO3sH260PpNMnZyXlpCO3/Zw+vfvLfqrbGWlsv/11p1mCXtQQvt+lgf6SHZBtU7AbcHu3Ta8h1RcGA/sd09xPN0bXpglQBcoYysx+PVqhrDN+uifye2M/j2hzB5oUCgYBns13UNAJr19kWWcwz0PAQSpGezDMAlabCmW8ZWWR6M3GNOO/R0f/9dT8EKzK0FbrS46pgggZ1KwMbf3xM+TJStHX3XcbYkvCz0b68sLCiBSEP64/cVO9Ykn7u7Yium1jzvqZ4b4X90rkL0mdSt8dKnHs3GH64WBqmzzk+hKOt4QKBgQCwAPwnlLiZmtORdja3rNFrTTXvjua8HVTemMdp2rUuSFB2FXS3suRhqkH2ilMRvbdiP/GlaCOyOTMSOVis88KZKie5Dy26TUgWUMsvG/7d21meRP6SCqpFhw5tkNkTzX+7ul5Si7iabmMtdlhw1OiD7yv4bo3Sw4YTWMa4s4D2ag=='; //请填写开发者私钥去头去尾去回车,一行字符串
$aop->appId = "20707673008";
$aop->rsaPrivateKey = 'gCvIsXq1A4VUTlfzCpLpEAe8Losf4lDqZhcwJOhk6+ZC6dWi1rKE7P+huG0Mh88PpXQAy9zPcbbdFqcuijZFxLNj0qcZGhurS6m0cWofAJxVcuSYpHNwJF24kCPrUje46mpNd3J8hsGXjZQBQpU3BdB4DM0hRA7BopR8WTaiGrNIzJSrAi6hIwDqjMFez3AYD4RhQRt9k7NPY04uKI7UR0D6Me+f6Cu0exodB87L1EXTm/ICG/F8rj+4xUXgqWOWw0QuUHMEYB0S5dSxy2sQg/2A67PogsxIUkOB+UdcsI0W2ZmpO5MKSusPlV6VwwIDAQABAoIBAQCscwBHnkLLtMNlNjFsw7PSln7GEM2DLgSzDTUcHhrPwR3p6z4BFz7V9HSu/RN0vk8HWqLwDWD/ukrq007ziQXvTsAuKI01dLEN4avxoghphwh7yV0+1NcEvyRPe3uCNj4HcxKmQgUCLubnwhlcYpYyPUAnbnjpJIboMjVwUgAFsFBlm5aQ1cCTR2aPg/KkC+VlxWOEBaY6Y2RH59sMon+G2LPIvzYJW8Ive+rccyZ0ly7dqEiaW5+dhcLRUC7z/Z4R9ZZm5zrzwFhI+v4vDN+oaTUSjijVbRkZN4U+PGvNYj+OyYd3rQvGS41EmCiO1L23jI7ve0XnbfXYpnpILVN5AoGBAPRF/4uc2ug3HFfP7jgmxuZHJR6GXZz9S9Au6CFi6SQ3D5bgvIN4RiZ8kIXnf1FAJ+/Gi97QPFpozAbNWgBj42w25FRXCe60HKV7K89ovSyeKcbKQ/PhV4MQnsyUU+bkqVzTK5uCedwYPG9rDGHkS3t0kvtvL+QtaK5FRXjtmmHnAoGBAO88iQsw3cE6Xf4B5byj1C3NaIvW7G8ZqLLKc190aNrMtDym8HPw4H2h0MrQ12fRIU/v06DzKII2SbywaICEpMQnAg2WS+X9oeiFGwVB8L2npHz6TX+TGgC8zjJuzW2wVX5NYATP5nSUbZE5oVEYh44gyE4JkY/iwesupO1PGunFAoGAW81qytd6VcdQeZgFmUjJe4XFZ4Fr8TIoqebXCqUXpaqjyzpO3sH260PpNMnZyXlpCO3/Zw+vfvLfqrbGWlsv/11p1mCXtQQvt+lgf6SHZBtU7AbcHu3Ta8h1RcGA/sd09xPN0bXpglQBcoYysx+PVqhrDN+uifye2M/j2hzB5oUCgYBns13UNAJr19kWWcwz0PAQSpGezDMAlabCmW8ZWWR6M3GNOO/R0f/9dT8EKzK0FbrS46pgggZ1KwMbf3xM+TJStHX3XcbYkvCz0b68sLCiBSEP64/cVO9Ykn7u7Yium1jzvqZ4b4X90rkL0mdSt8dKnHs3GH64WBqmzzk+hKOt4QKBgQCwAPwnlLiZmtORdja3rNFrTTXvjua8HVTemMdp2rUuSFB2FXS3suRhqkH2ilMRvbdiP/GlaCOyOTMSOVis88KZKie5Dy26TUgWUMsvG/7d21meRP6SCqpFhw5tkNkTzX+7ul5Si7iabmMtdlhw1OiD7yv4bo3Sw4YTWMa4s4D2ag=='; //请填写开发者私钥去头去尾去回车,一行字符串
$aop->format = "json";
$aop->charset = "UTF-8";
$aop->signType = "RSA2";
$aop->alipayrsaPublicKey = '1fengMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmLo5catqqLXWcf+LhRs/WDziyCAB+HPb/+xls2BAtNtvfLHCM9xej5VGTzX7mw6e5/Et3yVAhFnnTZ9U9RWq1m3MiEv19n17/yIbGMXpxSSujYnL0drFBY6Z4f19tzfqWQPETpEf1atFSHbcJQfpaslyr9W2NmS5dbWIe+sJVmZjRN5cYEhFY7U0JHqIPr653XSDzsQ152rHZIb0wJmEVfkr0yyOZl1ja0sx+Gv3/BcHDK1brK94mi9I6J78dDXQS6WSQY7mup9l74Z78FLHf22LtS9GvpkzlL5zAKh0LzTVsgGlyJNMnh0/aRYK4p4IKiSAvQRhLXjfbWLc9XFAzQIDAQAB'; //请填写支付宝公钥,一行字符串
$aop->alipayrsaPublicKey = 'FAAOCAQ8AMIIBCgKCAQEAmLo5catqqLXWcf+LhRs/WDziyCAB+HPb/+xls2BAtNtvfLHCM9xej5VGTzX7mw6e5/Et3yVAhFnnTZ9U9RWq1m3MiEv19n17/yIbGMXpxSSujYnL0drFBY6Z4f19tzfqWQPETpEf1atFSHbcJQfpaslyr9W2NmS5dbWIe+sJVmZjRN5cYEhFY7U0JHqIPr653XSDzsQ152rHZIb0wJmEVfkr0yyOZl1ja0sx+Gv3/BcHDK1brK94mi9I6J78dDXQS6WSQY7mup9l74Z78FLHf22LtS9GvpkzlL5zAKh0LzTVsgGlyJNMnh0/aRYK4p4IKiSAvQRhLXjfbWLc9XFAzQIDAQAB'; //请填写支付宝公钥,一行字符串
//实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.app.pay
$request = new \AlipayTradeAppPayRequest();
//SDK已经封装掉了公共参数,这里只需要传入业务参数
@ -23,7 +23,7 @@ public function AlipayTradeAppPayRequest()
. "\"total_amount\": \"0.01\","
. "\"product_code\":\"QUICK_MSECURITY_PAY\""
. "}";
$request->setNotifyUrl("http://59.110.220.223:8087/receive_notify"); //商户外网可以访问的异步地址,回调地址
$request->setNotifyUrl("http://www.baidu.com/notify"); //商户外网可以访问的异步地址,回调地址
$request->setBizContent($bizcontent);
//这里和普通的接口调用不同,使用的是sdkExecute
$response = $aop->sdkExecute($request);
@ -35,9 +35,30 @@ public function AlipayTradeAppPayRequest()
//PHP服务端验证异步通知信息参数示例
public function AlipayTradeAppPayNotify()
{
$res = "fail"; //支付成功返回success,失败返回fail
require_once './AopClient.php';
$aop = new \AopClient;
$aop->alipayrsaPublicKey = ''; //请填写支付宝公钥,一行字符串
$flag = $aop->rsaCheckV1($_POST, NULL, "RSA2"); //RSA2与上面一致
if($flag)
{
if($trade_status=="TRADE_SUCCESS")
{
//业务逻辑
//...
//...
//...
$res = "success";
}
else
{
$res = "fail";
}
}
return $res;
}

2
resources/org/wxpay/WxPayPubHelper.class.php

@ -853,7 +853,7 @@ class JsApi_pub extends Common_util_pub
if (!isset($_GET['code']))
{
//触发微信返回code码
$baseUrl = urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING']);
$baseUrl = urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$url = $this->createOauthUrlForCode($baseUrl);
Header("Location: $url");
exit();

4
resources/views/weixin/index/index.blade.php

@ -71,7 +71,7 @@ var swiper = new Swiper('.swiper-nav', {
<!--导航左右滑动-end-->
<!--菜单-start-->
<div class="floor home_menu" style="border-bottom:1px solid #f0f0f0;border-top:1px solid #f0f0f0;">
<div class="floor home_menu" style="background-color:#fff;border-bottom:1px solid #f0f0f0;border-top:1px solid #f0f0f0;">
<nav>
<a href="<?php echo route('weixin_category_goods_list'); ?>">
<img src="<?php echo env('APP_URL'); ?>/images/weixin/icon_05.png" alt="全部分类" />
@ -121,7 +121,7 @@ var swiper = new Swiper('.swiper-nav', {
<!--资讯头条-end-->
<!--猜您喜欢-start-->
<div class="floor guesslike">
<div class="floor guesslike" style="background-color:#fff;">
<div class="banner_tit">购·畅销</div>
<ul class="goods_list_s cl">
<?php if($goods_sale_list){foreach($goods_sale_list as $k=>$v){ ?>

12
resources/views/weixin/order/orderDetail.blade.php

@ -83,8 +83,8 @@ function cancel_order(order_id)
content: '确定要取消该订单吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:2},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_cancel"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({
@ -114,8 +114,8 @@ function done_order(order_id)
content: '确定要这样操作吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:3},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_receipt_confirm"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({
@ -145,8 +145,8 @@ function del_order(order_id)
content: '确定要删除该订单吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:5},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_delete"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({

20
resources/views/weixin/order/orderList.blade.php

@ -21,7 +21,7 @@
<div class="swiper-slide<?php if($order_status==2){echo ' swiper-slide-activate';} ?>"><a href="<?php echo route('weixin_order_list',array('status'=>2)); ?>">待发货</a></div>
<div class="swiper-slide<?php if($order_status==3){echo ' swiper-slide-activate';} ?>"><a href="<?php echo route('weixin_order_list',array('status'=>3)); ?>">待收货</a></div>
<div class="swiper-slide<?php if($order_status==4){echo ' swiper-slide-activate';} ?>"><a href="<?php echo route('weixin_order_list',array('status'=>4)); ?>">待评价</a></div>
<div class="swiper-slide<?php if($order_status==5){echo ' swiper-slide-activate';} ?>"><a href="<?php echo route('weixin_order_list',array('status'=>5)); ?>">退款/售后</a></div>
<!--<div class="swiper-slide<?php if($order_status==5){echo ' swiper-slide-activate';} ?>"><a href="<?php echo route('weixin_order_list',array('status'=>5)); ?>">退款/售后</a></div>-->
</div>
</div>
<style>
@ -51,7 +51,7 @@ var swiper = new Swiper('.swiper-nav', {
</a>
<p class="des">合计: <?php echo $value['order_amount']; ?> <small>(含运费:¥<?php echo $value['shipping_fee']; ?>)</small></p>
<div class="tag"><?php if($value['order_status_num']==4){ ?><a href="javascript:refund_order(<?php echo $value['id']; ?>);">申请退款</a><?php } ?><?php if($value['order_status_num']==4 || $value['order_status_num']==6 || $value['order_status_num']==7){ ?><a href="javascript:del_order(<?php echo $value['id']; ?>);">删除</a><?php } ?><?php if($value['order_status_num']==1){ ?><a href="javascript:cancel_order(<?php echo $value['id']; ?>);">取消订单</a><?php } ?><?php if($value['order_status_num']==1){ ?><a href="<?php echo route('weixin_order_pay',array('id'=>$value['id'])); ?>">付款</a><?php } ?><?php if($value['order_status_num']==3){ ?><a href="http://m.kuaidi100.com/index_all.html?type=<?php echo $value['shipping_name']; ?>&postid=<?php echo $value['shipping_sn']; ?>#result">查看物流</a><?php } ?><?php if($value['order_status_num']==3){ ?><a href="javascript:done_order(<?php echo $value['id']; ?>);">确认收货</a><?php } ?><?php if($value['order_status_num']==4){ ?><a class="activate" href="<?php echo route('weixin_order_comment',array('id'=>$value['id'])); ?>">评价</a><?php } ?></div>
<div class="tag"><!--<?php if($value['order_status_num']==4 && $value['refund_status']==0){ ?><a href="javascript:refund_order(<?php echo $value['id']; ?>);">申请退款</a><?php } ?><?php if($value['order_status_num']==4 || $value['order_status_num']==6 || $value['order_status_num']==7){ ?><a href="javascript:del_order(<?php echo $value['id']; ?>);">删除</a><?php } ?>--><?php if($value['order_status_num']==1){ ?><a href="javascript:cancel_order(<?php echo $value['id']; ?>);">取消订单</a><?php } ?><?php if($value['order_status_num']==1){ ?><a href="<?php echo route('weixin_order_pay',array('id'=>$value['id'])); ?>">付款</a><?php } ?><?php if($value['order_status_num']==3){ ?><a href="http://m.kuaidi100.com/index_all.html?type=<?php echo $value['shipping_name']; ?>&postid=<?php echo $value['shipping_sn']; ?>#result">查看物流</a><?php } ?><?php if($value['order_status_num']==2 || $value['order_status_num']==3){ ?><a href="javascript:done_order(<?php echo $value['id']; ?>);">确认收货</a><?php } ?><?php if($value['order_status_num']==4 && $value['is_comment']==0){ ?><a class="activate" href="<?php echo route('weixin_order_comment',array('id'=>$value['id'])); ?>">评价</a><?php } ?></div>
</div>
<?php }}else{ ?>
<div style="text-align:center;line-height:40px;color:#999;">暂无记录</div>
@ -85,8 +85,8 @@ function cancel_order(order_id)
content: '确定要取消该订单吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:2},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_cancel"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({
@ -116,8 +116,8 @@ function done_order(order_id)
content: '确定要这样操作吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:3},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_receipt_confirm"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({
@ -147,8 +147,8 @@ function del_order(order_id)
content: '确定要删除该订单吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:5},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_delete"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({
@ -178,8 +178,8 @@ function refund_order(order_id)
content: '确定要申请退款吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/order_status_update"; ?>';
$.post(url,{access_token:access_token,id:order_id,type:4},function(res)
var url = '<?php echo env('APP_API_URL')."/order_user_refund"; ?>';
$.post(url,{access_token:access_token,id:order_id},function(res)
{
//提示
layer.open({

2
resources/views/weixin/user/userRecharge.blade.php

@ -71,7 +71,7 @@ function chongzhi()
{
//提示
layer.open({
content: res.msg
content: '充值订单创建成功,请支付'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});

8
routes/web.php

@ -70,7 +70,6 @@ Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
Route::get('/brand_detail/{id}', 'GoodsBrandController@brandDetail')->name('weixin_brand_detail'); //品牌详情
Route::get('/bonus_list', 'BonusController@bonusList')->name('weixin_bonus_list');
Route::any('/wxpay_notify', 'WxPayController@wxpayNotify')->name('weixin_wxpay_notify'); //微信回调
Route::any('/wxoauth', 'UserController@oauth')->name('weixin_wxoauth'); //微信网页授权
Route::any('/login', 'UserController@login')->name('weixin_login');
Route::any('/register', 'UserController@register')->name('weixin_register');
@ -137,6 +136,8 @@ Route::group(['middleware' => ['web']], function () {
//API接口路由,无需token验证
Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web']], function () {
//各种回调
Route::any('/notify_wxpay_jsapi', 'NotifyController@wxpayJsapi')->name('notify_wxpay_jsapi'); //微信支付回调
//轮播图
Route::get('/slide_list', 'SlideController@slideList');
//文章
@ -212,6 +213,11 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
Route::post('/order_status_update', 'OrderController@orderStatusUpdate'); //订单状态修改
Route::get('/order_list', 'OrderController@orderList'); //订单列表
Route::get('/order_detail', 'OrderController@orderDetail'); //订单详情
Route::post('/order_yue_pay', 'OrderController@orderYuepay'); //订单余额支付
Route::post('/order_user_cancel', 'OrderController@userCancelOrder'); //用户取消订单
Route::post('/order_user_receipt_confirm', 'OrderController@userReceiptConfirm'); //用户确认收货
Route::post('/order_user_refund', 'OrderController@userOrderRefund'); //用户退款退货
Route::post('/order_user_delete', 'OrderController@userOrderDelete'); //用户删除订单
//购物车
Route::get('/cart_list', 'CartController@cartList'); //购物车列表
Route::post('/cart_clear', 'CartController@cartClear'); //清空购物车

Loading…
Cancel
Save