Skip to content

Commit ccc7d77

Browse files
committed
create Food Admin package
1 parent f7e2464 commit ccc7d77

File tree

7 files changed

+282
-0
lines changed

7 files changed

+282
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.test.spring.admin.food;
2+
3+
import java.util.List;
4+
5+
import javax.servlet.http.HttpServletRequest;
6+
import javax.servlet.http.HttpServletResponse;
7+
import javax.servlet.http.HttpSession;
8+
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
import org.springframework.stereotype.Controller;
11+
import org.springframework.transaction.annotation.Transactional;
12+
import org.springframework.web.bind.annotation.RequestMapping;
13+
import org.springframework.web.bind.annotation.RequestMethod;
14+
15+
import com.test.spring.dto.AdminUniversityDTO;
16+
import com.test.spring.dto.UniversityDTO;
17+
import com.test.spring.admin.food.AdminFoodDAO;
18+
19+
20+
@Controller("adminFoodController")
21+
public class AdminFoodController {
22+
23+
@RequestMapping(method = {RequestMethod.GET}, value = "/admin/adminFoodList.action")
24+
public String adminMain(HttpServletRequest request,HttpSession session,HttpServletResponse response){
25+
26+
return "/admin/adminFoodList";
27+
}
28+
29+
30+
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.test.spring.admin.food;
2+
3+
import java.util.List;
4+
5+
import org.mybatis.spring.SqlSessionTemplate;
6+
import org.springframework.beans.factory.annotation.Autowired;
7+
8+
import com.test.spring.dto.FoodDTO;
9+
10+
public class AdminFoodDAO {
11+
12+
@Autowired
13+
private SqlSessionTemplate sql;
14+
15+
16+
//
17+
public List<FoodDTO> foodList() {
18+
// TODO Auto-generated method stub
19+
return sql.selectList("food.foodList");
20+
}
21+
22+
23+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
package com.test.spring.dto;
2+
3+
public class FoodDTO {
4+
private String menuSeq;
5+
private String menuLocation;
6+
private String menuCorner;
7+
private String date;
8+
private String menu1;
9+
private String menu2;
10+
private String menu3;
11+
private String menu4;
12+
private String menu5;
13+
private String menuFlag;
14+
private String workDate;
15+
private String worker;
16+
17+
public String getMenuSeq() {
18+
return menuSeq;
19+
}
20+
public void setMenuSeq(String menuSeq) {
21+
this.menuSeq = menuSeq;
22+
}
23+
public String getMenuLocation() {
24+
return menuLocation;
25+
}
26+
public void setMenuLocation(String menuLocation) {
27+
this.menuLocation = menuLocation;
28+
}
29+
public String getMenuCorner() {
30+
return menuCorner;
31+
}
32+
public void setMenuCorner(String menuCorner) {
33+
this.menuCorner = menuCorner;
34+
}
35+
public String getDate() {
36+
return date;
37+
}
38+
public void setDate(String date) {
39+
this.date = date;
40+
}
41+
public String getMenu1() {
42+
return menu1;
43+
}
44+
public void setMenu1(String menu1) {
45+
this.menu1 = menu1;
46+
}
47+
public String getMenu2() {
48+
return menu2;
49+
}
50+
public void setMenu2(String menu2) {
51+
this.menu2 = menu2;
52+
}
53+
public String getMenu3() {
54+
return menu3;
55+
}
56+
public void setMenu3(String menu3) {
57+
this.menu3 = menu3;
58+
}
59+
public String getMenu4() {
60+
return menu4;
61+
}
62+
public void setMenu4(String menu4) {
63+
this.menu4 = menu4;
64+
}
65+
public String getMenu5() {
66+
return menu5;
67+
}
68+
public void setMenu5(String menu5) {
69+
this.menu5 = menu5;
70+
}
71+
public String getMenuFlag() {
72+
return menuFlag;
73+
}
74+
public void setMenuFlag(String menuFlag) {
75+
this.menuFlag = menuFlag;
76+
}
77+
public String getWorkDate() {
78+
return workDate;
79+
}
80+
public void setWorkDate(String workDate) {
81+
this.workDate = workDate;
82+
}
83+
public String getWorker() {
84+
return worker;
85+
}
86+
public void setWorker(String worker) {
87+
this.worker = worker;
88+
}
89+
90+
91+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
4+
5+
<mapper namespace="food">
6+
7+
<!-- 메뉴 조회 -->
8+
<select id="getFoodList" parameterType="String" resultType="com.test.spring.dto.FoodDTO">
9+
SELECT *
10+
FROM MENU
11+
</select>
12+
13+
<!-- 메뉴 삽입 -->
14+
<insert id = "adFood" parameterType = "java.util.HashMap">
15+
INSERT INTO MENU (menuLocation, menuCorner, date, menu1, menu2, menu3, menu4, menu5, menuFlag, workDate, worker)
16+
VALUES (*{}, *{}, *{}, *{}, *{}, *{}, *{}, *{}, *{}, *{}, *{});
17+
</insert>
18+
19+
<!-- 메뉴 수정 -->
20+
<update id = "updateFood" parameterType="java.util.HashMap">
21+
UPDATE MENU SET BUSSTOPCATEGORYSEQ = #{category} WHERE BUSINFOSEQ = #{}
22+
</update>
23+
24+
<!-- 메뉴 삭제 -->
25+
<delete id = "deleteFood" parameterType="String">
26+
DELETE FROM MENU WHERE date = #{} AND MENULOCATION = #{} AND MENUCORNER = #{}
27+
</delete>
28+
29+
30+
31+
32+
</mapper>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@include file="/inc/asset.jsp"%>
4+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5+
<html>
6+
<head>
7+
<meta charset=UTF-8">
8+
<title>CAMBUS :: 대학선택</title>
9+
<link rel="stylesheet" type="text/css" href="/spring/css/bacisTheme.css" />
10+
<style>
11+
#universitySearch{
12+
width:50%;
13+
margin:0 auto;
14+
margin-top:10%;
15+
}
16+
#universitySel{
17+
float:left;
18+
width:70%;
19+
}
20+
</style>
21+
22+
</head>
23+
24+
<body>
25+
26+
<%@include file="/inc/top.jsp"%>
27+
28+
29+
<!-- content 몸통부분 -->
30+
31+
</body>
32+
</html>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@include file="/inc/asset.jsp"%>
4+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5+
<html>
6+
<head>
7+
<meta charset=UTF-8">
8+
<title>CAMBUS :: 대학선택</title>
9+
<link rel="stylesheet" type="text/css" href="/spring/css/bacisTheme.css" />
10+
<style>
11+
#universitySearch{
12+
width:50%;
13+
margin:0 auto;
14+
margin-top:10%;
15+
}
16+
#universitySel{
17+
float:left;
18+
width:70%;
19+
}
20+
</style>
21+
22+
</head>
23+
24+
<body>
25+
26+
<%@include file="/inc/top.jsp"%>
27+
28+
<h1 class="menuTitle">학식 정보 관리</h1>
29+
<select id="category" class="form-control" style="float:right;width:200px; height:50px; margin:15px;">인성관</select>
30+
<table id="tbl1" class="table table-striped">
31+
32+
<tr>
33+
<th>글번호</th>
34+
<th>날짜</th>
35+
<th>조회수</th>
36+
<th>최종 수정일</th>
37+
<th>수정자</th>
38+
</table>
39+
40+
41+
<!-- content 몸통부분 -->
42+
43+
</body>
44+
</html>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8"
2+
pageEncoding="UTF-8"%>
3+
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4+
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
5+
<!DOCTYPE html>
6+
<html>
7+
<head>
8+
<script src="https://code.jquery.com/jquery-1.12.4.min.js"
9+
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
10+
crossorigin="anonymous"></script>
11+
12+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
13+
14+
<script>
15+
(adsbygoogle = window.adsbygoogle || []).push({
16+
google_ad_client: "ca-pub-2370297300940223",
17+
enable_page_level_ads: true
18+
});
19+
</script>
20+
21+
<meta charset="UTF-8">
22+
<meta name="viewport" content="width=device-width,initial-scale=1">
23+
<title>Ybus</title>
24+
25+
</head>
26+
<body>
27+
28+
</body>
29+
</html>

0 commit comments

Comments
 (0)