From b1cc2ffc3cc385f1e361b0db2977e9cac2143209 Mon Sep 17 00:00:00 2001 From: icanci Date: Sat, 19 Aug 2023 18:44:51 +0800 Subject: [PATCH] =?UTF-8?q?BuryingApi=20=E5=92=8C=20BuryingController=20?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- biz/pom.xml | 25 +++ .../loopstack/bic/biz/mapper/BaseMapper.java | 19 ++ .../bic/biz/mapper/BuryingMapper.java | 15 ++ .../bic/biz/service/BuryingService.java | 16 ++ .../bic/biz/service/BuryingServiceImpl.java | 12 -- .../biz/service/impl/BuryingServiceImpl.java | 38 ++++ .../cn/loopstack/bic/common/result/R.java | 154 ++++++++++++++ .../bic/common/result/ResultCodes.java | 22 ++ .../bic/common/result/ResultMessages.java | 11 + .../bic/dal/mongo/common/PageList.java | 84 ++++++++ .../bic/dal/mongo/common/Paginator.java | 194 ++++++++++++++++++ .../bic/dal/mongo/daointerface/BaseDAO.java | 71 +++++++ .../dal/mongo/daointerface/BuryingDAO.java | 40 ++++ .../bic/dal/mongo/dateobject/BaseDO.java | 84 ++++++++ .../bic/dal/mongo/dateobject/BuryingDO.java | 76 +++++++ .../bic/dal/mongo/mongo/AbstractBaseDAO.java | 50 +++++ .../bic/dal/mongo/mongo/MongoBuryingDAO.java | 66 ++++++ .../bic/dal/mongo/mongo/MongoPageHelper.java | 114 ++++++++++ .../bic/dal/mongo/utils/EnvUtils.java | 33 +++ .../bic/dal/mongo/utils/IDHolder.java | 40 ++++ .../dal/mongo/utils/service/EnvService.java | 14 ++ .../utils/service/IDGeneratorService.java | 15 ++ .../utils/service/impl/EnvServiceImpl.java | 30 +++ .../service/impl/IDGeneratorServiceImpl.java | 31 +++ sdk/pom.xml | 16 -- views/pom.xml | 74 +++---- .../loopstack/bic/views/BicApplication.java | 3 +- views/src/main/resources/application.yml | 6 + web/pom.xml | 10 + .../cn/loopstack/bic/web/api/BuryingApi.java | 29 +++ .../bic/web/controller/BuryingController.java | 26 +++ .../bic/web/model/BuryingModelVO.java | 29 +++ .../cn/loopstack/bic/web/package-info.java | 5 + 33 files changed, 1386 insertions(+), 66 deletions(-) create mode 100644 biz/src/main/java/cn/loopstack/bic/biz/mapper/BaseMapper.java create mode 100644 biz/src/main/java/cn/loopstack/bic/biz/mapper/BuryingMapper.java delete mode 100644 biz/src/main/java/cn/loopstack/bic/biz/service/BuryingServiceImpl.java create mode 100644 biz/src/main/java/cn/loopstack/bic/biz/service/impl/BuryingServiceImpl.java create mode 100644 common/src/main/java/cn/loopstack/bic/common/result/R.java create mode 100644 common/src/main/java/cn/loopstack/bic/common/result/ResultCodes.java create mode 100644 common/src/main/java/cn/loopstack/bic/common/result/ResultMessages.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/common/PageList.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/common/Paginator.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BaseDAO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BaseDO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BuryingDO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/AbstractBaseDAO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoPageHelper.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/EnvUtils.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/IDHolder.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/EnvService.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/IDGeneratorService.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/EnvServiceImpl.java create mode 100644 dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/IDGeneratorServiceImpl.java create mode 100644 web/src/main/java/cn/loopstack/bic/web/api/BuryingApi.java create mode 100644 web/src/main/java/cn/loopstack/bic/web/controller/BuryingController.java create mode 100644 web/src/main/java/cn/loopstack/bic/web/model/BuryingModelVO.java create mode 100644 web/src/main/java/cn/loopstack/bic/web/package-info.java diff --git a/biz/pom.xml b/biz/pom.xml index 451da6b..cda891e 100644 --- a/biz/pom.xml +++ b/biz/pom.xml @@ -22,5 +22,30 @@ bic-dal ${parent.version} + + org.mapstruct + mapstruct + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + + + + \ No newline at end of file diff --git a/biz/src/main/java/cn/loopstack/bic/biz/mapper/BaseMapper.java b/biz/src/main/java/cn/loopstack/bic/biz/mapper/BaseMapper.java new file mode 100644 index 0000000..6a5dd9f --- /dev/null +++ b/biz/src/main/java/cn/loopstack/bic/biz/mapper/BaseMapper.java @@ -0,0 +1,19 @@ +package cn.loopstack.bic.biz.mapper; + +import java.util.Collection; +import java.util.List; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:15 + */ +public interface BaseMapper { + + R do2vo(T t); + + List dos2vos(Collection ts); + + T vo2do(R r); + + List vos2dos(List rs); +} diff --git a/biz/src/main/java/cn/loopstack/bic/biz/mapper/BuryingMapper.java b/biz/src/main/java/cn/loopstack/bic/biz/mapper/BuryingMapper.java new file mode 100644 index 0000000..0df5894 --- /dev/null +++ b/biz/src/main/java/cn/loopstack/bic/biz/mapper/BuryingMapper.java @@ -0,0 +1,15 @@ +package cn.loopstack.bic.biz.mapper; + +import org.mapstruct.Mapper; +import org.mapstruct.NullValueMappingStrategy; + +import cn.loopstack.bic.common.model.BuryingVO; +import cn.loopstack.bic.dal.mongo.dateobject.BuryingDO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:15 + */ +@Mapper(componentModel = "spring", uses = {}, nullValueMappingStrategy = NullValueMappingStrategy.RETURN_NULL) +public interface BuryingMapper extends BaseMapper { +} diff --git a/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingService.java b/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingService.java index 5035c7a..f24d630 100644 --- a/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingService.java +++ b/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingService.java @@ -1,9 +1,25 @@ package cn.loopstack.bic.biz.service; +import java.util.List; + +import cn.loopstack.bic.common.model.BuryingVO; + /** * @author icanci * @since 1.0 Created in 2023/08/19 15:40 */ public interface BuryingService { + /** + * 批量插入 + * + * @param buryingList buryingList + */ + void batchInsert(List buryingList); + /** + * 查询所有数据 + * + * @return 返回所有数据 + */ + List queryAll(); } diff --git a/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingServiceImpl.java b/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingServiceImpl.java deleted file mode 100644 index 4ef8840..0000000 --- a/biz/src/main/java/cn/loopstack/bic/biz/service/BuryingServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.loopstack.bic.biz.service; - -import org.springframework.stereotype.Service; - -/** - * @author icanci - * @since 1.0 Created in 2023/08/19 15:40 - */ -@Service -public class BuryingServiceImpl implements BuryingService { - -} diff --git a/biz/src/main/java/cn/loopstack/bic/biz/service/impl/BuryingServiceImpl.java b/biz/src/main/java/cn/loopstack/bic/biz/service/impl/BuryingServiceImpl.java new file mode 100644 index 0000000..4f870eb --- /dev/null +++ b/biz/src/main/java/cn/loopstack/bic/biz/service/impl/BuryingServiceImpl.java @@ -0,0 +1,38 @@ +package cn.loopstack.bic.biz.service.impl; + +import java.util.List; + +import javax.annotation.Resource; + +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; + +import cn.loopstack.bic.biz.mapper.BuryingMapper; +import cn.loopstack.bic.biz.service.BuryingService; +import cn.loopstack.bic.common.model.BuryingVO; +import cn.loopstack.bic.dal.mongo.daointerface.BuryingDAO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 15:40 + */ +@Service +public class BuryingServiceImpl implements BuryingService { + @Resource + private BuryingDAO buryingDAO; + @Resource + private BuryingMapper buryingMapper; + + @Override + public void batchInsert(List buryingList) { + if (CollectionUtils.isEmpty(buryingList)) { + return; + } + buryingDAO.batchInsert(buryingMapper.vos2dos(buryingList)); + } + + @Override + public List queryAll() { + return buryingMapper.dos2vos(buryingDAO.queryAll()); + } +} diff --git a/common/src/main/java/cn/loopstack/bic/common/result/R.java b/common/src/main/java/cn/loopstack/bic/common/result/R.java new file mode 100644 index 0000000..005cb70 --- /dev/null +++ b/common/src/main/java/cn/loopstack/bic/common/result/R.java @@ -0,0 +1,154 @@ +package cn.loopstack.bic.common.result; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; +import java.util.StringJoiner; + +/** + * 通用返回结果 + * + * @author icanci + * @since 1.0 Created in 2022/04/04 19:11 + */ +public class R implements Serializable { + private static final long serialVersionUID = -1343013883236338104L; + /** 是否成功 */ + private boolean ok; + /** 错误码 */ + private int code; + /** 错误信息 */ + private String message; + /** 返回前端数据 */ + private Map data = new HashMap<>(); + + public R() { + } + + /** + * Builder + * + * @return Builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * BuilderOK + * + * @return Builder + */ + public static Builder builderOk() { + return new Builder().BuilderOK(); + } + + /** + * BuilderFail + * + * @return Builder + */ + public static Builder builderFail() { + return new Builder().BuilderFail(); + } + + public static class Builder { + /** 是否成功 */ + private boolean ok; + /** 错误码 */ + private int code; + /** 错误信息 */ + private String message; + /** 返回前端数据 */ + private Map data = new HashMap(); + + private Builder() { + + } + + public Builder(boolean ok, int code) { + this.ok = ok; + this.code = code; + } + + private Builder BuilderOK() { + this.ok = true; + this.code = ResultCodes.SUCCESS; + return this; + } + + private Builder BuilderFail() { + this.ok = false; + this.code = ResultCodes.FAIL_SYSTEM; + return this; + } + + public Builder message(String val) { + message = val; + return this; + } + + public Builder code(Integer val) { + code = val; + return this; + } + + public Builder data(String key, Object value) { + data.put(key, value); + return this; + } + + public Builder data(Map map) { + data = map; + return this; + } + + public R build() { + return new R(this); + } + } + + private R(Builder builder) { + this.ok = builder.ok; + this.code = builder.code; + this.message = builder.message; + this.data = builder.data; + } + + public boolean isOk() { + return ok; + } + + public void setOk(boolean ok) { + this.ok = ok; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Map getData() { + return data; + } + + public void setData(Map data) { + this.data = data; + } + + @Override + public String toString() { + return new StringJoiner(",").add("ok=" + ok).add("code=" + code).add("message=" + message).add("data=" + data).toString(); + } +} diff --git a/common/src/main/java/cn/loopstack/bic/common/result/ResultCodes.java b/common/src/main/java/cn/loopstack/bic/common/result/ResultCodes.java new file mode 100644 index 0000000..ec01ffd --- /dev/null +++ b/common/src/main/java/cn/loopstack/bic/common/result/ResultCodes.java @@ -0,0 +1,22 @@ +package cn.loopstack.bic.common.result; + +/** + * code集合 + * + * @author icanci + * @since 1.0 Created in 2022/04/04 20:09 + */ +public interface ResultCodes { + /** 成功 */ + int SUCCESS = 200; + /** 400异常 */ + int FAIL_404 = 404; + /** 500异常 */ + int FAIL_500 = 500; + /** 账号异常 */ + int ACCOUNT_ERROR_CODE = 1000; + /** 账号登录超时 */ + int LOGIN_TIME_OUT = 1001; + /** 默认失败原因 */ + int FAIL_SYSTEM = 9999; +} diff --git a/common/src/main/java/cn/loopstack/bic/common/result/ResultMessages.java b/common/src/main/java/cn/loopstack/bic/common/result/ResultMessages.java new file mode 100644 index 0000000..37fe358 --- /dev/null +++ b/common/src/main/java/cn/loopstack/bic/common/result/ResultMessages.java @@ -0,0 +1,11 @@ +package cn.loopstack.bic.common.result; + +/** + * message集合 + * + * @author icanci + * @since 1.0 Created in 2022/04/04 20:09 + */ +public interface ResultMessages { + String ACCOUNT_ERROR_MESSAGE = "账号%s异常,请重新登录"; +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/PageList.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/PageList.java new file mode 100644 index 0000000..8a5f917 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/PageList.java @@ -0,0 +1,84 @@ +package cn.loopstack.bic.dal.mongo.common; + +import java.io.Serializable; +import java.util.Collection; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 17:51 + */ +public class PageList implements Serializable { + /** */ + private static final long serialVersionUID = 1L; + + /** 分页器 */ + private Paginator paginator; + + /** 数据集 */ + private Collection data; + + /** + * 默认构造函数 + */ + public PageList() { + paginator = new Paginator(); + } + + /** + * 构造函数 + * + * @param data 数据集 + */ + public PageList(Collection data) { + this.data = data; + } + + /** + * 构造函数 + * + * @param data 数据集 + * @param paginator 分页器 + */ + public PageList(Collection data, Paginator paginator) { + this.data = data; + this.paginator = (paginator == null) ? new Paginator() : paginator; + } + + /** + * 获取分页器 + * + * @return 分页器 + */ + public Paginator getPaginator() { + return paginator; + } + + /** + * 设置分页器 + * + * @param paginator 分页器 + */ + public void setPaginator(Paginator paginator) { + if (paginator != null) { + this.paginator = paginator; + } + } + + /** + * 获取数据集 + * + * @return 数据集 + */ + public Collection getData() { + return data; + } + + /** + * 集数据 + * + * @param data 数据 + */ + public void setData(Collection data) { + this.data = data; + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/Paginator.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/Paginator.java new file mode 100644 index 0000000..0eae499 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/common/Paginator.java @@ -0,0 +1,194 @@ +package cn.loopstack.bic.dal.mongo.common; + +import java.io.Serializable; + +/** + * @author icanci + * @since 1.0 Created in 2022/10/24 22:42 + */ +public class Paginator implements Serializable { + + /** */ + private static final long serialVersionUID = 1L; + + /** 默认每页数据条目20 */ + private static final int DEFAULT_PAGE_SIZE = 20; + + /** 数据总量 */ + private int totalCount; + + /** 总页数 */ + private int totalPage; + + /** 每页条目数 */ + private int pageSize = DEFAULT_PAGE_SIZE; + + /** 查询起始条目编号,默认从0开始 */ + private int startIndex; + + /** 当前页页码 */ + private int currentPage; + + /** 上一页页码 */ + private int nextPage; + + /** 下一页页码 */ + private int priviousPage; + + /** + * 默认构造函数 + */ + protected Paginator() { + super(); + } + + /** + * 构造函数 + * + * @param totalCount 数据总条目数 + * @param pageSize 每页条目数 + * @param currentPage 当前页码 + */ + protected Paginator(int totalCount, int pageSize, int currentPage) { + this.totalCount = totalCount; + this.pageSize = pageSize; + this.currentPage = currentPage; + } + + /** + * 获取数据总条目数 + * + * @return 数据总条目数 + */ + public int getTotalCount() { + return totalCount; + } + + /** + * 设置数据总条目数 + * + * @param totalCount 数据总条目数 + */ + public void setTotalCount(int totalCount) { + this.totalCount = totalCount; + } + + /** + * 获取每页数据条目数 + * + * @return 每页数据条目数 + */ + public int getPageSize() { + if (pageSize <= 0) { + pageSize = DEFAULT_PAGE_SIZE; + } + return pageSize; + } + + /** + * 设置每页条目数 + * + * @param pageSize 每页条目数 + */ + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } + + /** + * 获取当前页码 + * + * @return 当前页面 + */ + public int getCurrentPage() { + if (currentPage <= 0) { + return 1; + } else if (currentPage > getTotalPage()) { + return getTotalPage(); + } + return currentPage; + } + + /** + * 设置当前页码 + * + * @param currentPage 当前页码 + */ + public void setCurrentPage(int currentPage) { + this.currentPage = currentPage; + } + + /** + * 获取总页数 + * + * @return 总页数 + */ + public int getTotalPage() { + if (totalCount > 0) { + if (getPageSize() > 0) { + totalPage = totalCount / getPageSize(); + if ((totalCount % getPageSize()) > 0) { + totalPage++; + } + } else { + totalPage = 1; + } + } else { + totalPage = 0; + } + return totalPage; + } + + /** + * 获取查询起始条目编号 + * + * @return 查询起始条目编号 + */ + public int getStartIndex() { + if (getCurrentPage() > 0) { + if (getPageSize() > 0) { + startIndex = (getCurrentPage() - 1) * getPageSize(); + } else { + startIndex = 0; + } + } else { + startIndex = 0; + } + return startIndex; + } + + /** + * 获取下一页页码 + * + * @return 下一页页码 + */ + public int getNextPage() { + if (getCurrentPage() >= getTotalPage()) { + nextPage = getTotalPage(); + } else { + if (getTotalPage() == 0) { + nextPage = 1; + } else { + nextPage = getCurrentPage() + 1; + } + + } + return nextPage; + } + + /** + * 获取上一页页码 + * + * @return 上一页页码 + */ + public int getPriviousPage() { + if (getCurrentPage() <= 1) { + priviousPage = 1; + } else if (getCurrentPage() > getTotalPage()) { + priviousPage = getTotalPage() - 1; + } else { + priviousPage = getCurrentPage() - 1; + } + return priviousPage; + } + +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BaseDAO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BaseDAO.java new file mode 100644 index 0000000..a03b6a3 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BaseDAO.java @@ -0,0 +1,71 @@ +package cn.loopstack.bic.dal.mongo.daointerface; + +import java.util.List; + +import cn.loopstack.bic.dal.mongo.common.PageList; +import cn.loopstack.bic.dal.mongo.dateobject.BaseDO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 17:53 + */ +public interface BaseDAO { + + /** 文档对应的名字 */ + String BASE_COLLECTION_NAME = "bic-"; + + /** + * 插入文档一条记录 + * + * @param t t + */ + void insert(T t); + + /** + * 更新文档一条记录 + * + * @param t t + */ + void update(T t); + + /** + * 查询文档所有记录 + * + * @return 返回查询的结果 + */ + List queryAll(); + + /** + * 查询文档所有记录 + * + * @param t 请求参数 + * @param pageNum pageNum + * @param pageSize pageSize + * @return 返回查询的结果 + */ + PageList pageQuery(T t, int pageNum, int pageSize); + + /** + * 根据 _id 查询一条信息 + * + * @param _id _id + * @return 返回查询的结果 + */ + T queryOneById(String _id); + + /** 基本表 */ + interface BaseColumn { + /** 文档id */ + String _ID = "_id"; + /** uuid */ + String UUID = "uuid"; + /** createTime */ + String CREATE_TIME = "createTime"; + /** updateTime */ + String UPDATE_TIME = "updateTime"; + /** 状态,是否删除 */ + String DELETED = "deleted"; + /** 操作环境 */ + String ENV = "env"; + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java new file mode 100644 index 0000000..fdf41c5 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/daointerface/BuryingDAO.java @@ -0,0 +1,40 @@ +package cn.loopstack.bic.dal.mongo.daointerface; + +import java.util.List; + +import cn.loopstack.bic.dal.mongo.dateobject.BuryingDO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 17:55 + */ +public interface BuryingDAO extends BaseDAO { + /** 文档对应的名字 */ + String COLLECTION_NAME = BASE_COLLECTION_NAME + "burying"; + /** 文档对应的Class */ + Class COLLECTION_CLASS = BuryingDO.class; + + /** + * 批量插入 + * + * @param buryingList buryingList + */ + void batchInsert(List buryingList); + + /** 列 */ + interface BuryingColumn extends BaseColumn { + /** TraceId */ + String TRACE_ID = "traceId"; + /** 业务标识 */ + String BUSINESS_NO = "businessNo"; + /** 系统应用唯一标识 */ + String SYSTEM_KEY = "systemKey"; + /** 模块 */ + String MODULE = "module"; + /** 时间 */ + String TIME = "time"; + /** 执行数据 */ + String MESSAGE = "message"; + } + +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BaseDO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BaseDO.java new file mode 100644 index 0000000..d0d34e7 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BaseDO.java @@ -0,0 +1,84 @@ +package cn.loopstack.bic.dal.mongo.dateobject; + +import java.util.Date; +import java.util.StringJoiner; + +import org.springframework.data.annotation.Id; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 17:52 + */ +public class BaseDO { + /** mongodb id */ + @Id + private String id; + /** 雪花算法随机UUID */ + private String uuid; + /** 创建时间 */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** 更新时间 */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + /** 状态 false 有效,true 无效 */ + private boolean deleted; + /** 环境 */ + private String env; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public boolean isDeleted() { + return deleted; + } + + public void setDeleted(boolean deleted) { + this.deleted = deleted; + } + + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + @Override + public String toString() { + return new StringJoiner(",").add("id=" + id).add("uuid=" + uuid).add("createTime=" + createTime).add("updateTime=" + updateTime).add("deleted=" + deleted).add("env=" + env) + .toString(); + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BuryingDO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BuryingDO.java new file mode 100644 index 0000000..7d1973f --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/dateobject/BuryingDO.java @@ -0,0 +1,76 @@ +package cn.loopstack.bic.dal.mongo.dateobject; + +import java.util.StringJoiner; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 17:52 + */ +public class BuryingDO extends BaseDO { + /** TraceId */ + private String traceId; + /** 业务标识 */ + private String businessNo; + /** 系统应用唯一标识 */ + private String systemKey; + /** 模块 */ + private String module; + /** 时间 */ + private long time; + /** 执行数据 */ + private String message; + + public String getTraceId() { + return traceId; + } + + public void setTraceId(String traceId) { + this.traceId = traceId; + } + + public String getBusinessNo() { + return businessNo; + } + + public void setBusinessNo(String businessNo) { + this.businessNo = businessNo; + } + + public String getSystemKey() { + return systemKey; + } + + public void setSystemKey(String systemKey) { + this.systemKey = systemKey; + } + + public String getModule() { + return module; + } + + public void setModule(String module) { + this.module = module; + } + + public long getTime() { + return time; + } + + public void setTime(long time) { + this.time = time; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public String toString() { + return new StringJoiner(",").add("traceId=" + traceId).add("businessNo=" + businessNo).add("systemKey=" + systemKey).add("module=" + module).add("time=" + time) + .add("message=" + message).toString(); + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/AbstractBaseDAO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/AbstractBaseDAO.java new file mode 100644 index 0000000..1babd22 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/AbstractBaseDAO.java @@ -0,0 +1,50 @@ +package cn.loopstack.bic.dal.mongo.mongo; + +import java.util.Date; +import java.util.List; + +import org.springframework.beans.factory.InitializingBean; + +import cn.loopstack.bic.dal.mongo.daointerface.BaseDAO; +import cn.loopstack.bic.dal.mongo.dateobject.BaseDO; +import cn.loopstack.bic.dal.mongo.utils.EnvUtils; +import cn.loopstack.bic.dal.mongo.utils.IDHolder; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:00 + */ +public abstract class AbstractBaseDAO extends MongoPageHelper implements BaseDAO, InitializingBean { + + protected String DEFAULT_ENV; + + @Override + public void insert(T t) { + // 处理插入数据 + doInsert(t); + } + + @Override + public void update(T t) { + t.setUpdateTime(new Date()); + } + + @Override + public void afterPropertiesSet() throws Exception { + DEFAULT_ENV = EnvUtils.getEnv(); + } + + public void batchInsert(List list) { + // 处理插入数据 + list.forEach(this::doInsert); + } + + private void doInsert(T t) { + t.setId(null); + t.setDeleted(false); + t.setCreateTime(new Date()); + t.setUpdateTime(new Date()); + t.setEnv(DEFAULT_ENV); + t.setUuid(IDHolder.generateNoBySnowFlakeDefaultPrefix()); + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java new file mode 100644 index 0000000..1426a19 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoBuryingDAO.java @@ -0,0 +1,66 @@ +package cn.loopstack.bic.dal.mongo.mongo; + +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Sort; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Service; + +import cn.loopstack.bic.dal.mongo.common.PageList; +import cn.loopstack.bic.dal.mongo.daointerface.BuryingDAO; +import cn.loopstack.bic.dal.mongo.dateobject.BuryingDO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:00 + */ +@Service("buryingDAO") +public class MongoBuryingDAO extends AbstractBaseDAO implements BuryingDAO { + + @Override + public void insert(BuryingDO burying) { + super.insert(burying); + mongoTemplate.insert(burying, COLLECTION_NAME); + } + + @Override + public void update(BuryingDO burying) { + super.update(burying); + mongoTemplate.save(burying, COLLECTION_NAME); + } + + @Override + public List queryAll() { + Criteria criteria = Criteria.where(BuryingColumn.ENV).is(DEFAULT_ENV); + Query query = new Query(criteria); + return mongoTemplate.find(query, COLLECTION_CLASS, COLLECTION_NAME); + } + + @Override + public PageList pageQuery(BuryingDO burying, int pageNum, int pageSize) { + Criteria criteria = Criteria.where(BuryingColumn.ENV).is(DEFAULT_ENV); + if (StringUtils.isNotBlank(burying.getSystemKey())) { + // 不分区大小写查询,其中操作符"i":表示不分区大小写 + criteria.and(BuryingColumn.SYSTEM_KEY).regex("^.*" + burying.getSystemKey() + ".*$", "i"); + } + Query query = new Query(criteria); + query.with(Sort.by(Sort.Direction.DESC, BuryingColumn.CREATE_TIME)); + return pageQuery(query, COLLECTION_CLASS, pageSize, pageNum, COLLECTION_NAME); + } + + @Override + public BuryingDO queryOneById(String _id) { + Criteria criteria = Criteria.where(BuryingColumn._ID).is(_id); + criteria.and(BuryingColumn.ENV).is(DEFAULT_ENV); + Query query = new Query(criteria); + return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); + } + + @Override + public void batchInsert(List buryingList) { + super.batchInsert(buryingList); + mongoTemplate.insert(buryingList, COLLECTION_NAME); + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoPageHelper.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoPageHelper.java new file mode 100644 index 0000000..ea0ba08 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/mongo/MongoPageHelper.java @@ -0,0 +1,114 @@ +package cn.loopstack.bic.dal.mongo.mongo; + +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Resource; + +import org.apache.commons.lang3.StringUtils; +import org.bson.types.ObjectId; +import org.springframework.data.domain.Sort; +import org.springframework.data.domain.Sort.Order; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; + +import com.google.common.collect.Lists; + +import cn.loopstack.bic.dal.mongo.common.PageList; +import cn.loopstack.bic.dal.mongo.common.Paginator; + +/** + * 分页插件 + * + * @author icanci(1205068) + * @version Id: MongoPageHelper, v 0.1 2022/10/24 16:44 icanci Exp $ + */ +public class MongoPageHelper { + @Resource + protected MongoTemplate mongoTemplate; + + public static final int FIRST_PAGE_NUM = 1; + + public static final String ID = "_id"; + + /** + * 分页查询,直接返回集合类型的结果. + * + * @param query 查询 + * @param entityClass class + * @param pageSize pageSize + * @param pageNum pageNum + * @param collectionName collectionName + * @param T + * @return PageResult + */ + public PageList pageQuery(Query query, Class entityClass, Integer pageSize, Integer pageNum, String collectionName) { + return pageQuery(query, entityClass, Function.identity(), pageSize, pageNum, null, collectionName); + } + + /** + * 分页查询,不考虑条件分页,直接使用skip-limit来分页. + * + * @param query 查询 + * @param entityClass class + * @param pageSize pageSize + * @param pageNum pageNum + * @param collectionName collectionName + * @param T + * @param R + * @param mapper mapper + * @return PageResult + */ + public PageList pageQuery(Query query, Class entityClass, Function mapper, Integer pageSize, Integer pageNum, String collectionName) { + return pageQuery(query, entityClass, mapper, pageSize, pageNum, null, collectionName); + } + + /** + * 分页查询. + * + * @param query Mongo Query对象,构造你自己的查询条件 + * @param entityClass Mongo collection定义的entity class,用来确定查询哪个集合 + * @param mapper 映射器,从db查出来的list的元素类型是entityClass, 如果你想要转换成另一个对象,比如去掉敏感字段等,可以使用mapper来决定如何转换 + * @param pageSize 分页的大小 + * @param pageNum 当前页 + * @param lastId 条件分页参数, 区别于skip-limit,采用find(_id>lastId).limit分页 + * @param collection定义的class类型 + * @param 最终返回时,展现给页面时的一条记录的类型 + * @return PageResult,一个封装page信息的对象 + */ + public PageList pageQuery(Query query, Class entityClass, Function mapper, Integer pageSize, Integer pageNum, String lastId, String collectionName) { + //分页逻辑 + long total = mongoTemplate.count(query, entityClass, collectionName); + + final int pages = (int) Math.ceil(total / (double) pageSize); + + if (pageNum <= 0 || pageNum > pages) { + pageNum = FIRST_PAGE_NUM; + } + + final Criteria criteria = new Criteria(); + + if (StringUtils.isNotBlank(lastId)) { + if (pageNum != FIRST_PAGE_NUM) { + criteria.and(ID).gt(new ObjectId(lastId)); + } + query.limit(pageSize); + } else { + int skip = pageSize * (pageNum - 1); + query.skip(skip).limit(pageSize); + } + + final List entityList = mongoTemplate.find(query.addCriteria(criteria).with(Sort.by(Lists.newArrayList(new Order(Sort.Direction.ASC, ID)))), entityClass, + collectionName); + + final PageList pageResult = new PageList<>(); + Paginator paginator = pageResult.getPaginator(); + paginator.setTotalCount((int) total); + paginator.setPageSize(pageSize); + paginator.setCurrentPage(pageNum); + pageResult.setData(entityList.stream().map(mapper).collect(Collectors.toList())); + return pageResult; + } +} \ No newline at end of file diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/EnvUtils.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/EnvUtils.java new file mode 100644 index 0000000..533a4d1 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/EnvUtils.java @@ -0,0 +1,33 @@ +package cn.loopstack.bic.dal.mongo.utils; + +import org.apache.commons.lang3.StringUtils; + +import cn.loopstack.bic.dal.mongo.utils.service.EnvService; +import cn.loopstack.bic.dal.mongo.utils.service.impl.EnvServiceImpl; + +/** + * 环境标识 + * + * @author icanci + * @since 1.0 Created in 2022/11/12 08:26 + */ +public class EnvUtils { + + private static final String DEFAULT_ENV = "test"; + + private static EnvService envService; + + private static String currEnv; + + public static String getEnv() { + if (StringUtils.isBlank(currEnv)) { + String env = envService.getEnv(); + currEnv = StringUtils.isBlank(env) ? DEFAULT_ENV : env; + } + return currEnv; + } + + public static void setEnvService(EnvServiceImpl envService) { + EnvUtils.envService = envService; + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/IDHolder.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/IDHolder.java new file mode 100644 index 0000000..8c56a19 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/IDHolder.java @@ -0,0 +1,40 @@ +package cn.loopstack.bic.dal.mongo.utils; + +import cn.loopstack.bic.dal.mongo.utils.service.IDGeneratorService; + +/** + * Id 生成器 + * + * @author icanci + * @since 1.0 Created in 2022/11/11 14:18 + */ +public class IDHolder { + /** 分布式id服务 */ + private static IDGeneratorService idGeneratorService; + + private static final String DEFAULT_PREFIX = "BIC"; + + public static void setIdGeneratorService(IDGeneratorService idGeneratorService) { + IDHolder.idGeneratorService = idGeneratorService; + } + + /** + * 通过雪花算法生成唯一id + * + * @param prefix 前缀 + * @return id + */ + public static String generateNoBySnowFlake(String prefix) { + return idGeneratorService.generateBySnowFlake(prefix); + } + + /** + * 通过雪花算法生成唯一id,默认 BIC + * + * @return id + */ + public static String generateNoBySnowFlakeDefaultPrefix() { + return idGeneratorService.generateBySnowFlake(DEFAULT_PREFIX); + } + +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/EnvService.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/EnvService.java new file mode 100644 index 0000000..8ed685e --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/EnvService.java @@ -0,0 +1,14 @@ +package cn.loopstack.bic.dal.mongo.utils.service; + +/** + * @author icanci + * @since 1.0 Created in 2022/11/12 08:28 + */ +public interface EnvService { + /** + * 获取当前的环境信息 + * + * @return 返回当前的环境信息 + */ + String getEnv(); +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/IDGeneratorService.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/IDGeneratorService.java new file mode 100644 index 0000000..5738826 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/IDGeneratorService.java @@ -0,0 +1,15 @@ +package cn.loopstack.bic.dal.mongo.utils.service; + +/** + * @author icanci + * @since 1.0 Created in 2022/10/30 08:43 + */ +public interface IDGeneratorService { + /** + * 生成唯一id + * + * @param prefix 前缀 + * @return id + */ + String generateBySnowFlake(String prefix); +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/EnvServiceImpl.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/EnvServiceImpl.java new file mode 100644 index 0000000..bf75da6 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/EnvServiceImpl.java @@ -0,0 +1,30 @@ +package cn.loopstack.bic.dal.mongo.utils.service.impl; + +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.stereotype.Service; + +import cn.loopstack.bic.dal.mongo.utils.EnvUtils; +import cn.loopstack.bic.dal.mongo.utils.service.EnvService; + +/** + * @author icanci + * @since 1.0 Created in 2022/11/12 08:29 + */ +@Service("envService") +public class EnvServiceImpl implements EnvService, BeanPostProcessor { + @Value("${bic.env}") + private String env; + + @Override + public String getEnv() { + return env; + } + + @Override + public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { + EnvUtils.setEnvService(this); + return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName); + } +} diff --git a/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/IDGeneratorServiceImpl.java b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/IDGeneratorServiceImpl.java new file mode 100644 index 0000000..7d9d946 --- /dev/null +++ b/dal/src/main/java/cn/loopstack/bic/dal/mongo/utils/service/impl/IDGeneratorServiceImpl.java @@ -0,0 +1,31 @@ +package cn.loopstack.bic.dal.mongo.utils.service.impl; + +import org.apache.commons.lang3.RandomUtils; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.stereotype.Service; + +import cn.hutool.core.lang.Snowflake; +import cn.loopstack.bic.dal.mongo.utils.IDHolder; +import cn.loopstack.bic.dal.mongo.utils.service.IDGeneratorService; + +/** + * 分布式ID生成器 + * + * @author icanci + * @since 1.0 Created in 2022/10/30 08:43 + */ +@Service +public class IDGeneratorServiceImpl implements IDGeneratorService, InitializingBean { + /** 雪花序列号生成算法 */ + private static final Snowflake SNOW_FLAKE = new Snowflake(RandomUtils.nextInt(1, 9), RandomUtils.nextInt(1, 9)); + + @Override + public String generateBySnowFlake(String prefix) { + return prefix + SNOW_FLAKE.nextId(); + } + + @Override + public void afterPropertiesSet() throws Exception { + IDHolder.setIdGeneratorService(this); + } +} diff --git a/sdk/pom.xml b/sdk/pom.xml index 9e70009..3f6bd21 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -21,12 +21,6 @@ - - - org.springframework.boot - spring-boot-configuration-processor - true - org.springframework.boot spring-boot-starter @@ -35,15 +29,5 @@ org.springframework.boot spring-boot-autoconfigure - - org.springframework.boot - spring-boot-configuration-processor - compile - true - - - org.openjdk.jol - jol-core - \ No newline at end of file diff --git a/views/pom.xml b/views/pom.xml index 6d3cac7..3dff19b 100644 --- a/views/pom.xml +++ b/views/pom.xml @@ -39,43 +39,43 @@ - - org.codehaus.mojo - exec-maven-plugin - - - - exec-npm-install - package - - exec - - - npm - - install - - src/main/resources/vueboot - - - - - exec-npm-run-build - package - - exec - - - npm - - run - build:stage - - src/main/resources/vueboot - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.maven.plugins diff --git a/views/src/main/java/cn/loopstack/bic/views/BicApplication.java b/views/src/main/java/cn/loopstack/bic/views/BicApplication.java index 075c80f..211a7f0 100644 --- a/views/src/main/java/cn/loopstack/bic/views/BicApplication.java +++ b/views/src/main/java/cn/loopstack/bic/views/BicApplication.java @@ -2,12 +2,13 @@ package cn.loopstack.bic.views; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; /** * @author icanci * @since 1.0 Created in 2023/08/19 09:42 */ -//@ComponentScan(basePackages = { "cn.icanci.loopstack.bic" }) +@ComponentScan(basePackages = { "cn.loopstack.bic" }) @SpringBootApplication public class BicApplication { public static void main(String[] args) { diff --git a/views/src/main/resources/application.yml b/views/src/main/resources/application.yml index 9c32df2..6c3d1f9 100644 --- a/views/src/main/resources/application.yml +++ b/views/src/main/resources/application.yml @@ -1,3 +1,8 @@ +# 项目配置 +bic: + env: test + +# 服务配置 server: tomcat: uri-encoding: UTF-8 @@ -5,6 +10,7 @@ server: servlet: context-path: / +# 日志 logging: config: classpath:log4j2.xml diff --git a/web/pom.xml b/web/pom.xml index 00da183..4075f17 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -17,6 +17,16 @@ + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + cn.loopstack.bic bic-biz diff --git a/web/src/main/java/cn/loopstack/bic/web/api/BuryingApi.java b/web/src/main/java/cn/loopstack/bic/web/api/BuryingApi.java new file mode 100644 index 0000000..995ab7e --- /dev/null +++ b/web/src/main/java/cn/loopstack/bic/web/api/BuryingApi.java @@ -0,0 +1,29 @@ +package cn.loopstack.bic.web.api; + +import javax.annotation.Resource; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.loopstack.bic.biz.service.BuryingService; +import cn.loopstack.bic.common.result.R; +import cn.loopstack.bic.web.model.BuryingModelVO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:18 + */ +@RestController +@RequestMapping("/bicApi/burying") +public class BuryingApi { + @Resource + private BuryingService buryingService; + + @PostMapping("/batchSubmit") + public R batchSubmit(@RequestBody BuryingModelVO buryingModel) { + buryingService.batchInsert(buryingModel.getBuryingList()); + return R.builderOk().build(); + } +} diff --git a/web/src/main/java/cn/loopstack/bic/web/controller/BuryingController.java b/web/src/main/java/cn/loopstack/bic/web/controller/BuryingController.java new file mode 100644 index 0000000..ee09cd4 --- /dev/null +++ b/web/src/main/java/cn/loopstack/bic/web/controller/BuryingController.java @@ -0,0 +1,26 @@ +package cn.loopstack.bic.web.controller; + +import javax.annotation.Resource; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import cn.loopstack.bic.biz.service.BuryingService; +import cn.loopstack.bic.common.result.R; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:34 + */ +@RestController +@RequestMapping("/bicAdmin/burying") +public class BuryingController { + @Resource + private BuryingService buryingService; + + @GetMapping("queryAll") + public R queryAll() { + return R.builderOk().data("list", buryingService.queryAll()).build(); + } +} diff --git a/web/src/main/java/cn/loopstack/bic/web/model/BuryingModelVO.java b/web/src/main/java/cn/loopstack/bic/web/model/BuryingModelVO.java new file mode 100644 index 0000000..888ad81 --- /dev/null +++ b/web/src/main/java/cn/loopstack/bic/web/model/BuryingModelVO.java @@ -0,0 +1,29 @@ +package cn.loopstack.bic.web.model; + +import java.io.Serializable; +import java.util.List; +import java.util.StringJoiner; + +import cn.loopstack.bic.common.model.BuryingVO; + +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:20 + */ +public class BuryingModelVO implements Serializable { + + private List buryingList; + + public List getBuryingList() { + return buryingList; + } + + public void setBuryingList(List buryingList) { + this.buryingList = buryingList; + } + + @Override + public String toString() { + return new StringJoiner(",").add("buryingList=" + buryingList).toString(); + } +} diff --git a/web/src/main/java/cn/loopstack/bic/web/package-info.java b/web/src/main/java/cn/loopstack/bic/web/package-info.java new file mode 100644 index 0000000..42ecd6a --- /dev/null +++ b/web/src/main/java/cn/loopstack/bic/web/package-info.java @@ -0,0 +1,5 @@ +/** + * @author icanci + * @since 1.0 Created in 2023/08/19 18:17 + */ +package cn.loopstack.bic.web; \ No newline at end of file -- Gitee