更新
This commit is contained in:
parent
1113b18e4f
commit
461809eb79
@ -43,12 +43,20 @@ class GoodsclassLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
$lists = Goodsclass::where($this->searchWhere)
|
$lists = Goodsclass::where($this->searchWhere)
|
||||||
|
->where('pid', 0)
|
||||||
->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])
|
->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function ($item) {
|
||||||
->toArray();
|
$a = Goodsclass::where('pid', $item['id'])->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])->select();
|
||||||
return linear_to_tree($lists, 'children');
|
$item['children'] = $a;
|
||||||
|
foreach ($a as $k => &$v) {
|
||||||
|
$b = Goodsclass::where('pid', $v['id'])->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])->select();
|
||||||
|
$v['children'] = $b;
|
||||||
|
}
|
||||||
|
})->toArray();
|
||||||
|
return $lists;
|
||||||
|
// return linear_to_tree($lists, 'children');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +69,8 @@ class GoodsclassLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return Goodsclass::where($this->searchWhere)->count();
|
return Goodsclass::where($this->searchWhere)->where('pid', 0)
|
||||||
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -43,12 +43,20 @@ class GoodsclassLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
$lists = Goodsclass::where($this->searchWhere)
|
$lists = Goodsclass::where($this->searchWhere)
|
||||||
|
->where('pid', 0)
|
||||||
->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])
|
->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function ($item) {
|
||||||
->toArray();
|
$a = Goodsclass::where('pid', $item['id'])->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])->select();
|
||||||
return linear_to_tree($lists, 'children');
|
$item['children'] = $a;
|
||||||
|
foreach ($a as $k => &$v) {
|
||||||
|
$b = Goodsclass::where('pid', $v['id'])->field(['id', 'pid', 'name', 'data', 'pic', 'sort'])->select();
|
||||||
|
$v['children'] = $b;
|
||||||
|
}
|
||||||
|
})->toArray();
|
||||||
|
return $lists;
|
||||||
|
// return linear_to_tree($lists, 'children');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +69,8 @@ class GoodsclassLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return Goodsclass::where($this->searchWhere)->count();
|
return Goodsclass::where($this->searchWhere)->where('pid', 0)
|
||||||
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
2
composer.lock
generated
2
composer.lock
generated
@ -7366,5 +7366,5 @@
|
|||||||
"ext-json": "*"
|
"ext-json": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.3.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc 支付配置文件
|
* @desc 支付配置文件
|
||||||
* @author Tinywan(ShaoBo Wan)
|
* @author Tinywan(ShaoBo Wan)
|
||||||
@ -31,6 +32,8 @@ return [
|
|||||||
'default' => [
|
'default' => [
|
||||||
// 必填-商户号,服务商模式下为服务商商户号
|
// 必填-商户号,服务商模式下为服务商商户号
|
||||||
'mch_id' => '1654274867',
|
'mch_id' => '1654274867',
|
||||||
|
// 选填-v2商户私钥
|
||||||
|
'mch_secret_key_v2' => 'FC685E79840793CE86AE621CE9EDFCDA',
|
||||||
// 必填-商户秘钥
|
// 必填-商户秘钥
|
||||||
'mch_secret_key' => '7E00D167C9793006C93F4FB4CF65BCC2',
|
'mch_secret_key' => '7E00D167C9793006C93F4FB4CF65BCC2',
|
||||||
// 必填-商户私钥 字符串或路径
|
// 必填-商户私钥 字符串或路径
|
||||||
@ -40,7 +43,7 @@ return [
|
|||||||
// 必填
|
// 必填
|
||||||
'notify_url' => 'https://erp.lihaink.cn/api/pay/notifyMnp',
|
'notify_url' => 'https://erp.lihaink.cn/api/pay/notifyMnp',
|
||||||
// 选填-公众号 的 app_id
|
// 选填-公众号 的 app_id
|
||||||
'mp_app_id' => '',
|
'mp_app_id' => 'wxe2428e8fe6767e45',
|
||||||
// 选填-小程序 的 app_id
|
// 选填-小程序 的 app_id
|
||||||
'mini_app_id' => 'wxdee751952c8c2027',
|
'mini_app_id' => 'wxdee751952c8c2027',
|
||||||
// 选填-app 的 app_id
|
// 选填-app 的 app_id
|
||||||
@ -58,8 +61,7 @@ return [
|
|||||||
// 选填-服务商模式下,子商户id
|
// 选填-服务商模式下,子商户id
|
||||||
'sub_mch_id' => '',
|
'sub_mch_id' => '',
|
||||||
// 选填-微信公钥证书路径, optional,强烈建议 php-fpm 模式下配置此参数
|
// 选填-微信公钥证书路径, optional,强烈建议 php-fpm 模式下配置此参数
|
||||||
'wechat_public_cert_path' => [
|
'wechat_public_cert_path' => [],
|
||||||
],
|
|
||||||
// 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE
|
// 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE
|
||||||
'mode' => \Yansongda\Pay\Pay::MODE_NORMAL,
|
'mode' => \Yansongda\Pay\Pay::MODE_NORMAL,
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user