【同步】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 {}