엔티티/테이블 공통 필드/컬럼 추가 -> REG_DT, RGTR, MDFCN_DT, MDFR

master
mjkhan21 2 years ago
parent 4b0e8a480f
commit 3418fee377

@ -11,7 +11,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -19,12 +18,13 @@ import java.util.stream.Stream;
import org.springframework.util.FileCopyUtils;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.AbstractEntity;
import cokr.xit.foundation.Assert;
/**
* @author mjkhan
*/
public class FileInfo {
public class FileInfo extends AbstractEntity {
/**
* @author mjkhan
*/
@ -284,13 +284,10 @@ public class FileInfo {
path,
url,
mimeType,
extension,
createdBy,
inUse;
extension;
private long size;
private int downloadCount;
private int sortOrder;
private Date createdAt;
private InputStream input;
/** .
@ -499,64 +496,6 @@ public class FileInfo {
this.sortOrder = sortOrder;
}
/** ID .
* @return ID
*/
public String getCreatedBy() {
return createdBy;
}
/** ID .
* @param createdBy ID
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/** .
* @return
*/
public Date getCreatedAt() {
return createdAt;
}
/** .
* @param createdAt
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/** .
* @return
* <ul><li>Y - </li>
* <li>N - </li>
* </ul>
*/
public String getInUse() {
return Assert.ifEmpty(inUse, "Y");
}
/** .
* @return
* <ul><li>true - </li>
* <li>false - </li>
* </ul>
*/
public boolean inUse() {
return "Y".equals(getInUse());
}
/** .
* @param deleted
* <ul><li>Y - </li>
* <li>N - </li>
* </ul>
*/
public void setInUse(String deleted) {
this.inUse = deleted;
}
/**FileInfo InputStream .
* @return InputStream
*/

@ -19,7 +19,7 @@ import cokr.xit.foundation.data.DataObject;
* <p> SQL .
* <pre>{@code <sql id="fileDirs">
* SELECT INF_TYPE
* , CONCAT('D://workspace/xit/base/files/', DIR, TO_CHAR(CURRENT_DATE, 'YYYY/MM/DD/')) DIR
* , CONCAT('C://workspace/xit/base/files/', DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/')) DIR
* FROM (
* SELECT '00' INF_TYPE, 'attachment/' DIR UNION
* SELECT '10' INF_TYPE, 'document/' DIR UNION
@ -27,7 +27,7 @@ import cokr.xit.foundation.data.DataObject;
* ) FILE_DIRS
* </sql>}</pre>
*
* <ul><li> 'D://workspace/xit/base/files/'로 지정한다.
* <ul><li> 'C://workspace/xit/base/files/'로 지정한다.
* <li> '00' ' /attachment/YYYY/MM/DD'
* <li> '01' ' /document/YYYY/MM/DD'
* <li> '02' ' /article/YYYY/MM/DD'
@ -37,12 +37,12 @@ import cokr.xit.foundation.data.DataObject;
* <p><b> URL </b>
* <p> URL SQL .
* <pre>{@code <sql id="selectFiles">
* SELECT A.*, REPLACE(FILE_PATH, 'D://workspace/xit/base', '') URL
* SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL
* FROM TB_FILE A
* ...
* </sql>}</pre>
*
* <ul><li> FILE_PATH 'D://workspace/xit/base' 부분을 제거하여 파일의 URL로 추출하도록 하고 있다.</li>
* <ul><li> FILE_PATH 'C://workspace/xit/base' 부분을 제거하여 파일의 URL로 추출하도록 하고 있다.</li>
* <li> URL .</li>
* </ul>
* @author mjkhan

@ -8,7 +8,7 @@
* , (-) infoKey .</li>
* </ul>
* <p> <b> infoType, infoKey + </b> <br />
* <a href="{@docRoot}/doc-files/xit-base-mysql.sql" target="_blank">TB_FILE </a> .
* <a href="{@docRoot}/doc-files/xit-base-mariadb.sql" target="_blank">TB_FILE </a> .
* <p> {@link cokr.xit.base.file.dao.FileMapper FileMapper} .
* <ul><li> : xit-file-yy.mm.dd.jar</li>
* <li> : {@link cokr.xit.foundation xit-foundation-yy.mm.dd.jar}</li>

@ -20,7 +20,7 @@ import cokr.xit.foundation.data.DataObject;
* <p> SQL .
* <pre>{@code <sql id="fileDirs">
* SELECT INF_TYPE
* , CONCAT('D://workspace/xit/base/files/', DIR, TO_CHAR(CURRENT_DATE, 'YYYY/MM/DD/')) DIR
* , CONCAT('C://workspace/xit/base/files/', DIR, DATE_FORMAT(CURRENT_DATE, '%Y/%m/%d/')) DIR
* FROM (
* SELECT '00' INF_TYPE, 'attachment/' DIR UNION
* SELECT '10' INF_TYPE, 'document/' DIR UNION
@ -28,7 +28,7 @@ import cokr.xit.foundation.data.DataObject;
* ) FILE_DIRS
* </sql>}</pre>
*
* <ul><li> 'D://workspace/xit/base/files/'로 지정한다.
* <ul><li> 'C://workspace/xit/base/files/'로 지정한다.
* <li> '00' ' /attachment/YYYY/MM/DD'
* <li> '01' ' /document/YYYY/MM/DD'
* <li> '02' ' /article/YYYY/MM/DD'
@ -38,12 +38,12 @@ import cokr.xit.foundation.data.DataObject;
* <p><b> URL </b>
* <p> URL SQL .
* <pre>{@code <sql id="selectFiles">
* SELECT A.*, REPLACE(FILE_PATH, 'D://workspace/xit/base', '') URL
* SELECT A.*, REPLACE(FILE_PATH, 'C://workspace/xit/base', '') URL
* FROM TB_FILE A
* ...
* </sql>}</pre>
*
* <ul><li> FILE_PATH 'D://workspace/xit/base' 부분을 제거하여 파일의 URL로 추출하도록 하고 있다.</li>
* <ul><li> FILE_PATH 'C://workspace/xit/base' 부분을 제거하여 파일의 URL로 추출하도록 하고 있다.</li>
* <li> URL .</li>
* </ul>
* @author mjkhan

Loading…
Cancel
Save