mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
authority group 부분 crud 기능 추가
This commit is contained in:
@@ -14,14 +14,11 @@ import java.util.UUID;
|
||||
public class AuthorityController {
|
||||
@Autowired
|
||||
AuthorityService authorityService;
|
||||
private static final int PER_PAGE = 10;
|
||||
private static final int PER_PAGE = 1000;
|
||||
|
||||
@GetMapping("/list")
|
||||
public ModelAndView list(ModelAndView mav, @RequestParam(defaultValue = "") String search, @RequestParam(defaultValue = "0") int start){
|
||||
List<AuthorityDto> list = authorityService.selectAll(search, start, PER_PAGE);
|
||||
for(int i=0; i < list.size(); ++i){
|
||||
System.out.println(list.get(i));
|
||||
}
|
||||
mav.addObject("list", list);
|
||||
mav.setViewName("/authority/list");
|
||||
return mav;
|
||||
@@ -29,7 +26,14 @@ public class AuthorityController {
|
||||
@GetMapping("/create")
|
||||
public String create(){
|
||||
return "/authority/create_group";
|
||||
}
|
||||
|
||||
@PostMapping("/read")
|
||||
public ModelAndView read(ModelAndView mav, AuthorityDto dto){
|
||||
dto = authorityService.selectById(dto);
|
||||
mav.addObject("dto", dto);
|
||||
mav.setViewName("/authority/update_group");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/checkNameDuplicate")
|
||||
@@ -45,4 +49,12 @@ public class AuthorityController {
|
||||
return gson.toJson(result);
|
||||
}
|
||||
|
||||
@PostMapping("/update_process")
|
||||
@ResponseBody
|
||||
public String updateProcess(AuthorityDto dto, Gson gson){
|
||||
int result = authorityService.update(dto);
|
||||
|
||||
return gson.toJson(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ public class AuthorityDto {
|
||||
|
||||
private AccountDto accountDto;
|
||||
|
||||
|
||||
private Boolean activation;
|
||||
private Boolean isGroupAuthority;
|
||||
}
|
||||
|
||||
@@ -15,5 +15,7 @@ public interface AuthorityMapper {
|
||||
|
||||
int insert(AuthorityDto dto);
|
||||
|
||||
int update(AuthorityDto dto);
|
||||
|
||||
List<AuthorityDto> selectAll(Map<String, Object> m);
|
||||
}
|
||||
|
||||
@@ -33,4 +33,6 @@ public class AuthorityService {
|
||||
public int insert(AuthorityDto dto){
|
||||
return mapper.insert(dto);
|
||||
}
|
||||
|
||||
public int update(AuthorityDto dto) { return mapper.update(dto); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user