1
This commit is contained in:
parent
70108bfe30
commit
843dcfd2f1
@ -2058,13 +2058,13 @@ class Maintainentry extends BaseController
|
|||||||
if (empty($type)) {
|
if (empty($type)) {
|
||||||
$this->apiError('缺少参数');
|
$this->apiError('缺少参数');
|
||||||
} else {
|
} else {
|
||||||
|
$ids = Db::table('cms_planting_type')->where('pid',$type)->column('id') ;
|
||||||
$where['user_id'] = $this->request->uid;
|
$where['user_id'] = $this->request->uid;
|
||||||
$where['type_id'] = $type;
|
|
||||||
$page = get_params('page')??1;
|
$page = get_params('page')??1;
|
||||||
$limit = get_params('limit')??10;
|
$limit = get_params('limit')??10;
|
||||||
$order = get_params('order')??'id';
|
$order = get_params('order')??'id';
|
||||||
|
|
||||||
$result = Db::table('cms_planting_information')->where($where)->page($page,$limit)->order($order. ' desc')
|
$result = Db::table('cms_planting_information')->where($where)->whereIn('type_id',$ids)->page($page,$limit)->order($order. ' desc')
|
||||||
->withAttr('createtime', function ($val,$data) {
|
->withAttr('createtime', function ($val,$data) {
|
||||||
return date('Y-m-d H:i:s',$data['createtime']);
|
return date('Y-m-d H:i:s',$data['createtime']);
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user