切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
Karson
4 years ago
提交者
Gitee
4 years ago
提交
32f256f3fa097f110b075c84258c215edfabd408
2 个父辈
750f5d78
c3eae7b1
!225 多选字段存储和编辑时按选择顺序存储及显示
Merge pull request !225 from HID丨emotion/adv_multi_order
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
20 行增加
和
4 行删除
application/common/controller/Backend.php
application/common/controller/Backend.php
查看文件 @
32f256f
...
...
@@ -533,11 +533,27 @@ class Backend extends Controller
if
(
is_array
(
$adminIds
))
{
$this
->
model
->
where
(
$this
->
dataLimitField
,
'in'
,
$adminIds
);
}
$fields
=
is_array
(
$this
->
selectpageFields
)
?
$this
->
selectpageFields
:
(
$this
->
selectpageFields
&&
$this
->
selectpageFields
!=
'*'
?
explode
(
','
,
$this
->
selectpageFields
)
:
[]);
$datalist
=
$this
->
model
->
where
(
$where
)
->
order
(
$order
)
->
page
(
$page
,
$pagesize
)
->
select
();
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
if
(
$primaryvalue
!==
null
)
{
$primaryvalue
=
array_unique
(
is_array
(
$primaryvalue
)
?
$primaryvalue
:
explode
(
','
,
$primaryvalue
));
$primaryvalue
=
implode
(
','
,
array_map
([
$this
->
model
->
getConnection
(),
'quote'
],
$primaryvalue
));
$datalist
=
$this
->
model
->
where
(
$where
)
->
orderRaw
(
"FIELD(`
{
$primarykey
}
`,
{
$primaryvalue
}
)"
)
->
page
(
$page
,
$pagesize
)
->
field
(
$this
->
selectpageFields
)
->
select
();
}
else
{
$datalist
=
$this
->
model
->
where
(
$where
)
->
order
(
$order
)
->
page
(
$page
,
$pagesize
)
->
field
(
$this
->
selectpageFields
)
->
select
();
}
foreach
(
$datalist
as
$index
=>
$item
)
{
unset
(
$item
[
'password'
],
$item
[
'salt'
]);
if
(
$this
->
selectpageFields
==
'*'
)
{
...
...
请
注册
或
登录
后发表评论