hanzhiwei 6ca897bcff 删除预案模块 RedisListenerConfig.java 配置 лет назад: 3
..
src 6ca897bcff 删除预案模块 RedisListenerConfig.java 配置 лет назад: 3
Dockerfile 44f0ed7749 docker文件编写 лет назад: 3
README.md f91101daaf 项目迁移 лет назад: 3
pom.xml 6ca897bcff 删除预案模块 RedisListenerConfig.java 配置 лет назад: 3
wait-for-it.sh 44f0ed7749 docker文件编写 лет назад: 3

README.md

气瓶模块

存储过程

CREATE DEFINER=`root`@`%` FUNCTION `getParList`(rootId BIGINT) RETURNS bigint(20)
BEGIN
    DECLARE sTemp BIGINT;
    DECLARE sTempPar BIGINT; 
		DECLARE sTempId BIGINT; 
    SET sTemp = NULL; 
    SET sTempPar =rootId; 
		SET sTempId =rootId; 

    #循环递归
    WHILE sTempPar<>-1 DO 
				SET sTempId =sTempPar; 
        SELECT parent_id INTO sTempPar FROM qp_air_goods_config where id=sTempPar; 
    END WHILE; 
		SELECT config_id INTO sTemp  FROM qp_air_goods_config where id=sTempId; 
RETURN sTemp; 
END

注意:如果创建存储过程失败且提示中包含 log_bin_trust_function_creators 字样的文本,请执行下方sql修改mysql设置

show variables like 'log_bin_trust_function_creators';
set global log_bin_trust_function_creators=1