【同步】BOOT 和 CLOUD 的功能
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -50,4 +50,4 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO {
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,4 +100,4 @@ public class ${table.className}DO extends BaseDO {
|
||||
#end
|
||||
#end
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ watch(
|
||||
() => props.${subJoinColumn.javaField},
|
||||
(val: number) => {
|
||||
if (!val) {
|
||||
list.value = [] // 清空列表
|
||||
return
|
||||
}
|
||||
queryParams.${subJoinColumn.javaField} = val
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public class InfraStudentRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user