<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                文件路徑:shop/controllers/Seller/Promotion/GroupBuyCtl.php 一、團購列表【方法:index();】 1.套餐過期時間及備注 ~~~ if (!$this->selfSupportFlag) //普通店鋪 { $com_flag = $this->comboFlag; if ($this->comboFlag)//套餐可用 { //店鋪套餐信息 $combo_row = $this->groupBuyQuotaModel->getGroupBuyQuotaByShopID(Perm::$shopId); } } ~~~ 2.團購類型【全部、線上團、虛擬團】 3.活動狀態 ~~~ $cond_row['shop_id'] = Perm::$shopId; //團購類型 if (request_int('type')) { $cond_row['groupbuy_type'] = request_int('type'); } //活動狀態 if (request_int('state')) { //groupbuy_state--團購狀態 1.審核中 2.正常 3.結束 4.審核失敗 5.管理員關閉 $cond_row['groupbuy_state'] = request_int('state'); } //團購活動列表 $data = $this->groupBuyBaseModel->getGroupBuyGoodsList($cond_row, array('groupbuy_id' => 'DESC'), $page, $rows); ~~~ 二、新增(虛擬)團購【方法:add();addVr();】 1.團購活動開始時間:不得小于當前時間,且小于團購套餐結束時間 2.團購活動結束時間:不得小于當前時間,且小于團購套餐結束時間 3.團購商品:選擇商品 通過AJAX獲得店鋪所有商品,并且判斷商品是否已經參加過其他團購活動 ~~~ $(".btn_show_search_goods").on('click', function() { $('.search-goods-list').show(); $('.btn_search_goods').click(); }); //搜索店鋪商品 $('.btn_search_goods').on('click', function() { var url = "index.php?ctl=Seller_Promotion_GroupBuy&met=getShopGoods&typ=e"; var key = $("#key").val(); url = key ? url + "&goods_name=" + key : url; $('.search-goods-list-bd').load(url); }); ~~~ 4.提交 新增團購活動提交時進行表單驗證:`$('#form').validator({})` 參數:group_id -> 用于判斷當前活動是修改還是添加 ~~~ $group_info = $this->groupBuyBaseModel->getOneByWhere(['groupbuy_id'=>$group_id]); $this->groupBuyBaseModel->sql->startTransactionDb(); if($group_info) { //編輯活動 $field_row['groupbuy_state'] = 1; $status_flag = $this->groupBuyBaseModel->editGroupBuy($group_id, $field_row); } else { //添加活動 $status_flag = $this->groupBuyBaseModel->addGroupBuy($field_row, true); } ~~~ 三、套餐管理【方法:combo();】 1.店鋪已有套餐列表 `$data = $this->shopCostModel->listByWhere($cond_row,$order_row,$page, $rows);` 2.提交 (1)購買套餐提交表單驗證:`$('#form').validator({})` (2)在店鋪的賬期結算中扣除相關費用并且在paycenter中添加交易記錄 ~~~ $flag = $this->shopCostModel->addCost($field_row, true); //記錄到店鋪費用表 $combo_row = $this->groupBuyQuotaModel->getGroupBuyQuotaByShopID(Perm::$shopId);//根據店鋪id號查找店鋪購買套餐情況 if ($combo_row) { //1、原套餐已經過期,更新套餐開始時間和結束時間 if (strtotime($combo_row['combo_endtime']) < time()) { $field['combo_starttime'] = get_date_time(); $field['combo_endtime'] = date('Y-m-d H:i:s', strtotime("+$days days")); } elseif ((time() >= strtotime($combo_row['combo_starttime'])) && (time() <= strtotime($combo_row['combo_endtime']))) { //2、原套餐尚未過期,只需更新結束時間 $field['combo_endtime'] = date('Y-m-d H:i:s', strtotime("+$days days", strtotime($combo_row['combo_endtime']))); } $op_flag = $this->groupBuyQuotaModel->renewGroupBuyCombo($combo_row['combo_id'], $field); } else { //記錄不存在,添加套餐 $field['combo_starttime'] = get_date_time(); $field['combo_endtime'] = date('Y-m-d H:i:s', strtotime("+$days days")); $field['shop_id'] = Perm::$shopId; $field['shop_name'] = $this->shopInfo['shop_name']; $field['user_id'] = Perm::$userId; $field['user_nickname'] = Perm::$row['user_account']; $op_flag = $this->groupBuyQuotaModel->addGroupBuyCombo($field, true); } //在paycenter中添加交易記錄 $rs = get_url_with_encrypt($key, sprintf('%s?ctl=Api_Pay_Pay&met=addCombo&typ=json', $url), $formvars); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看