商享通更新图片
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}")
|
||||
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 cax.sid,
|
||||
concat(#{path}, cax.filePath) as filePath,
|
||||
cax.filePath,
|
||||
cax.fileSize,
|
||||
cax.fileType,
|
||||
cax.attachType,
|
||||
|
||||
@@ -249,11 +249,11 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
||||
CrmFile commonAppendix = new CrmFile();
|
||||
dto.fillEntity(commonAppendix);
|
||||
String filePath = dto.getFilePath();
|
||||
String a = fileUploadComponent.getUrlPrefix();
|
||||
System.out.println("a============" + a);
|
||||
if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
|
||||
filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), "");
|
||||
}
|
||||
// String a = fileUploadComponent.getUrlPrefix();
|
||||
// System.out.println("a============" + a);
|
||||
// if (filePath.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
|
||||
// filePath = filePath.replace(fileUploadComponent.getUrlPrefix(), "");
|
||||
// }
|
||||
commonAppendix.setFilePath(filePath);
|
||||
commonAppendix.setLinkSid(sid);
|
||||
commonAppendix.setCreateBySid(staffSid);
|
||||
@@ -279,7 +279,7 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
||||
commonAppendix.setFileType(pcCommonAppendixDto.getFileType());
|
||||
commonAppendix.setFileSize(pcCommonAppendixDto.getFileSize());
|
||||
commonAppendix.setAttachType(CommonAttachTypeEnum.WITNESS.getAttachType());
|
||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath().replace(fileUploadComponent.getUrlPrefix(), ""));
|
||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath());
|
||||
s += commonAppendix.getFilePath()+",";
|
||||
save(commonAppendix);
|
||||
}
|
||||
@@ -304,8 +304,7 @@ public class CrmFileService extends MybatisBaseService<CrmFileMapper, CrmFile> {
|
||||
public List<CommonAppendixVo> getPcAppendix(CommonAppendixSelectQuery query) {
|
||||
String attachType = query.getAttachType();
|
||||
String linkSid = query.getLinkSid();
|
||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
return baseMapper.getPcAppendix(attachType,linkSid, urlPrefix);
|
||||
return baseMapper.getPcAppendix(attachType,linkSid);
|
||||
}
|
||||
|
||||
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.setAttachType(attachType);
|
||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath().replace(fileUploadComponent.getUrlPrefix(), ""));
|
||||
commonAppendix.setFilePath(pcCommonAppendixDto.getFilePath());
|
||||
save(commonAppendix);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user