insinfo($arr); return $id; } /* * 20211227 * steelxu5 */ public function getlistbywhere($arr) { $t_f = new feedbackmodel(); $where = []; $page = isset($arr['page']) && !empty($arr['page']) ? $arr['page'] : 1; $size = isset($arr['size']) && !empty($arr['size']) ? $arr['size'] : 10; if (isset($arr['wname']) && !empty($arr['wname']) && is_string($arr['wname'])) { $where['u.wname'] = ['like', "%" . $arr['wname'] . "%"]; } if (isset($arr['telno']) && !empty($arr['telno']) && is_numeric($arr['telno'])) { $where['fb.usertel'] = ['like', "%" . $arr['telno'] . "%"]; } if (isset($arr['isopr']) && is_numeric($arr['isopr']) && in_array($arr['isopr'], [0, 1])) { $where['fb.isopr'] = $arr['isopr']; } if (isset($arr['istel']) && is_numeric($arr['istel']) && in_array($arr['istel'], [0, 1])) { $where['fb.istel'] = $arr['istel']; } if (isset($arr['createtime']) && is_array($arr['createtime'])) { $createtime = array_filter($arr['createtime']); if (2 == count($createtime)) { $where['fb.createtime'] = ['between', $arr['createtime']]; } } $count = $t_f->getList($where, 'count'); if ($count <= 0) { return backarr(0, "无数据"); } $list = $t_f->getList($where, 'fb.*,u.wname,u.telno', $page, $size); $data = [ 'count' => $count, 'list' => $list, ]; return backarr(1, "查询成功", $data); } }