Browse Source

fix(model): 修正getAllCustomArrayData方法的默认排序参数

- 将默认排序从'sort asc,id desc'更改为'id desc'
- 保持其他参数不变包括where条件、字段选择、关联查询和偏移量
- 更新缓存键生成逻辑以反映新的排序默认值
master
zhangf@suq.cn 2 weeks ago
parent
commit
c8f614dc55
  1. 2
      app/model/Model.php

2
app/model/Model.php

@ -101,7 +101,7 @@ class Model extends BaseModel
return dataReturn($this->sucCode,$this->getMsg,$res);
}
public function getAllCustomArrayData($where,$order='sort asc,id desc',$field="*",$with=[],$offset=0): array
public function getAllCustomArrayData($where,$order='id desc',$field="*",$with=[],$offset=0): array
{
$key = md5($this->className . json_encode([$where,$order,$field,$with]));

Loading…
Cancel
Save