[Spring][쇼핑몰 프로젝트][27] 업로드 이미지 정보 등록 - 1

https://kimvampa.tistory.com/227
This commit is contained in:
SeoJin Kim
2021-06-03 23:15:11 +09:00
parent e1794281ff
commit 2f91f85cdb
6 changed files with 36 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package com.vam.model;
import java.util.Date;
import java.util.List;
public class BookVO {
@@ -48,6 +49,9 @@ public class BookVO {
/* 수정 날짜 */
private Date updateDate;
/* 이미지 정보 */
private List<AttachImageVO> imageList;
public int getBookId() {
return bookId;
@@ -169,15 +173,21 @@ public class BookVO {
this.updateDate = updateDate;
}
public List<AttachImageVO> getImageList() {
return imageList;
}
public void setImageList(List<AttachImageVO> imageList) {
this.imageList = imageList;
}
@Override
public String toString() {
return "BookVO [bookId=" + bookId + ", bookName=" + bookName + ", authorId=" + authorId + ", authorName="
+ authorName + ", publeYear=" + publeYear + ", publisher=" + publisher + ", cateCode=" + cateCode
+ ", cateName=" + cateName + ", bookPrice=" + bookPrice + ", bookStock=" + bookStock + ", bookDiscount="
+ bookDiscount + ", bookIntro=" + bookIntro + ", bookContents=" + bookContents + ", regDate=" + regDate
+ ", updateDate=" + updateDate + "]";
+ ", updateDate=" + updateDate + ", imageList=" + imageList + "]";
}
}

View File

@@ -596,6 +596,9 @@ $("#enrollBtn").on("click",function(e){
str += "<div id='result_card'>";
str += "<img src='/display?fileName=" + fileCallPath +"'>";
str += "<div class='imgDeleteBtn' data-file='" + fileCallPath + "'>x</div>";
str += "<input type='hidden' name='imageList[0].fileName' value='"+ obj.fileName +"'>";
str += "<input type='hidden' name='imageList[0].uuid' value='"+ obj.uuid +"'>";
str += "<input type='hidden' name='imageList[0].uploadPath' value='"+ obj.uploadPath +"'>";
str += "</div>";
uploadResult.append(str);

View File

@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Wed Jun 02 01:27:11 KST 2021
#Thu Jun 03 20:56:13 KST 2021
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa
m2e.projectName=VamPa
groupId=com.vam

View File

@@ -1,6 +1,7 @@
package com.vam.model;
import java.util.Date;
import java.util.List;
public class BookVO {
@@ -48,6 +49,9 @@ public class BookVO {
/* 수정 날짜 */
private Date updateDate;
/* 이미지 정보 */
private List<AttachImageVO> imageList;
public int getBookId() {
return bookId;
@@ -169,12 +173,21 @@ public class BookVO {
this.updateDate = updateDate;
}
public List<AttachImageVO> getImageList() {
return imageList;
}
public void setImageList(List<AttachImageVO> imageList) {
this.imageList = imageList;
}
@Override
public String toString() {
return "BookVO [bookId=" + bookId + ", bookName=" + bookName + ", authorId=" + authorId + ", authorName="
+ authorName + ", publeYear=" + publeYear + ", publisher=" + publisher + ", cateCode=" + cateCode
+ ", cateName=" + cateName + ", bookPrice=" + bookPrice + ", bookStock=" + bookStock + ", bookDiscount="
+ bookDiscount + ", bookIntro=" + bookIntro + ", bookContents=" + bookContents + ", regDate=" + regDate
+ ", updateDate=" + updateDate + "]";
+ ", updateDate=" + updateDate + ", imageList=" + imageList + "]";
}
}

View File

@@ -539,6 +539,9 @@ $("#enrollBtn").on("click",function(e){
str += "<div id='result_card'>";
str += "<img src='/display?fileName=" + fileCallPath +"'>";
str += "<div class='imgDeleteBtn' data-file='" + fileCallPath + "'>x</div>";
str += "<input type='hidden' name='imageList[0].fileName' value='"+ obj.fileName +"'>";
str += "<input type='hidden' name='imageList[0].uuid' value='"+ obj.uuid +"'>";
str += "<input type='hidden' name='imageList[0].uploadPath' value='"+ obj.uploadPath +"'>";
str += "</div>";
uploadResult.append(str);

View File

@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Wed Jun 02 01:27:11 KST 2021
#Thu Jun 03 20:56:14 KST 2021
m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa_MySQL
m2e.projectName=VamPa_MySQL
groupId=com.vam