mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
ResetPassword 관련 추가
This commit is contained in:
@@ -45,7 +45,7 @@ public class AuthAspect {
|
||||
String[] list = targetController.split("\\.");
|
||||
|
||||
String packageName = list[3];
|
||||
if(packageName.equals("login")) {
|
||||
if(packageName.equals("login") || packageName.equals("resetpassword")) {
|
||||
return joinPoint.proceed();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.no1.wms.resetpassword;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/resetpassword")
|
||||
public class ResetPasswordController {
|
||||
|
||||
|
||||
@Autowired
|
||||
ResetPasswordService resetPasswordService;
|
||||
|
||||
@PostMapping("/insert")
|
||||
@ResponseBody
|
||||
public String insert(ResetPasswordDto dto, Gson gson){
|
||||
resetPasswordService.insert(dto);
|
||||
|
||||
return gson.toJson("s");
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ResponseBody
|
||||
public String delete(ResetPasswordDto dto, Gson gson){
|
||||
resetPasswordService.delete(dto);
|
||||
|
||||
return gson.toJson("s");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.no1.wms.resetpassword;
|
||||
|
||||
import com.no1.wms.account.AccountDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.ibatis.type.Alias;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Alias("ResetPasswordDto")
|
||||
public class ResetPasswordDto {
|
||||
String id;
|
||||
String accountId;
|
||||
String note;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
Date date;
|
||||
|
||||
AccountDto accountDto;
|
||||
String employeeNumber;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.no1.wms.resetpassword;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface ResetPasswordMapper {
|
||||
|
||||
void insert(ResetPasswordDto dto);
|
||||
|
||||
void delete(ResetPasswordDto dto);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.no1.wms.resetpassword;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ResetPasswordService {
|
||||
|
||||
@Autowired
|
||||
ResetPasswordMapper mapper;
|
||||
|
||||
void insert(ResetPasswordDto dto){
|
||||
mapper.insert(dto);
|
||||
}
|
||||
|
||||
void delete(ResetPasswordDto dto){
|
||||
mapper.delete(dto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user