Client.php 1.74 KB
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: elkan
 * Date: 14-8-5
 * Time: 下午6:04
 * To change this template use File | Settings | File Templates.
 */
class YHMSupport_Models_Advise_Client {

    /**
     *
     * @var YHMSupport_Models_Advise_Dao
     */
    private static $dao;

    /**
     *
     * @return YHMSupport_Models_Advise_Dao
     */
    static private function dao() {
        if (empty(self::$dao)) {
            self::$dao = new YHMSupport_Models_Advise_Dao();
        }
        return self::$dao;
    }

    /**
     * 用户提交建议
     * @param int $uid
     * @param string $content
     * @return int
     */
    static function setAdvise($uid, $content,$client_version="",$client_type="",$os_version="",$parent_id=0,$user_type=1) {
        if ((int) $uid < 0 || empty($content)) {
            return 0;
        }
        return self::dao()->setAdvise((int) $uid, $content,$client_version,$client_type,$os_version,$parent_id,$user_type);
    }
  /**
   * 反馈数
   */
  static function getAdviseCount($startTime,$endTime,$type,$id,$status)
  {
      return self::dao()->getAdviseCount($startTime,$endTime,$type,$id,$status);
  }
   /**
   * 反馈数
   */
  static function getAdviseList($startTime,$endTime,$type,$id,$status,$offset, $size)
  {
       return self::dao()-> getAdviseList($startTime,$endTime,$type,$id,$status,$offset, $size); 
  }
  /*
   * 反馈详情
   */
  static function getOneById($id)
  {
      return self::dao()->getOneById($id);
  }
   /*
   * 反馈回复列表
   */
   static function getCustListByPid($pid)
  {
      return self::dao()->getCustListByPid($pid);
  }
  /*
   * 反馈回复列表
   */
   static function setReply($id,$status){
      return self::dao()->setReply($id,$status);  
   }
  
}