diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 697358a..9522bb3 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e.xml b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e.xml
index 5df55e7..16d4400 100644
--- a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e.xml
+++ b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e.xml
@@ -1250,265 +1250,473 @@ test\\_%|schema||''||UPDATE|G
-
+
+
+
+
+
+
+
1
varchar(20)|0s
1
-
+
2
varchar(20)|0s
1
-
+
3
varchar(20)|0s
1
-
+
4
varchar(20)|0s
-
+
5
varchar(30)|0s
1
-
+
6
varchar(20)|0s
1
-
+
1
identificationNumber
1
-
+
1
int(11)|0s
1
null
-
+
2
int(11)|0s
1
-
+
3
- varchar(40)|0s
+ varchar(100)|0s
-
+
4
datetime|0s
1
-
+
5
int(11)|0s
1
-
- 6
- varchar(12)|0s
- 1
-
-
+
7
varchar(100)|0s
1
-
+
8
varchar(300)|0s
1
-
+
9
int(11)|0s
-
+
+ 6
+ varchar(100)|0s
+ 1
+
+
+ 10
+ varchar(100)|0s
+
+
+ 11
+ int(11)|0s
+ 0
+
+
idx
btree
-
+
1
gallary_id
1
-
+
idx
user
idx
-
+
1
bigint(21)|0s
1
-
+
2
bigint(21)|0s
1
-
+
3
bigint(21)|0s
1
-
+
4
start value when sequences is created or value if RESTART is used
bigint(21)|0s
1
-
+
5
increment value
bigint(21)|0s
1
-
+
6
bigint(21) unsigned|0s
1
-
+
7
0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed
tinyint(1) unsigned|0s
1
-
+
8
How many cycles have been done
bigint(21)|0s
1
-
+
1
bigint(21)|0s
1
-
+
2
bigint(21)|0s
1
-
+
3
bigint(21)|0s
1
-
+
4
start value when sequences is created or value if RESTART is used
bigint(21)|0s
1
-
+
5
increment value
bigint(21)|0s
1
-
+
6
bigint(21) unsigned|0s
1
-
+
7
0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed
tinyint(1) unsigned|0s
1
-
+
8
How many cycles have been done
bigint(21)|0s
1
-
+
1
int(11)|0s
1
-
+
2
- varchar(30)|0s
+ varchar(300)|0s
-
+
3
varchar(30)|0s
1
-
+
4
varchar(12)|0s
1
-
+
5
- varchar(12)|0s
+ varchar(50)|0s
1
-
+
6
char(11)|0s
1
-
+
7
varchar(3)|0s
1
-
+
8
char(4)|0s
1
-
+
9
char(2)|0s
1
-
+
10
char(2)|0s
1
-
+
11
varchar(200)|0s
1
-
+
12
int(11)|0s
1
-
+
13
int(11)|0s
1
-
+
14
int(11)|0s
1
-
+
15
int(1)|0s
1
0
-
+
+ 1
+ idx
+ 1
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ int(8)|0s
+ 1
+
+
+ 3
+ varchar(20)|0s
+ 1
+
+
+ 4
+ datetime|0s
+ 1
+
+
+ 5
+ varchar(30)|0s
+ 1
+
+
+ idx
+ btree
+
+
+ 1
+ mid
+ 1
+
+
+ idx
+ user
+ idx
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ varchar(30)|0s
+ 1
+
+
+ 3
+ datetime|0s
+ 1
+
+
+ 4
+ int(11)|0s
+ 1
+
+
+ idx
+ btree
+
+
+ gallary_id
+ btree
+
+
+ 1
+ order_number
+ 1
+
+
+ idx
+ user
+ idx
+
+
+ gallary_id
+ gallary
+ gallary_id
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ int(11)|0s
+ 1
+
+
+ idx
+ btree
+
+
+ idx
+ user
+ idx
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ int(10)|0s
+ 1
+ 0
+
+
+ 3
+ int(10)|0s
+ 1
+ 0
+
+
+ 4
+ int(10)|0s
+ 1
+ 0
+
+
+ 5
+ int(10)|0s
+ 1
+ 0
+
+
+ 6
+ int(10)|0s
+ 1
+ 0
+
+
1
idx
1
+
+ idx
+ user
+ idx
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ int(10)|0s
+
+
+ 1
+ gallary_id
+ 1
+
+
+ gallary_id
+ gallary
+ gallary_id
+
+
+ 1
+ int(11)|0s
+ 1
+
+
+ 2
+ int(11)|0s
+ 1
+
+
+ gallery_id
+ btree
+
+
+ idx
+ btree
+
+
+ idx
+ user
+ idx
+
+
+ gallery_id
+ gallary
+ gallary_id
+
\ No newline at end of file
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat
index 608e48b..fe798c2 100644
Binary files a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat and b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat differ
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values
index fe3e0fb..68c751f 100644
Binary files a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values and b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values differ
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.at b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.at
index 2d0285b..b8e0aa5 100644
Binary files a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.at and b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.at differ
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.s b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.s
index aa8e734..092310e 100644
--- a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.s
+++ b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat.values.s
@@ -1 +1 @@
-qaO[OQOQOQOPOPOPPPPPPPPPPPPPPPP
\ No newline at end of file
+qaO[OQOQOQOPOPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPMPPNPPNPPNPPNPPNPPNPPNPPNPP
\ No newline at end of file
diff --git a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat_i b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat_i
index 04aa23c..66c5ff3 100644
Binary files a/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat_i and b/.idea/dataSources/00b6e4d6-edf0-493a-9249-804793f8ef3e/entities/entities.dat_i differ
diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32___Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32___Changes_.xml
deleted file mode 100644
index 1ba8f45..0000000
--- a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32___Changes_.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32_\354\230\244\354\240\204_[Changes]/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32_\354\230\244\354\240\204_[Changes]/shelved.patch"
deleted file mode 100644
index bd49c52..0000000
--- "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_09_22_1_32_\354\230\244\354\240\204_[Changes]/shelved.patch"
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: .idea/compiler.xml
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
-<+>\n\n \n \n \n \n \n \n \n \n \n \n \n \n
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
-diff --git a/.idea/compiler.xml b/.idea/compiler.xml
---- a/.idea/compiler.xml (revision 6b23d6c59fde4165fdb77307d4d8816e8a973721)
-+++ b/.idea/compiler.xml (date 1632241891305)
-@@ -11,5 +11,6 @@
-
-
-
-+
-
-
-\ No newline at end of file
diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_.xml
new file mode 100644
index 0000000..0e062f9
--- /dev/null
+++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_1.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_1.xml
new file mode 100644
index 0000000..b099e10
--- /dev/null
+++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38___Changes_1.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat"
new file mode 100644
index 0000000..1ba9bea
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values"
new file mode 100644
index 0000000..4ce0275
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values.s" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values.s"
new file mode 100644
index 0000000..f1735cc
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat.values.s"
@@ -0,0 +1 @@
+qaO[OQOQOQOPOPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat_i" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat_i"
new file mode 100644
index 0000000..7dfe7bb
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/entities.dat_i" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/shelved.patch"
new file mode 100644
index 0000000..40f10ef
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]/shelved.patch"
@@ -0,0 +1,115 @@
+Index: .idea/workspace.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\n\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n 1629794747969\n \n \n 1629794747969\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/.idea/workspace.xml b/.idea/workspace.xml
+--- a/.idea/workspace.xml
++++ b/.idea/workspace.xml
+@@ -5,7 +5,14 @@
+
+
+
++
++
++
++
+
++
++
++
+
+
+
+@@ -47,7 +54,7 @@
+
+
+
+-
++
+
+
+
+@@ -352,7 +359,10 @@
+
+
+
+-
++
++
++
++
+
+
+
+Index: photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n INSERT INTO gallery (\n gallery_id,\n idx,\n gallery_adress,\n gallery_time,\n gallery_seseon,\n gallery_direaction_x,\n gallery_name,\n gallery_image_location,\n gallery_subscibe_count,\n gallery_direaction_y,\n gallery_views\n )\n VALUES (\n #{galleryId},\n #{idx},\n #{galleryAdress},\n #{galleryTime},\n #{gallerySeseon},\n #{galleryDireactionX},\n #{galleryName},\n #{galleryImageLocation},\n #{gallerySubscribeCount},\n #{galleryDireactionY},\n #{galleryViews}\n )\n \n\n \n UPDATE user\n SET profile_Image_location = #{profileImageLocation},\n nick_name = #{nickName},\n password = #{password}\n WHERE idx = #{idx}\n \n\n \n\n \n UPDATE gallery\n SET gallery_views = gallery_views + 1\n WHERE gallery_id = #{glleryId}\n \n\n\n
+===================================================================
+diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
+--- a/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
++++ b/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
+@@ -16,6 +16,26 @@
+
+
+
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+
+
+
+@@ -53,13 +73,10 @@
+ nick_name = #{nickName},
+ password = #{password}
+ WHERE idx = #{idx}
++ ;
+
+
+-
++
+
+
+ UPDATE gallery
+Index: photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>package com.example.photologger.photo.controller;\n\nimport com.example.photologger.photo.domain.Gallery;\nimport com.example.photologger.photo.service.GalleryService;\nimport lombok.extern.slf4j.Slf4j;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.ResponseBody;\nimport org.springframework.web.bind.annotation.RestController;\n\n@Slf4j\n@RequestMapping(\"/gallery\")\n@RestController\npublic class GalleryController {\n\n private final GalleryService galleryService;\n\n @Autowired\n public GalleryController(GalleryService galleryService){\n this.galleryService = galleryService;\n }\n\n /*갤러리 정보 조회*/\n @GetMapping(value = \"/{gallery_id}\")\n @ResponseBody\n public Gallery lookUp(\n @PathVariable(value = \"gallery_id\") Integer galleryId\n ) throws Exception{\n Gallery gallary = galleryService.galleryLookUp(galleryId);\n return gallary;\n }\n}\n
+===================================================================
+diff --git a/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java b/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
+--- a/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
++++ b/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
+@@ -28,7 +28,7 @@
+ public Gallery lookUp(
+ @PathVariable(value = "gallery_id") Integer galleryId
+ ) throws Exception{
+- Gallery gallary = galleryService.galleryLookUp(galleryId);
+- return gallary;
++ Gallery gallery = galleryService.galleryLookUp(galleryId);
++ return gallery;
+ }
+ }
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat"
new file mode 100644
index 0000000..1ba9bea
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values"
new file mode 100644
index 0000000..4ce0275
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values.s" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values.s"
new file mode 100644
index 0000000..f1735cc
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat.values.s"
@@ -0,0 +1 @@
+qaO[OQOQOQOPOPOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat_i" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat_i"
new file mode 100644
index 0000000..7dfe7bb
Binary files /dev/null and "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/entities.dat_i" differ
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/shelved.patch"
new file mode 100644
index 0000000..de3fc89
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_19_2_38_\354\230\244\354\240\204_[Changes]1/shelved.patch"
@@ -0,0 +1,18 @@
+Index: photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\n\n\n\n \n \n \n\n \n \n \n UPDATE user\n SET password = #{password}\n where idx = #{idx}\n \n\n\n \n UPDATE user\n SET password = #{password}\n where email = #{email}\n \n\n \n UPDATE user\n SET name = #{name}\n WHERE idx = #{idx}\n \n\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
+--- a/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
++++ b/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
+@@ -22,6 +22,7 @@
+ AND name = #{name}
+ AND phone_number = #{phoneNumber}
+
++
+
+
+ UPDATE user
diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08___Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08___Changes_.xml
new file mode 100644
index 0000000..5e74c3e
--- /dev/null
+++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08___Changes_.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08_\354\230\244\355\233\204_[Changes]/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08_\354\230\244\355\233\204_[Changes]/shelved.patch"
new file mode 100644
index 0000000..1d4a37c
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_08_\354\230\244\355\233\204_[Changes]/shelved.patch"
@@ -0,0 +1,30 @@
+Index: .idea/workspace.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\n\n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n 1629794747969\n \n \n 1629794747969\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/.idea/workspace.xml b/.idea/workspace.xml
+--- a/.idea/workspace.xml (revision 76c79e88a3b51ad26e756b6714c80b742386f9cf)
++++ b/.idea/workspace.xml (date 1637672825920)
+@@ -5,10 +5,7 @@
+
+
+
+-
+
+-
+-
+
+
+
+@@ -365,7 +362,7 @@
+
+
+
+-
++
+
+
+
diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09___Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09___Changes_.xml
new file mode 100644
index 0000000..b6b4d7d
--- /dev/null
+++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09___Changes_.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09_\354\230\244\355\233\204_[Changes]/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09_\354\230\244\355\233\204_[Changes]/shelved.patch"
new file mode 100644
index 0000000..c833d47
--- /dev/null
+++ "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09_\354\230\244\355\233\204_[Changes]/shelved.patch"
@@ -0,0 +1,132 @@
+Index: .idea/workspace.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\n\n \n \n \n \n \n \n<<<<<<< HEAD\n=======\n \n \n>>>>>>> a990b919b6a1cab569a1939f370aefd4b13a3e87\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n 1629794747969\n \n \n 1629794747969\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/.idea/workspace.xml b/.idea/workspace.xml
+--- a/.idea/workspace.xml
++++ b/.idea/workspace.xml
+@@ -4,13 +4,11 @@
+
+
+
+-
++
+
+-<<<<<<< HEAD
+-=======
+-
+-
+->>>>>>> a990b919b6a1cab569a1939f370aefd4b13a3e87
++
++
++
+
+
+
+@@ -46,8 +44,8 @@
+
+
+
+-
+
++
+
+
+
+@@ -57,7 +55,7 @@
+
+
+
+
+
+@@ -97,23 +95,16 @@
+
+
+
+-
+
+
+-
+
+
+
+-
+-
+-
+-
+-
+
+
+
+
+-
++
+
+
+
+@@ -312,10 +303,10 @@
+
+
+
+-
++
+
+
+-
++
+
+
+
+@@ -352,22 +343,30 @@
+
+
+
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+
+
+
diff --git "a/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09_\354\230\244\355\233\204_[Changes]1/shelved.patch" "b/.idea/shelf/Uncommitted_changes_before_Checkout_at_2021_11_23_10_09_\354\230\244\355\233\204_[Changes]1/shelved.patch"
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
new file mode 100644
index 0000000..57cda04
--- /dev/null
+++ b/.idea/sqldialects.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fefbfc0..9c9cb63 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,24 +4,26 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
+
@@ -56,9 +58,9 @@
+
-
@@ -68,7 +70,7 @@
@@ -82,11 +84,18 @@
-
+
+
-
+
+
+
+
+
+
+
@@ -98,6 +107,7 @@
+
@@ -105,19 +115,18 @@
-
-
-
+
+
@@ -142,84 +151,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -293,6 +224,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -306,13 +285,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
@@ -349,6 +358,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/photo/build.gradle b/photo/build.gradle
index 4d3c30e..53d0f15 100644
--- a/photo/build.gradle
+++ b/photo/build.gradle
@@ -27,14 +27,14 @@ dependencies {
//Lombok
- compileOnly 'org.projectlombok:lombok:1.18.20'
- annotationProcessor 'org.projectlombok:lombok:1.18.20'
+ compileOnly 'org.projectlombok:lombok:1.18.22'
+ annotationProcessor 'org.projectlombok:lombok:1.18.22'
// MyBatis
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0'
- implementation('org.springframework.boot:spring-boot-starter-jdbc:2.5.3')
+ implementation('org.springframework.boot:spring-boot-starter-jdbc:2.5.5')
implementation('org.mariadb.jdbc:mariadb-java-client:2.7.3')
- implementation('org.apache.tomcat.embed:tomcat-embed-jasper:10.0.8')
+ implementation('org.apache.tomcat.embed:tomcat-embed-jasper:10.0.12')
implementation('javax.servlet:jstl:1.2')
//Swagger 2
@@ -48,18 +48,18 @@ dependencies {
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'
- implementation 'javax.xml.bind:jaxb-api'
+ implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
//Spring Security
- implementation 'org.springframework.boot:spring-boot-starter-security'
+ implementation 'org.springframework.boot:spring-boot-starter-security:2.5.6'
//Email
- implementation 'org.springframework.boot:spring-boot-starter-mail:2.5.3'
+ implementation 'org.springframework.boot:spring-boot-starter-mail:2.5.5'
//Amazone S3
- implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.5.RELEASE'
+ implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
//thumbnailator
- implementation 'net.coobird:thumbnailator:0.4.8'
+ implementation 'net.coobird:thumbnailator:0.4.14'
diff --git a/photo/src/main/java/com/example/photologger/photo/apidocument/AccountControllerDocs.java b/photo/src/main/java/com/example/photologger/photo/apidocument/AccountControllerDocs.java
index e9bbfd5..7ec60c9 100644
--- a/photo/src/main/java/com/example/photologger/photo/apidocument/AccountControllerDocs.java
+++ b/photo/src/main/java/com/example/photologger/photo/apidocument/AccountControllerDocs.java
@@ -23,22 +23,10 @@ public interface AccountControllerDocs {
@ApiOperation(value = "로그인", notes = "로그인.")
public ReturnUser login(@RequestBody @ApiParam(value = "이메일(ID) & password",required = true) Map userIdPassword);
- @ApiOperation(value = "로그아웃", notes = "로그아웃.")
- public String logout(HttpServletRequest request, HttpServletResponse response);
-
- @ApiOperation(value = "비밀번호 찾기", notes = "비밀번호 찾기")
- public void PassWord_Reset();
-
- @ApiOperation(value = "Id 찾기", notes = "id찾기")
- public String Id_Find();
-
- @ApiOperation(value = "회원 삭제", notes = "회원삭제는 ??일의 보류기간을 가집니다.")
- public String Delete_User();
-
@ApiOperation(value = "이메일 중복검사",notes = "회원가입중 이메일을 검증할 코드입니다.")
public Object email_check(@RequestBody @ApiParam(value = "email") String email);
- @ApiOperation(value = "",notes = "")
+ @ApiOperation(value = "Token 검증",notes = "JWT검증하는 코드입니다.")
public HashMap token_Expiration(@RequestParam(name = "token")@ApiParam(value = "token") String token, @RequestParam(name = "email") @ApiParam(value = "email") String email);
}
diff --git a/photo/src/main/java/com/example/photologger/photo/apidocument/CashControllerDocs.java b/photo/src/main/java/com/example/photologger/photo/apidocument/CashControllerDocs.java
new file mode 100644
index 0000000..411f1a7
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/apidocument/CashControllerDocs.java
@@ -0,0 +1,35 @@
+package com.example.photologger.photo.apidocument;
+
+import com.example.photologger.photo.service.PaymentSerivce;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@Api(tags= "Cash Controller")
+public interface CashControllerDocs {
+ @ApiOperation(value = "포인트 충전", notes = "아임포트측과 연동하여 결제햔 데이터의 정보를 받고 확인합니다.")
+ public boolean check(@ApiParam(value = "결제데이터") Map mid);
+
+ @ApiOperation(value = "현글거래내역(결제내역)",notes = "데이터 베이스에 저장되있는 현금거래내역(결제내역)을 ")
+ public Object history(@ApiParam(value = "토큰") String token,
+ @ApiParam(value = "조회 시작날짜") String start,
+ @ApiParam(name = "조회 종료날짜(0시기준 조회기때문에 조회날짜는 +1을 해서 보내는게좋습니다.") String end);
+
+ @ApiOperation(value = "출금",notes = "실제 돈을 출금할방법이없기에 빼는거만 계산됬습니다.")
+ public Object withdrawal(@ApiParam(value = "토큰") String token,
+ @ApiParam(value = "이메일") String email,
+ @ApiParam(value = "가격") int pay);
+
+ @ApiOperation(value = "출금내역",notes = "출금내역을 보여줍니다.")
+ public Object withdrawalHistory(@ApiParam(value = "이메일") String email,
+ @ApiParam(value = "토큰") String token,
+ @ApiParam(value = "조회 시작날짜") String start,
+ @ApiParam(name = "조회 종료날짜(0시기준 조회기때문에 조회날짜는 +1을 해서 보내는게좋습니다.") String end);
+}
+
diff --git a/photo/src/main/java/com/example/photologger/photo/apidocument/itemControllerDocs.java b/photo/src/main/java/com/example/photologger/photo/apidocument/itemControllerDocs.java
new file mode 100644
index 0000000..55b56c5
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/apidocument/itemControllerDocs.java
@@ -0,0 +1,34 @@
+package com.example.photologger.photo.apidocument;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@Api(tags= "item Controller")
+public interface itemControllerDocs {
+ @ApiOperation(value = "사진구매",notes = "사진을구매합니다")
+ public Object itemBuy(@ApiParam(value = "사진구매데이터") Map tmp);
+
+ @ApiOperation(value = "사진구매내역",notes = "사진을 구매한내역을 시작날짜와 끝날짜에 맞춰보여줍니다.")
+ public Object itemHistory(@ApiParam(value = "토큰")String token,
+ @ApiParam(value = "조회 시작날짜") String start,
+ @ApiParam(name = "조회 종료날짜(0시기준 조회기때문에 조회날짜는 +1을 해서 보내는게좋습니다.") String end);
+
+ @ApiOperation(value = "장바구니 확인",notes = "장바구니목록을 보여줍니다.")
+ public Object cartCheck(@ApiParam(value = "토큰") String token);
+
+ @ApiOperation(value = "장바구니 담기",notes = "해당사진을 장바구니에 담습니다.")
+ public Object cartInsert(@ApiParam(value = "장바구니에 넣을 데이터") Map tmp);
+
+ @ApiOperation(value = "장바구니 구매",notes = "장바구니에 있는 물건을 선택하여 구매합니다.")
+ public Object cartBuy(@ApiParam(value = "장바구니에서 구매할 상품") String json);
+
+ @ApiOperation(value = "장바구니 삭제",notes = "구매가 완료된 상품 OR 장바구니에서 삭제할 물건을 입력합니다.")
+ public Object cartDelete(@ApiParam(value = "토큰") String token,
+ @ApiParam(value = "이메일") String email,
+ @ApiParam(value = "사진번호") String gallery_id);
+}
\ No newline at end of file
diff --git a/photo/src/main/java/com/example/photologger/photo/config/Webconfig.java b/photo/src/main/java/com/example/photologger/photo/config/Webconfig.java
index 09c8b62..43a0ebe 100644
--- a/photo/src/main/java/com/example/photologger/photo/config/Webconfig.java
+++ b/photo/src/main/java/com/example/photologger/photo/config/Webconfig.java
@@ -10,7 +10,7 @@ class Webconfig implements WebMvcConfigurer {
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
- .allowedMethods("GET", "POST")
+ .allowedMethods("GET", "POST","DELETE","PUT")
.maxAge(3000);
}
}
diff --git a/photo/src/main/java/com/example/photologger/photo/constants/Constants.java b/photo/src/main/java/com/example/photologger/photo/constants/Constants.java
index 2ce90fa..d0c3026 100644
--- a/photo/src/main/java/com/example/photologger/photo/constants/Constants.java
+++ b/photo/src/main/java/com/example/photologger/photo/constants/Constants.java
@@ -4,4 +4,8 @@ public class Constants {
public static final Integer TAKE =20;
+ public static final Integer SUBSCRIVE_TAKE=5;
+
+ public static final Integer SEARCH_TAKE=4;
+
}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/AccountsController.java b/photo/src/main/java/com/example/photologger/photo/controller/AccountsController.java
index 2408562..90ae431 100644
--- a/photo/src/main/java/com/example/photologger/photo/controller/AccountsController.java
+++ b/photo/src/main/java/com/example/photologger/photo/controller/AccountsController.java
@@ -1,58 +1,67 @@
package com.example.photologger.photo.controller;
+import com.example.photologger.photo.apidocument.AccountControllerDocs;
+import com.example.photologger.photo.domain.Gallery;
import com.example.photologger.photo.domain.ReturnUser;
import com.example.photologger.photo.domain.User;
import com.example.photologger.photo.service.AccountsService;
import com.example.photologger.photo.service.EmailService;
+import com.example.photologger.photo.service.GalleryService;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.example.photologger.photo.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
@Slf4j
@RequestMapping("/accounts")
@RestController
-public class AccountsController{
+public class AccountsController {
+ private final GalleryService galleryService;
private final AccountsService accountsService;
private final EmailService emailService;
+
@Autowired
public AccountsController(AccountsService accountsService,
- EmailService emailService) {
+ EmailService emailService,
+ GalleryService galleryService) {
this.accountsService = accountsService;
this.emailService = emailService;
+ this.galleryService = galleryService;
}
- @PostMapping(value = "/new", consumes = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity JoIn(@RequestBody User user) {
-// //비밀번호 암호화(미사용코드) 프론트쪽에서 암호화예정.
-// BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
-// user.setPassword(passwordEncoder.encode(user.getPassword()));
- //DB User 데이터 저장
+ @PostMapping(value = "")
+ public ResponseEntity JoIn(
+ @RequestBody User user,
+ @RequestParam(value = "images") MultipartFile multipartFile) throws IOException {
accountsService.join(user);
+ user.setProfileImageLocation(galleryService.profileImagejoin(multipartFile, user));
emailService.SendJoinMail(user.getEmail());
log.info(user.getName() + "님의 회원가입이 정상적으로 완료되었습니다");
return new ResponseEntity(HttpStatus.OK);
+
}
@GetMapping("/emailcornfirm/{email}")
public String checkEmail(@PathVariable(value = "email") String email) {
log.info(email);
accountsService.emailCheck(email);
- log.info("아매알 안중이 완료 되었습니다.");
+ log.info("아매알 인중이 완료 되었습니다.");
return "true";
}
@@ -63,22 +72,13 @@ public ReturnUser login(@RequestBody Map userIdPassword) {
return accountsService.login(userIdPassword);
}
- @GetMapping("/logout")
- public String logout(HttpServletRequest request, HttpServletResponse response) {
- Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
-
- if (authentication != null) {
- new SecurityContextLogoutHandler().logout(request, response, authentication);
- }
- return "redirect:/";
- }
- @GetMapping("/new/email-check")
+ @GetMapping("/email")
public Object email_check(@RequestParam(name = "email") String email) {
log.info(email);
return accountsService.email_Check(email);
}
- @GetMapping("/token-check")
+ @GetMapping("/token")
@ResponseBody
public HashMap token_Expiration(@RequestParam(name = "token") String token,
@RequestParam(name = "email") String email) {
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/CashController.java b/photo/src/main/java/com/example/photologger/photo/controller/CashController.java
new file mode 100644
index 0000000..f39ff88
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/controller/CashController.java
@@ -0,0 +1,45 @@
+package com.example.photologger.photo.controller;
+
+import com.example.photologger.photo.service.PaymentSerivce;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+@Slf4j
+@RestController
+@RequestMapping("cash")
+public class CashController {
+ @Autowired
+ PaymentSerivce paymentSerivce;
+
+ @PostMapping(value = "/payment",consumes = MediaType.APPLICATION_JSON_VALUE)
+ public boolean check(@RequestBody Map mid)
+ {
+ return paymentSerivce.check(mid);
+ }
+ @GetMapping("/payment")
+ public Object history(@RequestParam(name="token")String token,
+ @RequestParam(name = "start_history")String start,
+ @RequestParam(name = "end_history")String end)
+ {
+ return paymentSerivce.history(token,start, end);
+ }
+ @PutMapping("/withdrawal")
+ public Object withdrawal(@RequestParam(name="token")String token,
+ @RequestParam(name="email")String email,
+ @RequestParam(name="pay")int pay)
+ {
+ return paymentSerivce.withdrawal(token,email,pay);
+ }
+ @GetMapping("/withdrawal")
+ public Object withdrawalHistory(@RequestParam(name="email")String email,
+ @RequestParam(name="token")String token,
+ @RequestParam(name = "start_history")String start,
+ @RequestParam(name = "end_history")String end)
+ {
+ return paymentSerivce.withdrawalHistory(email,token,start,end);
+ }
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/GallaryController.java b/photo/src/main/java/com/example/photologger/photo/controller/GallaryController.java
deleted file mode 100644
index 8fc02e9..0000000
--- a/photo/src/main/java/com/example/photologger/photo/controller/GallaryController.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.example.photologger.photo.controller;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@Slf4j
-@RequestMapping("/api/gallary")
-public class GallaryController {
-
-}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java b/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
new file mode 100644
index 0000000..0ce6422
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/controller/GalleryController.java
@@ -0,0 +1,35 @@
+package com.example.photologger.photo.controller;
+
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.JoinGalleryUserLU;
+import com.example.photologger.photo.service.GalleryService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RequestMapping("/gallery")
+@RestController
+public class GalleryController {
+
+ private final GalleryService galleryService;
+
+ @Autowired
+ public GalleryController(GalleryService galleryService){
+ this.galleryService = galleryService;
+ }
+
+ /* Gallery Info LookUp */
+ @GetMapping(value = "/{gallery_id}")
+ @ResponseBody
+ public JoinGalleryUserLU lookUp(
+ @PathVariable(value = "gallery_id") Integer galleryId
+ ) throws Exception{
+ Gallery gallery1 = galleryService.galleryLookUp(galleryId);
+ return galleryService.galleryAndUserLU(gallery1.getGalleryId(), gallery1.getIdx());
+ }
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/ItemController.java b/photo/src/main/java/com/example/photologger/photo/controller/ItemController.java
new file mode 100644
index 0000000..228e498
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/controller/ItemController.java
@@ -0,0 +1,56 @@
+package com.example.photologger.photo.controller;
+
+import com.example.photologger.photo.service.PaymentSerivce;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@RequestMapping("item")
+public class ItemController {
+ @Autowired
+ PaymentSerivce paymentSerivce;
+ @PostMapping("/buy")
+ public Object itemBuy(@RequestBody Map tmp)
+ {
+ int galleryid=Integer.parseInt(tmp.get("gallery_id").toString());
+ String token = tmp.get("token").toString();
+ log.info(galleryid+" "+token);
+ return paymentSerivce.itemBuy(galleryid,token);
+ }
+ @GetMapping("/buy")
+ public Object itemHistory(@RequestParam(name="token")String token,
+ @RequestParam(name = "start_history")String start,
+ @RequestParam(name = "end_history")String end)
+ {
+ return paymentSerivce.itemHistoryCheck(token,start,end);
+ }
+ @GetMapping("/cart")
+ public Object cartCheck(@RequestParam(name="token") String token,
+ @RequestParam(name="email") String email)
+ {
+ return paymentSerivce.cartCheck(token,email);
+ }
+ @PostMapping("/cart")
+ public Object cartInsert(@RequestBody Map tmp)
+ {
+ return paymentSerivce.cartInsert(tmp);
+ }
+
+ @PostMapping(value="/cart/buy",consumes = MediaType.APPLICATION_JSON_VALUE)
+ public Object cartBuy(@RequestBody String json)
+ {
+ return paymentSerivce.cartBuy(json);
+ }
+ @DeleteMapping("/cart")
+ public Object cartDelete(@RequestParam(name="token") String token,
+ @RequestParam(name="email") String email,
+ @RequestParam(name="gallery_id")String gallery_id)//여러개 받을거라 1,2,3으로 받고 자르는게 편할듯
+ {
+ return paymentSerivce.cartDelete(token,email,gallery_id);
+ }
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/PaginationController.java b/photo/src/main/java/com/example/photologger/photo/controller/PaginationController.java
index 00ab1ad..d4488f3 100644
--- a/photo/src/main/java/com/example/photologger/photo/controller/PaginationController.java
+++ b/photo/src/main/java/com/example/photologger/photo/controller/PaginationController.java
@@ -1,20 +1,18 @@
package com.example.photologger.photo.controller;
-import com.example.photologger.photo.domain.Gallary;
-//import com.example.photologger.photo.domain.ResponseDto;
+import com.example.photologger.photo.domain.Gallery;
import com.example.photologger.photo.service.PaginationService;
+import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
-@RequestMapping("/api/pagination")
+@RequestMapping("/pagination")
@RestController
public class PaginationController {
@@ -22,16 +20,10 @@ public class PaginationController {
PaginationService paginationService;
-// @GetMapping("/cursor/{cursor}")
-// public ResponseEntity cursorPagination(@PathVariable("cursor") Integer cursor){
-// return new ResponseEntity(
-// ResponseDto
-// .builder()
-// .data(paginationService.getGallery(cursor)) // 네네
-// .build()
-// , HttpStatus.OK
-// );
-// }
+ @GetMapping("/cursor/{cursor}")
+ public List cursorPagination(@PathVariable("cursor") Integer cursor){
+ return paginationService.getGallery(cursor);
+ }
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/PaymentController.java b/photo/src/main/java/com/example/photologger/photo/controller/PaymentController.java
deleted file mode 100644
index 6632a8b..0000000
--- a/photo/src/main/java/com/example/photologger/photo/controller/PaymentController.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.example.photologger.photo.controller;
-
-import com.example.photologger.photo.mapper.AccountsMapper;
-import com.example.photologger.photo.mapper.PaymentMapper;
-import com.example.photologger.photo.service.AccountsService;
-import com.example.photologger.photo.service.PaymentSerivce;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.format.annotation.DateTimeFormat;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.*;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-
-@Slf4j
-@RestController
-@RequestMapping("payment")
-public class PaymentController {
- @Autowired
- PaymentSerivce paymentSerivce;
- @Autowired
- AccountsService accountsService;
- @Autowired
- PaymentMapper paymentMapper;
- @Autowired
- AccountsMapper accountsMapper;
-
- @PostMapping(value = "/check",consumes = MediaType.APPLICATION_JSON_VALUE)
- public boolean check(@RequestBody Map mid)
- {
-
- return paymentSerivce.check(mid);
-
- }
- @GetMapping("/history")
- public Object history(@RequestParam(name="token")String token,
- @RequestParam(name = "start_history")String start,
- @RequestParam(name = "end_history")String end)
- {
- return paymentSerivce.history(token,start, end);
- }
-}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/SearchController.java b/photo/src/main/java/com/example/photologger/photo/controller/SearchController.java
new file mode 100644
index 0000000..2d84243
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/controller/SearchController.java
@@ -0,0 +1,43 @@
+package com.example.photologger.photo.controller;
+
+
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.User;
+import com.example.photologger.photo.service.SearchService;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RequestMapping("/search")
+@RestController
+public class SearchController {
+
+ private final SearchService searchService;
+
+ @Autowired
+ public SearchController(SearchService searchService) {
+ this.searchService = searchService;
+ }
+
+ @GetMapping(value = "/title/{cursor}/{word}")
+ public List titleSearch(
+ @PathVariable("cursor") Integer cursor,
+ @PathVariable("word") String word)
+ {
+ return searchService.titleSearch(cursor,word);
+ }
+
+ @GetMapping(value = "/seller/{cursor}/{seller}")
+ public List sellerSearch(
+ @PathVariable("cursor") Integer cursor,
+ @PathVariable("word") String seller
+ ){
+ return searchService.sellerSearch(cursor,seller);
+ }
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/SubscribeController.java b/photo/src/main/java/com/example/photologger/photo/controller/SubscribeController.java
new file mode 100644
index 0000000..aec4ce3
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/controller/SubscribeController.java
@@ -0,0 +1,61 @@
+package com.example.photologger.photo.controller;
+
+import com.example.photologger.photo.domain.Subscribe;
+import com.example.photologger.photo.service.SubscribeService;
+import io.swagger.models.auth.In;
+import java.util.List;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping("/subscribe")
+public class SubscribeController {
+
+ private final SubscribeService subscribeService;
+
+ public SubscribeController(
+ SubscribeService subscribeService) {
+ this.subscribeService = subscribeService;
+ }
+
+ /*사진 구독*/
+ @PostMapping("/gallery")
+ public void subscribeGallery(
+ @RequestBody Subscribe subscribe
+ ) {
+ subscribeService.subscribeGallery(subscribe);
+ }
+
+ /*작가 구독*/
+ @PostMapping("/user")
+ public void subscribeUser(
+ @RequestBody Subscribe subscribe
+ ) {
+ subscribeService.subscribeUser(subscribe);
+ }
+
+ /*구독한 사진 불러오기*/
+ @GetMapping("/gallery/cursor/{cursor}/{idx}")
+ public List subGalleryPagination(
+ @PathVariable("cursor") Integer cursor,
+ @PathVariable("idx") Integer idx)
+ {
+ return subscribeService.getSubscribeGallery(cursor, idx);
+ }
+
+ /*구독한 유저 불러오기*/
+ @GetMapping("/user/cursor/{cursor}/{idx}")
+ public List subUserPagination(
+ @PathVariable("cursor") Integer cursor,
+ @PathVariable("idx") Integer idx)
+ {
+ return subscribeService.getSubscribeUser(cursor, idx);
+ }
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/UploadController.java b/photo/src/main/java/com/example/photologger/photo/controller/UploadController.java
index 759dfe6..005105f 100644
--- a/photo/src/main/java/com/example/photologger/photo/controller/UploadController.java
+++ b/photo/src/main/java/com/example/photologger/photo/controller/UploadController.java
@@ -1,11 +1,16 @@
package com.example.photologger.photo.controller;
-import com.example.photologger.photo.domain.Gallary;
-import com.example.photologger.photo.service.GallaryService;
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.User;
+import com.example.photologger.photo.service.GalleryService;
+import com.example.photologger.photo.service.UserService;
import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -13,19 +18,40 @@
@Slf4j
@RestController
-@RequestMapping("/api/uploader")
+@RequestMapping("/uploader")
public class UploadController {
@Autowired
- private GallaryService gallaryService;
+ private GalleryService galleryService;
+ @Autowired
+ private UserService userService;
+
+ //갤러리 이미지 업로드
@PostMapping(value = "/images")
public String upload(
- Gallary gallary,
+ Gallery gallery,
@RequestParam(value = "images") MultipartFile multipartFile
) throws IOException {
- gallaryService.gallaryInfoeSave(gallary ,multipartFile);
+ galleryService.galleryInfoeSave(gallery ,multipartFile);
return "ok";
}
+ //프로필 이미지 업로드
+ @PostMapping(value = "/profileimage")
+ public String profileupload(
+ @RequestParam(value = "idx") Integer idx,
+ @RequestParam(value = "nickName") String nickname,
+ @RequestParam(value = "password") String password,
+ @RequestParam(value = "images") MultipartFile multipartFile
+ ) throws IOException {
+ User user = userService.findOne(idx);
+ user.setNickName(nickname);
+ user.setPassword(password);
+
+ galleryService.profileImageSave(multipartFile, user);
+ return "ok";
+ }
+
+
}
diff --git a/photo/src/main/java/com/example/photologger/photo/controller/UserController.java b/photo/src/main/java/com/example/photologger/photo/controller/UserController.java
index 4151e27..a0b9cd7 100644
--- a/photo/src/main/java/com/example/photologger/photo/controller/UserController.java
+++ b/photo/src/main/java/com/example/photologger/photo/controller/UserController.java
@@ -1,6 +1,6 @@
package com.example.photologger.photo.controller;
-//import com.example.photologger.photo.domain.ResponseDto;
+import com.example.photologger.photo.domain.ResponseDto;
import com.example.photologger.photo.domain.User;
import com.example.photologger.photo.service.EmailService;
import com.example.photologger.photo.service.UserService;
@@ -8,11 +8,17 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
-@RequestMapping("/api/user")
+@RequestMapping("/user")
public class UserController {
@Autowired
@@ -28,31 +34,30 @@ public User findUser(
@PathVariable(value = "idx")
Integer idx
) throws Exception {
-
User user = userService.findOne(idx);
return user;
}
// 아이디 찾기
- @GetMapping("/findId")
- public String findUserId(@RequestBody User user) {
- return "ok";
+ @GetMapping("/findid")
+ public void findUserId(@RequestBody String name, String phoneNumber) {
+ userService.findId(name, phoneNumber);
+
}
// 비밀번호 찾기
-// @PostMapping("/findPwd")
-// public ResponseEntity findPwd(@RequestBody User user)
-// {
-// User user1 = null;
-// user1 = userService.findpwd(user);
-// String email = user1.getEmail();
-// return new ResponseEntity(
-// ResponseDto
-// .builder()
-// .data(emailService.sendFindPasswordMail(email,user1))
-// .build()
-// , HttpStatus.OK);
-// }
+ @PostMapping("/findPwd")
+ public ResponseEntity findPwd(@RequestBody User user) {
+ User user1 = null;
+ user1 = userService.findpwd(user);
+ String email = user1.getEmail();
+ return new ResponseEntity(
+ ResponseDto
+ .builder()
+ .data(emailService.sendFindPasswordMail(email, user1))
+ .build()
+ , HttpStatus.OK);
+ }
// 비밀번호 변경
@@ -64,4 +69,6 @@ public String updatePassword(@PathVariable(value = "idx") Integer idx,
userService.UpdatePassword(user);
return "true";
}
+
+ //프로필 이미지 저장
}
\ No newline at end of file
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Cart.java b/photo/src/main/java/com/example/photologger/photo/domain/Cart.java
new file mode 100644
index 0000000..fb7e470
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Cart.java
@@ -0,0 +1,17 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+@Getter
+@Setter
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class Cart {
+ @ApiModelProperty(example = "회원 번호")
+ int idx;
+ @ApiModelProperty(example = "사진 번호")
+ int galleryId;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Gallary.java b/photo/src/main/java/com/example/photologger/photo/domain/Gallary.java
deleted file mode 100644
index 407fe9e..0000000
--- a/photo/src/main/java/com/example/photologger/photo/domain/Gallary.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.example.photologger.photo.domain;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-import lombok.ToString;
-
-@Getter
-@Setter
-@NoArgsConstructor
-@ToString
-public class Gallary {
- @ApiModelProperty(example = "사진 번호")
- private int gallaryId;
-
- @ApiModelProperty(example = "회원 번호")
- private int idx;
-
- @ApiModelProperty(example = "사진 주소")
- private String gallaryAdress;
-
- @ApiModelProperty(example = "사진 시간")
- private String gallaryTime;
-
- @ApiModelProperty(example = "시진 계절")
- private int gallarySeseon;
-
- @ApiModelProperty(example = "사진 방향")
- private String gallaryDireaction;
-
- @ApiModelProperty(example = "사진 이름")
- private String gallaryName;
-
- @ApiModelProperty(example = "사진 업로드 위치")
- private String gallaryImageLocation;
-
- @ApiModelProperty(example = "사진 구독자 수")
- private int gallarySubscribeCount;
-
-}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Gallery.java b/photo/src/main/java/com/example/photologger/photo/domain/Gallery.java
new file mode 100644
index 0000000..24e60e7
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Gallery.java
@@ -0,0 +1,49 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+@Getter
+@Setter
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class Gallery {
+ @ApiModelProperty(example = "사진 번호")
+ private int galleryId;
+
+ @ApiModelProperty(example = "회원 번호")
+ private int idx;
+
+ @ApiModelProperty(example = "사진 주소")
+ private String galleryAdress;
+
+ @ApiModelProperty(example = "사진 시간")
+ private String galleryTime;
+
+ @ApiModelProperty(example = "시진 계절")
+ private int gallerySeseon;
+
+ @ApiModelProperty(example = "사진 좌표 X")
+ private String galleryDireactionX;
+
+ @ApiModelProperty(example = "사진 좌표 Y")
+ private String galleryDireactionY;
+
+ @ApiModelProperty(example = "사진 이름")
+ private String galleryName;
+
+ @ApiModelProperty(example = "사진 업로드 위치")
+ private String galleryImageLocation;
+
+ @ApiModelProperty(example = "사진 구독자 수")
+ private int gallerySubscribeCount;
+
+ @ApiModelProperty(example = "사진 조회수")
+ private int galleryViews;
+
+ @ApiModelProperty(example = "사진 구매 수")
+ private int galleryBuyCount;
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/GalleryPrice.java b/photo/src/main/java/com/example/photologger/photo/domain/GalleryPrice.java
new file mode 100644
index 0000000..0fab529
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/GalleryPrice.java
@@ -0,0 +1,17 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+@Getter
+@Setter
+@ToString
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class GalleryPrice {
+ @ApiModelProperty(example = "사진 가격")
+ int price;
+ @ApiModelProperty(example = "사진 번호")
+ int galleryId;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryAndSubscribe.java b/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryAndSubscribe.java
new file mode 100644
index 0000000..d09da99
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryAndSubscribe.java
@@ -0,0 +1,15 @@
+package com.example.photologger.photo.domain;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+@Data
+@Getter
+@Setter
+public class JoinGalleryAndSubscribe {
+
+ private Gallery gallery;
+ private Subscribe subscribe;
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/JoinGallerySU.java b/photo/src/main/java/com/example/photologger/photo/domain/JoinGallerySU.java
new file mode 100644
index 0000000..a7c06d1
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/JoinGallerySU.java
@@ -0,0 +1,16 @@
+package com.example.photologger.photo.domain;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+public class JoinGallerySU {
+
+ private Gallery gallery;
+ private User user;
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryUserLU.java b/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryUserLU.java
new file mode 100644
index 0000000..ab9df18
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/JoinGalleryUserLU.java
@@ -0,0 +1,16 @@
+package com.example.photologger.photo.domain;
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+public class JoinGalleryUserLU {
+
+ private Gallery gallery;
+ private User user;
+ private GalleryPrice galleryPrice;
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Order.java b/photo/src/main/java/com/example/photologger/photo/domain/Order.java
new file mode 100644
index 0000000..c59ba1e
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Order.java
@@ -0,0 +1,22 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.util.Date;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Setter
+@Getter
+@Builder
+public class Order {
+ @ApiModelProperty(example = "회원 번호")
+ int idx;
+ @ApiModelProperty(example = "주문 번호")
+ String orderNumber;
+ @ApiModelProperty(example = "주문 날짜 시간")
+ Date date;
+ @ApiModelProperty(example = "사진 번호")
+ int galleryId;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/PayJoin.java b/photo/src/main/java/com/example/photologger/photo/domain/PayJoin.java
new file mode 100644
index 0000000..0341ad5
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/PayJoin.java
@@ -0,0 +1,22 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.util.Date;
+
+@Getter
+@Setter
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class PayJoin {
+ @ApiModelProperty(example = "주문번호")
+ String orderNumber;
+ @ApiModelProperty(example = "날짜")
+ Date date;
+ @ApiModelProperty(example = "회원 번호")
+ int idx;
+ @ApiModelProperty(example = "사진 번호")
+ int gallary_Id;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Payment.java b/photo/src/main/java/com/example/photologger/photo/domain/Payment.java
index c5e0aa8..24d1d0c 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/Payment.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Payment.java
@@ -8,14 +8,28 @@
@Getter
@Setter
@Builder
+@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Payment {
+
+ @ApiModelProperty(example = "회원번호")
+ @NotEmpty
+ private int idx;
+
@ApiModelProperty(example = "총 포인트")
private int totalPoint;
+
@ApiModelProperty(example = "소비 포인트")
private int sellPoint;
- @ApiModelProperty(example = "회원번호")
- @NotEmpty
- private int idx;
+
+ @ApiModelProperty(example = "구매 포인트")
+ private int buyPoint;
+
+ @ApiModelProperty(example = "무료 포인트")
+ private int freePoint;
+
+ @ApiModelProperty(example = "수익 포인트")
+ private int profitPoint;
+
}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/PaymentHistory.java b/photo/src/main/java/com/example/photologger/photo/domain/PaymentHistory.java
index 7f50fb0..d52325c 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/PaymentHistory.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/PaymentHistory.java
@@ -1,23 +1,30 @@
package com.example.photologger.photo.domain;
+import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.joda.time.DateTime;
+import javax.validation.constraints.NotEmpty;
import java.util.Date;
@Getter
@Setter
@ToString
+@NoArgsConstructor
@Builder
@AllArgsConstructor
public class PaymentHistory
{
+ @NotEmpty
+ @ApiModelProperty(example = "회원번호")
int idx;
+ @ApiModelProperty(example = "충전포인트")
int pay;
- String name;
- String email;
+ @ApiModelProperty(example = "결제카드")
String payCard;
+ @ApiModelProperty(example = "결제시간")
Date time;
+ @ApiModelProperty(example = "결제번호")
String mId;
}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ResponseDto.java b/photo/src/main/java/com/example/photologger/photo/domain/ResponseDto.java
new file mode 100644
index 0000000..52f2414
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ResponseDto.java
@@ -0,0 +1,38 @@
+package com.example.photologger.photo.domain;
+
+import lombok.Getter;
+
+@Getter
+public class ResponseDto {
+ private final T data;
+ private StatusCode statusCode;
+
+
+ public static class ResponseDtoBuilder{
+ private T data;
+ private StatusCode statusCode;
+
+ public ResponseDtoBuilder data(T data) {
+ this.data = data;
+ return this;
+ }
+
+ public ResponseDtoBuilder statusCode(StatusCode statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ public ResponseDto build() {
+ return new ResponseDto(this);
+ }
+ }
+
+ private ResponseDto(ResponseDtoBuilder responseDtoBuilder) {
+ this.data = responseDtoBuilder.data;
+ this.statusCode = responseDtoBuilder.statusCode;
+ }
+
+ public static ResponseDtoBuilder builder() {
+ return new ResponseDtoBuilder<>();
+ }
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnCheck.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnCheck.java
index a41b771..aefdcd8 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/ReturnCheck.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnCheck.java
@@ -1,5 +1,6 @@
package com.example.photologger.photo.domain;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
@@ -8,6 +9,8 @@
@Getter
@ToString
public class ReturnCheck {
+ @ApiModelProperty(example = "email중복체크 msg")
String msg;
+ @ApiModelProperty(example = "email중복체크 bool")
boolean isValue;
}
\ No newline at end of file
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnGalleryHistory.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnGalleryHistory.java
new file mode 100644
index 0000000..e7f14ae
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnGalleryHistory.java
@@ -0,0 +1,32 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.util.Date;
+
+@Getter
+@Setter
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class ReturnGalleryHistory {
+ @ApiModelProperty(example = "사진 번호")
+ private int galleryId;
+
+ @ApiModelProperty(example = "사진 이름")
+ private String galleryName;
+
+ @ApiModelProperty(example = "사진 업로드 위치")
+ private String galleryImageLocation;
+
+ @ApiModelProperty(example = "결제 날짜")
+ private String date;
+
+ @ApiModelProperty(example = "주문 번호")
+ private String order_number;
+
+ @ApiModelProperty(example = "작가이름")
+ private String seller_Name;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnHistory.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnHistory.java
index 84f854e..34a986c 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/ReturnHistory.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnHistory.java
@@ -1,5 +1,6 @@
package com.example.photologger.photo.domain;
+import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.util.Date;
@@ -9,14 +10,17 @@
@Builder
@AllArgsConstructor
public class ReturnHistory {
-
+//ReturnPaymentHistory
+//따로 존재이유 원하는 date방식으로 출력해주기위하여..
+ @ApiModelProperty(example = "회원번호")
int idx;
+ @ApiModelProperty(example = "충전포인트")
int pay;
- String name;
- String email;
+ @ApiModelProperty(example = "결제카드")
String payCard;
+ @ApiModelProperty(example = "결제시간")
String time;
+ @ApiModelProperty(example = "결제번호")
String mId;
-
}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnPhotosForSale.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnPhotosForSale.java
new file mode 100644
index 0000000..0ca8f0b
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnPhotosForSale.java
@@ -0,0 +1,19 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+@Getter
+@Setter
+@ToString
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ReturnPhotosForSale {
+ @ApiModelProperty(example = "회원번호")
+ int idx;
+ @ApiModelProperty(example = "사진번호")
+ int galleryId;
+ @ApiModelProperty(example = "사진")
+ String galleryImageLocation;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnSubScribe.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnSubScribe.java
new file mode 100644
index 0000000..21bb2d2
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnSubScribe.java
@@ -0,0 +1,12 @@
+package com.example.photologger.photo.domain;
+
+import lombok.*;
+
+@NoArgsConstructor
+@AllArgsConstructor
+@Setter
+@Getter
+@Builder
+public class ReturnSubScribe {
+ String nickName;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnUser.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnUser.java
index a7fe7e5..2c05910 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/ReturnUser.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnUser.java
@@ -1,12 +1,21 @@
package com.example.photologger.photo.domain;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class ReturnUser {
+ @ApiModelProperty(example = "JWT")
private String token;
- private String name;
+
+ @ApiModelProperty(example = "유저이름")
+ private String email;
+
+ @ApiModelProperty(example = "0 1 2 구분")
private int isValue;
+
+ @ApiModelProperty(example = "유저 idx")
+ private int idx;
}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/ReturnWithdrawal.java b/photo/src/main/java/com/example/photologger/photo/domain/ReturnWithdrawal.java
new file mode 100644
index 0000000..25a7a28
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/ReturnWithdrawal.java
@@ -0,0 +1,23 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.util.Date;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@ToString
+public class ReturnWithdrawal {
+ @ApiModelProperty(example = "회원번호")
+ int idx;
+ @ApiModelProperty(example = "수익번호")
+ String withdrawalNumber;
+ @ApiModelProperty(example = "가격")
+ int point;
+ @ApiModelProperty(example = "날짜")
+ String date;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/SellerIdxCheck.java b/photo/src/main/java/com/example/photologger/photo/domain/SellerIdxCheck.java
new file mode 100644
index 0000000..751bcfb
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/SellerIdxCheck.java
@@ -0,0 +1,16 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+public class SellerIdxCheck {
+ @ApiModelProperty(example = "사진번호")
+ int gallaryId;
+ @ApiModelProperty(example = "회원번호")
+ int idx;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/StatusCode.java b/photo/src/main/java/com/example/photologger/photo/domain/StatusCode.java
index 3090f6a..5993569 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/StatusCode.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/StatusCode.java
@@ -1,32 +1,18 @@
-/*
package com.example.photologger.photo.domain;
-import okhttp3.internal.http2.ErrorCode;
-
public enum StatusCode {
+ OK("CM0", "정상작동")
+ ,ERR_PAGINATION("CM1", "잘못된 인덱스 접근")
+ ;
private final String code;
private final String message;
- private final int status;
-
- public String getCode() {
- return code;
+ StatusCode(
+ final String code,
+ final String message
+ ){
+ this.code =code;
+ this.message=message;
}
-
- public String getMessage() {
- return message;
- }
-
- public int getStatus() {
- return status;
- }
-
- StatusCode(String code, String message, int status) {
- this.code = code;
- this.message = message;
- this.status = status;
- }
-
}
-*/
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Subscribe.java b/photo/src/main/java/com/example/photologger/photo/domain/Subscribe.java
new file mode 100644
index 0000000..04f6b27
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Subscribe.java
@@ -0,0 +1,21 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+public class Subscribe {
+
+ @ApiModelProperty(example = "유저번호")
+ private int idx;
+
+ @ApiModelProperty(example = "사진 번호")
+ private int galleryId;
+
+ @ApiModelProperty(example = "구독할 유저 번호")
+ private int subscribeUser;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/User.java b/photo/src/main/java/com/example/photologger/photo/domain/User.java
index 586791e..bc5776b 100644
--- a/photo/src/main/java/com/example/photologger/photo/domain/User.java
+++ b/photo/src/main/java/com/example/photologger/photo/domain/User.java
@@ -8,6 +8,8 @@
@Getter
@Setter
@NoArgsConstructor
+@AllArgsConstructor
+@Builder
@ToString
public class User {
diff --git a/photo/src/main/java/com/example/photologger/photo/domain/Withdrawal.java b/photo/src/main/java/com/example/photologger/photo/domain/Withdrawal.java
new file mode 100644
index 0000000..1a011fb
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/domain/Withdrawal.java
@@ -0,0 +1,23 @@
+package com.example.photologger.photo.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import java.util.Date;
+
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@ToString
+public class Withdrawal {
+ @ApiModelProperty(example = "회원번호")
+ int idx;
+ @ApiModelProperty(example = "수익번호")
+ String withdrawalNumber;
+ @ApiModelProperty(example = "가격")
+ int point;
+ @ApiModelProperty(example = "날짜")
+ Date date;
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/AccountsMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/AccountsMapper.java
index 688e0c9..053e4e9 100644
--- a/photo/src/main/java/com/example/photologger/photo/mapper/AccountsMapper.java
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/AccountsMapper.java
@@ -11,8 +11,6 @@ public interface AccountsMapper {
void emailCheck(String email);
- void findEmail(User user);
-
//토큰발급용 맵퍼jwt
Optional findEmail(String email);
}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/GallaryMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/GallaryMapper.java
deleted file mode 100644
index df60a16..0000000
--- a/photo/src/main/java/com/example/photologger/photo/mapper/GallaryMapper.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.photologger.photo.mapper;
-
-import com.example.photologger.photo.domain.Gallary;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface GallaryMapper {
-
- //갤러리 정보 저장
- void gallaryinfosave(Gallary gallary);
-
-}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/GalleryMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/GalleryMapper.java
new file mode 100644
index 0000000..9fd5a8d
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/GalleryMapper.java
@@ -0,0 +1,29 @@
+package com.example.photologger.photo.mapper;
+
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.JoinGalleryUserLU;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface GalleryMapper {
+
+ /* 갤러리 정보 저장 */
+ void galleryinfosave(Gallery gallery);
+
+ /* 프로필 이미지 업로드 */
+ void updateProfileLocation(Integer idx, String profileImageLocation, String nickName, String password);
+
+ /* 갤러리 조회 (Only gallery Info) */
+ Gallery galleryLookUp(@Param("galleryId")Integer galleryId);
+
+ /* 갤러리, 유저 조회 (Gallery And User Info) */
+ JoinGalleryUserLU galleryAndUserLU(Integer galleryId, Integer idx);
+
+ /* 갤러리 조회수 올리기 */
+ void galleryViewCount(Integer galleryId);
+
+ /* 갤러리 구매 횟수 올리기 */
+ void galleryBuyCount(int galleryId);
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/PaginationMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/PaginationMapper.java
index af50caf..4d4f0d6 100644
--- a/photo/src/main/java/com/example/photologger/photo/mapper/PaginationMapper.java
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/PaginationMapper.java
@@ -1,6 +1,6 @@
package com.example.photologger.photo.mapper;
-import com.example.photologger.photo.domain.Gallary;
+import com.example.photologger.photo.domain.Gallery;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -8,11 +8,10 @@
@Mapper
public interface PaginationMapper {
- List cursorPagination(
+ /*Cursor Pagination*/
+ List cursorPagination(
@Param("cursor") Integer cursor
- ,@Param("take") Integer take
+ , @Param("take") Integer take
);
- Integer gallerycount();
-
}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/PaymentMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/PaymentMapper.java
index a1c15de..53cc113 100644
--- a/photo/src/main/java/com/example/photologger/photo/mapper/PaymentMapper.java
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/PaymentMapper.java
@@ -1,12 +1,11 @@
package com.example.photologger.photo.mapper;
-import com.example.photologger.photo.domain.Payment;
-import com.example.photologger.photo.domain.PaymentHistory;
+import com.example.photologger.photo.domain.*;
import org.apache.ibatis.annotations.Mapper;
-import org.joda.time.DateTime;
import java.util.Date;
import java.util.List;
+import java.util.Optional;
@Mapper
public interface PaymentMapper {
@@ -14,9 +13,23 @@ public interface PaymentMapper {
void paymentHistoryInsert(PaymentHistory paymentHistory);
- List paymentHistory(Date startHistory, Date endHistory, String email);
+ List paymentHistory(Date startHistory, Date endHistory, int idx);
+ Optional itemBuyCheck(int galleryId,int idx);
- int itemSelect(String itemIdx);
+ Payment userPoint(int idx);
+ GalleryPrice priceCheck(int galleryId);
+ void itemHistoryInsert(Order order);
+ SellerIdxCheck sellerIdxCheck(int galleryId);
+ List idxToGallId(int idx, Date start, Date end);
+ Gallery gallCheck(int galleryId);
+ void cartInsert(int idx, int galleryId);
+ List cartCheck(int idx);
+ Optional cartDup(int idx, int galleryId);
+ void cartDelete(int idx, int galleryId);
+ int withdrawal(int idx, int profitPoint);
+ void withdrawalHistoryInsert(Withdrawal withdrawal);
+ List withdrawalHistory(Date start, Date end,int idx);
+ List moneyWithdrawn(int idx);
+ List totalSales(int galleryId);
- void itemHistoryinsert();
}
\ No newline at end of file
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/SearchMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/SearchMapper.java
new file mode 100644
index 0000000..9a06f6c
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/SearchMapper.java
@@ -0,0 +1,24 @@
+package com.example.photologger.photo.mapper;
+
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.User;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface SearchMapper {
+
+ List titleSearch(
+ @Param("cursor") Integer cursor,
+ @Param("take") Integer take,
+ @Param("word") String word
+ );
+
+ List sellerSearch(
+ @Param("cursor") Integer cursor,
+ @Param("take") Integer take,
+ @Param("seller") String seller
+ );
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/SubscribeMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/SubscribeMapper.java
new file mode 100644
index 0000000..f2986f5
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/SubscribeMapper.java
@@ -0,0 +1,28 @@
+package com.example.photologger.photo.mapper;
+
+import com.example.photologger.photo.domain.Subscribe;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface SubscribeMapper {
+
+ void subscirbeGallery(Subscribe subscribe);
+
+ void subscirbeUser(Subscribe subscribe);
+
+ List subscirbeGalleryCursorPagination(
+ @Param("cursor") Integer cursor,
+ @Param("idx") Integer idx,
+ @Param("take") Integer take
+ );
+
+ List subscirbeUserCursorPagination(
+ @Param("cursor") Integer cursor,
+ @Param("idx") Integer idx,
+ @Param("take") Integer take
+ );
+
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/mapper/UserMapper.java b/photo/src/main/java/com/example/photologger/photo/mapper/UserMapper.java
index 3ddd175..8c2b56f 100644
--- a/photo/src/main/java/com/example/photologger/photo/mapper/UserMapper.java
+++ b/photo/src/main/java/com/example/photologger/photo/mapper/UserMapper.java
@@ -1,21 +1,35 @@
package com.example.photologger.photo.mapper;
+import com.example.photologger.photo.domain.ReturnPhotosForSale;
+import com.example.photologger.photo.domain.ReturnUser;
import com.example.photologger.photo.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
@Mapper
public interface UserMapper {
- //특정 회원 정보 불러오기
+ /* Show User One */
User findOne(@Param("idx") Integer idx);
- //비밀번호 변경
+ /* Change Password */
void updatePassword(User user);
- //닉네임 변경
+ /* Change NickName */
void updateName(User user);
- //비밀번호 찾기
+ /* Find Id*/
+ void findId(String name, String phoneNumber);
+
+ /* Find Password */
User findPwd(User user);
+
+ //구독중인사람(user1를 구독하고있는사람의 목록을 보여준다)
+ List subScribe(int SubScribeIdx);
+
+ //사람이 등록한 사진은 반환한다.
+ List photosForSale(int idx);
+
}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/AccountsService.java b/photo/src/main/java/com/example/photologger/photo/service/AccountsService.java
index 0b2ce2b..38d9623 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/AccountsService.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/AccountsService.java
@@ -1,13 +1,15 @@
package com.example.photologger.photo.service;
-import com.example.photologger.photo.domain.ReturnCheck;
-import com.example.photologger.photo.domain.ReturnUser;
-import com.example.photologger.photo.domain.User;
+import com.example.photologger.photo.domain.*;
import com.example.photologger.photo.jwt.JwtTokenProvider;
import com.example.photologger.photo.mapper.AccountsMapper;
+import com.example.photologger.photo.mapper.PaymentMapper;
import com.example.photologger.photo.mapper.UserMapper;
import io.jsonwebtoken.ExpiredJwtException;
+
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +29,8 @@ public class AccountsService {
@Autowired
UserMapper userMapper;
+ @Autowired
+ PaymentMapper paymentMapper;
@Transactional
public int join(User user) {
//validateDuplicateuser(user); //중복 회원 검증
@@ -53,11 +57,12 @@ public ReturnUser login(Map userIdPassword) {
if (!bCryptPasswordEncoder.matches(userIdPassword.get("password"), user.getPassword())) {
throw new IllegalArgumentException("잘못된 비밀번호입니다.");
}
- if(user.getAuthKey()==0) {
+ if(user.getAuthKey()==0) { //1로바꾸셈
returnUser.setToken(jwtTokenProvider.createToken(user.getEmail()));
returnUser.setIsValue(1);
log.info(returnUser.getToken());
- returnUser.setName(user.getEmail());
+ returnUser.setEmail(user.getEmail());
+ returnUser.setIdx(user.getIdx());
return returnUser;
}
else
@@ -72,10 +77,12 @@ public ReturnUser login(Map userIdPassword) {
return returnUser;
}
}
+
public boolean login_check(String token)
{
return jwtTokenProvider.validateToken(token);
}
+
public Object email_Check(String email)
{
ReturnCheck returncheck = new ReturnCheck();
@@ -103,6 +110,10 @@ public Object email_Check(String email)
public HashMap token_Expiration(String token,String email)
{
HashMap TrueAndFlase = new HashMap();
+ List withdrawal = new ArrayList<>();
+ int size=0;
+ List returnPhotosForSales = new ArrayList<>();
+ int cumulativeSales=0;
try {
if (jwtTokenProvider.getUserPk(token).equals(email))
@@ -122,31 +133,50 @@ public HashMap token_Expiration(String token,String email)
tmp.put("Day",user.getUserDay());
tmp.put("Sex",user.getSex());
tmp.put("PhoneNumber",user.getPhoneNumber());
+ tmp.put("Point",paymentMapper.userPoint(user.getIdx()));
+ tmp.put("NickName",user.getNickName());
+ tmp.put("SubScribeUser",userMapper.subScribe(user.getIdx()));
+ tmp.put("ProfileImagelocation",user.getProfileImageLocation());
+ returnPhotosForSales = userMapper.photosForSale(user.getIdx());
+ for(int i =0; i< returnPhotosForSales.size();i++)
+ {
+ size= size+paymentMapper.totalSales(returnPhotosForSales.get(i).getGalleryId()).size();
+ }
+ tmp.put("totalSales",size);
+ tmp.put("PhotosForSale",returnPhotosForSales);
+ withdrawal = paymentMapper.moneyWithdrawn(user.getIdx());
+ for(int i=0;i {
-// throw new IllegalStateException("이미 존재하는 회원입니다.");
-// });
-// }
}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/EmailService.java b/photo/src/main/java/com/example/photologger/photo/service/EmailService.java
index c57c9f1..3771371 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/EmailService.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/EmailService.java
@@ -6,7 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
-
+import java.util.Random;
import org.springframework.stereotype.Service;
@Service
@@ -34,7 +34,7 @@ public Object sendFindPasswordMail(String adress, User user) {
return null;
}
- public void SendJoinMail(String adress){
+ public void SendJoinMail(String adress) {
SimpleMailMessage message = new SimpleMailMessage();
String link = getlink(adress);
message.setTo(adress);
@@ -44,23 +44,25 @@ public void SendJoinMail(String adress){
mailSender.send(message);
}
- public String getlink(String email){
+ public String getlink(String email) {
String str = "http://localhost:8080/api/accounts/emailcornfirm/";
str += email;
return str;
}
- //임시 비밀번호 생성 - UUID 자리수 제한 가능함으로써 변경
- public String getTempPassword(){
- char[] charSet = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
- 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
- String str = "";
- int idx = 0;
- for (int i = 0; i < 10; i++) {
- idx = (int) (charSet.length * Math.random());
- str += charSet[idx];
+ //랜덤 난수 만들기
+ public String getTempPassword() {
+ Random rnd = new Random();
+ StringBuffer buf = new StringBuffer();
+
+ for (int i = 0; i < 20; i++) {
+ if (rnd.nextBoolean()) {
+ buf.append((char) ((int) (rnd.nextInt(26)) + 97));
+ } else {
+ buf.append((rnd.nextInt(10)));
+ }
}
- return str;
+ return buf.toString();
}
-
}
+
diff --git a/photo/src/main/java/com/example/photologger/photo/service/GallaryService.java b/photo/src/main/java/com/example/photologger/photo/service/GallaryService.java
deleted file mode 100644
index e5e7644..0000000
--- a/photo/src/main/java/com/example/photologger/photo/service/GallaryService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.example.photologger.photo.service;
-
-import com.example.photologger.photo.domain.Gallary;
-import com.example.photologger.photo.mapper.GallaryMapper;
-import java.io.IOException;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
-@Slf4j
-@Service
-public class GallaryService {
-
- @Autowired
- UploaderService uploaderService;
-
- @Autowired
- GallaryMapper gallaryMapper;
-
- public void gallaryInfoeSave(Gallary gallary, MultipartFile multipartFile) throws IOException {
- if (multipartFile != null) {
-
- gallary.setGallaryImageLocation(uploaderService.upload(multipartFile));
- gallary.setGallaryName(multipartFile.getOriginalFilename());
- gallaryMapper.gallaryinfosave(gallary);
- log.info(gallary.toString());
- }
- }
-}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/GalleryService.java b/photo/src/main/java/com/example/photologger/photo/service/GalleryService.java
new file mode 100644
index 0000000..ca684e3
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/service/GalleryService.java
@@ -0,0 +1,83 @@
+package com.example.photologger.photo.service;
+
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.JoinGalleryUserLU;
+import com.example.photologger.photo.domain.User;
+import com.example.photologger.photo.mapper.GalleryMapper;
+import com.example.photologger.photo.mapper.UserMapper;
+import java.io.IOException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+@Slf4j
+@Service
+public class GalleryService {
+
+ private final UploaderService uploaderService;
+ private final GalleryMapper galleryMapper;
+ private final UserMapper userMapper;
+
+ public GalleryService(UploaderService uploaderService,
+ GalleryMapper galleryMapper, UserMapper userMapper) {
+ this.uploaderService = uploaderService;
+ this.galleryMapper = galleryMapper;
+ this.userMapper = userMapper;
+ }
+
+
+ /* Gallery Image Save */
+ public void galleryInfoeSave(Gallery gallery, MultipartFile multipartFile)
+ throws IOException {
+ if (multipartFile != null) {
+ String path = "gallery";
+ gallery.setGalleryImageLocation(uploaderService.upload(multipartFile, path));
+ gallery.setGalleryName(multipartFile.getOriginalFilename());
+ galleryMapper.galleryinfosave(gallery);
+ log.info(gallery.toString());
+ }
+ }
+
+ /* Profile images save */
+ public String profileImagejoin(MultipartFile multipartFile, User user)
+ throws IOException {
+ if (multipartFile != null) {
+ String path = "profile";
+ user.setProfileImageLocation(uploaderService.upload(multipartFile, path));
+ log.info(user.getProfileImageLocation());
+ return user.getProfileImageLocation();
+ }
+ return "fail";
+ }
+
+ /* Profile images save */
+ public void profileImageSave(MultipartFile multipartFile, User user)
+ throws IOException {
+ if (multipartFile != null) {
+ String path = "profile";
+ user.setProfileImageLocation(uploaderService.upload(multipartFile, path));
+ log.info(user.getProfileImageLocation());
+ galleryMapper.updateProfileLocation(user.getIdx(), user.getProfileImageLocation(),
+ user.getNickName(), user.getPassword());
+ }
+ }
+
+ /* Gallery Info */
+ public Gallery galleryLookUp(Integer galleryId) {
+ galleryMapper.galleryViewCount(galleryUser(galleryId));
+ return galleryMapper.galleryLookUp(galleryId);
+ }
+
+ /* Gallery And User Indo */
+ public JoinGalleryUserLU galleryAndUserLU(Integer galleryId, Integer idx){
+ return galleryMapper.galleryAndUserLU(galleryId, idx);
+ }
+
+ /* Use GalleryId bring Userinfo*/
+ Integer galleryUser(Integer gallery){
+ Gallery galleryInfo = galleryMapper.galleryLookUp(gallery);
+ Integer galleryId = galleryInfo.getGalleryId();
+ return galleryId;
+ }
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/PaginationService.java b/photo/src/main/java/com/example/photologger/photo/service/PaginationService.java
index 7c4fcf9..0db4d92 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/PaginationService.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/PaginationService.java
@@ -1,7 +1,7 @@
package com.example.photologger.photo.service;
import com.example.photologger.photo.constants.Constants;
-import com.example.photologger.photo.domain.Gallary;
+import com.example.photologger.photo.domain.Gallery;
import com.example.photologger.photo.mapper.PaginationMapper;
import java.util.List;
import lombok.RequiredArgsConstructor;
@@ -17,8 +17,7 @@ public class PaginationService {
@Autowired
PaginationMapper paginationMapper;
- public List getGallery(Integer cursor) {
-
+ public List getGallery(Integer cursor) {
return paginationMapper.cursorPagination(cursor, Constants.TAKE);
}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/PaymentSerivce.java b/photo/src/main/java/com/example/photologger/photo/service/PaymentSerivce.java
index 68fc804..1f6b4cb 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/PaymentSerivce.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/PaymentSerivce.java
@@ -1,16 +1,46 @@
package com.example.photologger.photo.service;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.Map.Entry;
+import static com.example.photologger.photo.constants.paymentConstant.BUYER_EMAIL;
+import static com.example.photologger.photo.constants.paymentConstant.IMPORT_CANCEL_URL;
+import static com.example.photologger.photo.constants.paymentConstant.IMPORT_PAYMENTINFO_URL;
+import static com.example.photologger.photo.constants.paymentConstant.IMPORT_PREPARE_URL;
+import static com.example.photologger.photo.constants.paymentConstant.IMPORT_TOKEN_URL;
+import static com.example.photologger.photo.constants.paymentConstant.KEY;
+import static com.example.photologger.photo.constants.paymentConstant.MERCHANT_UID;
+import static com.example.photologger.photo.constants.paymentConstant.PAID_AT;
+import static com.example.photologger.photo.constants.paymentConstant.PAY_CARD;
+import static com.example.photologger.photo.constants.paymentConstant.SECRET;
+import static com.example.photologger.photo.constants.paymentConstant.imp_key;
+import static com.example.photologger.photo.constants.paymentConstant.imp_secret;
+import com.example.photologger.photo.domain.Cart;
+import com.example.photologger.photo.domain.Gallery;
+import com.example.photologger.photo.domain.GalleryPrice;
+import com.example.photologger.photo.domain.Order;
import com.example.photologger.photo.domain.Payment;
import com.example.photologger.photo.domain.PaymentHistory;
+import com.example.photologger.photo.domain.ReturnGalleryHistory;
import com.example.photologger.photo.domain.ReturnHistory;
+import com.example.photologger.photo.domain.ReturnWithdrawal;
import com.example.photologger.photo.domain.User;
+import com.example.photologger.photo.domain.Withdrawal;
import com.example.photologger.photo.mapper.AccountsMapper;
+import com.example.photologger.photo.mapper.GalleryMapper;
import com.example.photologger.photo.mapper.PaymentMapper;
import com.example.photologger.photo.mapper.UserMapper;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
@@ -21,13 +51,9 @@
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import static com.example.photologger.photo.constants.paymentConstant.*;
-
@Slf4j
@Service
public class PaymentSerivce {
@@ -39,6 +65,8 @@ public class PaymentSerivce {
AccountsService accountsService;
@Autowired
UserMapper userMapper;
+ @Autowired
+ GalleryMapper galleryMapper;
//가맹점 식별코드 imp89552474
// 아임포트 인증(토큰)을 받아주는 함수
public String getImportToken() {
@@ -135,7 +163,7 @@ public boolean setHackCheck(String amount, String mId, String token) {
log.info(rootNode.toString());
if(rootNode.findValue("code").toString().replaceAll("\"","").equals("1"))
{
- return true; //false 로 바꿔라
+ return false; //false 로 바꿔라
}
else
{
@@ -194,8 +222,7 @@ public boolean check(Map mid)
log.info("결제 금액 : "+Integer.toString(pay));
Payment payment = Payment.builder()
.idx(idx)
- .totalPoint(pay)
- .sellPoint(0)
+ .buyPoint(pay)
.build();
log.info(payment.toString());
paymentMapper.paymentUpdate(payment);
@@ -209,8 +236,6 @@ public boolean check(Map mid)
.idx(idx)
.pay(pay)
.payCard(card_Code(tmp.findValue(PAY_CARD).toString().replaceAll("\"", "")))
- .email(tmp.findValue(BUYER_EMAIL).toString().replaceAll("\"",""))
- .name(tmp.findValue(BUYER_NAME).toString().replaceAll("\"",""))
.mId(tmp.findValue(MERCHANT_UID).toString().replaceAll("\"",""))
.time(date)
.build();
@@ -238,12 +263,89 @@ public boolean check(Map mid)
return false;
}
}
+ public Object withdrawal(String token,String email,int pay)
+ {
+ int idx;
+
+ SimpleDateFormat outputFormat= new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss", Locale.ENGLISH); //결재완료후 뛰어줄 date
+ LocalDateTime now = LocalDateTime.now();
+ Date date = Timestamp.valueOf(now);
+ log.info(date.toString());
+ if(userCheck(token,email))
+ {
+ try
+ {
+ idx =accountsMapper.findEmail(email).get().getIdx();
+ int profitPoint=paymentMapper.userPoint(idx).getProfitPoint();
+ if(profitPoint output = new ArrayList<>();
+ int idx = accountsMapper.findEmail(email).get().getIdx();
+ try
+ {
+
+ if(userCheck(token,email))
+ {
+
+ Date start_history = inputFormat.parse(start); //시작날짜 inputFormat형식으로 변경
+ Date end_history = inputFormat.parse(end); //종료날짜 inputFormat형식으로 변경
+ log.info("로그인중 토큰정보 : " +token);
+ log.info("결제내역 시작 : " + start_history.toString());
+ log.info("결제내역 끝 : "+ end_history.toString());
+ List tmp = paymentMapper.withdrawalHistory(start_history,end_history,idx);
+ for (int i =0;i history = paymentMapper.paymentHistory(start_history, end_history,email); //db조회
- if(userMapper.findOne(history.get(0).getIdx()).getEmail().equals(email)) //token에서나온 이메일과 db조회 이메일이 같은경우
+ List history = paymentMapper.paymentHistory(start_history, end_history,idx = accountsMapper.findEmail(email).get().getIdx()); //db조회
+ if(userMapper.findOne(idx).getEmail().equals(email)) //token에서나온 이메일과 db조회 이메일이 같은경우
{
log.info(Integer.toString(history.size()));
List returnHistory = new ArrayList(); //date형식 지정 반환을 위해 새로생성
@@ -268,13 +370,11 @@ public Object history(String token, String start, String end)
Date data = rootFormat.parse(history.get(i).getTime().toString()); //rootFormat형식을 받아서..
String timeTmp = outputFormat.format(data);
ReturnHistory tmp = ReturnHistory.builder()
- .name(history.get(i).getName())
- .mId(history.get(i).getMId())
- .email(history.get(i).getEmail())
- .pay(history.get(i).getPay())
.idx(history.get(i).getIdx())
+ .pay(history.get(i).getPay())
.payCard(history.get(i).getPayCard())
.time(timeTmp)
+ .mId(history.get(i).getMId())
.build();
log.info(tmp.toString());
returnHistory.add(tmp);
@@ -308,42 +408,398 @@ public Object history(String token, String start, String end)
ReturnHistory returnHistory = ReturnHistory.builder() //초기화 되지않은 반환값을위해 미리세팅
.payCard("")
.time("")
- .name("")
.idx(0)
.pay(0)
- .email("")
.mId("")
.build();
return returnHistory;
}
-// public Map itemBuy(String itemIdx,String token)
-// {
-// //1번 구매금액만큼 포인트 소비후 잔여포인트 갱신(반환)하기
-// try {
-// String email = accountsService.getUserPk(token);
-// User user = accountsMapper.findEmail(email)
-// .orElseThrow(() -> new Exception("잘못된 이메일입니다."));
-//
-// //구현해야할부분 구매내역에 존재하면 구매못하고 false Return 예정
-// Payment payment = Payment.builder()
-// .sellPoint(paymentMapper.itemSelect(itemIdx))
-// .idx(user.getIdx())
-// .totalPoint(0)
-// .build();
-// paymentMapper.itemSelect(itemIdx);
-// }catch (Exception e)
-// {
-// log.info(e.toString());
-// }
-//
-//
-// //고려해야할것 3번 쿠폰
-//
-// //고려햐야할것 4번 포인트
-//
-// //고려해야할것 1번 상품등록자에게 구매금액 지급
-//
-// }
+
+ public void galleryBuyCount(int galleryId){
+ galleryMapper.galleryBuyCount(galleryId);
+ }
+ public Object itemBuy(int galleryId, String token)
+ {
+ SimpleDateFormat outputFormat= new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss", Locale.ENGLISH); //결재완료후 뛰어줄 date
+ LocalDateTime now = LocalDateTime.now();
+ Date date = Timestamp.valueOf(now);
+ log.info(date.toString());
+ String dateOut =outputFormat.format(date);
+ log.info(dateOut);
+ //1번 구매금액만큼 포인트 소비후 잔여포인트 갱신(반환)하기
+ try {
+ String email = accountsService.getUserPk(token);
+ User user = accountsMapper.findEmail(email)
+ .orElseThrow(() -> new Exception("잘못된 이메일입니다."));
+ log.info(user.getIdx()+"님이 로그인 중입니다.");
+
+ try {
+ if(paymentMapper.itemBuyCheck(galleryId,user.getIdx()).get().getIdx()==user.getIdx())
+ {
+ //존재하면 이어질것임으로
+ return false;
+ }
+
+ }
+ catch(Throwable e) {
+ log.info(e.getMessage());
+ }
+ GalleryPrice tmp = paymentMapper.priceCheck(galleryId);
+ int sellPoint = tmp.getPrice();
+ log.info(sellPoint + " 원 결제시도");
+ Payment buyer = paymentMapper.userPoint(user.getIdx());
+ log.info(buyer.toString());
+ if (buyer.getTotalPoint() < sellPoint) {
+ String returnCheck = Integer.toString(buyer.getTotalPoint() - sellPoint) + " 원 모자랍니다. 충전해주세요.";
+ return returnCheck;
+ }
+ log.info(buyer.toString());
+ itemBuyCheck(buyer,sellPoint);
+ log.info("test");
+ paymentMapper.paymentUpdate(buyer); //위에 리턴을 통과안햇다는건 결제시도를 해도된다는뜻임으로 강제로payment타입으로 변환해준다.
+ Order order = Order.builder() //구매내역
+ .idx(user.getIdx())
+ .date(date)
+ .orderNumber(user.getIdx() + "_" + dateOut + "_" + galleryId)
+ .galleryId(galleryId)
+ .build();
+ log.info(order.getOrderNumber());
+ paymentMapper.itemHistoryInsert(order);
+ log.info("test");
+ //상품등록자에게 구매금액 지급
+ log.info(paymentMapper.sellerIdxCheck(galleryId).toString());
+ Payment seller = Payment.builder()
+ .idx(paymentMapper.sellerIdxCheck(galleryId).getIdx()) //수정해야합니다.
+ .profitPoint(sellPoint)
+ .build();
+ log.info("test");
+ buyer = paymentMapper.userPoint(user.getIdx());
+ paymentMapper.paymentUpdate(seller);
+ galleryBuyCount(galleryId);
+ log.info("test");
+ return Integer.toString(buyer.getTotalPoint());
+ }catch (Exception e)
+ {
+ //test해야합니다.
+ log.info(e.toString());
+ return false;
+ }
+ //고려해야할것 3번 쿠폰
+ }
+
+ public Payment itemBuyCheck(Payment payment,int sellPoint) //이 함수를 실행시켰다는것은 total-sell을 통과했다는거 따라서 세부조항만 계산하면됨.
+ {
+ int tmp; //임시로 사용할 int
+ if (sellPoint-payment.getFreePoint() <= 0 ) //잔여결제금액이 0보다크거나같으면
+ {
+ payment.setFreePoint(-sellPoint); //setfreePoint를 설정
+ payment.setBuyPoint(0);
+ payment.setProfitPoint(0);
+ payment.setSellPoint(sellPoint);
+ return payment; //payment 다시반환
+ }
+ tmp = (payment.getFreePoint() - sellPoint)*-1;
+ log.info("현재 결제포인트 : "+payment.getBuyPoint()+ "판매 포인트 : " + sellPoint + "남은 금액 : "+ Integer.toString(tmp));
+
+ if(tmp-payment.getBuyPoint()<=0) //잔여결제금액이 0보다 크거나같으면
+ {
+ payment.setFreePoint(0); //freePoint = 0
+ payment.setBuyPoint(-tmp); //bouPoint = tmp로 저장
+ payment.setProfitPoint(0);
+ payment.setSellPoint(sellPoint);
+ return payment; //결제금액 반환
+ }
+ tmp = payment.getFreePoint()+ payment.getBuyPoint() - sellPoint;
+ log.info("현재 수익포인트 : "+payment.getBuyPoint()+ "판매 포인트 : " + sellPoint + "남은 금액 : "+ Integer.toString(tmp));
+ payment.setFreePoint(0); //무료포인트 0
+ payment.setBuyPoint(0); //충전포인트 0
+ payment.setProfitPoint(tmp); //수익포인트 - rtmp
+ payment.setSellPoint(sellPoint);
+ return payment; //결제금액 반환
+ }
+ public Object itemHistoryCheck(String token,String start, String end)
+ {
+ SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); //get으로 가져올 date
+ SimpleDateFormat rootFormat = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy", Locale.ENGLISH); //DB저장되있는 date
+ SimpleDateFormat outputFormat= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
+ try{
+ Date start_history = inputFormat.parse(start); //시작날짜 inputFormat형식으로 변경
+ Date end_history = inputFormat.parse(end); //종료날짜 inputFormat형식으로 변경
+ log.info("로그인중 토큰정보 : " + token);
+ log.info("결제내역 시작 : " + start_history.toString());
+ log.info("결제내역 끝 : " + end_history.toString());
+
+ if (accountsService.login_check(token)) //로그인 체크
+ {
+ log.info(token+start+end);
+ try {
+ String email= accountsService.getUserPk(token); //본인확인용 이메일
+ int idx= accountsMapper.findEmail(email).get().getIdx();
+ log.info(email);
+ List galleryId = paymentMapper.idxToGallId(idx,start_history, end_history); //db조회
+ if(userMapper.findOne(galleryId.get(0).getIdx()).getEmail().equals(email)) //token에서나온 이메일과 db조회 이메일이 같은경우
+ {
+ log.info(Integer.toString(galleryId.size()));
+ List returngalleryHistory = new ArrayList(); //date형식 지정 반환을 위해 새로생성
+ log.info(Integer.toString(galleryId.get(0).getGalleryId()));
+ for(int i=0;i cart = paymentMapper.cartCheck(accountsMapper.findEmail(email).get().getIdx());
+ log.info("test");
+ for(int i =0;i outPut_in = new HashMap<>();
+ Gallery tmp =paymentMapper.gallCheck(cart.get(i).getGalleryId());
+ outPut_in.put("gallery_location",tmp.getGalleryImageLocation());
+ outPut_in.put("gallery_name",tmp.getGalleryName());
+ outPut_in.put("price",paymentMapper.priceCheck(tmp.getGalleryId()).getPrice());
+ outPut_in.put("gallery_id",tmp.getGalleryId());
+ outPut_in.put("seller_Name",userMapper.findOne(paymentMapper.gallCheck(tmp.getGalleryId()).getIdx()).getNickName());
+ outPut.add(i,outPut_in);
+ log.info(outPut.toString());
+ }
+ log.info(outPut.toString());
+ return outPut;
+ }catch (Exception e)
+ {
+ log.info(e.toString());
+
+ }
+ log.info("상품 조회 실패");
+ return false;
+ }
+ log.info("유저 인증 실패");
+ return false;
+ }
+ public Object cartInsert(Map tmp)
+ {
+ String token = tmp.get("token").toString();
+ String email = tmp.get("email").toString();
+ int gallery_id = Integer.parseInt(tmp.get("gallery_id").toString());
+ if(userCheck(token,email))
+ {
+
+ int idx = 0;
+ try {
+ idx = accountsMapper.findEmail(email).get().getIdx();
+
+ if(paymentMapper.itemBuyCheck(gallery_id,idx).get().getIdx()==idx)
+ {
+ log.info("이미 구매내역에 존재합니다.");
+ return false;
+ }
+ log.info(Integer.toString(idx));
+ paymentMapper.cartDup(idx,gallery_id)
+ .orElseThrow(() -> new IllegalArgumentException("장바구니 담기 가는 상태"));
+ log.info("장바구니 담기 불가능 상태");
+ return false;
+ }catch (Exception e)
+ {
+ log.info(e.getMessage());
+ try {
+ paymentMapper.cartInsert(idx, gallery_id);
+ log.info(gallery_id+"의 물건이 장바구니에 담겼습니다.");
+ return true;
+ }
+ catch (Exception e2) {
+ log.info(e2.toString());
+ log.info("예상치못한 에러 발생");
+ }
+ }
+
+ log.info("장바구니에 담지 못하였습니다");
+ return false;
+ }
+ log.info("유저 인증 실패");
+ return false;
+ }
+ public Object cartBuy(String json)
+ {
+ log.info(json);
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ JsonNode data = mapper.readTree(json);
+ String email = data.get("user_email").toString().replace("\"","");
+ String token = data.get("token").toString().replace("\"","");
+ int price = Integer.parseInt(data.get("pay").toString());
+ String galleryId = data.get("gallery_id").toString().replace("\"","");
+ String array[]=galleryId.split(",");
+ int arrayLength = array.length;
+ Integer cart[] = new Integer[arrayLength];
+ for(int i =0;i 보유돈보다 크면 결제안되야함..
+ int idx = accountsMapper.findEmail(email).get().getIdx();
+ log.info("현재사용중인 로그인한계정은 "+email+"("+idx+") 입니다.");
+ int totalPrice = paymentMapper.userPoint(idx).getTotalPoint();
+ log.info(idx+"의 충전된 금액은"+totalPrice+" 입니다");
+ if(price<=totalPrice) {
+ if (userCheck(token, email)) {
+ try {
+ log.info(Integer.toString(cart.length));
+ for (int i = 0; i < cart.length; i++) {
+ log.info(cart[i]+"번 물건 결제시도");
+ String tmp = itemBuy(cart[i], token).toString();
+ log.info(tmp);
+ }
+ log.info(price+"원 결제");
+ log.info(totalPrice-price+"원 남았습니다.");
+ for(int i=0; i titleSearch(Integer cursor, String word){
+ return searchMapper.titleSearch(cursor, Constants.SEARCH_TAKE,word);
+ }
+
+ public List sellerSearch(Integer cursor, String seller){
+ return searchMapper.sellerSearch(cursor,Constants.SEARCH_TAKE, seller);
+ }
+
+
+}
diff --git a/photo/src/main/java/com/example/photologger/photo/service/SubscribeService.java b/photo/src/main/java/com/example/photologger/photo/service/SubscribeService.java
new file mode 100644
index 0000000..ab1eb65
--- /dev/null
+++ b/photo/src/main/java/com/example/photologger/photo/service/SubscribeService.java
@@ -0,0 +1,39 @@
+package com.example.photologger.photo.service;
+
+import com.example.photologger.photo.constants.Constants;
+import com.example.photologger.photo.domain.Subscribe;
+import com.example.photologger.photo.mapper.SubscribeMapper;
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SubscribeService {
+
+ private final SubscribeMapper subscribeMapper;
+
+ @Autowired
+ public SubscribeService(SubscribeMapper subscribeMapper) {
+ this.subscribeMapper = subscribeMapper;
+ }
+
+ /*사진 구독*/
+ public void subscribeGallery(Subscribe subscribe) {
+ subscribeMapper.subscirbeGallery(subscribe);
+ }
+
+ /*작가 구독*/
+ public void subscribeUser(Subscribe subscribe) {
+ subscribeMapper.subscirbeUser(subscribe);
+ }
+
+ /*구독한 사진 페이지 네이션*/
+ public List getSubscribeGallery(Integer cursor, Integer idx) {
+ return subscribeMapper.subscirbeGalleryCursorPagination(cursor, idx, Constants.SUBSCRIVE_TAKE);
+ }
+
+ /*구독한 사진 페이지 네이션*/
+ public List getSubscribeUser(Integer cursor, Integer idx) {
+ return subscribeMapper.subscirbeUserCursorPagination(cursor, idx, Constants.SUBSCRIVE_TAKE);
+ }
+}
\ No newline at end of file
diff --git a/photo/src/main/java/com/example/photologger/photo/service/UploaderService.java b/photo/src/main/java/com/example/photologger/photo/service/UploaderService.java
index 3a495ca..6f1b9a8 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/UploaderService.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/UploaderService.java
@@ -7,7 +7,7 @@
import com.amazonaws.services.s3.model.PutObjectRequest;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.Upload;
-import com.example.photologger.photo.mapper.GallaryMapper;
+import com.example.photologger.photo.mapper.GalleryMapper;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -28,7 +28,7 @@
public class UploaderService {
@Autowired
- GallaryMapper gallaryMapper;
+ GalleryMapper galleryMapper;
@Autowired
private final AmazonS3Client amazonS3Client;
@@ -47,24 +47,28 @@ public UploaderService(AmazonS3Client amazonS3Client) {
@Value("${cloud.aws.s3.bucket.url}")
private String defaultUrl; //버킷 주소
- public String upload(MultipartFile multipartFile) throws IOException {
+ public String upload(MultipartFile multipartFile, String path) throws IOException {
String originName = multipartFile.getOriginalFilename();
String url;
-
try {
- //파일 명 변경
+ //원본 파일 명 저장
String saveFileName =
- "O" + fourteen_format.format(date_now) +multipartFile.getOriginalFilename();
- File file = new File( System.getProperty("user.dir") + saveFileName);
+ path + "/" + "O" + "/"
+ + fourteen_format.format(date_now)
+ + multipartFile.getOriginalFilename();
+ File file = new File(System.getProperty("user.dir") + originName);
multipartFile.transferTo(file);
//원본 이미지 업로드
uploadOnS3(saveFileName, file);
BufferedImage transImage = ImageIO.read(file);
- BufferedImage thumbnailImage = Thumbnails.of(transImage).size(500,333).asBufferedImage();
- String saveFileName2 = "T" + fourteen_format.format(date_now) + multipartFile.getOriginalFilename(); //사간 이름 카테고리
- thumbUploadOns3(saveFileName2,thumbnailImage);
+ BufferedImage thumbnailImage = Thumbnails.of(transImage).size(500, 333)
+ .asBufferedImage();
+ //변형된 파일 명 저장
+ String saveFileName2 = path + "/" + "T" + "/" + fourteen_format.format(date_now)
+ + multipartFile.getOriginalFilename(); //사간 이름 카테고리
+ thumbUploadOns3(saveFileName2, thumbnailImage);
url = defaultUrl + saveFileName;
@@ -74,7 +78,7 @@ public String upload(MultipartFile multipartFile) throws IOException {
return url;
}
- private void uploadOnS3(String findName,File file) {
+ private void uploadOnS3(String findName, File file) {
TransferManager transferManager = new TransferManager(this.amazonS3Client);
PutObjectRequest request = new PutObjectRequest(bucket, findName, file);
Upload upload = transferManager.upload(request);
@@ -106,7 +110,8 @@ private void thumbUploadOns3(String findName, BufferedImage file) throws IOExcep
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
TransferManager transferManager = new TransferManager(this.amazonS3Client);
- PutObjectRequest request = new PutObjectRequest(bucket,findName ,byteArrayInputStream, objectMetadata);
+ PutObjectRequest request = new PutObjectRequest(bucket, findName, byteArrayInputStream,
+ objectMetadata);
Upload upload = transferManager.upload(request);
try {
diff --git a/photo/src/main/java/com/example/photologger/photo/service/UserService.java b/photo/src/main/java/com/example/photologger/photo/service/UserService.java
index 640996e..e77930c 100644
--- a/photo/src/main/java/com/example/photologger/photo/service/UserService.java
+++ b/photo/src/main/java/com/example/photologger/photo/service/UserService.java
@@ -10,26 +10,28 @@
@Service
public class UserService {
-
@Autowired
UserMapper userMapper;
- //맴버 전체 조회
+ /* Show User One */
public User findOne(Integer idx) {
return userMapper.findOne(idx);
}
- //비밀번호 변경
+ /* Change Password */
public void UpdatePassword(User user) {
userMapper.updatePassword(user);
}
- //닉네임 변경
+ /* Change NickName */
public void UpdateName(User user) {
userMapper.updateName(user);
}
+ /* Find Id*/
+ public void findId(String name, String phoneNumber){ userMapper.findId(name, phoneNumber); }
+ /* Find Password */
public User findpwd(User user) {
return userMapper.findPwd(user);
}
diff --git a/photo/src/main/resources/application.properties b/photo/src/main/resources/application.properties
index d1b8dbf..ed369c6 100644
--- a/photo/src/main/resources/application.properties
+++ b/photo/src/main/resources/application.properties
@@ -19,10 +19,13 @@ jwt.secret=dlvmfhwprxmsmseorkeogkrtodemfdmlvmfhwprxmdlqslekrmfwktnqnwhrdmfhrmfwk
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=ukidd002
-spring.mail.password=ukidd1474
+spring.mail.password=ljh90140189!
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
cloud.aws.s3.bucket.url=https://photo-album-paldu.s3.ap-northeast-2.amazonaws.com/
-server.port = 8080
\ No newline at end of file
+server.port = 8080
+
+#mybatis camel-case mapping
+mybatis.configuration.map-underscore-to-camel-case=true
\ No newline at end of file
diff --git a/photo/src/main/resources/aws.yml b/photo/src/main/resources/aws.yml
index 06315fe..8abcc68 100644
--- a/photo/src/main/resources/aws.yml
+++ b/photo/src/main/resources/aws.yml
@@ -1,17 +1,16 @@
cloud:
aws:
credentials:
- instance-profile: false
access-key: AKIA3IW2YOIUGFPO6FNM
+ instance-profile: false
secret-key: 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
region:
auto: false
static: ap-northeast-2
- stack:
- auto: false
s3:
bucket: photo-album-paldu
-
+ stack:
+ auto: false
logging:
level:
com:
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/AccountsMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/AccountsMapper.xml
index 04b0756..79112a7 100644
--- a/photo/src/main/resources/com/example/photologger/photo/mapper/AccountsMapper.xml
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/AccountsMapper.xml
@@ -33,7 +33,7 @@
#{userMonth},
#{userDay},
#{type},
- #{gallCount},
+ #{galleryCount},
#{userSubscribeCount},
#{authKey}
)
@@ -48,6 +48,6 @@
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/GallaryMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/GallaryMapper.xml
deleted file mode 100644
index 7399381..0000000
--- a/photo/src/main/resources/com/example/photologger/photo/mapper/GallaryMapper.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- INSERT INTO gallary (
- gallary_id,
- idx,
- gallary_adress,
- gallary_time,
- gallary_seseon,
- gallary_direaction,
- gallary_name,
- gallary_image_location,
- gallary_subscibe_count
- )
- VALUES (
- #{gallaryId},
- #{idx},
- #{gallaryAdress},
- #{gallaryTime},
- #{gallarySeseon},
- #{gallaryDireaction},
- #{gallaryName},
- #{gallaryImageLocation},
- #{gallarySubscribeCount}
- )
-
-
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
new file mode 100644
index 0000000..4d4ff0d
--- /dev/null
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/GalleryMapper.xml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO gallery (
+ gallery_id,
+ idx,
+ gallery_adress,
+ gallery_time,
+ gallery_seseon,
+ gallery_direaction_x,
+ gallery_name,
+ gallery_image_location,
+ gallery_subscibe_count,
+ gallery_direaction_y,
+ gallery_views,
+ gallery_buy_count
+ )
+ VALUES (
+ #{galleryId},
+ #{idx},
+ #{galleryAdress},
+ #{galleryTime},
+ #{gallerySeseon},
+ #{galleryDireactionX},
+ #{galleryName},
+ #{galleryImageLocation},
+ #{gallerySubscribeCount},
+ #{galleryDireactionY},
+ #{galleryViews},
+ #{galleryBuyCount}
+ )
+
+
+
+
+
+
+
+
+
+ UPDATE user
+ SET profile_Image_location = #{profileImageLocation},
+ nick_name = #{nickName},
+ password = #{password}
+ WHERE idx = #{idx}
+
+
+
+
+
+
+
+ UPDATE gallery
+ SET gallery_views = gallery_views + 1
+ WHERE gallery_id = #{glleryId}
+
+
+
+ UPDATE gallery
+ SET gallery_buy_count = gallery_buy_count + 1
+ WHERE gallery_id = #{glleryId}
+
+
+
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/PaginationMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/PaginationMapper.xml
index 03a0c62..84b0398 100644
--- a/photo/src/main/resources/com/example/photologger/photo/mapper/PaginationMapper.xml
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/PaginationMapper.xml
@@ -2,38 +2,54 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/SearchMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/SearchMapper.xml
new file mode 100644
index 0000000..e39d4fd
--- /dev/null
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/SearchMapper.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/SubscribeMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/SubscribeMapper.xml
new file mode 100644
index 0000000..793c081
--- /dev/null
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/SubscribeMapper.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO PHOTO.subscribe_gallery(idx,
+ gallery_id)
+ VALUES (#{idx},
+ #{galleryId})
+
+
+
+ INSERT INTO PHOTO.subscribe_user(idx,
+ subscribe_idx)
+ VALUES (#{idx},
+ #{subscribeUser})
+
+
+
+
+
+
+
diff --git a/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml b/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
index 959c23e..a75683f 100644
--- a/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
+++ b/photo/src/main/resources/com/example/photologger/photo/mapper/UserMapper.xml
@@ -9,7 +9,7 @@
+
+
+