Commit 740a9b48 authored by tangwei's avatar tangwei

修改函数

parent 61d6e442
...@@ -1141,6 +1141,7 @@ public class CommandController extends BaseController { ...@@ -1141,6 +1141,7 @@ public class CommandController extends BaseController {
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
response.setContentType("text/html"); response.setContentType("text/html");
response.setHeader("X-Frame-Options", "SAMEORIGIN");
ServletOutputStream out; ServletOutputStream out;
out = response.getOutputStream(); out = response.getOutputStream();
int b = 0; int b = 0;
......
...@@ -222,7 +222,29 @@ ...@@ -222,7 +222,29 @@
</changeSet> </changeSet>
<changeSet author="tw" id="20221121-01" runAlways="true">
<comment>`getBuildingParentIds`</comment>
<sql endDelimiter="#">
DROP FUNCTION IF EXISTS `getBuildingParentIds`#
CREATE DEFINER=`root`@`%` FUNCTION `getBuildingParentIds`(rootId bigint) RETURNS varchar(1000) CHARSET utf8mb4
DETERMINISTIC
BEGIN
DECLARE fid bigint default 0;
DECLARE str varchar(1000) default concat(rootId, '');
WHILE rootId != 0 do
SET fid =(SELECT parentid FROM get_building_tree WHERE instanceId = rootId);
IF fid != 0 THEN
SET str = concat(str, ',', fid);
SET rootId = fid;
ELSE
SET rootId = fid;
END IF;
END WHILE;
return str;
END#
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment