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:
@@ -322,7 +322,7 @@ php think swoole
|
|||||||
|
|
||||||
5. 后台登录:
|
5. 后台登录:
|
||||||
http://域名/admin
|
http://域名/admin
|
||||||
默认账号:admin 密码:A@123456 或 A123456
|
默认账号:admin 后者 admin2026 密码:A@123456 或 A123456
|
||||||
|
|
||||||
|
|
||||||
## 启动命令
|
## 启动命令
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class StoreProduct extends AuthController
|
|||||||
['stock_range', ''],//库存区间
|
['stock_range', ''],//库存区间
|
||||||
['collect_range', ''],//收藏区间
|
['collect_range', ''],//收藏区间
|
||||||
['product_clear', ''],//适用群体
|
['product_clear', ''],//适用群体
|
||||||
|
['is_queue_goods', ''],//报单商品
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($this->adminType == 4) {
|
if ($this->adminType == 4) {
|
||||||
@@ -201,6 +202,7 @@ class StoreProduct extends AuthController
|
|||||||
['stock_range', ''],//库存区间
|
['stock_range', ''],//库存区间
|
||||||
['collect_range', ''],//收藏区间
|
['collect_range', ''],//收藏区间
|
||||||
['product_clear', ''],//适用群体
|
['product_clear', ''],//适用群体
|
||||||
|
['is_queue_goods', ''],//报单商品
|
||||||
]);
|
]);
|
||||||
if ($this->adminType == 4) {
|
if ($this->adminType == 4) {
|
||||||
$where['supplier_id'] = $this->adminId;
|
$where['supplier_id'] = $this->adminId;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class StoreProductDao extends BaseDao
|
|||||||
$start_time = strtotime($create_range[0]);
|
$start_time = strtotime($create_range[0]);
|
||||||
$end_time = strtotime($create_range[1]);
|
$end_time = strtotime($create_range[1]);
|
||||||
if ($start_time && $end_time) {
|
if ($start_time && $end_time) {
|
||||||
$query->whereBetween('price', [$start_time, $end_time]);
|
$query->whereBetween('add_time', [$start_time, $end_time]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//活动类型
|
//活动类型
|
||||||
|
|||||||
@@ -765,6 +765,11 @@ class StoreProduct extends BaseModel
|
|||||||
if ('' !== $value) $query->where('is_brokerage', $value);
|
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)
|
public function searchisChannelProductAttr($query, $value)
|
||||||
{
|
{
|
||||||
if ('' !== $value) $query->where('is_channel_product', $value);
|
if ('' !== $value) $query->where('is_channel_product', $value);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
// | 应用设置
|
// | 应用设置
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
use crmeb\basic\BaseAuth;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
// 应用地址
|
// 应用地址
|
||||||
'app_host' => env('HOST', ''),
|
'app_host' => env('HOST', ''),
|
||||||
@@ -40,6 +42,6 @@ return [
|
|||||||
'error_message' => '页面错误!请稍后再试~',
|
'error_message' => '页面错误!请稍后再试~',
|
||||||
// 显示错误信息
|
// 显示错误信息
|
||||||
'show_error_msg' => false,
|
'show_error_msg' => false,
|
||||||
// 自有项目不读取 CRMEB 原厂授权密钥;商业模块如需使用仍应走合法授权。
|
// 授权密钥
|
||||||
'auth_crmeb' => ''
|
'auth_crmeb' => BaseAuth::AUTH_CRMEB
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user