只会写sql server的存储过程
今天试着写了个sql存储过程,却一直报错,求大神们帮忙看看
在线等
以下截取部分代码DELETE FROM shipmentQueryResultTable;
DECLARE table_index int,table_name VARCHAR(50),stmt VARCHAR(2000);
IF uin = 0
THEN
END IF
ELSE
  THEN
table_index = uin % 16;
  IF table_type = 1
THEN
SET table_name = CONCAT('expresssucshipmenttable', CAST(table_index AS VARCHAR(4)));
END
ELSEIF table_type = 2
THEN
SET table_name = CONCAT('expresstimeoutshipmenttable',CAST(table_index AS VARCHAR(4)));
END
IF shipmentID = 0
THEN
SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
'WHERE shipmentTime between ', fromDateTime, " and ", toDateTime); 
END
ELSE
THEN
SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
'WHERE (shipmentTime between ', fromDateTime, " and ", toDateTime, ")AND shipmentID=", shipmentID); 
END
prepare stmt from @sqlstr;
execute stmt;
END
END

解决方案 »

  1.   

    输入参数:
    table_type int
    uin bigint
    shipmentID bigint
    fromDateTime datetime
    toDateTime datetime
      

  2.   

    完整代码是什么,提示什么,去掉SET后面的END
      

  3.   

    救命啊,版主http://bbs.csdn.net/topics/390520778
      

  4.   


    DELETE FROM shipmentQueryResultTable;
    DECLARE table_index int,table_name VARCHAR(50),stmt VARCHAR(2000);IF uin = 0
    THEN
    IF shipmentID = 0
    THEN
    IF table_type = 1
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    ELSEIF table_type = 2
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    END IF
    ELSE
    THEN
    IF table_type = 1
    THEN
    16条insert语句
    END
    ELSEIF table_type = 2
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    END
    END
    END
    ELSE
    THEN
    table_index = uin % 16;
      IF table_type = 1
    THEN
    SET table_name = CONCAT('expresssucshipmenttable', CAST(table_index AS VARCHAR(4)));
    ELSEIF table_type = 2
    THEN
    SET table_name = CONCAT('expresstimeoutshipmenttable',CAST(table_index AS VARCHAR(4)));
    END IF
    IF shipmentID = 0
    THEN
    SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
    'WHERE shipmentTime between ', fromDateTime, " and ", toDateTime); 
    ELSE
    THEN
    SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
    'WHERE (shipmentTime between ', fromDateTime, " and ", toDateTime, ")AND shipmentID=", shipmentID); 
    END IF
    prepare stmt from @sqlstr;
    execute stmt;
    END IF
    END IF
    错误提示:1064-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE table_index.....if uin = 0 at line 5
      

  5.   


    DELETE FROM shipmentQueryResultTable;
    DECLARE table_index int,table_name VARCHAR(50),stmt VARCHAR(2000);IF uin = 0
    THEN
    IF shipmentID = 0
    THEN
    IF table_type = 1
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresssucshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    ELSEIF table_type = 2
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime;
    END IF
    ELSE
    THEN
    IF table_type = 1
    THEN
    16条insert语句
    END
    ELSEIF table_type = 2
    THEN
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable0 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable1 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable2 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable3 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable4 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable5 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable6 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable7 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable8 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable9 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable10 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable11 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable12 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable13 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable14 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    INSERT INTO shipmentQueryResultTable SELECT * FROM expresstimeoutshipmenttable15 WHERE shipmentTime BETWEEN fromDateTime AND toDateTime AND shipmentID = shipmentID;
    END
    END
    END
    ELSE
    THEN
    table_index = uin % 16;
      IF table_type = 1
    THEN
    SET table_name = CONCAT('expresssucshipmenttable', CAST(table_index AS VARCHAR(4)));
    ELSEIF table_type = 2
    THEN
    SET table_name = CONCAT('expresstimeoutshipmenttable',CAST(table_index AS VARCHAR(4)));
    END IF
    IF shipmentID = 0
    THEN
    SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
    'WHERE shipmentTime between ', fromDateTime, " and ", toDateTime); 
    ELSE
    THEN
    SET @sqlstr = comcat('INSERT INTO shipmentQueryResultTable SELECT * FROM ',table_name ,
    'WHERE (shipmentTime between ', fromDateTime, " and ", toDateTime, ")AND shipmentID=", shipmentID); 
    END IF
    prepare stmt from @sqlstr;
    execute stmt;
    END IF
    END IF
    错误提示:1064-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE table_index.....if uin = 0 at line 5大神,救我啊http://bbs.csdn.net/topics/390520778
      

  6.   

    MYSQL不支持匿名块,建立SP,将上述代码PASTE
      

  7.   

    不是匿名块,建立了过程,navicat for sql里面建立的,头部被navicat隐藏了
      

  8.   


    重新创建sp之后BEGIN
    DECLARE a INT;
    END直接就报1064错误了
      

  9.   

    直接用MYSQL命令行工具测试, 应该是 delimiter 设置的问题。delimiter //
    create procedure xxx 
    BEGIN
    DECLARE a INT;
    END//
      

  10.   


    在之前我已经加上了delimiter //
    但是还是报1064的错误
      

  11.   

    把你的SP用文本贴出来DELIMITER $$DROP PROCEDURE IF EXISTS `ff1`$$CREATE PROCEDURE `ff1`()
    BEGIN
    DECLARE a INT;
    IF a=1 THEN SET a=0;
    ELSEIF a=2 THEN SET a=3;
    END IF;
    END$$DELIMITER ;
      

  12.   

    嗯  我在控制台写了个简单的sp,但是始终是报1064错误,指向我的最后一行“END”
    delimiter //
    create procedure test1()
    BEGIN
    DECLARE a INT;
    SET  a=0;
    IF a=0
    THEN
    SET a=1;
    ELSEIF a=1
    SET a=0
    END IF
    END代码很简单,不知道为什么会报这个错误
      

  13.   

    不知道你看过我的示例没有:
    DELIMITER $$DROP PROCEDURE IF EXISTS `test1`$$CREATE DEFINER=`root`@`localhost` PROCEDURE `test1`()
    BEGIN
     DECLARE a INT;
     SET a=0;
     IF a=0 THEN
     SET a=1;
     ELSEIF a=1 THEN
     SET a=0;
     END IF;
      END$$DELIMITER ;
      

  14.   

    谢谢,我的END IF后面没加分号加了之后可以了,mysql存储过程的语法不太熟悉,我也太粗心了
    再问个问题  下面的字符串拼接报错   table_index为int类型   table_name定义为varchar(100)
    SET table_name = CONCAT("expresssucshipmenttable", CAST(table_index AS VARCHAR(4)));
      

  15.   

    CAST(table_index AS CHAR(4))
      

  16.   

    谢谢WWWWA同学,感觉耐心的指教,问题解决了,结贴!