feat: 캔버스 복사 기능 추가
This commit is contained in:
parent
40831b4672
commit
1337c682e5
@ -1,6 +1,7 @@
|
||||
package com.interplug.qcast.biz.canvasStatus;
|
||||
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus;
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusCopyRequest;
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -40,4 +41,7 @@ public interface CanvasStatusMapper {
|
||||
|
||||
// 캔버스 삭제 by id
|
||||
public void deleteIdCanvasStatus(Integer id);
|
||||
|
||||
// 캔버스 복사
|
||||
public void copyCanvasStatus(CanvasStatusCopyRequest cs);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.interplug.qcast.biz.canvasStatus;
|
||||
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatus;
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusCopyRequest;
|
||||
import com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusResponse;
|
||||
import com.interplug.qcast.config.Exception.ErrorCode;
|
||||
import com.interplug.qcast.config.Exception.QcastException;
|
||||
@ -116,4 +117,13 @@ public class CanvasStatusService {
|
||||
throw new QcastException(ErrorCode.NOT_FOUND, "삭제할 캔버스가 존재하지 않습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
// 캔버스 복사 후 등록
|
||||
public void copyCanvasStatus(CanvasStatusCopyRequest cs) throws QcastException {
|
||||
try {
|
||||
canvasStatusMapper.copyCanvasStatus(cs);
|
||||
} catch (Exception e) {
|
||||
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR, "캔버스 복사 중 오류 발생");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.interplug.qcast.biz.canvasStatus.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Schema(description = "캔버스 복사 요청 객체")
|
||||
public class CanvasStatusCopyRequest {
|
||||
@Schema(description = "원본 물건 번호")
|
||||
private String originObjectNo;
|
||||
|
||||
@Schema(description = "원본 플랜 번호")
|
||||
private String originPlanNo;
|
||||
|
||||
@Schema(description = "복사본 저장할 사용자 ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "복사본 저장할 물건 번호")
|
||||
private String objectNo;
|
||||
|
||||
@Schema(description = "복사본 저장할 플랜 번호")
|
||||
private String planNo;
|
||||
}
|
||||
@ -122,4 +122,27 @@
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<insert id="copyCanvasStatus"
|
||||
parameterType="com.interplug.qcast.biz.canvasStatus.dto.CanvasStatusCopyRequest">
|
||||
/* sqlid : com.interplug.qcast.canvasStatus.copyCanvasStatus 캔버스 복사 */
|
||||
INSERT INTO TB_CANVAS_STATUS
|
||||
(user_id,
|
||||
object_no,
|
||||
plan_no,
|
||||
regist_datetime,
|
||||
canvas_status,
|
||||
bg_image_name,
|
||||
map_position_address)
|
||||
SELECT #{userId},
|
||||
#{objectNo},
|
||||
#{planNo},
|
||||
GETDATE(),
|
||||
canvas_status,
|
||||
bg_image_name,
|
||||
map_position_address
|
||||
FROM TB_CANVAS_STATUS
|
||||
WHERE object_no = #{originObjectNo}
|
||||
AND plan_no = #{originPlanNo}
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
Loading…
x
Reference in New Issue
Block a user