|
|
@@ -423,7 +423,7 @@ public class TextdictInfoController extends BladeController {
|
|
|
String value;
|
|
|
if (type == 1) {
|
|
|
// 转数组格式
|
|
|
- value = String.format(" %s = if(substr(%s,1,1) = '[', %s, concat('[', @v := substr(%s,1, if(instr(%s, '_^_') - 1 < 0, char_length(%s), instr(%s, '_^_') - 1), @v ,']', substr(%s, instr(%s, '_^_'))))", split[0], split[0], split[0], split[0], split[0], split[0], split[0], split[0], split[0]);
|
|
|
+ value = String.format(" %s = if(substr(%s,1,1) = '[', %s, concat('[', @v := substr(%s,1, if(instr(%s, '_^_') - 1 < 0, char_length(%s), instr(%s, '_^_') - 1)), if(instr(@v,',') > 0, '', concat(',',@v)) ,']', substr(%s, instr(%s, '_^_'))))", split[0], split[0], split[0], split[0], split[0], split[0], split[0], split[0], split[0]);
|
|
|
} else {
|
|
|
// 转普通格式
|
|
|
value = String.format(" %s = if(substr(%s,1,1) = '[', concat(substr(%s, instr(%s, '[') + 1, (CHAR_LENGTH(%s) - instr(REVERSE(%s) , ']') - instr(%s, '['))), substr(%s, instr(%s, '_^_'))), %s)",
|
|
|
@@ -433,7 +433,7 @@ public class TextdictInfoController extends BladeController {
|
|
|
String value1;
|
|
|
if (type == 1) {
|
|
|
// 转数组格式
|
|
|
- value1 = String.format(" key_201 = concat(SUBSTRING_INDEX(key_201,'%s:',1), '%s:', if(substr(@v := if(INSTR(SUBSTRING_INDEX(key_201, '%s:',-1),'$$') - 1 < 0, SUBSTRING_INDEX(key_201, '%s:',-1), SUBSTR(SUBSTRING_INDEX(key_201, '%s:',-1), 1 , INSTR(SUBSTRING_INDEX(key_201, '%s:',-1),'$$') - 1)) , 1, 1) = '[', @v, concat('[', substr(@v,1, if(instr(@v, '_^_') - 1 < 0, char_length(@v), instr(@v, '_^_') - 1) ,']', substr(@v, instr(@v, '_^_')))) , if (INSTR(SUBSTRING_INDEX(key_201, 'key_16:',-1),'$$') - 1 < 0, '', concat('$$', SUBSTRING_INDEX(SUBSTRING_INDEX(key_201,'key_16:',-1),'$$',-1))) ) ",
|
|
|
+ value1 = String.format(" key_201 = concat(SUBSTRING_INDEX(key_201,'%s:',1), '%s:', if(substr(@v := if(INSTR(SUBSTRING_INDEX(key_201, '%s:',-1),'$$') - 1 < 0, SUBSTRING_INDEX(key_201, '%s:',-1), SUBSTR(SUBSTRING_INDEX(key_201, '%s:',-1), 1 , INSTR(SUBSTRING_INDEX(key_201, '%s:',-1),'$$') - 1)) , 1, 1) = '[', @v, concat('[', @vv := substr(@v,1, if(instr(@v, '_^_') - 1 < 0, char_length(@v), instr(@v, '_^_') - 1), if(instr(@vv,',') > 0, '', concat(',',@vv)) ,']', substr(@v, instr(@v, '_^_')))) , if (INSTR(SUBSTRING_INDEX(key_201, 'key_16:',-1),'$$') - 1 < 0, '', concat('$$', SUBSTRING_INDEX(SUBSTRING_INDEX(key_201,'key_16:',-1),'$$',-1))) ) ",
|
|
|
split[0],split[0], split[0], split[0], split[0], split[0]);
|
|
|
} else {
|
|
|
// 转普通格式
|