Merge branch 'feat_agree' into dev

This commit is contained in:
yaooo 2023-09-23 14:37:05 +08:00
commit 97bfb2a9aa

View File

@ -68,15 +68,13 @@ class Auth extends BaseController
$param = [ $param = [
"status" => 0, "status" => 0,
"is_del" => 0, "is_del" => 0,
"mer_id" => 5, "mer_id" => 1,
"type" => 10,
"meal_id" => 10,
"pay_type" => 1, "pay_type" => 1,
"attach" => "meal", "attach" => "margin",
"order_info" => '{"type_id":10,"is_margin":1,"margin":"0.01"}', "order_info" => '{"is_margin":1,"margin":"0.01"}',
"pay_price" => "0.01", "pay_price" => 0.01,
"order_sn" => "bzj" . date('YmdHis') . uniqid(), "order_sn" => "bzj" . date('YmdHis') . uniqid(),
"body" => uniqid(), "body" =>'哈哈哈',
]; ];
$payType = 'weixinApp'; $payType = 'weixinApp';
$service = new PayService($payType, $param); $service = new PayService($payType, $param);
@ -278,7 +276,7 @@ class Auth extends BaseController
public function doMargin() public function doMargin()
{ {
$user = $this->request->userInfo(); $user = $this->request->userInfo();
$merchant = Db::name('merchant')->where('uid', $user['uid'])->where('status', 1)->find(); $merchant = Db::name('merchant')->where('uid', $user['uid'])->where('status', 1)->where('is_margin', 1)->find();
if (!$merchant) { if (!$merchant) {
return app('json')->fail('用户店铺异常'); return app('json')->fail('用户店铺异常');
} }
@ -288,7 +286,7 @@ class Auth extends BaseController
"is_del" => 0, "is_del" => 0,
"mer_id" => $merchant['mer_id'], "mer_id" => $merchant['mer_id'],
"pay_type" => 1, "pay_type" => 1,
"attach" => "meal", "attach" => "margin",
"order_info" => '{"is_margin":1,"margin":"' . $merchant['margin'] . '"}', "order_info" => '{"is_margin":1,"margin":"' . $merchant['margin'] . '"}',
"pay_price" => $merchant['margin'], "pay_price" => $merchant['margin'],
"order_sn" => "bzj" . date('YmdHis') . uniqid(), "order_sn" => "bzj" . date('YmdHis') . uniqid(),