Compare commits
9 Commits
20250804-0
...
20250806-0
| Author | SHA1 | Date | |
|---|---|---|---|
| 42dd168c14 | |||
| 4f862caa0b | |||
| ec60074298 | |||
| 006821188d | |||
| 46a305ffe5 | |||
| 5bacdc8585 | |||
| 573aeee8db | |||
| 89797d5bfc | |||
| ba009f4a9d |
@@ -56,10 +56,10 @@ class ApiReturnAspect extends AbstractAspect
|
|||||||
$this->writeResponseLog(json_encode($result));
|
$this->writeResponseLog(json_encode($result));
|
||||||
|
|
||||||
//正式服加密 测试服不做处理
|
//正式服加密 测试服不做处理
|
||||||
if (SystemUtil::checkProEnv()) {
|
// if (SystemUtil::checkProEnv()) {
|
||||||
$cryptoFactory = $this->CryptoFactory->cryptoClass('api', json_encode($result['data']));
|
// $cryptoFactory = $this->CryptoFactory->cryptoClass('api', json_encode($result['data']));
|
||||||
$result['data'] = $cryptoFactory->encrypt();
|
// $result['data'] = $cryptoFactory->encrypt();
|
||||||
}
|
// }
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ class GoodCache
|
|||||||
$imageList = $this->getOssObjects(array_merge($spuImage,$imageIdArr));
|
$imageList = $this->getOssObjects(array_merge($spuImage,$imageIdArr));
|
||||||
|
|
||||||
$chefIds = array_column($skuList,'chef_id');
|
$chefIds = array_column($skuList,'chef_id');
|
||||||
$chefList = $this->adminUserModel->getDataByIds($chefIds);
|
$chefList = $this->adminUserModel->getChefNameByIds($chefIds);
|
||||||
|
|
||||||
$skuListArr = [];
|
$skuListArr = [];
|
||||||
$imageArr = [];
|
$imageArr = [];
|
||||||
|
|||||||
@@ -107,6 +107,32 @@ class AdminUser extends Model
|
|||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $ids
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getChefNameByIds(array $ids): array
|
||||||
|
{
|
||||||
|
$data = $this
|
||||||
|
->join('chef', function ($join) use ($ids) {
|
||||||
|
$join->on('chef.user_id', '=', 'admin_user.id')
|
||||||
|
->whereIn('chef.id', $ids)
|
||||||
|
->where('admin_user.is_del',UserCode::IS_NO_DEL)
|
||||||
|
->select([
|
||||||
|
'admin_user.chinese_name',
|
||||||
|
'chef.id',
|
||||||
|
'admin_user.username',
|
||||||
|
]);
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
|
||||||
|
if ($data->isEmpty()) return [];
|
||||||
|
|
||||||
|
$data = $data->toArray();
|
||||||
|
|
||||||
|
return array_column($data,null,'id');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $ids
|
* @param array $ids
|
||||||
* @return array
|
* @return array
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
|||||||
namespace App\Service\Admin\Catering\Print;
|
namespace App\Service\Admin\Catering\Print;
|
||||||
|
|
||||||
use App\Exception\ErrException;
|
use App\Exception\ErrException;
|
||||||
|
use App\Lib\Log;
|
||||||
use App\Lib\Print\YlyBasicsLib;
|
use App\Lib\Print\YlyBasicsLib;
|
||||||
use App\Model\Printer;
|
use App\Model\Printer;
|
||||||
use Hyperf\Di\Annotation\Inject;
|
use Hyperf\Di\Annotation\Inject;
|
||||||
@@ -58,6 +59,12 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
#[Inject]
|
#[Inject]
|
||||||
protected Printer $printerModel;
|
protected Printer $printerModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Log
|
||||||
|
*/
|
||||||
|
#[Inject]
|
||||||
|
private Log $log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
@@ -108,9 +115,12 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
empty($this->data['order_sno']) ||
|
empty($this->data['order_sno']) ||
|
||||||
empty($this->data['username']) ||
|
empty($this->data['username']) ||
|
||||||
empty($this->data['mobile']) ||
|
empty($this->data['mobile']) ||
|
||||||
empty($this->data['date']) ||
|
empty($this->data['date'])
|
||||||
empty($this->data['heapsort'])
|
// empty($this->data['heapsort'])
|
||||||
) throw new ErrException('打印数据丢失');
|
) {
|
||||||
|
$this->log->error('打印数据'.json_encode($this->data));
|
||||||
|
throw new ErrException('打印数据丢失');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,9 +136,6 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
//设置宽度
|
//设置宽度
|
||||||
$this->content .= "<PW>048</PW>";
|
$this->content .= "<PW>048</PW>";
|
||||||
|
|
||||||
$this->content .= "\n";
|
|
||||||
$this->content .= "\n";
|
|
||||||
|
|
||||||
//取餐号
|
//取餐号
|
||||||
$this->content .= "<FS3><CA>{$this->data['pickup_code']}</CA></FS3>\n";
|
$this->content .= "<FS3><CA>{$this->data['pickup_code']}</CA></FS3>\n";
|
||||||
|
|
||||||
@@ -190,7 +197,7 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
$contentEdibleTimeTips = config('print.yly.content_edible_time_tips');
|
$contentEdibleTimeTips = config('print.yly.content_edible_time_tips');
|
||||||
$this->content .= "<LR2>保质期,$contentEdibleTimeTips</LR2>";
|
$this->content .= "<LR2>保质期,$contentEdibleTimeTips</LR2>";
|
||||||
|
|
||||||
$this->content .= "<FS3><CA>{$this->data['heapsort']}</CA></FS3>";
|
$this->content .= "<FS3><CA>{$this->data['pickup_code']}</CA></FS3>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -231,6 +238,8 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
private function checkBoxLabelData(): void
|
private function checkBoxLabelData(): void
|
||||||
{
|
{
|
||||||
@@ -244,7 +253,10 @@ class YlyPrintService implements PrintOrderInterface
|
|||||||
empty($this->data['driver_name']) ||
|
empty($this->data['driver_name']) ||
|
||||||
empty($this->data['current_num']) ||
|
empty($this->data['current_num']) ||
|
||||||
empty($this->data['date_text'])
|
empty($this->data['date_text'])
|
||||||
) throw new ErrException('打印数据丢失');
|
) {
|
||||||
|
$this->log->error('打印数据'.json_encode($this->data));
|
||||||
|
throw new ErrException('打印数据丢失-01');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ class SkuService extends BaseService
|
|||||||
$spuInfo = $this->spuModel->getInfoById($skuInfo->spu_id);
|
$spuInfo = $this->spuModel->getInfoById($skuInfo->spu_id);
|
||||||
if (empty($spuInfo)) throw new ErrException('数据出错');
|
if (empty($spuInfo)) throw new ErrException('数据出错');
|
||||||
|
|
||||||
$purchaseInfo = $this->purchaseModel->getListByCycleIdAndKitchenId($skuInfo->cycle_id,$spuInfo->kitchen_id);
|
$purchaseInfo = $this->purchaseModel->getListByCycleIdAndKitchenId($spuInfo->cycle_id,$spuInfo->kitchen_id);
|
||||||
$purchaseIds = [];
|
$purchaseIds = [];
|
||||||
if (!empty($purchaseInfo)) {
|
if (!empty($purchaseInfo)) {
|
||||||
foreach ($purchaseInfo->toArray() as $one) {
|
foreach ($purchaseInfo->toArray() as $one) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
|||||||
namespace App\Service\Api\System;
|
namespace App\Service\Api\System;
|
||||||
|
|
||||||
use App\Cache\Redis\Api\SiteCache;
|
use App\Cache\Redis\Api\SiteCache;
|
||||||
|
use App\Constants\Common\SiteCode;
|
||||||
use App\Extend\SystemUtil;
|
use App\Extend\SystemUtil;
|
||||||
use App\Model\Site;
|
use App\Model\Site;
|
||||||
use App\Service\Api\BaseService;
|
use App\Service\Api\BaseService;
|
||||||
@@ -36,6 +37,7 @@ class SiteListService extends BaseService
|
|||||||
$query->where('name', 'like', "%$name%");
|
$query->where('name', 'like', "%$name%");
|
||||||
})
|
})
|
||||||
// ->where('name', 'like', '%'.$this->request->input('search_value').'%')
|
// ->where('name', 'like', '%'.$this->request->input('search_value').'%')
|
||||||
|
->where('is_del',SiteCode::SITE_NO_DEL)
|
||||||
->paginate($limit)
|
->paginate($limit)
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user