feat(user): 新增用户注册、登录和删除功能
- 新增用户实体类和相关控制器、服务类 - 实现用户注册、登录和删除功能 - 添加用户token生成和验证逻辑 -优化密码存储,使用加密算法
This commit is contained in:
@@ -3,13 +3,19 @@ package com.test.bijihoudaun.controller;
|
||||
|
||||
import com.test.bijihoudaun.entity.Image;
|
||||
import com.test.bijihoudaun.service.ImageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Tag(name = "markdown接口")
|
||||
@RestController
|
||||
@RequestMapping("/api/images")
|
||||
public class ImageController {
|
||||
@@ -17,6 +23,12 @@ public class ImageController {
|
||||
@Autowired
|
||||
private ImageService imageService;
|
||||
|
||||
@Operation(summary = "上传图片")
|
||||
@Parameters({
|
||||
@Parameter(name = "userId", description = "用户id", required = true),
|
||||
@Parameter(name = "markdownId", description = "markdownid", required = true),
|
||||
@Parameter(name = "file", description = "图片文件", required = true)
|
||||
})
|
||||
@PostMapping
|
||||
public ResponseEntity<Image> uploadImage(
|
||||
@RequestParam Integer userId,
|
||||
|
||||
Reference in New Issue
Block a user