Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
06258e7854
@ -30,11 +30,11 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface,Li
|
|||||||
*/
|
*/
|
||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
$name=$this->request->get('name','');
|
$name=$this->request->get('store_name','');
|
||||||
// $where['%pipe_like%'] =['name'=>'store_name|bar_code'];
|
// $where['%pipe_like%'] =['name'=>'store_name|bar_code'];
|
||||||
if($name){
|
if($name){
|
||||||
if(preg_match('/[\x{4e00}-\x{9fff}]+/u', $name)==1){
|
if(preg_match('/[\x{4e00}-\x{9fff}]+/u', $name)==1){
|
||||||
$where['%like%']=['store_name'];
|
$where['%like%']=['store_name'=>'store_name'];
|
||||||
}else{
|
}else{
|
||||||
$where['=']=['bar_code','cate_id'];
|
$where['=']=['bar_code','cate_id'];
|
||||||
}
|
}
|
||||||
|
@ -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,13 @@ 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);
|
||||||
|
$findPath = '/image/barcode/'.time().'.png';
|
||||||
|
$savePath = 'public'.$findPath;
|
||||||
|
file_put_contents($savePath, $barcode);
|
||||||
|
$_order['verify_img'] = $findPath;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$order = StoreOrder::create($_order);
|
$order = StoreOrder::create($_order);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user