marge: 合并11.2版本
This commit is contained in:
17
database/install/function.sql
Normal file
17
database/install/function.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
DELIMITER //
|
||||
|
||||
CREATE FUNCTION IF NOT EXISTS omc_get_dict_value(field_value VARCHAR(255), type VARCHAR(255))
|
||||
RETURNS VARCHAR(255) CHARSET utf8mb4 COLLATE utf8mb4_general_ci
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE result VARCHAR(255);
|
||||
|
||||
SELECT `dict_value` INTO result
|
||||
FROM `sys_dict_data`
|
||||
WHERE `dict_label` = field_value AND `dict_type` = type
|
||||
LIMIT 1;
|
||||
|
||||
RETURN result;
|
||||
END //
|
||||
|
||||
DELIMITER ;
|
||||
Reference in New Issue
Block a user