【同步】BOOT 和 CLOUD 的功能

This commit is contained in:
YunaiV
2025-07-26 19:22:26 +08:00
parent d6fa049f61
commit c854fda3f1
40 changed files with 379 additions and 141 deletions

View File

@@ -6,11 +6,10 @@ import cn.iocoder.yudao.framework.websocket.core.sender.WebSocketMessageSender;
import cn.iocoder.yudao.framework.websocket.core.util.WebSocketFrameworkUtils;
import cn.iocoder.yudao.module.infra.websocket.message.DemoReceiveMessage;
import cn.iocoder.yudao.module.infra.websocket.message.DemoSendMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.WebSocketSession;
import jakarta.annotation.Resource;
/**
* WebSocket 示例:单发消息
*
@@ -19,7 +18,8 @@ import jakarta.annotation.Resource;
@Component
public class DemoWebSocketMessageListener implements WebSocketMessageListener<DemoSendMessage> {
@Resource
@SuppressWarnings("SpringJavaAutowiredFieldsWarningInspection")
@Autowired(required = false) // 由于 yudao.websocket.enable 配置项,可以关闭 WebSocket 的功能,所以这里只能不强制注入
private WebSocketMessageSender webSocketMessageSender;
@Override

View File

@@ -50,4 +50,4 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO {
#end
#end
}
}

View File

@@ -100,4 +100,4 @@ public class ${table.className}DO extends BaseDO {
#end
#end
}
}

View File

@@ -138,6 +138,7 @@ watch(
() => props.${subJoinColumn.javaField},
(val: number) => {
if (!val) {
list.value = [] // 清空列表
return
}
queryParams.${subJoinColumn.javaField} = val

View File

@@ -353,6 +353,7 @@ const handleDelete = async (id: number) => {
// 发起删除
await ${simpleClassName}Api.delete${simpleClassName}(id)
message.success(t('common.delSuccess'))
currentRow.value = {}
// 刷新列表
await getList()
} catch {}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
import cn.idev.excel.annotation.*;
@Schema(description = "管理后台 - 分类 Response VO")
@Data
@@ -23,4 +23,4 @@ public class InfraCategoryRespVO {
@ExcelProperty("父编号")
private Long parentId;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
}

View File

@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
import cn.idev.excel.annotation.*;
@Schema(description = "管理后台 - 分类 Response VO")
@Data
@@ -23,4 +23,4 @@ public class InfraCategoryRespVO {
@ExcelProperty("父编号")
private Long parentId;
}
}