Commit da9c3b16 authored by 赵啸非's avatar 赵啸非

添加apipost生成接口文档逻辑

parent 4fdec01a
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.mortals.xhx.base.system.gentable.model; package com.mortals.xhx.base.system.gentable.model;
import java.util.Date; import java.util.Date;
import java.util.List;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.common.utils.StringUtils; import com.mortals.xhx.common.utils.StringUtils;
...@@ -604,6 +606,26 @@ public class GentableColumnEntity extends GentableColumnEntityExt { ...@@ -604,6 +606,26 @@ public class GentableColumnEntity extends GentableColumnEntityExt {
} }
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (StringUtils.isNotEmpty(remarks)) { if (StringUtils.isNotEmpty(remarks)) {
// 可能的分隔符列表
String[] possibleDelimiters = { ",", "," };
// 尝试不同的分隔符进行拆分
for (String delimiter : possibleDelimiters) {
List<String> result = StrUtil.split(remarks, delimiter);
if (result.size() > 1) {
System.out.println("使用分隔符 '" + delimiter + "' 拆分后的结果:");
for (String value : result) {
int point = value.indexOf(".");
if (point != -1) {
Object startStr = value.subSequence(0, point);
String endStr = value.substring(point + 1);
sb.append("").append(startStr).append("=").append(endStr).append(",");
}
}
break;
}
}
/*
for (String value : remarks.split(",")) { for (String value : remarks.split(",")) {
if (StringUtils.isNotEmpty(value)) { if (StringUtils.isNotEmpty(value)) {
int point = value.indexOf("."); int point = value.indexOf(".");
...@@ -613,7 +635,7 @@ public class GentableColumnEntity extends GentableColumnEntityExt { ...@@ -613,7 +635,7 @@ public class GentableColumnEntity extends GentableColumnEntityExt {
sb.append("").append(startStr).append("=").append(endStr).append(","); sb.append("").append(startStr).append("=").append(endStr).append(",");
} }
} }
} }*/
return sb.deleteCharAt(sb.length() - 1).toString(); return sb.deleteCharAt(sb.length() - 1).toString();
} else { } else {
return this.columnComment; return this.columnComment;
......
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