[Spring][쇼핑몰 프로젝트][17] 작가 수정 페이지 - 2

https://kimvampa.tistory.com/190
This commit is contained in:
SeoJin Kim
2021-03-16 07:01:29 +09:00
parent 60453d4308
commit 8d1294f680
18 changed files with 195 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
@@ -99,6 +100,20 @@ public class AdminController {
model.addAttribute("authorInfo", authorService.authorGetDetail(authorId));
}
/* 작가 정보 수정 */
@PostMapping("/authorModify")
public String authorModifyPOST(AuthorVO author, RedirectAttributes rttr) throws Exception{
logger.info("authorModifyPOST......." + author);
int result = authorService.authorModify(author);
rttr.addFlashAttribute("modify_result", result);
return "redirect:/admin/authorManage";
}
}