zoukankan      html  css  js  c++  java
  • ECShop笔记(积分类)

    /**
    * 获得指定分类下的积分兑换商品
    * @position exchange.php
    * @access  public
    * @param   string  $children  由get_children()函数返回的结果,可以往get_children()函数里面传入一个分类id,及得到其下的所有分类id
    * @param   num  $min  积分的下限
    * @param   num  $max  积分的上限
    * @param   String  $ext  扩展查询条件
    * @param   Num  $size  要查询的列表数量
    * @param   Num  $page  扩展查询条件,当前页
    * @param   String  $sort 排序的字段
    * @param   String  $order  降序或升序
    * @return  array
    */

    exchange_get_goods($children, $min, $max, $ext, $size, $page, $sort, $order)

    array(2) {
      [19] => array(10) {
        ["goods_id"] => string(2) "19"
        ["goods_name"] => string(14) "三星SGH-F..."
        ["name"] => string(14) "三星SGH-F258"
        ["goods_brief"] => string(134) "从整体来看,三星SGH-F258比较时尚可爱,三围尺寸为94×46×17.5mm,重量为96克,曲线柔和具有玲珑美感
    "
        ["goods_style_name"] => string(14) "三星SGH-F258"
        ["exchange_integral"] => string(5) "80000"
        ["type"] => string(1) "9"
        ["goods_thumb"] => string(52) "images/200905/thumb_img/19_thumb_G_1241970175208.jpg"
        ["goods_img"] => string(46) "images/200905/goods_img/19_G_1241970175091.jpg"
        ["url"] => string(31) "exchange.php?id=19&act=view"
      }
      [24] => array(10) {
        ["goods_id"] => string(2) "24"
        ["goods_name"] => string(4) "P806"
        ["name"] => string(4) "P806"
        ["goods_brief"] => string(0) ""
        ["goods_style_name"] => string(4) "P806"
        ["exchange_integral"] => string(5) "17000"
        ["type"] => string(1) "9"
        ["goods_thumb"] => string(52) "images/200905/thumb_img/24_thumb_G_1241971981429.jpg"
        ["goods_img"] => string(46) "images/200905/goods_img/24_G_1241971981284.jpg"
        ["url"] => string(31) "exchange.php?id=24&act=view"
      }

    /**
    * 获得积分兑换商品的详细信息
    * @position exchange.php
    * @access  public
    * @param   integer     $goods_id
    * @return  void
    */

    get_exchange_goods_info($goods_id)

    array(48) {
      ["goods_id"] => string(2) "19"
      ["cat_id"] => string(1) "3"
      ["goods_sn"] => string(9) "ECS000019"
      ["goods_name"] => string(14) "三星SGH-F258"
      ["goods_name_style"] => string(1) "+"
      ["click_count"] => string(1) "8"
      ["brand_id"] => string(1) "6"
      ["provider_name"] => string(0) ""
      ["goods_number"] => string(2) "12"
      ["goods_weight"] => string(4) "0克"
      ["market_price"] => string(7) "1029.60"
      ["shop_price"] => string(6) "858.00"
      ["promote_price"] => string(4) "0.00"
      ["promote_start_date"] => string(1) "0"
      ["promote_end_date"] => string(1) "0"
      ["warn_number"] => string(1) "1"
      ["keywords"] => string(49) "滑盖 GSM 258 时尚 蓝牙 黑色 金色 白色"
      ["goods_brief"] => string(134) "从整体来看,三星SGH-F258比较时尚可爱,三围尺寸为94×46×17.5mm,重量为96克,曲线柔和具有玲珑美感
    "
      ["goods_desc"] => string(848) "<p>从整体来看,三星SGH-F258比较<font size="3" color="#ff0000"><strong>时尚</strong></font>可爱,三围尺寸为94&times;46&times;17.5mm,重量为96克,曲线柔和具有玲珑美感。</p>
    <p>&nbsp;</p>
    <p>三星F258的前面板整体应用<strong><font size="3" color="#ff0000">镜面效果</font></strong>,2.0英寸显示屏幕略显窄小,导航键与功能键在滑盖滑开之前是前面板的全部控制键,没有挂断和接听键,不过,五向键有<font size="3"><strong><font color="#ff0000">音乐操</font><font color="#ff0000">作</font></strong></font>功能,明确显示了F258音乐手机的定位。</p>
    <p>&nbsp;</p>
    <p>F258的数字键键区采用了极具金属质感的平板式设计,每颗按键的面积足够大,按键与按键之间的间隔明显,操作起来手感舒适。</p>"
      ["goods_thumb"] => string(52) "images/200905/thumb_img/19_thumb_G_1241970175208.jpg"
      ["goods_img"] => string(46) "images/200905/goods_img/19_G_1241970175091.jpg"
      ["original_img"] => string(47) "images/200905/source_img/19_G_1241970175549.jpg"
      ["is_real"] => string(1) "1"
      ["extension_code"] => string(0) ""
      ["is_on_sale"] => string(1) "1"
      ["is_alone_sale"] => string(1) "1"
      ["is_shipping"] => string(1) "0"
      ["integral"] => string(1) "8"
      ["add_time"] => string(10) "2009-05-11"
      ["sort_order"] => string(3) "100"
      ["is_delete"] => string(1) "0"
      ["is_best"] => string(1) "1"
      ["is_new"] => string(1) "1"
      ["is_hot"] => string(1) "1"
      ["is_promote"] => string(1) "0"
      ["bonus_type_id"] => string(1) "0"
      ["last_update"] => string(10) "1269589154"
      ["goods_type"] => string(1) "9"
      ["seller_note"] => string(0) ""
      ["give_integral"] => string(2) "-1"
      ["rank_integral"] => string(2) "-1"
      ["suppliers_id"] => NULL
      ["is_check"] => NULL
      ["measure_unit"] => string(3) "台"
      ["goods_brand"] => string(6) "三星"
      ["exchange_integral"] => string(5) "80000"
      ["is_exchange"] => string(1) "1"
      ["watermark_img"] => string(13) "watermark_new"
    }

    /**
    * 获得分类下的积分兑换商品总数
    * @position exchange.php
    * @access  public
    * @param  $children    get_children()函数的返回值    $min:积分下限条件   $max:积分上限条件 
    * @return  integer
    */
    get_exchange_goods_count($children, $min = 0, $max = 0, $ext='')

    /**
    * 获得指定分类下的推荐商品
    * @position exchange.php
    * @access  public
    * @param   string      $type       推荐类型,可以是 best, new, hot, promote,注意,这里的类型是exchange_goods表里的类型,而不是商品表里的类型
    * @param   string      $cats       分类id的条件表达式 如: ‘cat_id=1’
    * @param   integer     $min        商品积分下限
    * @param   integer     $max        商品积分上限
    * @param   string      $ext        商品扩展查询
    * @return  array
    */
    get_exchange_recommend_goods($type = '', $cats = '', $min =0,  $max = 0, $ext='')

    array(1) {
      [0] => array(10) {
        ["id"] => string(2) "24"
        ["name"] => string(4) "P806"
        ["brief"] => string(0) ""
        ["brand_name"] => string(6) "联想"
        ["short_name"] => string(4) "P806"
        ["exchange_integral"] => string(5) "17000"
        ["thumb"] => string(52) "images/200905/thumb_img/24_thumb_G_1241971981429.jpg"
        ["goods_img"] => string(46) "images/200905/goods_img/24_G_1241971981284.jpg"
        ["url"] => string(31) "exchange.php?id=24&amp;act=view"
        ["short_style_name"] => string(4) "P806"
      }
    }

    /**
    * 获取积分兑换排行榜
    *
    * @access  public
    * @param   num  $time   查询的时间范围,单位为天
    * @param   num  $limit   数量
    * @param   string  $cats   查询的分类id,可以有多个,以逗隔开,如'1,2,4'*/
    get_jifen_rank($time=7,$limit=10,$cats = '')

    array(1) {
      [0] => array(10) {
        ["goods_id"] => string(2) "24"
        ["goods_name"] => string(4) "P806"
        ["shop_price"] => string(7) "2000.00"
        ["goods_thumb"] => string(52) "images/200905/thumb_img/24_thumb_G_1241971981429.jpg"
        ["goods_number"] => string(1) "1"
        ["integral"] => string(2) "20"
        ["short_name"] => string(4) "P806"
        ["url"] => string(15) "goods.php?id=24"
        ["thumb"] => string(52) "images/200905/thumb_img/24_thumb_G_1241971981429.jpg"
        ["price"] => string(10) "¥2000元"
      }
    }
  • 相关阅读:
    appium的log详细分析
    安卓版本6.0打开uiautomator报错
    wmware搬家
    Appium_Python_Api文档
    EF常用命令行
    Java学习----this和super(在继承中)
    Java学习----到底调用哪一个方法(多态)
    Java学习----方法的覆盖
    Java学习----对象间的继承
    Java学习----一个对象怎么调用另一个对象呢?
  • 原文地址:https://www.cnblogs.com/2050/p/1958066.html
Copyright © 2011-2022 走看看