fix(product): add queue goods filter and fix date range query

Support filtering by queue goods in admin product lists and correct product create-time range query to use add_time. Also update README default admin account note and restore app auth key config reference.

Made-with: Cursor
This commit is contained in:
apple
2026-04-29 18:30:39 +08:00
parent c307903a17
commit a46489d007
5 changed files with 13 additions and 4 deletions

View File

@@ -322,7 +322,7 @@ php think swoole
5. 后台登录:
http://域名/admin
默认账号admin 密码A@123456 或 A123456
默认账号admin 后者 admin2026 密码A@123456 或 A123456
## 启动命令

View File

@@ -61,6 +61,7 @@ class StoreProduct extends AuthController
['stock_range', ''],//库存区间
['collect_range', ''],//收藏区间
['product_clear', ''],//适用群体
['is_queue_goods', ''],//报单商品
]);
if ($this->adminType == 4) {
@@ -201,6 +202,7 @@ class StoreProduct extends AuthController
['stock_range', ''],//库存区间
['collect_range', ''],//收藏区间
['product_clear', ''],//适用群体
['is_queue_goods', ''],//报单商品
]);
if ($this->adminType == 4) {
$where['supplier_id'] = $this->adminId;

View File

@@ -145,7 +145,7 @@ class StoreProductDao extends BaseDao
$start_time = strtotime($create_range[0]);
$end_time = strtotime($create_range[1]);
if ($start_time && $end_time) {
$query->whereBetween('price', [$start_time, $end_time]);
$query->whereBetween('add_time', [$start_time, $end_time]);
}
})
//活动类型

View File

@@ -765,6 +765,11 @@ class StoreProduct extends BaseModel
if ('' !== $value) $query->where('is_brokerage', $value);
}
public function searchIsQueueGoodsAttr($query, $value)
{
if ('' !== $value) $query->where('is_queue_goods', $value);
}
public function searchisChannelProductAttr($query, $value)
{
if ('' !== $value) $query->where('is_channel_product', $value);

View File

@@ -13,6 +13,8 @@
// | 应用设置
// +----------------------------------------------------------------------
use crmeb\basic\BaseAuth;
return [
// 应用地址
'app_host' => env('HOST', ''),
@@ -40,6 +42,6 @@ return [
'error_message' => '页面错误!请稍后再试~',
// 显示错误信息
'show_error_msg' => false,
// 自有项目不读取 CRMEB 原厂授权密钥;商业模块如需使用仍应走合法授权。
'auth_crmeb' => ''
// 授权密钥
'auth_crmeb' => BaseAuth::AUTH_CRMEB
];