feat(order): 修正订单验证码图片保存路径及采购款不足错误
This commit is contained in:
parent
1432a29f05
commit
9dde487cb9
@ -194,7 +194,7 @@ class OrderLogic extends BaseLogic
|
|||||||
$generator = new BarcodeGeneratorPNG();
|
$generator = new BarcodeGeneratorPNG();
|
||||||
$barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
|
$barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
|
||||||
$findPath = '/image/barcode/'.time().'.png';
|
$findPath = '/image/barcode/'.time().'.png';
|
||||||
$savePath = 'public'.$findPath;
|
$savePath = public_path().$findPath;
|
||||||
file_put_contents($savePath, $barcode);
|
file_put_contents($savePath, $barcode);
|
||||||
$_order['verify_img'] = $findPath;
|
$_order['verify_img'] = $findPath;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
|
@ -97,7 +97,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
public static function purchase_funds($orderSn, $extra = [])
|
public static function purchase_funds($orderSn, $extra = [])
|
||||||
{
|
{
|
||||||
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
||||||
$user = User::where('id', $extra['uid'])->find();
|
$user = User::where('id', $order['uid'])->find();
|
||||||
if ($user['purchase_funds'] < $order['pay_price']) {
|
if ($user['purchase_funds'] < $order['pay_price']) {
|
||||||
throw new \Exception('采购款不足');
|
throw new \Exception('采购款不足');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user