Ejemplo n.º 1
0
 public function act_getSendReplacement()
 {
     //$oi_obj = new OrderInfoModel ();
     $return = array();
     $SendReplacementType = SendReplacementModel::getSendReplacementType();
     $SendReplacementReason = SendReplacementModel::getSendReplacementReason();
     if ($SendReplacementType) {
         // 未找到订单
         $return['SendReplacementType'] = $SendReplacementType;
         //self::$errCode = SendReplacementModel::$errCode;
         //self::$errMsg = SendReplacementModel::$errMsg;
     } else {
         self::$errCode = 506;
         self::$errMsg = '获取失败!';
         return FALSE;
     }
     if ($SendReplacementType) {
         // 未找到订单
         $return['SendReplacementReason'] = $SendReplacementReason;
         //self::$errCode = SendReplacementModel::$errCode;
         //self::$errMsg = SendReplacementModel::$errMsg;
     } else {
         self::$errCode = 506;
         self::$errMsg = '获取失败!';
         return FALSE;
     }
     //var_dump($return); exit;
     self::$errCode = 200;
     self::$errMsg = '申请成功!';
     return $return;
 }
Ejemplo n.º 2
0
 /**
  *修改指定表记录(只要sql运行成功就算成功)
  */
 public static function getSendReplacementReason()
 {
     self::initDB();
     //$string = array2sql($data);
     $tName = 'om_sendReplacement_reason';
     $sql = "SELECT * FROM {$tName} ";
     //echo $sql; exit;
     $query = self::$dbConn->query($sql);
     $ret = array();
     $order_info = self::$dbConn->fetch_array_all($query);
     foreach ($order_info as $value) {
         $ret[$value['id']] = $value['reason'];
     }
     //var_dump($ret);
     if ($ret) {
         self::$errCode = "200";
         self::$errMsg = "获取成功";
     } else {
         self::$errCode = "003";
         self::$errMsg = "获取失败";
     }
     return $ret;
     //成功, 返回真
 }