最新代码
This commit is contained in:
@@ -2,6 +2,7 @@ package com.starry.generator.utils;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
@@ -48,7 +49,7 @@ public class VelocityUtils {
|
||||
VelocityContext velocityContext = new VelocityContext();
|
||||
velocityContext.put("tplCategory", genTableEntity.getTplCategory());
|
||||
velocityContext.put("tableName", genTableEntity.getTableName());
|
||||
velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】");
|
||||
velocityContext.put("functionName", StrUtil.isNotBlank(functionName) ? functionName : "【请填写功能名称】");
|
||||
velocityContext.put("ClassName", genTableEntity.getClassName());
|
||||
// 首字母小写
|
||||
velocityContext.put("className", StringUtils.uncapitalize(genTableEntity.getClassName()));
|
||||
@@ -148,7 +149,7 @@ public class VelocityUtils {
|
||||
*/
|
||||
public static void addDicts(Set<String> dicts, List<GenTableColumnEntity> columns) {
|
||||
for (GenTableColumnEntity column : columns) {
|
||||
if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny(column.getHtmlType(), new String[]{GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX})) {
|
||||
if (!column.isSuperColumn() && StrUtil.isNotBlank(column.getDictType()) && StringUtils.equalsAny(column.getHtmlType(), new String[]{GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX})) {
|
||||
dicts.add("'" + column.getDictType() + "'");
|
||||
}
|
||||
}
|
||||
@@ -204,7 +205,7 @@ public class VelocityUtils {
|
||||
* @return 上级菜单ID字段
|
||||
*/
|
||||
public static String getParentMenuId(JSONObject paramsObj) {
|
||||
if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID) && StringUtils.isNotEmpty(paramsObj.getString(GenConstants.PARENT_MENU_ID))) {
|
||||
if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID) && StrUtil.isNotBlank(paramsObj.getString(GenConstants.PARENT_MENU_ID))) {
|
||||
return paramsObj.getString(GenConstants.PARENT_MENU_ID);
|
||||
}
|
||||
return DEFAULT_PARENT_MENU_ID;
|
||||
|
||||
Reference in New Issue
Block a user