Selaa lähdekoodia

cfnDownloadSampleFile 관련 system=>common 으로 변경

eskim 5 vuotta sitten
vanhempi
commit
83eaa03169

+ 8 - 0
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaCommonDao.java

@@ -39,6 +39,14 @@ public interface TsaCommonDao {
 	 */
 	void createExceluploadSearchByAll(SearchData searchData);
 
+	/**
+	 * 샘플파일 시스템파일명 조회
+	 * @param sampleFileId - 샘플파일ID
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 3
+	 */
+	String getSampleFileSystemFilename(String sampleFileId);
 
 
 }

+ 1 - 10
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaSystemDao.java

@@ -14,7 +14,7 @@ import com.style24.persistence.domain.UserMenu;
 
 /**
  * 시스템 Dao
- * 
+ *
  * @author gagamel
  * @since 2020. 10. 7
  */
@@ -234,13 +234,4 @@ public interface TsaSystemDao {
 	 */
 	void updateSampleFile(SampleFile sampleFile);
 
-	/**
-	 * 샘플파일 시스템파일명 조회
-	 * @param sampleFileId - 샘플파일ID
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 3
-	 */
-	String getSampleFileSystemFilename(String sampleFileId);
-
 }

+ 10 - 0
style24.admin/src/main/java/com/style24/admin/biz/service/TsaCommonService.java

@@ -57,5 +57,15 @@ public class TsaCommonService {
 		commonDao.createExceluploadSearchByAll(searchData);
 	}
 
+	/**
+	 * 샘플파일 시스템파일명 조회
+	 * @param sampleFileId - 샘플파일ID
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 3
+	 */
+	public String getSampleFileSystemFilename(String sampleFileId) {
+		return commonDao.getSampleFileSystemFilename(sampleFileId);
+	}
 
 }

+ 0 - 11
style24.admin/src/main/java/com/style24/admin/biz/service/TsaSystemService.java

@@ -414,15 +414,4 @@ public class TsaSystemService {
 		}
 	}
 
-	/**
-	 * 샘플파일 시스템파일명 조회
-	 * @param sampleFileId - 샘플파일ID
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 3
-	 */
-	public String getSampleFileSystemFilename(String sampleFileId) {
-		return systemDao.getSampleFileSystemFilename(sampleFileId);
-	}
-
 }

+ 19 - 0
style24.admin/src/main/java/com/style24/admin/biz/web/TsaCommonController.java

@@ -15,6 +15,7 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.util.StringUtils;
 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.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.ModelAndView;
 
+import com.style24.admin.biz.service.TsaCommonService;
 import com.style24.admin.support.controller.TsaBaseController;
 
 import lombok.extern.slf4j.Slf4j;
@@ -47,6 +49,10 @@ public class TsaCommonController extends TsaBaseController {
 	@Autowired
 	private Environment env;
 
+	@Autowired
+	private TsaCommonService commonService;
+
+
 	@Value("${upload.default.target.path}")
 	private String uploadTargetPath;
 
@@ -199,4 +205,17 @@ public class TsaCommonController extends TsaBaseController {
 
 		return mav;
 	}
+
+	/**
+	 * 샘플파일 시스템파일명 조회
+	 * @param sampleFileId - 샘플파일ID
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 3
+	 */
+	@GetMapping("/sample/file/{sampleFileId}")
+	@ResponseBody
+	public String getSampleFileSystemFilename(@PathVariable("sampleFileId") String sampleFileId) {
+		return commonService.getSampleFileSystemFilename(sampleFileId);
+	}
 }

+ 0 - 13
style24.admin/src/main/java/com/style24/admin/biz/web/TsaSystemController.java

@@ -439,17 +439,4 @@ public class TsaSystemController extends TsaBaseController {
 		return super.ok(message.getMessage("SUCC_0001"));
 	}
 
-	/**
-	 * 샘플파일 시스템파일명 조회
-	 * @param sampleFileId - 샘플파일ID
-	 * @return
-	 * @author gagamel
-	 * @since 2020. 11. 3
-	 */
-	@GetMapping("/sample/file/{sampleFileId}")
-	@ResponseBody
-	public String getSampleFileSystemFilename(@PathVariable("sampleFileId") String sampleFileId) {
-		return systemService.getSampleFileSystemFilename(sampleFileId);
-	}
-
 }

+ 7 - 0
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaCommon.xml

@@ -55,4 +55,11 @@
 		         AND REG_NO = #{regNo}) = 0
 	</insert>
 	
+	<!-- 샘플파일 시스템파일명 조회 -->
+	<select id="getSampleFileSystemFilename" parameterType="String" resultType="String">
+		/* TsaCommon.getSampleFileSystemFilename */
+		SELECT SYS_FILE_NM
+		FROM   TB_SAMPLE_FILE
+		WHERE  SAMPLE_FILE_ID = #{sampleFileId}
+	</select>
 </mapper>

+ 0 - 8
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaSystem.xml

@@ -619,13 +619,5 @@
 		     , UPD_DT = NOW()
 		WHERE  SAMPLE_FILE_ID = #{sampleFileId}
 	</update>
-	
-	<!-- 샘플파일 시스템파일명 조회 -->
-	<select id="getSampleFileSystemFilename" parameterType="String" resultType="String">
-		/* TsaSystem.getSampleFileSystemFilename */
-		SELECT SYS_FILE_NM
-		FROM   TB_SAMPLE_FILE
-		WHERE  SAMPLE_FILE_ID = #{sampleFileId}
-	</select>
 
 </mapper>

+ 1 - 1
style24.admin/src/main/webapp/ux/js/admin.common.js

@@ -772,7 +772,7 @@ var cfnGridNumner = function (formId, idx, sortFlag){
  * @author : rladbwnd5
  */
 function cfnDownloadSampleFile(sampleFileId) {
-	$.get('/system/sample/file/' + sampleFileId
+	$.get('/common/sample/file/' + sampleFileId
 		, function(result) {
 			if (gagajf.isNull(result)) {
 				mcxDialog.alert('다운로드 받을 파일이 존재하지 않습니다.');