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