파일 업로드 vm옵션으로 변경 -Dpath.upload.storage=LOCAL 로 변경해주세요
This commit is contained in:
@@ -37,23 +37,16 @@
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="createNoticeHasUploadFile">
|
||||
<!-- createNoticeHasUploadFile 게시글 등록 시, 첨부파일 join 데이터 등록 -->
|
||||
INSERT INTO notice_has_upload_file
|
||||
(
|
||||
notice_id,
|
||||
upload_files_id,
|
||||
<include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
)
|
||||
VALUES
|
||||
<update id="createNoticeUploadFile">
|
||||
update upload_file
|
||||
set mapping_id = #{id},
|
||||
<include refid="common.fields.UpdateBaseSet"/>
|
||||
where id IN (
|
||||
<foreach collection="fileMappingIds" item="fileId" separator=",">
|
||||
(
|
||||
#{id},
|
||||
#{fileId},
|
||||
<include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
)
|
||||
#{fileId}
|
||||
</foreach>
|
||||
</insert>
|
||||
)
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -29,8 +29,7 @@
|
||||
resultType="app.module.admin.usecase.communication.notice.getNotice.ports.application.domain.GetNoticeUploadFile">
|
||||
/* getUploadFiles 상세 게시글 조회 시, 첨부파일 조회 */
|
||||
SELECT
|
||||
awuf.notice_id AS noticeId,
|
||||
awuf.upload_files_id AS uploadfileId,
|
||||
uf.mapping_id,
|
||||
uf.id AS id,
|
||||
uf.created_at AS createdAt,
|
||||
uf.created_by AS createdBy,
|
||||
@@ -41,9 +40,7 @@
|
||||
uf.origin_name AS originName,
|
||||
uf.path AS path,
|
||||
uf.type AS type
|
||||
FROM notice_has_upload_file awuf
|
||||
INNER JOIN upload_file uf
|
||||
ON awuf.upload_files_id = uf.id
|
||||
WHERE awuf.notice_id = #{id} AND awuf.is_deleted = false
|
||||
FROM upload_file uf
|
||||
WHERE uf.mapping_id = #{id} AND uf.is_deleted = false AND uf.type ='NOTICE'
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -78,16 +78,15 @@
|
||||
resultType="app.module.admin.usecase.communication.notice.getNoticesUI.ports.application.domain.GetNoticeFiles">
|
||||
/* getUploadFiles : 게시물 리스트의 대표 이미지 */
|
||||
SELECT
|
||||
awuf.notice_id,
|
||||
uf.mapping_id as notice_id,
|
||||
uf.id,
|
||||
uf.type,
|
||||
uf.path,
|
||||
uf.name,
|
||||
uf.origin_name,
|
||||
uf.file_length
|
||||
FROM notice_has_upload_file awuf
|
||||
INNER JOIN upload_file uf ON awuf.upload_files_id = uf.id
|
||||
WHERE awuf.notice_id IN
|
||||
FROM upload_file uf
|
||||
WHERE uf.mapping_id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="deleteNoticeHasFiles">
|
||||
/* deleteNoticeHasFiles : 게시물-파일 매핑 논리 삭제 */
|
||||
UPDATE notice_has_upload_file
|
||||
<update id="deleteNoticeUploadFiles">
|
||||
/* deleteNoticeUploadFiles : 게시물-파일 매핑 논리 삭제 */
|
||||
UPDATE upload_file
|
||||
SET <include refid="common.fields.DeleteBaseSet" />
|
||||
WHERE notice_id IN
|
||||
WHERE type='NOTICE' and mapping_id IN
|
||||
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@@ -4,32 +4,6 @@
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.communication.notice.updateNotice.adapters.persistence.UpdateNoticeMapper">
|
||||
|
||||
<update id="deleteFileUploads">
|
||||
/* deleteFileUploads 게시글 수정 시, 첨부파일 join 데이터 삭제 */
|
||||
UPDATE notice_has_upload_file
|
||||
SET
|
||||
<include refid="common.fields.DeleteBaseSet"/>
|
||||
WHERE notice_id = #{noticeId}
|
||||
</update>
|
||||
|
||||
<insert id="createFileUploads">
|
||||
/* createFileUploads 게시글 수정 시, 첨부파일 join 데이터 등록 */
|
||||
INSERT INTO notice_has_upload_file
|
||||
(
|
||||
notice_id,
|
||||
upload_files_id,
|
||||
<include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="fileMappingId" item="fileId" separator=",">
|
||||
(
|
||||
#{id},
|
||||
#{fileId},
|
||||
<include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateNotice">
|
||||
/* updateNotice 게시글 수정 */
|
||||
UPDATE notice
|
||||
|
||||
Reference in New Issue
Block a user