[Spring][쇼핑몰 프로젝트][29] 상품 이미지 수정 - 5(배치 프로그램 적용 2)
https://kimvampa.tistory.com/239
This commit is contained in:
@@ -36,4 +36,7 @@ public interface AdminMapper {
|
||||
/* 지정 상품 이미지 전체 삭제 */
|
||||
public void deleteImageAll(int bookId);
|
||||
|
||||
/* 어제자 날짜 이미지 리스트 */
|
||||
public List<AttachImageVO> checkFileList();
|
||||
|
||||
}
|
||||
|
||||
@@ -101,5 +101,12 @@
|
||||
delete FROM vam_image where bookId = #{bookId}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- 어제자 날자 이미지 리스트 -->
|
||||
<select id="checkFileList" resultType="com.vam.model.AttachImageVO">
|
||||
|
||||
select * from vam_image where uploadpath = to_char(sysdate -1, 'yyyy\mm\dd')
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -152,6 +152,7 @@ public class AdminMapperTests {
|
||||
*/
|
||||
|
||||
/* 지정 상품 이미지 삭제 */
|
||||
/*
|
||||
@Test
|
||||
public void deleteImageAllTest() {
|
||||
|
||||
@@ -160,6 +161,15 @@ public class AdminMapperTests {
|
||||
mapper.deleteImageAll(bookId);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/* 어제자 날짜 이미지 리스트 */
|
||||
@Test
|
||||
public void checkImageListTest() {
|
||||
|
||||
mapper.checkFileList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -101,5 +101,12 @@
|
||||
delete FROM vam_image where bookId = #{bookId}
|
||||
|
||||
</delete>
|
||||
|
||||
<!-- 어제자 날자 이미지 리스트 -->
|
||||
<select id="checkFileList" resultType="com.vam.model.AttachImageVO">
|
||||
|
||||
select * from vam_image where uploadpath = to_char(sysdate -1, 'yyyy\mm\dd')
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -36,4 +36,7 @@ public interface AdminMapper {
|
||||
/* 지정 상품 이미지 전체 삭제 */
|
||||
public void deleteImageAll(int bookId);
|
||||
|
||||
/* 어제자 날짜 이미지 리스트 */
|
||||
public List<AttachImageVO> checkFileList();
|
||||
|
||||
}
|
||||
|
||||
@@ -90,6 +90,13 @@
|
||||
|
||||
delete FROM vam_image where bookId = #{bookId}
|
||||
|
||||
</delete>
|
||||
</delete>
|
||||
|
||||
<!-- 어제자 날자 이미지 리스트 -->
|
||||
<select id="checkFileList" resultType="com.vam.model.AttachImageVO">
|
||||
|
||||
select * from vam_image where uploadpath = DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y\%m\%d')
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -16,7 +16,7 @@ public class AdminMapperTests {
|
||||
private AdminMapper mapper;
|
||||
|
||||
/* 상품 등록 */
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void bookEnrollTest() throws Exception{
|
||||
|
||||
@@ -40,6 +40,7 @@ public class AdminMapperTests {
|
||||
System.out.println("After BookVO :" + book);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/* 카테고리 리스트 */
|
||||
@@ -151,6 +152,7 @@ public class AdminMapperTests {
|
||||
*/
|
||||
|
||||
/* 지정 상품 이미지 삭제 */
|
||||
/*
|
||||
@Test
|
||||
public void deleteImageAllTest() {
|
||||
|
||||
@@ -158,6 +160,17 @@ public class AdminMapperTests {
|
||||
|
||||
mapper.deleteImageAll(bookId);
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* 어제자 날짜 이미지 리스트 */
|
||||
@Test
|
||||
public void checkImageListTest() {
|
||||
|
||||
mapper.checkFileList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -90,6 +90,13 @@
|
||||
|
||||
delete FROM vam_image where bookId = #{bookId}
|
||||
|
||||
</delete>
|
||||
</delete>
|
||||
|
||||
<!-- 어제자 날자 이미지 리스트 -->
|
||||
<select id="checkFileList" resultType="com.vam.model.AttachImageVO">
|
||||
|
||||
select * from vam_image where uploadpath = DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y\%m\%d')
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user