商享通更新图片
This commit is contained in:
@@ -82,6 +82,6 @@ public interface CrmFileMapper extends BaseMapper<CrmFile> {
|
|||||||
@Delete("DELETE FROM crm_appendix WHERE linkSid = #{linkSid} and attachType =#{attachType}")
|
@Delete("DELETE FROM crm_appendix WHERE linkSid = #{linkSid} and attachType =#{attachType}")
|
||||||
int deleteFiles(@Param("linkSid") String linkSid,@Param("attachType") String attachType);
|
int deleteFiles(@Param("linkSid") String linkSid,@Param("attachType") String attachType);
|
||||||
|
|
||||||
List<CommonAppendixVo> getPcAppendix(@Param("type") String type, @Param("linkSid") String linkSid, @Param("path") String path);
|
List<CommonAppendixVo> getPcAppendix(@Param("type") String type, @Param("linkSid") String linkSid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<select id="getPcAppendix" resultType="com.yxt.customer.biz.crmfile.CommonAppendixVo">
|
<select id="getPcAppendix" resultType="com.yxt.customer.biz.crmfile.CommonAppendixVo">
|
||||||
SELECT cax.sid,
|
SELECT cax.sid,
|
||||||
concat(#{path}, cax.filePath) as filePath,
|
cax.filePath,
|
||||||
cax.fileSize,
|
cax.fileSize,
|
||||||
cax.fileType,
|
cax.fileType,
|
||||||
cax.attachType,
|
cax.attachType,
|
||||||
|
|||||||
@@ -249,11 +249,11 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
|||||||
CrmFile commonAppendix = new CrmFile();
|
CrmFile commonAppendix = new CrmFile();
|
||||||
dto.fillEntity(commonAppendix);
|
dto.fillEntity(commonAppendix);
|
||||||
String filePath = dto.getFilePath();
|
String filePath = dto.getFilePath();
|
||||||
String a = fileUploadComponent.getUrlPrefix();
|
// String a = fileUploadComponent.getUrlPrefix();
|
||||||
System.out.println("a============" + a);
|
// System.out.println("a============" + a);
|
||||||
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
|
// if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
|
||||||
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), "");
|
// filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), "");
|
||||||
}
|
// }
|
||||||
commonAppendix.setFilePath(filePath);
|
commonAppendix.setFilePath(filePath);
|
||||||
commonAppendix.setLinkSid(sid);
|
commonAppendix.setLinkSid(sid);
|
||||||
commonAppendix.setCreateBySid(staffSid);
|
commonAppendix.setCreateBySid(staffSid);
|
||||||
@@ -279,7 +279,7 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
|||||||
commonAppendix.setFileType(pcCommonAppendixDto.getFileType());
|
commonAppendix.setFileType(pcCommonAppendixDto.getFileType());
|
||||||
commonAppendix.setFileSize(pcCommonAppendixDto.getFileSize());
|
commonAppendix.setFileSize(pcCommonAppendixDto.getFileSize());
|
||||||
commonAppendix.setAttachType(CommonAttachTypeEnum.WITNESS.getAttachType());
|
commonAppendix.setAttachType(CommonAttachTypeEnum.WITNESS.getAttachType());
|
||||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath().replace(fileUploadComponent.getUrlPrefix(), ""));
|
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath());
|
||||||
s += commonAppendix.getFilePath()+",";
|
s += commonAppendix.getFilePath()+",";
|
||||||
save(commonAppendix);
|
save(commonAppendix);
|
||||||
}
|
}
|
||||||
@@ -304,8 +304,7 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
|||||||
public List<CommonAppendixVo> getPcAppendix(CommonAppendixSelectQuery query) {
|
public List<CommonAppendixVo> getPcAppendix(CommonAppendixSelectQuery query) {
|
||||||
String attachType = query.getAttachType();
|
String attachType = query.getAttachType();
|
||||||
String linkSid = query.getLinkSid();
|
String linkSid = query.getLinkSid();
|
||||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
return baseMapper.getPcAppendix(attachType,linkSid);
|
||||||
return baseMapper.getPcAppendix(attachType,linkSid, urlPrefix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAppendix(String linkSid, String attachType, List<PcCommonAppendixDto> list) {
|
public void saveAppendix(String linkSid, String attachType, List<PcCommonAppendixDto> list) {
|
||||||
@@ -325,7 +324,7 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
|||||||
commonAppendix.setFileSize(pcCommonAppendixDto.getFileSize());
|
commonAppendix.setFileSize(pcCommonAppendixDto.getFileSize());
|
||||||
}
|
}
|
||||||
commonAppendix.setAttachType(attachType);
|
commonAppendix.setAttachType(attachType);
|
||||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath().replace(fileUploadComponent.getUrlPrefix(), ""));
|
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath());
|
||||||
save(commonAppendix);
|
save(commonAppendix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user