Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
潘荣晟
2025-11-25 14:47:38 +08:00
69 changed files with 3656 additions and 10 deletions

View File

@@ -72,6 +72,8 @@ knife4j:
# MyBatis Plus 的配置项 # MyBatis Plus 的配置项
mybatis-plus: mybatis-plus:
mapper-locations:
- classpath*:mapper/**/*.xml
configuration: configuration:
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
global-config: global-config:

View File

@@ -0,0 +1,76 @@
<configuration>
<!-- 引用 Spring Boot 的 logback 基础配置 -->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<!-- 变量 zt.info.base-package基础业务包 -->
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level级别从左显示 5 个字符宽度,%msg日志消息%n是换行符 -->
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<!-- 控制台 Appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">     
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
</appender>
<!-- 文件 Appender -->
<!-- 参考 Spring Boot 的 file-appender.xml 编写 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
<!-- 日志文件名 -->
<file>${LOG_FILE}</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 滚动后的日志文件名 -->
<fileNamePattern>${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz}</fileNamePattern>
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
<!-- 日志文件,到达多少容量,进行滚动 -->
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
<!-- 日志文件的总大小0 表示不限制 -->
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
<!-- 日志文件的保留天数 -->
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30}</maxHistory>
</rollingPolicy>
</appender>
<!-- 异步写入日志,提升性能 -->
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志。默认的,如果队列的 80% 已满,则会丢弃 TRACT、DEBUG、INFO 级别的日志 -->
<discardingThreshold>0</discardingThreshold>
<!-- 更改默认的队列的深度,该值会影响性能。默认值为 256 -->
<queueSize>256</queueSize>
<appender-ref ref="FILE"/>
</appender>
<!-- SkyWalking GRPC 日志收集实现日志中心。注意SkyWalking 8.4.0 版本开始支持 -->
<appender name="GRPC" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
</appender>
<!-- 本地环境 -->
<springProfile name="local,dev">
<root level="DEBUG">
<appender-ref ref="STDOUT"/>
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
</root>
</springProfile>
<!-- 其它环境 -->
<springProfile name="test,stage,prod,default">
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ASYNC"/>
<appender-ref ref="GRPC"/>
</root>
</springProfile>
</configuration>

View File

@@ -23,18 +23,21 @@ spec:
containers: containers:
- name: base-server - name: base-server
image: 172.16.46.66:10043/yudao/base-server:VERSION_PLACEHOLDER image: 172.16.46.66:10043/yudao/base-server:VERSION_PLACEHOLDER
env:
- name: TZ
value: Asia/Shanghai
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /actuator/health path: /actuator/health
port: 48100 port: 48100
initialDelaySeconds: 10 initialDelaySeconds: 50
periodSeconds: 5 periodSeconds: 5
failureThreshold: 3 failureThreshold: 3
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /actuator/health path: /actuator/health
port: 48100 port: 48100
initialDelaySeconds: 30 initialDelaySeconds: 50
periodSeconds: 10 periodSeconds: 10
failureThreshold: 5 failureThreshold: 5
resources: resources:

View File

@@ -19,7 +19,7 @@
<url>https://github.com/YunaiV/ruoyi-vue-pro</url> <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<properties> <properties>
<revision>3.0.44</revision> <revision>3.0.45</revision>
<!-- Maven 相关 --> <!-- Maven 相关 -->
<java.version>17</java.version> <java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>

View File

@@ -0,0 +1,60 @@
package com.zt.plat.module.base.api.businessdictionarytype;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryDataDTO;
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypePageReqDTO;
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeRespDTO;
import com.zt.plat.module.base.api.businessdictionarytype.dto.BusinessDictionaryTypeSaveReqDTO;
import com.zt.plat.module.base.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 业务字典类型")
public interface BusinessDictionaryTypeApi {
String PREFIX = ApiConstants.PREFIX + "/business-dictionary-type";
@PostMapping(PREFIX + "/create")
@Operation(summary = "创建业务字典类型")
CommonResult<BusinessDictionaryTypeRespDTO> createBusinessDictionaryType(@Valid @RequestBody BusinessDictionaryTypeSaveReqDTO createReqDTO);
@PutMapping(PREFIX + "/update")
@Operation(summary = "更新业务字典类型")
CommonResult<Boolean> updateBusinessDictionaryType(@Valid @RequestBody BusinessDictionaryTypeSaveReqDTO updateReqDTO);
@DeleteMapping(PREFIX + "/delete")
@Operation(summary = "删除业务字典类型")
CommonResult<Boolean> deleteBusinessDictionaryType(@RequestParam("id") Long id);
@DeleteMapping(PREFIX + "/delete-list")
@Operation(summary = "批量删除业务字典类型")
CommonResult<Boolean> deleteBusinessDictionaryTypeList(@RequestBody List<Long> ids);
@GetMapping(PREFIX + "/get")
@Operation(summary = "获得业务字典类型")
CommonResult<BusinessDictionaryTypeRespDTO> getBusinessDictionaryType(@RequestParam("id") Long id);
@GetMapping(PREFIX + "/page")
@Operation(summary = "获得业务字典类型分页")
CommonResult<PageResult<BusinessDictionaryTypeRespDTO>> getBusinessDictionaryTypePage(@Valid BusinessDictionaryTypePageReqDTO pageReqDTO);
@GetMapping(PREFIX + "/business-dictionary-data/list-by-dictionary-type-id")
@Operation(summary = "获得业务字典数据列表")
CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByDictionaryTypeId(@RequestParam("dictionaryTypeId") Long dictionaryTypeId);
@GetMapping(PREFIX + "/business-dictionary-data/list-by-type")
@Operation(summary = "根据字典类型编码获取业务字典数据列表")
CommonResult<List<BusinessDictionaryDataDTO>> getBusinessDictionaryDataListByType(@RequestParam("type") String type);
}

