dev check violation for lawcase,complaint
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-19 14:55:43 +07:00
parent 2aac3bbdf4
commit 31713550ce
3 changed files with 3 additions and 25 deletions
@@ -53,17 +53,6 @@ public class UserController {
private final FileStatsService fileStatsService; private final FileStatsService fileStatsService;
@GetMapping("/all")
public ResponseEntity<List<UserDTO>> getAllUsers() {
List<UserDTO> allUsers = userRepository.findAll().stream()
.map(u -> new UserDTO(u.getFullName(), u.getCompanyName(), u.getEmail(), u.isActive(),
u.getPhone(), u.getGenderType(),
u.getBirthday(), u.getCreatedAt(), u.getSubscriptionType(), tariffService.getAllTariffs(),
null, null, u.getVerificationStatus()))
.toList();
return ResponseEntity.ok(allUsers);
}
@GetMapping @GetMapping
public ResponseEntity<UserDTO> getUser(@RequestParam("email") String email, public ResponseEntity<UserDTO> getUser(@RequestParam("email") String email,
@@ -121,23 +110,16 @@ public class UserController {
.build(); .build();
userDTO.setTariffInfo(infoDTO); userDTO.setTariffInfo(infoDTO);
userDTO.setSubscriptionType(infoDTO.getTariffName());
} }
userDTO.setPhone(user.getPhone()); userDTO.setPhone(user.getPhone());
userDTO.setGenderType(user.getGenderType()); userDTO.setGenderType(user.getGenderType());
userDTO.setBirthday(user.getBirthday()); userDTO.setBirthday(user.getBirthday());
userDTO.setCreatedAt(user.getCreatedAt()); userDTO.setCreatedAt(user.getCreatedAt());
userDTO.setSubscriptionType(user.getSubscriptionType());
userDTO.setActive(user.isActive()); userDTO.setActive(user.isActive());
userDTO.setPermission(user.getUserPermissions()); userDTO.setPermission(user.getUserPermissions());
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
System.out.println("userDTO: " + userDTO);
return ResponseEntity.ok(userDTO); return ResponseEntity.ok(userDTO);
} }
} else { } else {
@@ -27,7 +27,7 @@ public class UserDTO {
private GenderType genderType; private GenderType genderType;
private LocalDate birthday; private LocalDate birthday;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private SubscriptionType subscriptionType; private String subscriptionType;
private List<TariffDTO> tariffs; private List<TariffDTO> tariffs;
private TariffInfoDTO tariffInfo; private TariffInfoDTO tariffInfo;
private Long permission; private Long permission;
@@ -49,10 +49,6 @@ public class User {
@Column(unique = true) @Column(unique = true)
private String phone; private String phone;
@Enumerated(EnumType.STRING)
@Column(name = "subscription_type", nullable = false, length = 20)
private SubscriptionType subscriptionType = SubscriptionType.DEMO;
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
@Column(name = "gender") @Column(name = "gender")
private GenderType genderType = GenderType.MALE; private GenderType genderType = GenderType.MALE;