Exemplo n.º 1
0
 public function getBeauticianWorkTime()
 {
     $workTime = ConfigUtil::loadConfig($this->beauticianWorkTimeConfigFile);
     if (is_array($workTime)) {
         $this->beauticianWorkTime = $workTime;
     }
     return $workTime;
 }
Exemplo n.º 2
0
 public function __construct($totalSize = 0, $config = 'pagination')
 {
     $config = ConfigUtil::loadConfig($config);
     $instance = get_instance();
     $config['total_rows'] = $totalSize;
     $config['base_url'] = RequestUtil::CM();
     $instance->load->library('pagination', $config);
     $this->pagination = $instance->pagination;
 }
Exemplo n.º 3
0
 public function __construct($config = 'weixin')
 {
     $weixinConfig = ConfigUtil::loadConfig($config);
     $this->appId = $weixinConfig['appId'];
     $this->appSecret = $weixinConfig['appSecret'];
     $this->mchId = $weixinConfig['mchId'];
     $this->apiKey = $weixinConfig['apiKey'];
     $this->noticeUrl = $weixinConfig['noticeUrl'];
 }
Exemplo n.º 4
0
 public function __construct($config = 'weixin')
 {
     $weixinConfig = ConfigUtil::loadConfig($config);
     $this->appId = $weixinConfig['appId'];
     $this->appSecret = $weixinConfig['appSecret'];
     $this->mchId = $weixinConfig['mchId'];
     $this->apiKey = $weixinConfig['apiKey'];
     $this->noticeUrl = $weixinConfig['noticeUrl'];
     include 'WxPayPubHelper/WxPayPubHelper.php';
 }
 public function getCustomerExchangeGoodsList($openId, $offset = 0)
 {
     $exchangeGoods = new ExchangeGoodsModel();
     $where = array('open_id' => $openId);
     $this->db->order_by('customer_exchange_goods_id desc');
     $pagination = ConfigUtil::loadConfig('pagination');
     $limit = $pagination['per_page'];
     $this->db->join($exchangeGoods->table, "{$this->table}.exchange_goods_id={$exchangeGoods->table}.exchange_goods_id");
     $query = $this->db->get_where($this->table, $where, $limit, $offset);
     return $query->result_array();
 }
Exemplo n.º 6
0
 /**
  * 获得当前用户领取的优惠券
  * @param $openId
  * @param int $offset
  */
 public function getCustomerCouponList($openId, $offset = 0)
 {
     $coupon = new CouponModel();
     $where = array('open_id' => $openId);
     $this->db->order_by('customer_coupon_id desc');
     $pagination = ConfigUtil::loadConfig('pagination');
     $limit = $pagination['per_page'];
     $this->db->join($coupon->table, "{$this->table}.coupon_id={$coupon->table}.coupon_id");
     $query = $this->db->get_where($this->table, $where, $limit, $offset);
     return $query->result_array();
 }
Exemplo n.º 7
0
 /**
  * 我的订单
  * @param $openId
  * @param int $orderStatus
  * @param int $offset
  * @return mixed
  */
 public function getUserOrders($openId, $orderStatus = 0, $offset = 0)
 {
     $paginationConfig = ConfigUtil::loadConfig('user-center');
     $rows = $paginationConfig['per_page'];
     $sql = "select a.*, b.*, c.name as beautician_name, a.order_status+0 as order_sign from `order` as a" . " left join order_project as b on a.order_id=b.order_id" . " left join beautician as c on a.beautician_id=c.beautician_id ";
     $orderStatusWhere = '';
     if ($orderStatus) {
         $orderStatusWhere = " and a.order_status={$orderStatus}";
     }
     $sql .= " where a.disabled=0 and a.open_id='{$openId}'{$orderStatusWhere}" . " order by a.order_id desc limit {$offset}, {$rows}";
     return (new CurdUtil($this))->query($sql);
 }
Exemplo n.º 8
0
 /**
  * 缩略图
  * @param $resizeType
  * @param $upload
  */
 public function resizeImage($resizeType, $upload)
 {
     if (!is_array($resizeType)) {
         $resizeType = array($resizeType);
     }
     $this->instance->load->library('image_lib');
     foreach ($resizeType as $type) {
         $config = ConfigUtil::loadConfig($type);
         $config['source_image'] = $upload['full_path'];
         $this->instance->image_lib->initialize($config);
         $this->instance->image_lib->resize();
         $this->instance->image_lib->clear();
     }
 }
Exemplo n.º 9
0
 public function readLimit($where, $limit = '', $order = '', $config = 'pagination')
 {
     if (!$limit) {
         $limit = 0;
     }
     if (empty($where)) {
         $where = '1=1';
     }
     if ($order) {
         $this->db->order_by($order);
     }
     $pagination = ConfigUtil::loadConfig($config);
     $offset = $pagination['per_page'];
     $this->model->beforeRead();
     $query = $this->db->get_where($this->table, $where, $offset, $limit);
     $this->model->afterRead();
     return $this->result($query);
 }