View File

@@ -0,0 +1,35 @@
package com.zt.plat.module.base.api.businessdictionarytype.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 业务字典数据 DTO
*/
@Data
public class BusinessDictionaryDataDTO {
@Schema(description = "主键ID", example = "1001")
private Long id;
@Schema(description = "上级字典", example = "2001")
private Long parentId;
@Schema(description = "字典类型", example = "3001")
private Long dictionaryTypeId;
@Schema(description = "排序号", example = "10")
private Long sort;
@Schema(description = "字典标签", example = "状态")
private String label;
@Schema(description = "字典值", example = "ENABLE")
private String value;
@Schema(description = "状态(0正常 1停用)", example = "0")
private Long status;
@Schema(description = "备注", example = "同义词")
private String remark;
}

View File

@@ -0,0 +1,21 @@
package com.zt.plat.module.base.api.businessdictionarytype.dto;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 业务字典类型分页 Request DTO
*/
@Data
public class BusinessDictionaryTypePageReqDTO extends PageParam {
@Schema(description = "字典名称", example = "物料状态")
private String name;
@Schema(description = "字典类型", example = "base_material_status")
private String type;
@Schema(description = "状态(0正常 1停用)", example = "0")
private Long status;
}

View File

@@ -0,0 +1,31 @@
package com.zt.plat.module.base.api.businessdictionarytype.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 业务字典类型 Response DTO
*/
@Data
public class BusinessDictionaryTypeRespDTO {
@Schema(description = "主键ID", example = "11771")
private Long id;
@Schema(description = "字典名称", example = "物料状态")
private String name;
@Schema(description = "字典类型", example = "base_material_status")
private String type;
@Schema(description = "状态(0正常 1停用)", example = "0")
private Long status;
@Schema(description = "备注", example = "基础物料状态")
private String remark;
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -0,0 +1,38 @@
package com.zt.plat.module.base.api.businessdictionarytype.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 业务字典类型新增/修改 Request DTO
*/
@Data
public class BusinessDictionaryTypeSaveReqDTO {
@Schema(description = "主键ID", example = "11771")
private Long id;
@Schema(description = "字典名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "物料状态")
@NotEmpty(message = "字典名称不能为空")
private String name;
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "base_material_status")
@NotEmpty(message = "字典类型不能为空")
private String type;
@Schema(description = "状态(0正常 1停用)", example = "0")
private Long status;
@Schema(description = "备注", example = "基础物料状态")
private String remark;
@Schema(description = "删除时间")
private LocalDateTime delTime;
@Schema(description = "业务字典数据列表")
private List<BusinessDictionaryDataDTO> businessDictionaryDatas;
}

View File

@@ -0,0 +1,51 @@
package com.zt.plat.module.base.api.departmentmaterial;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialPageReqDTO;
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialRespDTO;
import com.zt.plat.module.base.api.departmentmaterial.dto.DepartmentMaterialSaveReqDTO;
import com.zt.plat.module.base.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 组织架构物料")
public interface DepartmentMaterialApi {
String PREFIX = ApiConstants.PREFIX + "/department-material";
@PostMapping(PREFIX + "/create")
@Operation(summary = "创建组织架构物料")
CommonResult<DepartmentMaterialRespDTO> createDepartmentMaterial(@Valid @RequestBody DepartmentMaterialSaveReqDTO createReqDTO);
@PutMapping(PREFIX + "/update")
@Operation(summary = "更新组织架构物料")
CommonResult<Boolean> updateDepartmentMaterial(@Valid @RequestBody DepartmentMaterialSaveReqDTO updateReqDTO);
@DeleteMapping(PREFIX + "/delete")
@Operation(summary = "删除组织架构物料")
CommonResult<Boolean> deleteDepartmentMaterial(@RequestParam("id") Long id);
@DeleteMapping(PREFIX + "/delete-list")
@Operation(summary = "批量删除组织架构物料")
CommonResult<Boolean> deleteDepartmentMaterialList(@RequestBody List<Long> ids);
@GetMapping(PREFIX + "/get")
@Operation(summary = "获得组织架构物料")
CommonResult<DepartmentMaterialRespDTO> getDepartmentMaterial(@RequestParam("id") Long id);
@GetMapping(PREFIX + "/page")
@Operation(summary = "获得组织架构物料分页")
CommonResult<PageResult<DepartmentMaterialRespDTO>> getDepartmentMaterialPage(@Valid DepartmentMaterialPageReqDTO pageReqDTO);
}

Some files were not shown because too many files have changed in this diff Show More