['name'], '=' => ['status'], ]; } /** * @notes 查看自提门店列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2021/8/11 3:54 下午 */ public function lists(): array { $lists = SelffetchShop::field('id,image,name,contact,mobile,business_start_time,business_end_time,status,create_time,province,city,district,address') ->append(['detailed_address','status_desc']) ->hidden(['province','city','district','address']) ->order('id','desc') ->where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->select() ->toArray(); return $lists; } /** * @notes 查看自提门店总数 * @return int * @author ljj * @date 2021/8/11 3:55 下午 */ public function count(): int { return SelffetchShop::where($this->searchWhere)->count(); } /** * @notes 设置导出字段 * @return string[] * @author ljj * @date 2021/8/11 8:34 下午 */ public function setExcelFields(): array { return [ // '数据库字段名(支持别名) => 'Excel表字段名' 'id' => 'ID', 'name' => '门店名称', 'contact' => '联系人', 'mobile' => '联系电话', 'detailed_address' => '门店地址', 'business_start_time' => '营业开始时间', 'business_end_time' => '营业结束时间', 'status_desc' => '状态', ]; } /** * @notes 设置默认表名 * @return string * @author ljj * @date 2021/8/11 8:34 下午 */ public function setFileName(): string { return '自提门店'; } }