Compare commits
68 Commits
personal/p
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| e45e84c53a | |||
| 3c8eb52ac0 | |||
| 05ed80d460 | |||
| 55e40288df | |||
| 33f811e6b7 | |||
| 9e03bb3873 | |||
| f104c89d08 | |||
| aa8ca4e274 | |||
| d2e3443c40 | |||
| 2c12fc075f | |||
| ed0cde6968 | |||
| e66695cbff | |||
| 9de8c77764 | |||
| 30344b2162 | |||
| 431ef62c12 | |||
| 9056250574 | |||
| a15f407c13 | |||
| 173b507361 | |||
| fdb9dc6daf | |||
| a38fd92801 | |||
| df34d7cb28 | |||
| a4713648a2 | |||
| e4a11a8a53 | |||
| a532eaa89c | |||
| c4f0b2348f | |||
| 3a7b6ee605 | |||
| a5aac1199d | |||
| 6c36552c2f | |||
| e6ba8c9a12 | |||
| 65f15eb9a9 | |||
| b4bdd2fc83 | |||
| 961a17efef | |||
| e56db8a92e | |||
| 64d7ae8c59 | |||
| 3579f93c0d | |||
| f9a6a3c481 | |||
| 2505b63b88 | |||
| 97d2ba60f5 | |||
| df51dac024 | |||
| af4a0f9684 | |||
| ae0417c77f | |||
| b7ede5652c | |||
| fcd9534e65 | |||
| 3137c22313 | |||
| 1d29684689 | |||
| ad14782702 | |||
| 3641689cbb | |||
| d69a979f10 | |||
| cc1d63e76c | |||
| 9c46495d40 | |||
| 3fdded3c9c | |||
| c03b190aba | |||
| cbe7ec9a24 | |||
| 58e456f3b3 | |||
| c863f1023b | |||
| aa9e0d8804 | |||
| 0f13440ab0 | |||
| b04ebb148a | |||
| 0a33a40ce1 | |||
| 442eaf2479 | |||
| 57b75e4813 | |||
| 2848312363 | |||
| 4eb09c3bca | |||
| 80ae2fb8d3 | |||
| feec889732 | |||
| 94474d6c42 | |||
| b173b37329 | |||
| 2ada18d2af |
@ -0,0 +1,65 @@
|
||||
package org.cmh.backend.NewsManagement.controller;
|
||||
|
||||
import org.cmh.backend.NewsManagement.dto.UploadFileResponse;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin // 如果前端和后端不在同一个域名或端口下,需要启用跨域
|
||||
public class FileController {
|
||||
|
||||
private static final String UPLOAD_DIR = "uploads/";
|
||||
|
||||
@PostMapping("/news/uploadPic")
|
||||
public ResponseEntity<UploadFileResponse> uploadFile(@RequestParam("file") MultipartFile file) {
|
||||
if (file.isEmpty()) {
|
||||
return new ResponseEntity<>(new UploadFileResponse("文件不能为空", null), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
try {
|
||||
// 确保上传目录存在
|
||||
Path uploadDirPath = Paths.get(UPLOAD_DIR);
|
||||
if (!Files.exists(uploadDirPath)) {
|
||||
Files.createDirectories(uploadDirPath);
|
||||
}
|
||||
|
||||
// 生成文件路径
|
||||
byte[] bytes = file.getBytes();
|
||||
Path path = Paths.get(UPLOAD_DIR + file.getOriginalFilename());
|
||||
Files.write(path, bytes);
|
||||
|
||||
// 返回成功信息
|
||||
return new ResponseEntity<>(new UploadFileResponse("文件上传成功", "/api/news/files/" + file.getOriginalFilename()), HttpStatus.OK);
|
||||
} catch (IOException e) {
|
||||
return new ResponseEntity<>(new UploadFileResponse("文件上传失败", null), HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/news/files/{filename}")
|
||||
public ResponseEntity<Resource> getFile(@PathVariable String filename) {
|
||||
try {
|
||||
Path filePath = Paths.get(UPLOAD_DIR).resolve(filename).normalize();
|
||||
Resource resource = new UrlResource(filePath.toUri());
|
||||
|
||||
if (resource.exists() && resource.isReadable()) {
|
||||
return ResponseEntity.ok()
|
||||
.header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + resource.getFilename() + "\"")
|
||||
.body(resource);
|
||||
} else {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package org.cmh.backend.NewsManagement.controller;
|
||||
|
||||
import jakarta.persistence.EntityNotFoundException;
|
||||
import org.cmh.backend.NewsManagement.dto.GetNewsListResponse;
|
||||
import org.cmh.backend.NewsManagement.dto.MessageResponse;
|
||||
import org.cmh.backend.NewsManagement.dto.NewsRequest;
|
||||
import org.cmh.backend.NewsManagement.dto.SearchNewsRequest;
|
||||
import org.cmh.backend.NewsManagement.model.News;
|
||||
import org.cmh.backend.NewsManagement.service.NewsService;
|
||||
import org.cmh.backend.Utils.JwtUtil;
|
||||
import org.cmh.backend.Utils.JwtVerify;
|
||||
import org.cmh.backend.authentication.model.UserHS;
|
||||
import org.cmh.backend.authentication.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/news")
|
||||
public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@GetMapping
|
||||
@JwtVerify
|
||||
public ResponseEntity<GetNewsListResponse> getNewsByRange(@RequestParam Integer start, @RequestParam Integer end, @RequestParam String token) {
|
||||
String username = JwtUtil.extractUsername(token);
|
||||
UserHS user = userService.getUserByUsername(username);
|
||||
// TODO:完善用户权限
|
||||
if (user.getSuperAdmin()) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (start >= end) {
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
long newsCount = newsService.getNewsCount();
|
||||
return new ResponseEntity<>(new GetNewsListResponse(newsCount, newsService.getNewsByRange(start, end, user)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/search")
|
||||
@JwtVerify
|
||||
public ResponseEntity<GetNewsListResponse> searchNews(@RequestBody SearchNewsRequest request) {
|
||||
List<News> newsList = newsService.searchNews(request);
|
||||
long newsCount = newsList.size();
|
||||
return new ResponseEntity<>(new GetNewsListResponse(newsCount, newsList), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@JwtVerify
|
||||
public ResponseEntity<News> getNewsPage(@PathVariable Long id, @RequestParam String token) {
|
||||
try {
|
||||
return new ResponseEntity<>(newsService.getNewsById(id), HttpStatus.OK);
|
||||
} catch (EntityNotFoundException e) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@JwtVerify
|
||||
public ResponseEntity<MessageResponse> createNews(@RequestBody NewsRequest request) {
|
||||
try {
|
||||
newsService.createNews(request);
|
||||
} catch (DataIntegrityViolationException e) {
|
||||
return new ResponseEntity<>(new MessageResponse("创建失败,文章已存在或缺少字段"), HttpStatus.BAD_REQUEST);
|
||||
} catch (Exception e) {
|
||||
return new ResponseEntity<>(new MessageResponse("创建失败:" + e.getMessage()), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return new ResponseEntity<>(new MessageResponse("创建成功"), HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping("/{id}")
|
||||
@JwtVerify
|
||||
public ResponseEntity<MessageResponse> updateNews(@PathVariable Long id, @RequestBody NewsRequest request) {
|
||||
try {
|
||||
newsService.updateNews(id, request);
|
||||
} catch (DataIntegrityViolationException e) {
|
||||
return new ResponseEntity<>(new MessageResponse("修改失败,新标题已存在或缺少字段"), HttpStatus.BAD_REQUEST);
|
||||
} catch (Exception e) {
|
||||
return new ResponseEntity<>(new MessageResponse("创建失败:" + e.getMessage()), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return new ResponseEntity<>(new MessageResponse("修改成功"), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
@JwtVerify
|
||||
public ResponseEntity<MessageResponse> deleteNews(@PathVariable Long id, @RequestParam String token) {
|
||||
try {
|
||||
newsService.deleteNews(id);
|
||||
} catch (EntityNotFoundException e) {
|
||||
return new ResponseEntity<>(new MessageResponse("删除失败,文章不存在"), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
return new ResponseEntity<>(new MessageResponse("删除成功"), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package org.cmh.backend.NewsManagement.dto;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.cmh.backend.NewsManagement.model.News;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class GetNewsListResponse {
|
||||
Long newsCount;
|
||||
List<News> newsList;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package org.cmh.backend.NewsManagement.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class MessageResponse {
|
||||
String message;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package org.cmh.backend.NewsManagement.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.cmh.backend.Utils.JwtRequest;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class NewsRequest extends JwtRequest {
|
||||
private String title;
|
||||
private String summary;
|
||||
private String content;
|
||||
private String imagePath;
|
||||
private String author;
|
||||
private String tenant;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package org.cmh.backend.NewsManagement.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.cmh.backend.Utils.JwtRequest;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class SearchNewsRequest extends JwtRequest {
|
||||
private String author;
|
||||
private String title;
|
||||
private String imagePath;
|
||||
private String summary;
|
||||
private String sortBy;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package org.cmh.backend.NewsManagement.dto;
|
||||
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UploadFileResponse extends MessageResponse {
|
||||
private String url;
|
||||
|
||||
public UploadFileResponse(String message, String url) {
|
||||
super(message);
|
||||
this.url = url;
|
||||
}
|
||||
}
|
||||
36
src/main/java/org/cmh/backend/NewsManagement/model/News.java
Normal file
@ -0,0 +1,36 @@
|
||||
package org.cmh.backend.NewsManagement.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class News {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(nullable = false, unique = true)
|
||||
private String title;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String summary;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String content;
|
||||
|
||||
private String imagePath;
|
||||
|
||||
@Column(nullable = false)
|
||||
private String author;
|
||||
|
||||
@CreationTimestamp
|
||||
private LocalDateTime createdAt;
|
||||
// TODO:添加外键绑定
|
||||
private String tenant;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package org.cmh.backend.NewsManagement.repository;
|
||||
|
||||
import org.cmh.backend.NewsManagement.model.News;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface NewsRepository extends JpaRepository<News, Long> {
|
||||
Page<News> findAllByOrderByIdDesc(Pageable pageable);
|
||||
|
||||
Page<News> findByTenantOrderByIdDesc(String tenant, Pageable pageable);
|
||||
|
||||
List<News> findByTitleContainingOrSummaryContainingOrAuthorContainingOrImagePathContainingAndTenantEquals(
|
||||
String title,
|
||||
String summary,
|
||||
String author,
|
||||
String imagePath,
|
||||
String tenant);
|
||||
|
||||
List<News> findByTitleContainingOrSummaryContainingOrAuthorContainingOrImagePathContaining(String title, String summary, String author, String imagePath);
|
||||
}
|
||||
@ -0,0 +1,175 @@
|
||||
package org.cmh.backend.NewsManagement.service;
|
||||
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityNotFoundException;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||
import jakarta.persistence.criteria.CriteriaQuery;
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import jakarta.persistence.criteria.Root;
|
||||
import org.cmh.backend.NewsManagement.dto.NewsRequest;
|
||||
import org.cmh.backend.NewsManagement.dto.SearchNewsRequest;
|
||||
import org.cmh.backend.NewsManagement.model.News;
|
||||
import org.cmh.backend.NewsManagement.repository.NewsRepository;
|
||||
import org.cmh.backend.Utils.JwtUtil;
|
||||
import org.cmh.backend.authentication.model.UserHS;
|
||||
import org.cmh.backend.authentication.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class NewsService {
|
||||
@Autowired
|
||||
private NewsRepository newsRepository;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
public List<News> getNewsByRange(int start, int end, UserHS user) {
|
||||
if (start < 0 || end <= start) {
|
||||
throw new IllegalArgumentException("Invalid start or end range");
|
||||
}
|
||||
|
||||
int pageSize = end - start; // 计算每页的大小
|
||||
int startPageNumber = start / pageSize; // 计算起始页码
|
||||
int endPageNumber = (end - 1) / pageSize; // 计算结束页码
|
||||
|
||||
List<News> result = new ArrayList<>();
|
||||
|
||||
for (int pageNumber = startPageNumber; pageNumber <= endPageNumber; pageNumber++) {
|
||||
Pageable pageable = PageRequest.of(pageNumber, pageSize);
|
||||
Page<News> newsPage = null;
|
||||
if (user.getSuperAdmin()) {
|
||||
newsPage = newsRepository.findAllByOrderByIdDesc(pageable);
|
||||
} else {
|
||||
newsPage = newsRepository.findByTenantOrderByIdDesc(user.getUsername(), pageable);
|
||||
}
|
||||
|
||||
if (newsPage.hasContent()) {
|
||||
result.addAll(newsPage.getContent());
|
||||
} else {
|
||||
break; // 如果没有更多内容,提前退出
|
||||
}
|
||||
}
|
||||
|
||||
int startIndex = start % pageSize;
|
||||
int endIndex = startIndex + (end - start);
|
||||
|
||||
if (endIndex > result.size()) {
|
||||
endIndex = result.size();
|
||||
}
|
||||
|
||||
return result.subList(startIndex, endIndex);
|
||||
}
|
||||
|
||||
|
||||
public void createNews(NewsRequest request) {
|
||||
News news = new News();
|
||||
news.setTitle(request.getTitle());
|
||||
news.setSummary(request.getSummary());
|
||||
news.setContent(request.getContent());
|
||||
news.setAuthor(request.getAuthor());
|
||||
news.setImagePath(request.getImagePath());
|
||||
news.setTenant(request.getTenant());
|
||||
newsRepository.save(news);
|
||||
}
|
||||
|
||||
public void updateNews(Long id, NewsRequest request) {
|
||||
News news = newsRepository.findById(id).orElse(null);
|
||||
if (news != null) {
|
||||
news.setTitle(request.getTitle());
|
||||
news.setSummary(request.getSummary());
|
||||
news.setContent(request.getContent());
|
||||
news.setAuthor(request.getAuthor());
|
||||
news.setImagePath(request.getImagePath());
|
||||
news.setTenant(request.getTenant());
|
||||
newsRepository.save(news);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteNews(Long id) {
|
||||
if (!newsRepository.existsById(id)) {
|
||||
throw new EntityNotFoundException();
|
||||
}
|
||||
newsRepository.deleteById(id);
|
||||
}
|
||||
|
||||
public News getNewsById(Long id) {
|
||||
if (!newsRepository.existsById(id)) {
|
||||
throw new EntityNotFoundException();
|
||||
}
|
||||
return newsRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
public long getNewsCount() {
|
||||
return newsRepository.count();
|
||||
}
|
||||
|
||||
// TODO:完善用户权限
|
||||
// public List<News> searchNews(SearchNewsRequest request) {
|
||||
// String username = JwtUtil.extractUsername(request.getToken());
|
||||
// UserHS user = userService.getUserByUsername(username);
|
||||
// if (user.getSuperAdmin()) {
|
||||
// return newsRepository.findByTitleContainingOrSummaryContainingOrAuthorContainingOrImagePathContaining(
|
||||
// request.getTitle(),
|
||||
// request.getSummary(),
|
||||
// request.getAuthor(),
|
||||
// request.getImagePath()
|
||||
// );
|
||||
// }
|
||||
// return newsRepository.findByTitleContainingOrSummaryContainingOrAuthorContainingOrImagePathContainingAndTenantEquals(
|
||||
// request.getTitle(),
|
||||
// request.getSummary(),
|
||||
// request.getAuthor(),
|
||||
// request.getImagePath(),
|
||||
// user.getUsername()
|
||||
// );
|
||||
// }
|
||||
public List<News> searchNews(SearchNewsRequest request) {
|
||||
String username = JwtUtil.extractUsername(request.getToken());
|
||||
UserHS user = userService.getUserByUsername(username);
|
||||
|
||||
// Create a list to hold predicates
|
||||
List<Predicate> predicates = new ArrayList<>();
|
||||
// Create the query
|
||||
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
|
||||
CriteriaQuery<News> criteriaQuery = criteriaBuilder.createQuery(News.class);
|
||||
Root<News> root = criteriaQuery.from(News.class);
|
||||
|
||||
// Build the query conditionally based on non-empty fields
|
||||
if (!request.getTitle().isEmpty()) {
|
||||
predicates.add(criteriaBuilder.like(root.get("title"), "%" + request.getTitle() + "%"));
|
||||
}
|
||||
if (!request.getSummary().isEmpty()) {
|
||||
predicates.add(criteriaBuilder.like(root.get("summary"), "%" + request.getSummary() + "%"));
|
||||
}
|
||||
if (!request.getAuthor().isEmpty()) {
|
||||
predicates.add(criteriaBuilder.like(root.get("author"), "%" + request.getAuthor() + "%"));
|
||||
}
|
||||
if (!request.getImagePath().isEmpty()) {
|
||||
predicates.add(criteriaBuilder.like(root.get("imagePath"), "%" + request.getImagePath() + "%"));
|
||||
}
|
||||
|
||||
if (user.getSuperAdmin()) {
|
||||
// Combine predicates with OR
|
||||
criteriaQuery.where(criteriaBuilder.or(predicates.toArray(new Predicate[0])));
|
||||
} else {
|
||||
// Combine predicates with OR and add tenant condition
|
||||
Predicate tenantPredicate = criteriaBuilder.equal(root.get("tenant"), user.getUsername());
|
||||
predicates.add(tenantPredicate);
|
||||
criteriaQuery.where(criteriaBuilder.and(predicates.toArray(new Predicate[0])));
|
||||
}
|
||||
|
||||
// Execute the query
|
||||
return entityManager.createQuery(criteriaQuery).getResultList();
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,109 @@
|
||||
package org.cmh.backend.authentication.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.cmh.backend.Utils.JwtUtil;
|
||||
import org.cmh.backend.Utils.JwtVerify;
|
||||
import org.cmh.backend.authentication.dto.*;
|
||||
import org.cmh.backend.authentication.model.UserHS;
|
||||
import org.cmh.backend.authentication.service.UserService;
|
||||
import org.cmh.backend.authentication.service.VerificationCodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
class AuthenticationController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private VerificationCodeService verificationCodeService;
|
||||
|
||||
@GetMapping("/hello")
|
||||
public String hello(){
|
||||
public String hello() {
|
||||
return "Hello SpringBoot!";
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/register")
|
||||
public ResponseEntity<RegisterResponse> register(@RequestBody RegisterRequest request) {
|
||||
try {
|
||||
boolean isRegistered = userService.registerUser(request);
|
||||
if (isRegistered) {
|
||||
return new ResponseEntity<>(new RegisterResponse("注册成功"), HttpStatus.OK);
|
||||
} else {
|
||||
return new ResponseEntity<>(new RegisterResponse("注册失败:用户已存在"), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
return new ResponseEntity<>(new RegisterResponse("注册失败:输入格式有误"), HttpStatus.BAD_REQUEST);
|
||||
} catch (Exception e) {
|
||||
return new ResponseEntity<>(new RegisterResponse("注册失败:服务器错误"), HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
public ResponseEntity<LoginResponse> login(@RequestBody LoginRequest loginRequest) {
|
||||
boolean isValidUser = userService.loginUser(loginRequest.getUsername(), loginRequest.getPassword());
|
||||
|
||||
if (isValidUser) {
|
||||
return new ResponseEntity<>(new LoginResponse("登录成功", JwtUtil.generateToken(loginRequest.getUsername())), HttpStatus.OK);
|
||||
} else {
|
||||
return new ResponseEntity<>(new LoginResponse("用户名或密码错误", null), HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/userProfile")
|
||||
public ResponseEntity<UserProfileResponse> getUserProfile(@RequestParam String token) {
|
||||
if (JwtUtil.isTokenValid(token)) {
|
||||
UserHS user = userService.getUserByUsername(JwtUtil.extractUsername(token));
|
||||
if (user != null) {
|
||||
UserProfileResponse response = new UserProfileResponse(
|
||||
user.getUsername(),
|
||||
user.getNickname(),
|
||||
user.getGender(),
|
||||
user.getPhoneNumber(),
|
||||
user.getEmail(),
|
||||
user.getDepartment(),
|
||||
user.getRole(),
|
||||
user.getCreatedAt()
|
||||
);
|
||||
if (user.getSuperAdmin()) {
|
||||
response.setDepartment("超级管理员");
|
||||
response.setRole("超级管理员");
|
||||
}
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
@PostMapping("/manageUserProfile")
|
||||
@JwtVerify
|
||||
public ResponseEntity<Object> manageUserProfile(@RequestBody ManageUserProfileRequest userProfileRequest) {
|
||||
String username = JwtUtil.extractUsername(userProfileRequest.getToken());
|
||||
boolean succeeded = userService.updateUserProfile(username, userProfileRequest);
|
||||
if (succeeded) {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@PostMapping("/changePassword")
|
||||
@JwtVerify
|
||||
public ResponseEntity<Object> changePassword(@RequestBody ChangePasswordRequest changePasswordRequest) {
|
||||
if (userService.changePassword(JwtUtil.extractUsername(changePasswordRequest.getToken()), changePasswordRequest)) {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@GetMapping("/getVerificationCode")
|
||||
public ResponseEntity<VerificationCodeResponse> getVerificationCode() {
|
||||
return new ResponseEntity<>(verificationCodeService.provideVerificationCode(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
package org.cmh.backend.authentication.controller;
|
||||
|
||||
import org.cmh.backend.authentication.model.User;
|
||||
import org.cmh.backend.authentication.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.springframework.http.ResponseEntity.ok;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/users")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
|
||||
@PostMapping("/tmdshabi")
|
||||
public ResponseEntity<User> login(@RequestBody Map<String, String> credentials) {
|
||||
String account = credentials.get("account");
|
||||
String password = credentials.get("password");
|
||||
System.out.println(account);
|
||||
System.out.println(password);
|
||||
System.out.println("hahaha");
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
@PostMapping("/checkLogin")
|
||||
public ResponseEntity<User> hahaha(@RequestBody Map<String, String> credentials){
|
||||
String account = credentials.get("account");
|
||||
String password = credentials.get("password");
|
||||
System.out.println(account);
|
||||
System.out.println(password);
|
||||
System.out.println("hahaha");
|
||||
System.out.println("hahaha");
|
||||
User user = userService.getUserByAccountAndPassword(account, password);
|
||||
//判断逻辑
|
||||
System.out.println(user);
|
||||
return ok(user);
|
||||
}
|
||||
|
||||
@PostMapping("/checkRegister")
|
||||
public String register(@RequestBody User user) {
|
||||
// String account = user.getAccount();
|
||||
// String password = user.getPassword();
|
||||
// String name = user.getName();
|
||||
// String organization = user.getOrganization();
|
||||
// String gender = user.getGender();
|
||||
// String email = user.getEmail();
|
||||
// String phone = user.getPhone();
|
||||
|
||||
System.out.println(user.toString());
|
||||
|
||||
if(userService.registerUser(user) != null){
|
||||
return "注册成功";
|
||||
}
|
||||
return "注册错误";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.cmh.backend.Utils.JwtRequest;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class ChangePasswordRequest extends JwtRequest {
|
||||
private String currentPassword;
|
||||
private String newPassword;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoginRequest {
|
||||
private String username;
|
||||
private String password;
|
||||
private String verificationCode;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class LoginResponse {
|
||||
private String message;
|
||||
private String token;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.cmh.backend.Utils.JwtRequest;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class ManageUserProfileRequest extends JwtRequest {
|
||||
private String nickname;
|
||||
private String gender;
|
||||
private String phoneNumber;
|
||||
private String email;
|
||||
private String department;
|
||||
private String role;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class RegisterRequest {
|
||||
private String username;
|
||||
private String password;
|
||||
private String phoneNumber;
|
||||
private String verificationCode;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class RegisterResponse {
|
||||
private String message;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class UserProfileResponse {
|
||||
private String username;
|
||||
private String nickname;
|
||||
private String gender;
|
||||
private String phoneNumber;
|
||||
private String email;
|
||||
private String department;
|
||||
private String role;
|
||||
private LocalDateTime createdAt;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package org.cmh.backend.authentication.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class VerificationCodeResponse {
|
||||
private String code;
|
||||
private String path;
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
package org.cmh.backend.authentication.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
@Entity
|
||||
public class User {
|
||||
@Setter
|
||||
@Getter
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
@Setter
|
||||
@Getter
|
||||
private String account;
|
||||
@Setter
|
||||
@Getter
|
||||
private String password;
|
||||
@Setter
|
||||
@Getter
|
||||
private String name;
|
||||
@Getter
|
||||
@Setter
|
||||
private String organization;
|
||||
@Setter
|
||||
@Getter
|
||||
private String gender;
|
||||
@Setter
|
||||
@Getter
|
||||
private String email;
|
||||
@Getter
|
||||
@Setter
|
||||
private String phone;
|
||||
|
||||
public User() {
|
||||
|
||||
}
|
||||
|
||||
public User(String account, String password, String name, String organization, String gender, String email, String phone) {
|
||||
this.account = account;
|
||||
this.password = password;
|
||||
this.name = name;
|
||||
this.organization = organization;
|
||||
this.gender = gender;
|
||||
this.email = email;
|
||||
this.phone = phone;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"id=" + id +
|
||||
", account='" + account + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", organization='" + organization + '\'' +
|
||||
", gender='" + gender + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package org.cmh.backend.authentication.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@Entity
|
||||
public class UserHS {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String username;
|
||||
private String password;
|
||||
private String nickname;
|
||||
private String gender;
|
||||
private String phoneNumber;
|
||||
private String email;
|
||||
private String department;
|
||||
private String role;
|
||||
private LocalDateTime createdAt;
|
||||
private Boolean superAdmin = false;
|
||||
}
|
||||
@ -1,10 +1,8 @@
|
||||
package org.cmh.backend.authentication.repository;
|
||||
|
||||
import org.cmh.backend.authentication.model.User;
|
||||
import org.cmh.backend.authentication.model.UserHS;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
User findByAccount(String username);
|
||||
User findByAccountAndPassword(String username, String password);
|
||||
User save(User user);
|
||||
public interface UserRepository extends JpaRepository<UserHS, Long> {
|
||||
UserHS findByUsername(String username);
|
||||
}
|
||||
|
||||
@ -1,24 +1,117 @@
|
||||
package org.cmh.backend.authentication.service;
|
||||
|
||||
import org.cmh.backend.authentication.model.User;
|
||||
import org.cmh.backend.authentication.dto.ChangePasswordRequest;
|
||||
import org.cmh.backend.authentication.dto.ManageUserProfileRequest;
|
||||
import org.cmh.backend.authentication.dto.RegisterRequest;
|
||||
import org.cmh.backend.authentication.model.UserHS;
|
||||
import org.cmh.backend.authentication.repository.UserRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Service
|
||||
public class UserService {
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
public User getUserByAccount(String account) {
|
||||
return userRepository.findByAccount(account);
|
||||
}
|
||||
public User getUserByAccountAndPassword(String account, String password) {
|
||||
return userRepository.findByAccountAndPassword(account, password);
|
||||
private final PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
||||
|
||||
public UserHS getUserByUsername(String username) {
|
||||
return userRepository.findByUsername(username);
|
||||
}
|
||||
|
||||
public User registerUser(User user) {
|
||||
User savedUser = userRepository.save(user);
|
||||
return savedUser;
|
||||
public boolean registerUser(RegisterRequest request) {
|
||||
String username = request.getUsername();
|
||||
String password = request.getPassword();
|
||||
String phoneNumber = request.getPhoneNumber();
|
||||
// 验证用户名是否已存在
|
||||
if (userRepository.findByUsername(username) != null) {
|
||||
return false; // 用户已存在
|
||||
}
|
||||
|
||||
// 验证输入格式
|
||||
if (!isValidUsername(username) || !isValidPassword(password) || !isValidContactInfo(phoneNumber)) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
// 加密密码
|
||||
String encodedPassword = passwordEncoder.encode(password);
|
||||
|
||||
// 创建新用户
|
||||
UserHS newUser = new UserHS();
|
||||
newUser.setUsername(username);
|
||||
newUser.setPassword(encodedPassword);
|
||||
newUser.setPhoneNumber(phoneNumber);
|
||||
newUser.setCreatedAt(LocalDateTime.now());
|
||||
|
||||
userRepository.save(newUser);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean loginUser(String username, String password) {
|
||||
UserHS user = userRepository.findByUsername(username);
|
||||
return user != null && passwordEncoder.matches(password, user.getPassword());
|
||||
}
|
||||
|
||||
public boolean updateUserProfile(String username, ManageUserProfileRequest request) {
|
||||
UserHS user = userRepository.findByUsername(username);
|
||||
if (user != null) {
|
||||
user.setNickname(request.getNickname());
|
||||
user.setGender(request.getGender());
|
||||
user.setPhoneNumber(request.getPhoneNumber());
|
||||
user.setEmail(request.getEmail());
|
||||
user.setDepartment(request.getDepartment());
|
||||
user.setRole(request.getRole());
|
||||
try {
|
||||
userRepository.save(user);
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean changePassword(String username, ChangePasswordRequest request) {
|
||||
UserHS user = userRepository.findByUsername(username);
|
||||
if (user != null) {
|
||||
if (passwordEncoder.matches(request.getCurrentPassword(), user.getPassword())) {
|
||||
if (isValidPassword(request.getNewPassword())) {
|
||||
String encodedPassword = passwordEncoder.encode(request.getNewPassword());
|
||||
user.setPassword(encodedPassword);
|
||||
try {
|
||||
userRepository.save(user);
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 验证用户名格式
|
||||
private boolean isValidUsername(String username) {
|
||||
return username != null && username.length() >= 3 && username.length() <= 20;
|
||||
}
|
||||
|
||||
// 验证密码格式
|
||||
private boolean isValidPassword(String password) {
|
||||
return password != null && password.length() >= 4;
|
||||
}
|
||||
|
||||
// 验证联系方式格式(假设为电话号码)
|
||||
private boolean isValidContactInfo(String contactInfo) {
|
||||
String regex = "^\\+?[0-9. ()-]{7,25}$"; // 电话号码验证
|
||||
return contactInfo != null && Pattern.matches(regex, contactInfo);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package org.cmh.backend.authentication.service;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import lombok.Getter;
|
||||
import org.cmh.backend.authentication.dto.VerificationCodeResponse;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Service
|
||||
public class VerificationCodeService {
|
||||
|
||||
@Value("${verification.code.images.path}")
|
||||
private String verificationCodeImagesPath;
|
||||
|
||||
@Getter
|
||||
private List<String> verificationCodeList = new ArrayList<>();
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
loadVerificationCodeImages();
|
||||
}
|
||||
|
||||
private void loadVerificationCodeImages() {
|
||||
try (Stream<Path> paths = Files.list(Paths.get(verificationCodeImagesPath))) {
|
||||
paths.filter(path -> path.toString().endsWith(".png"))
|
||||
.forEach(path -> verificationCodeList.add(path.getFileName().toString()));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public VerificationCodeResponse provideVerificationCode() {
|
||||
if (verificationCodeList.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
Random random = new Random();
|
||||
int code = random.nextInt(random.nextInt(verificationCodeList.size()));
|
||||
String selectedCode = verificationCodeList.get(code);
|
||||
return new VerificationCodeResponse(selectedCode.split("\\.")[0], "/verificationCodeImages/" + selectedCode);
|
||||
}
|
||||
|
||||
}
|
||||
BIN
src/main/resources/static/verificationCodeImages/011092.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/021719.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/022035.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/029455.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/031573.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/046770.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/047990.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/056052.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/058684.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/main/resources/static/verificationCodeImages/060657.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/082948.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/085535.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/095376.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/resources/static/verificationCodeImages/096237.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/main/resources/static/verificationCodeImages/121504.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/129257.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/143814.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/main/resources/static/verificationCodeImages/159296.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/main/resources/static/verificationCodeImages/162856.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/167606.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/static/verificationCodeImages/187677.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/193643.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/194588.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/194642.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/196496.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/196553.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/198679.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/206102.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/216242.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/static/verificationCodeImages/216341.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/219509.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/239910.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/245156.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/246115.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/254558.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/263518.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/main/resources/static/verificationCodeImages/265527.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/268074.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/293288.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/304263.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/311480.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/324873.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/342986.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/361726.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/372672.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/392726.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/398993.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/402610.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/main/resources/static/verificationCodeImages/409320.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/411406.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/439170.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/469004.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/480443.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/481488.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/484022.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/492409.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/497995.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/501513.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/static/verificationCodeImages/502886.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/503160.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/main/resources/static/verificationCodeImages/512497.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
src/main/resources/static/verificationCodeImages/526749.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/531660.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/main/resources/static/verificationCodeImages/545022.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/main/resources/static/verificationCodeImages/548598.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/562119.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/resources/static/verificationCodeImages/582599.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/591206.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/main/resources/static/verificationCodeImages/607760.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/633245.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/main/resources/static/verificationCodeImages/642202.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/main/resources/static/verificationCodeImages/647711.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/main/resources/static/verificationCodeImages/653574.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
src/main/resources/static/verificationCodeImages/690774.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |