Compare commits

...

10 Commits

Author SHA1 Message Date
006821188d fix : site 2025-08-05 18:04:43 +08:00
46a305ffe5 fix : api return aop 2025-08-05 17:59:53 +08:00
5bacdc8585 fix : pay config 2025-08-05 17:55:06 +08:00
573aeee8db fix : sku 2025-08-05 15:55:27 +08:00
89797d5bfc fix : sku 2025-08-05 15:51:59 +08:00
ba009f4a9d fix : sku 2025-08-05 15:35:49 +08:00
ae0d0d83ac fix : statement 2025-08-04 16:50:57 +08:00
a1668b60fc fix : change admin user info 2025-08-04 15:58:15 +08:00
356b80a653 feat : env 2025-07-30 16:39:00 +08:00
b8f583bcc7 feat : env 2025-07-30 16:23:44 +08:00
12 changed files with 48 additions and 20 deletions

View File

@@ -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;
} }

View File

@@ -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 = [];

View File

@@ -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

View File

@@ -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) {

View File

@@ -41,7 +41,7 @@ class DriverService extends BaseService
$list = $this->siteDriverStatementModel $list = $this->siteDriverStatementModel
->when($searchCityId, function ($query) use ($searchCityId) { ->when($searchCityId, function ($query) use ($searchCityId) {
$query->whereIn('city_id', $searchCityId); $query->where('city_id', $searchCityId);
}) })
->when($searchDriverId, function ($query) use ($searchDriverId) { ->when($searchDriverId, function ($query) use ($searchDriverId) {
$query->where('driver_id', $searchDriverId); $query->where('driver_id', $searchDriverId);

View File

@@ -41,7 +41,7 @@ class SiteService extends BaseService
$list = $this->siteDriverStatementModel $list = $this->siteDriverStatementModel
->when($searchCityId, function ($query) use ($searchCityId) { ->when($searchCityId, function ($query) use ($searchCityId) {
$query->whereIn('city_id', $searchCityId); $query->where('city_id', $searchCityId);
}) })
->when($searchSiteId, function ($query) use ($searchSiteId) { ->when($searchSiteId, function ($query) use ($searchSiteId) {
$query->where('site_id', $searchSiteId); $query->where('site_id', $searchSiteId);

View File

@@ -61,7 +61,7 @@ class EmployeeService extends BaseService
/** /**
* @var array|string[] * @var array|string[]
*/ */
private array $filed = ['id','username','avatar','chinese_name','mobile','status','last_login_ip','last_login_time','role_id']; private array $filed = ['id','username','avatar','chinese_name','mobile','status','last_login_ip','last_login_time','role_id','bind_user_id'];
/** /**
* 列表 * 列表
@@ -160,8 +160,8 @@ class EmployeeService extends BaseService
$bindUserId = (int)$this->request->input('bind_user_id', 0); $bindUserId = (int)$this->request->input('bind_user_id', 0);
if ($bindUserId > 0) { if ($bindUserId > 0) {
$oldBindUserId = $this->adminUserModel->getAdminInfoByBindUserId($bindUserId); $oldInfo = $this->adminUserModel->getAdminInfoByBindUserId($bindUserId);
if (!empty($oldBindUserId) && $info->bind_user_id != $oldBindUserId) throw new ErrException('绑定用户已存在'); if (!empty($oldBindUserId) && $info->bind_user_id != $oldInfo->bind_user_id) throw new ErrException('绑定用户已存在');
} }

View File

@@ -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();

View File

@@ -60,5 +60,5 @@ WX_PAYMENT_MCH_SECRET_KEY=075cf77f5b57cc84ba59e9df3b86eda1
WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem
WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem
WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b
WX_PAYMENT_SUB_MINI_APP_ID=wxc2bc0e47e212d831 WX_PAYMENT_SUB_MINI_APP_ID=wxc0edbbd0ff0fe7ed
WX_PAYMENT_SUB_MCH_ID=1656142874 WX_PAYMENT_SUB_MCH_ID=1723727305

View File

@@ -55,5 +55,5 @@ WX_PAYMENT_MCH_SECRET_KEY=075cf77f5b57cc84ba59e9df3b86eda1
WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem
WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem
WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b
WX_PAYMENT_SUB_MINI_APP_ID=wxc2bc0e47e212d831 WX_PAYMENT_SUB_MINI_APP_ID=wxc0edbbd0ff0fe7ed
WX_PAYMENT_SUB_MCH_ID=1656142874 WX_PAYMENT_SUB_MCH_ID=1723727305

View File

@@ -58,5 +58,5 @@ WX_PAYMENT_MCH_SECRET_KEY=075cf77f5b57cc84ba59e9df3b86eda1
WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem
WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem
WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b
WX_PAYMENT_SUB_MINI_APP_ID=wxc2bc0e47e212d831 WX_PAYMENT_SUB_MINI_APP_ID=wxc0edbbd0ff0fe7ed
WX_PAYMENT_SUB_MCH_ID=1656142874 WX_PAYMENT_SUB_MCH_ID=1723727305

View File

@@ -1,6 +1,6 @@
# [app] -- 集群配置需一致 # [app] -- 集群配置需一致
APP_NAME=hhl_meal APP_NAME=hhl_meal
APP_ENV=dev APP_ENV=prod
API_RETURN_KEY=hch@shenzhen API_RETURN_KEY=hch@shenzhen
JWT_KEY=hch@shenzhen JWT_KEY=hch@shenzhen
JWT_EXPIRE=2592000 JWT_EXPIRE=2592000
@@ -58,5 +58,5 @@ WX_PAYMENT_MCH_SECRET_KEY=075cf77f5b57cc84ba59e9df3b86eda1
WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem WX_PAYMENT_MCH_SECRET_CERT=__DIR__/config/pay/wx/apiclient_key.pem
WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem WX_PAYMENT_MCH_PUBLIC_CERT_PATH=__DIR__/config/pay/wx/apiclient_cert.pem
WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b WX_PAYMENT_MINI_APP_ID=wx444b711b6101f25b
WX_PAYMENT_SUB_MINI_APP_ID=wxc2bc0e47e212d831 WX_PAYMENT_SUB_MINI_APP_ID=wxc0edbbd0ff0fe7ed
WX_PAYMENT_SUB_MCH_ID=1656142874 WX_PAYMENT_SUB_MCH_ID=1723727305