add核销码图片
This commit is contained in:
parent
955e28a4c6
commit
664d24091c
@ -23,6 +23,8 @@ use app\common\model\system_store\SystemStoreStaff;
|
|||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
use app\common\model\user\UserAddress;
|
use app\common\model\user\UserAddress;
|
||||||
use app\common\model\user\UserShip;
|
use app\common\model\user\UserShip;
|
||||||
|
use Picqer\Barcode\BarcodeGeneratorJPG;
|
||||||
|
use Picqer\Barcode\BarcodeGeneratorPNG;
|
||||||
use support\exception\BusinessException;
|
use support\exception\BusinessException;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use taoser\exception\ValidateException;
|
use taoser\exception\ValidateException;
|
||||||
@ -227,7 +229,12 @@ class OrderLogic extends BaseLogic
|
|||||||
if ($params['shipping_type'] == 2) {
|
if ($params['shipping_type'] == 2) {
|
||||||
$_order['status'] = 1;
|
$_order['status'] = 1;
|
||||||
}
|
}
|
||||||
|
//生成核销码
|
||||||
|
$generator = new BarcodeGeneratorPNG();
|
||||||
|
$barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128);
|
||||||
|
$savePath = 'public/image/barcode/'.time().'.png';
|
||||||
|
file_put_contents($savePath, $barcode);
|
||||||
|
$_order['verify_img'] = $savePath;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$order = StoreOrder::create($_order);
|
$order = StoreOrder::create($_order);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user