@@ -81,10 +81,12 @@ public class AsyncLatchUtils {
|
|||||||
|
|
||||||
System.out.println("主流程开始,准备分发异步任务...");
|
System.out.println("主流程开始,准备分发异步任务...");
|
||||||
|
|
||||||
|
System.out.println("主线程id:" + Thread.currentThread().getId());
|
||||||
// 2. 提交多个异步任务
|
// 2. 提交多个异步任务
|
||||||
// 任务一:获取用户信息
|
// 任务一:获取用户信息
|
||||||
AsyncLatchUtils.submitTask(executorService, () -> {
|
AsyncLatchUtils.submitTask(executorService, () -> {
|
||||||
try {
|
try {
|
||||||
|
System.out.println("任务一子线程id:" + Thread.currentThread().getId());
|
||||||
System.out.println("开始获取用户信息...");
|
System.out.println("开始获取用户信息...");
|
||||||
Thread.sleep(1000); // 模拟耗时
|
Thread.sleep(1000); // 模拟耗时
|
||||||
System.out.println("获取用户信息成功!");
|
System.out.println("获取用户信息成功!");
|
||||||
@@ -96,6 +98,7 @@ public class AsyncLatchUtils {
|
|||||||
// 任务二:获取订单信息
|
// 任务二:获取订单信息
|
||||||
AsyncLatchUtils.submitTask(executorService, () -> {
|
AsyncLatchUtils.submitTask(executorService, () -> {
|
||||||
try {
|
try {
|
||||||
|
System.out.println("任务二子线程id:" + Thread.currentThread().getId());
|
||||||
System.out.println("开始获取订单信息...");
|
System.out.println("开始获取订单信息...");
|
||||||
Thread.sleep(1500); // 模拟耗时
|
Thread.sleep(1500); // 模拟耗时
|
||||||
System.out.println("获取订单信息成功!");
|
System.out.println("获取订单信息成功!");
|
||||||
@@ -107,6 +110,7 @@ public class AsyncLatchUtils {
|
|||||||
// 任务三:获取商品信息
|
// 任务三:获取商品信息
|
||||||
AsyncLatchUtils.submitTask(executorService, () -> {
|
AsyncLatchUtils.submitTask(executorService, () -> {
|
||||||
try {
|
try {
|
||||||
|
System.out.println("任务三子线程id:" + Thread.currentThread().getId());
|
||||||
System.out.println("开始获取商品信息...");
|
System.out.println("开始获取商品信息...");
|
||||||
Thread.sleep(500); // 模拟耗时
|
Thread.sleep(500); // 模拟耗时
|
||||||
System.out.println("获取商品信息成功!");
|
System.out.println("获取商品信息成功!");
|
||||||
|
|||||||
@@ -40,8 +40,11 @@ public class PortalRespVO {
|
|||||||
@ExcelProperty("图标类型")
|
@ExcelProperty("图标类型")
|
||||||
private Integer iconType;
|
private Integer iconType;
|
||||||
|
|
||||||
@Schema(description = "图标图片URL(当 iconType=2 时使用)", example = "https://example.com/icon.png")
|
@Schema(description = "图标文件ID(当 iconType=2 时使用)", example = "1234567890")
|
||||||
private String iconUrl;
|
private String iconFileId;
|
||||||
|
|
||||||
|
@Schema(description = "图标文件名(当 iconType=2 时使用)", example = "logo.png")
|
||||||
|
private String iconFileName;
|
||||||
|
|
||||||
@Schema(description = "门户分类", example = "业务系统")
|
@Schema(description = "门户分类", example = "业务系统")
|
||||||
@ExcelProperty("门户分类")
|
@ExcelProperty("门户分类")
|
||||||
|
|||||||
@@ -41,9 +41,13 @@ public class PortalSaveReqVO {
|
|||||||
@Max(value = 2, message = "图标类型值不正确")
|
@Max(value = 2, message = "图标类型值不正确")
|
||||||
private Integer iconType;
|
private Integer iconType;
|
||||||
|
|
||||||
@Schema(description = "图标图片URL(当 iconType=2 时使用)", example = "https://example.com/icon.png")
|
@Schema(description = "图标文件ID(当 iconType=2 时使用)", example = "1234567890")
|
||||||
@Size(max = 500, message = "图标图片URL长度不能超过500个字符")
|
@Size(max = 64, message = "图标文件ID长度不能超过64个字符")
|
||||||
private String iconUrl;
|
private String iconFileId;
|
||||||
|
|
||||||
|
@Schema(description = "图标文件名(当 iconType=2 时使用)", example = "logo.png")
|
||||||
|
@Size(max = 255, message = "图标文件名长度不能超过255个字符")
|
||||||
|
private String iconFileName;
|
||||||
|
|
||||||
@Schema(description = "门户分类", example = "业务系统")
|
@Schema(description = "门户分类", example = "业务系统")
|
||||||
@Size(max = 50, message = "门户分类长度不能超过50个字符")
|
@Size(max = 50, message = "门户分类长度不能超过50个字符")
|
||||||
|
|||||||
@@ -49,14 +49,21 @@ public class PortalDO extends TenantBaseDO {
|
|||||||
* 图标类型
|
* 图标类型
|
||||||
*
|
*
|
||||||
* 1 - 图标库(使用 icon 字段)
|
* 1 - 图标库(使用 icon 字段)
|
||||||
* 2 - 自定义图片(使用 iconUrl 字段)
|
* 2 - 自定义图片(使用 iconFileId 字段)
|
||||||
*/
|
*/
|
||||||
private Integer iconType;
|
private Integer iconType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图标图片URL(当 iconType=2 时使用)
|
* 图标文件ID(当 iconType=2 时使用)
|
||||||
|
*
|
||||||
|
* 通过文件ID实时获取访问URL,避免URL过期问题
|
||||||
*/
|
*/
|
||||||
private String iconUrl;
|
private String iconFileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图标文件名(当 iconType=2 时使用)
|
||||||
|
*/
|
||||||
|
private String iconFileName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门户分类
|
* 门户分类
|
||||||
|
|||||||
Reference in New Issue
Block a user