mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
add build.gradle dependencies(gson,poi,poi-ooxml) please refresh gradle
This commit is contained in:
@@ -15,7 +15,17 @@ public class CategoryController {
|
||||
|
||||
@Autowired
|
||||
CategoryService categoryService;
|
||||
|
||||
// 테스트
|
||||
@GetMapping("/category/test")
|
||||
public String testpage(Model m) {
|
||||
List<CategoryDto> dto = categoryService.selectAllCategory();
|
||||
m.addAttribute("dto", dto);
|
||||
|
||||
return "category/test";
|
||||
}
|
||||
|
||||
|
||||
// 카테고리 리스트 출력
|
||||
@GetMapping("/category/list")
|
||||
public String list(@RequestParam(name="p", defaultValue = "1")int p, Model m) {
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface CategoryMapper {
|
||||
List<CategoryDto> categoryList(Map<String, Object> m);
|
||||
CategoryDto selectByKanCode(String kan_code);
|
||||
int createProcess(CategoryDto dto);
|
||||
|
||||
List<CategoryDto> selectAllCategory();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,9 @@ public class CategoryService {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
public List<CategoryDto> selectAllCategory() {
|
||||
return mapper.selectAllCategory();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -31,9 +31,13 @@
|
||||
order by kan_code desc limit #{start} , #{count}
|
||||
</select>
|
||||
|
||||
<select id="selectByKancode" parameterType="String" resultType="CategoryDto">
|
||||
<select id="selectByKanCode" parameterType="String" resultType="CategoryDto">
|
||||
select * from product_category where kan_code = #{kan_code}
|
||||
</select>
|
||||
|
||||
<select id="selectAllCategory" resultType="CategoryDto">
|
||||
select * from product_category
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
18
src/main/webapp/WEB-INF/views/category/test.jsp
Normal file
18
src/main/webapp/WEB-INF/views/category/test.jsp
Normal file
@@ -0,0 +1,18 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>test상세페이지</title>
|
||||
</head>
|
||||
<body>
|
||||
test success<br>
|
||||
<hr>
|
||||
<c:forEach items="${dto }" var="item">
|
||||
${item.kan_code} : ${item.cls_nm_1} > ${item.cls_nm_2} > ${item.cls_nm_3} > ${item.cls_nm_4}<br>
|
||||
활성화 : ${item.activation}<br>
|
||||
<hr>
|
||||
</c:forEach>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user