mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 21:49:37 +08:00
区分附件图片格式和视频格式
This commit is contained in:
parent
e7632446b2
commit
ef2fdb2e50
@ -63,7 +63,10 @@ public class RepairAttachController extends BaseController {
|
||||
}
|
||||
if (nodeId == 0) return R.error("无效参数");
|
||||
if ((nodeId == 9 || nodeId == 13) && repairId == null) return R.error("无效参数");
|
||||
return processAttache(file, repairId, nodeId, IRepairAttachService.FILE_IMG);
|
||||
String ext = FileUploadUtils.getExtension(file);
|
||||
String type = IRepairAttachService.FILE_IMG;
|
||||
if (StringUtils.isNotBlank(ext) && ext.toLowerCase().equals("mp4")) type = IRepairAttachService.FILE_VIDEO;
|
||||
return processAttache(file, repairId, nodeId, type);
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,7 +14,9 @@ public interface IRepairAttachService {
|
||||
|
||||
String FILE_VOICE = "voice";
|
||||
|
||||
String FILE_IMG = "img/video";
|
||||
String FILE_IMG = "img";
|
||||
|
||||
String FILE_VIDEO = "video";
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
|
@ -56,7 +56,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getRepairFirstImg" parameterType="Long" resultType="String">
|
||||
select url from ics_repair_attach where repair_id=#{repairId} and node_id=1 and delete_flag=0 and ext1='img/video' order by id limit 1
|
||||
select url from ics_repair_attach where repair_id=#{repairId} and node_id=1 and delete_flag=0 and ext1='img' order by id limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertRepairAttach" parameterType="com.ics.admin.domain.RepairAttach">
|
||||
|
Loading…
x
Reference in New Issue
Block a user