feat: v1 controllers
This commit is contained in:
@@ -126,13 +126,4 @@ class data {
|
||||
|
||||
# ws://localhost:8080/ws
|
||||
|
||||
几乎所有的ws请求都需要先在`http`请求中获取`ticket`
|
||||
|
||||
## /test
|
||||
|
||||
回复:
|
||||
|
||||
```typescript
|
||||
`Kotlin springboot4 received: ${userText}`
|
||||
```
|
||||
|
||||
目前不支持WS
|
||||
@@ -15,8 +15,16 @@
|
||||
- /ask-code
|
||||
- /register
|
||||
- /reset
|
||||
- /ws
|
||||
- /test
|
||||
- /departments
|
||||
- /email
|
||||
- /evaluation-records
|
||||
- /finance
|
||||
- /items
|
||||
- /memos
|
||||
- /personnel
|
||||
- /project-groups
|
||||
- /proof-images
|
||||
- /usages
|
||||
|
||||
## 预计完成的 API 列表
|
||||
|
||||
@@ -77,10 +85,10 @@
|
||||
|
||||
### 4. **邮件通知 (Email Notice)** - `/api/`
|
||||
|
||||
| 端点 | 方法 | 功能说明 |
|
||||
|------|------|--------|
|
||||
| 端点 | 方法 | 功能说明 |
|
||||
|--------------------------|----------|----------------|
|
||||
| `notification-settings/` | GET/POST | 获取/更新通知设置和邮箱列表 |
|
||||
| `toggle-email-status/` | POST | 切换邮箱启用/禁用状态 |
|
||||
| `toggle-email-status/` | POST | 切换邮箱启用/禁用状态 |
|
||||
|
||||
**功能**: 管理邮件通知的全局开关和收件人列表
|
||||
|
||||
|
||||
+8
-3
@@ -1,4 +1,4 @@
|
||||
package club.itstudio.itmanager.controller
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import club.itstudio.itmanager.entity.ApiResponse
|
||||
import club.itstudio.itmanager.entity.vo.request.EmailRegisterVO
|
||||
@@ -10,13 +10,18 @@ import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.*
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.server.ServerWebExchange
|
||||
import reactor.core.publisher.Mono
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/auth")
|
||||
@RequestMapping("/api/v1/auth")
|
||||
class AuthorizeController(
|
||||
private val service: AccountService
|
||||
) {
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/department")
|
||||
class DepartmentsController {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/email")
|
||||
class EmailController {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/evaluation-records")
|
||||
class EvaluationRecordsController {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/finance")
|
||||
class FinanceController {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/items")
|
||||
class ItemsController {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/memos")
|
||||
class MemosController {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/personnel")
|
||||
class PersonnelController {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/project-groups")
|
||||
class ProjectGroupsController {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/proof-images")
|
||||
class ProofImagesController {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package club.itstudio.itmanager.controller.v1
|
||||
|
||||
import org.springframework.validation.annotation.Validated
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/usages")
|
||||
class UsagesController {
|
||||
}
|
||||
Reference in New Issue
Block a user