From eb2cac54f75b2850f2957b32190d12e63377c185 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Fri, 27 Dec 2024 21:33:12 +0800 Subject: [PATCH] =?UTF-8?q?chore(extension/crud):=20=E7=A7=BB=E9=99=A4=20B?= =?UTF-8?q?aseResp=E3=80=81BaseDetailResp=EF=BC=88=E5=B7=B2=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=20Admin=20=E9=A1=B9=E7=9B=AE=E5=86=85?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crud/model/resp/BaseDetailResp.java | 86 ------------- .../extension/crud/model/resp/BaseResp.java | 116 ------------------ 2 files changed, 202 deletions(-) delete mode 100644 continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseDetailResp.java delete mode 100644 continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseResp.java diff --git a/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseDetailResp.java b/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseDetailResp.java deleted file mode 100644 index dd58dcb7..00000000 --- a/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseDetailResp.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. - *

- * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * http://www.gnu.org/licenses/lgpl.html - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package top.continew.starter.extension.crud.model.resp; - -import cn.crane4j.annotation.Assemble; -import cn.crane4j.annotation.Mapping; -import cn.crane4j.annotation.condition.ConditionOnPropertyNotNull; -import com.alibaba.excel.annotation.ExcelProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.v3.oas.annotations.media.Schema; -import top.continew.starter.extension.crud.constant.ContainerPool; - -import java.io.Serial; -import java.time.LocalDateTime; - -/** - * 详情响应基类 - * - * @author Charles7c - * @since 1.0.0 - */ -public class BaseDetailResp extends BaseResp { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 修改人 - */ - @JsonIgnore - @ConditionOnPropertyNotNull - @Assemble(container = ContainerPool.USER_NICKNAME, props = @Mapping(ref = "updateUserString")) - private Long updateUser; - - /** - * 修改人 - */ - @Schema(description = "修改人", example = "李四") - @ExcelProperty(value = "修改人", order = Integer.MAX_VALUE - 2) - private String updateUserString; - - /** - * 修改时间 - */ - @Schema(description = "修改时间", example = "2023-08-08 08:08:08", type = "string") - @ExcelProperty(value = "修改时间", order = Integer.MAX_VALUE - 1) - private LocalDateTime updateTime; - - public Long getUpdateUser() { - return updateUser; - } - - public void setUpdateUser(Long updateUser) { - this.updateUser = updateUser; - } - - public String getUpdateUserString() { - return updateUserString; - } - - public void setUpdateUserString(String updateUserString) { - this.updateUserString = updateUserString; - } - - public LocalDateTime getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(LocalDateTime updateTime) { - this.updateTime = updateTime; - } -} diff --git a/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseResp.java b/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseResp.java deleted file mode 100644 index cee1a174..00000000 --- a/continew-starter-extension/continew-starter-extension-crud/continew-starter-extension-crud-core/src/main/java/top/continew/starter/extension/crud/model/resp/BaseResp.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. - *

- * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * http://www.gnu.org/licenses/lgpl.html - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package top.continew.starter.extension.crud.model.resp; - -import cn.crane4j.annotation.Assemble; -import cn.crane4j.annotation.Mapping; -import com.alibaba.excel.annotation.ExcelProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import top.continew.starter.extension.crud.constant.ContainerPool; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - * 响应参数基类 - * - * @author Charles7c - * @since 1.0.0 - */ -public class BaseResp implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @Schema(description = "ID", example = "1") - @ExcelProperty(value = "ID", order = 1) - private Long id; - - /** - * 创建人 - */ - @JsonIgnore - @Assemble(container = ContainerPool.USER_NICKNAME, props = @Mapping(ref = "createUserString")) - private Long createUser; - - /** - * 创建人 - */ - @Schema(description = "创建人", example = "超级管理员") - @ExcelProperty(value = "创建人", order = Integer.MAX_VALUE - 4) - private String createUserString; - - /** - * 创建时间 - */ - @Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string") - @ExcelProperty(value = "创建时间", order = Integer.MAX_VALUE - 3) - private LocalDateTime createTime; - - /** - * 是否禁用修改 - */ - @Schema(description = "是否禁用修改", example = "true") - @JsonInclude(JsonInclude.Include.NON_NULL) - private Boolean disabled; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Long getCreateUser() { - return createUser; - } - - public void setCreateUser(Long createUser) { - this.createUser = createUser; - } - - public String getCreateUserString() { - return createUserString; - } - - public void setCreateUserString(String createUserString) { - this.createUserString = createUserString; - } - - public LocalDateTime getCreateTime() { - return createTime; - } - - public void setCreateTime(LocalDateTime createTime) { - this.createTime = createTime; - } - - public Boolean getDisabled() { - return disabled; - } - - public void setDisabled(Boolean disabled) { - this.disabled = disabled; - } -}