|
|
@ -5,7 +5,8 @@ import java.util.HashSet; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
import org.apache.velocity.VelocityContext; |
|
|
|
import org.apache.velocity.VelocityContext; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.ruoyi.common.core.constant.GenConstants; |
|
|
|
import com.ruoyi.common.core.constant.GenConstants; |
|
|
|
import com.ruoyi.common.core.utils.DateUtils; |
|
|
|
import com.ruoyi.common.core.utils.DateUtils; |
|
|
|
import com.ruoyi.common.core.utils.StringUtils; |
|
|
|
import com.ruoyi.common.core.utils.StringUtils; |
|
|
@ -75,7 +76,7 @@ public class VelocityUtils |
|
|
|
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) |
|
|
|
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) |
|
|
|
{ |
|
|
|
{ |
|
|
|
String options = genTable.getOptions(); |
|
|
|
String options = genTable.getOptions(); |
|
|
|
JSONObject paramsObj = JSONObject.parseObject(options); |
|
|
|
JSONObject paramsObj = JSON.parseObject(options); |
|
|
|
String parentMenuId = getParentMenuId(paramsObj); |
|
|
|
String parentMenuId = getParentMenuId(paramsObj); |
|
|
|
context.put("parentMenuId", parentMenuId); |
|
|
|
context.put("parentMenuId", parentMenuId); |
|
|
|
} |
|
|
|
} |
|
|
@ -83,7 +84,7 @@ public class VelocityUtils |
|
|
|
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) |
|
|
|
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) |
|
|
|
{ |
|
|
|
{ |
|
|
|
String options = genTable.getOptions(); |
|
|
|
String options = genTable.getOptions(); |
|
|
|
JSONObject paramsObj = JSONObject.parseObject(options); |
|
|
|
JSONObject paramsObj = JSON.parseObject(options); |
|
|
|
String treeCode = getTreecode(paramsObj); |
|
|
|
String treeCode = getTreecode(paramsObj); |
|
|
|
String treeParentCode = getTreeParentCode(paramsObj); |
|
|
|
String treeParentCode = getTreeParentCode(paramsObj); |
|
|
|
String treeName = getTreeName(paramsObj); |
|
|
|
String treeName = getTreeName(paramsObj); |
|
|
@ -381,7 +382,7 @@ public class VelocityUtils |
|
|
|
public static int getExpandColumn(GenTable genTable) |
|
|
|
public static int getExpandColumn(GenTable genTable) |
|
|
|
{ |
|
|
|
{ |
|
|
|
String options = genTable.getOptions(); |
|
|
|
String options = genTable.getOptions(); |
|
|
|
JSONObject paramsObj = JSONObject.parseObject(options); |
|
|
|
JSONObject paramsObj = JSON.parseObject(options); |
|
|
|
String treeName = paramsObj.getString(GenConstants.TREE_NAME); |
|
|
|
String treeName = paramsObj.getString(GenConstants.TREE_NAME); |
|
|
|
int num = 0; |
|
|
|
int num = 0; |
|
|
|
for (GenTableColumn column : genTable.getColumns()) |
|
|
|
for (GenTableColumn column : genTable.getColumns()) |
|
|
|