Exemplo n.º 1
0
 public function index($limit = '')
 {
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $couponCodes = (new CurdUtil($this->couponCodeModel))->readLimit($where, $limit, 'coupon_code_id desc');
     $couponCodesCount = (new CurdUtil($this->couponCodeModel))->count($where);
     $pages = (new PaginationUtil($couponCodesCount))->pagination();
     $this->view('couponCode/index', array('coupons' => $couponCodes, 'limit' => $limit + 0, 'pages' => $pages, 'params' => RequestUtil::getParams()));
 }
Exemplo n.º 2
0
 public function index($limit = '')
 {
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $users = (new CurdUtil($this->userModel))->readLimit($where, $limit);
     $usersCount = (new CurdUtil($this->userModel))->count($where);
     $pages = (new PaginationUtil($usersCount))->pagination();
     $this->view('user/index', array('users' => $users, 'pages' => $pages, 'params' => RequestUtil::getParams()));
 }
Exemplo n.º 3
0
 public function index($limit = '')
 {
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $exchangeGoods = (new CurdUtil($this->exchangeGoodsModel))->readLimit($where, $limit, 'exchange_goods_id desc');
     $exchangeGoodsCount = (new CurdUtil($this->exchangeGoodsModel))->count($where);
     $pages = (new PaginationUtil($exchangeGoodsCount))->pagination();
     $shops = (new ShopModel())->getAllShops();
     $this->view('exchangeGoods/index', array('exchangeGoods' => $exchangeGoods, 'limit' => $limit + 0, 'pages' => $pages, 'params' => RequestUtil::getParams(), 'shops' => $shops));
 }
Exemplo n.º 4
0
 /**
  * 美容师列表 没有使用分页
  */
 public function index()
 {
     $timeSetting = $this->timeSetting;
     $workTime = new WorkTimeUtil();
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $beauticians = (new BeauticianModel())->getAllBeauticians($where);
     $shops = (new ShopModel())->getAllShops();
     $beauticianOrderCounts = (new OrderModel())->getOrderCountsByBeauticianId();
     $this->view('beautician/index', array('beauticians' => $beauticians, 'shops' => $shops, 'params' => RequestUtil::getParams(), 'beauticianOrderCounts' => $beauticianOrderCounts, 'timeSetting' => $timeSetting, 'workTime' => $workTime->beauticianWorkTime));
 }
Exemplo n.º 5
0
 public function index($limit = '')
 {
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $projects = (new CurdUtil($this->projectModel))->readLimit($where, $limit, 'project_id desc');
     $projectsCount = (new CurdUtil($this->projectModel))->count($where);
     $pages = (new PaginationUtil($projectsCount))->pagination();
     $categories = (new CategoryModel())->getAllCategories();
     $shops = (new ShopModel())->getAllShops();
     $categoryId = $this->input->get('category_id') + 0;
     $this->view('project/index', array('projects' => $projects, 'shops' => $shops, 'limit' => $limit + 0, 'pages' => $pages, 'categories' => $categories, 'params' => RequestUtil::getParams(), 'categoryId' => $categoryId));
 }
Exemplo n.º 6
0
 public function index($limit = '')
 {
     // 获得查询参数, 查询参数都为like模糊查询
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $this->db->select('*');
     $customers = (new CurdUtil($this->customerModel))->readLimit($where, $limit, 'customer_id desc');
     $customersCount = (new CurdUtil($this->customerModel))->count($where);
     $pages = (new PaginationUtil($customersCount))->pagination();
     // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
     $sex = array('未知', '男', '女');
     $this->view('customer/index', array('customers' => $customers, 'pages' => $pages, 'params' => RequestUtil::getParams(), 'limit' => $limit, 'sex' => $sex));
 }
Exemplo n.º 7
0
 public function index($limit = '')
 {
     // 获得查询参数, 查询参数都为like模糊查询
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $this->db->select('*');
     $orders = (new CurdUtil($this->offlineOrderModel))->readLimit($where, $limit, 'offline_order_id desc');
     $ordersCount = (new CurdUtil($this->offlineOrderModel))->count($where);
     $pages = (new PaginationUtil($ordersCount))->pagination();
     $shops = (new ShopModel())->getAllShops();
     $beauticians = (new BeauticianModel())->getAllFormatBeauticians();
     $this->view('offline/order', array('orders' => $orders, 'pages' => $pages, 'beauticians' => $beauticians, 'params' => RequestUtil::getParams(), 'shops' => $shops, 'limit' => $limit));
 }
Exemplo n.º 8
0
 public function index($limit = '')
 {
     $shopId = $this->input->get('shop_id') + 0;
     if ($shopId == 0) {
         unset($_GET['shop_id']);
     } else {
         $this->db->where_in('shop_id', array(0, $shopId));
     }
     // 获得查询参数, 查询参数都为like模糊查询
     $where = RequestUtil::buildLikeQueryParamsWithDisabled();
     $this->db->select('*');
     $this->db->select('order_status+0 as order_sign', false);
     $orders = (new CurdUtil($this->orderModel))->readLimit($where, $limit, 'order_id desc');
     $ordersCount = (new CurdUtil($this->orderModel))->count($where);
     $pages = (new PaginationUtil($ordersCount))->pagination();
     $shops = (new ShopModel())->getAllShops();
     $beauticians = (new BeauticianModel())->getAllFormatBeauticians();
     $this->view('order/index', array('orders' => $orders, 'pages' => $pages, 'beauticians' => $beauticians, 'params' => RequestUtil::getParams(), 'shops' => $shops, 'limit' => $limit));
 }