Commit 93288640 authored by yanzg's avatar yanzg

下载视频

parent e1fdb2e1
......@@ -2,9 +2,11 @@ package com.yanzuoguang.cloud.file.dao.impl;
import com.yanzuoguang.cloud.file.dao.YzgFileDao;
import com.yanzuoguang.cloud.vo.YzgFileVo;
import com.yanzuoguang.cloud.vo.req.YzgFileQueryReqVo;
import com.yanzuoguang.cloud.vo.req.YzgFileStatusReqVo;
import com.yanzuoguang.dao.DaoConst;
import com.yanzuoguang.dao.impl.BaseDaoImpl;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.MapRow;
import org.springframework.beans.factory.InitializingBean;
......@@ -60,7 +62,12 @@ public class YzgFileDaoImpl extends BaseDaoImpl implements YzgFileDao, Initializ
;
table.add(GET_COUNT_SQL, "SELECT COUNT(1) FROM Yzg_File AS a WHERE 1=1")
.add(YzgFileVo.class, "a.");
.add(YzgFileVo.class, "a.")
.add("createDateFrom", "AND a.createDate>=?")
.add("createDateTo", "AND a.createDate<=?")
.add("downloadDateFrom", "AND a.downloadDate>=?")
.add("downloadDateTo", "AND a.downloadDate<=?")
;
table.add(UPDATE_STATUS_SQL, "UPDATE Yzg_File AS a SET a.fileId=a.fileId {FIELD} WHERE a.fileId=@fileId")
.addPara("fileStatus", DaoConst.CODE_FIELD, ",a.fileStatus=CASE WHEN @fileStatus>a.fileStatus THEN @fileStatus ELSE a.fileStatus END")
......@@ -100,9 +107,10 @@ public class YzgFileDaoImpl extends BaseDaoImpl implements YzgFileDao, Initializ
if (StringHelper.isEmpty(req.getCompanyId(), req.getCreateUserId())) {
return 0;
}
YzgFileVo countReq = new YzgFileVo();
YzgFileQueryReqVo countReq = new YzgFileQueryReqVo();
countReq.setCompanyId(req.getCompanyId());
countReq.setCreateUserId(req.getCreateUserId());
countReq.setCreateDateFrom(DateHelper.getToday());
return StringHelper.toInt(queryCell(GET_COUNT_SQL, countReq));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment