[Spring][쇼핑몰 프로젝트][27] 업로드 이미지 정보 등록 - 1
https://kimvampa.tistory.com/227
This commit is contained in:
@@ -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 + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user