|
|
@@ -107,7 +107,8 @@ public class BusinessFileServiceImpl implements BusinessFileService {
|
|
107
|
107
|
* @param fileIds
|
|
108
|
108
|
* @param bid
|
|
109
|
109
|
*/
|
|
110
|
|
- public void updateFileByFileIdsAndBid(String fileIds, Integer bid,String fileType) {
|
|
|
110
|
+ public void updateFileByFileIdsAndBid(String fileIds, Integer bid,String fileType) {
|
|
|
111
|
+
|
|
111
|
112
|
if (StringUtils.isNotBlank(fileIds) && !"[]".equals(fileIds)) {
|
|
112
|
113
|
BusinessFile businessFile = new BusinessFile();
|
|
113
|
114
|
businessFile.setBid(bid);
|
|
|
@@ -119,13 +120,19 @@ public class BusinessFileServiceImpl implements BusinessFileService {
|
|
119
|
120
|
fileIds = fileIds.substring(0, fileIds.length() - 1);
|
|
120
|
121
|
String[] idArray = fileIds.split(",");
|
|
121
|
122
|
List<Integer> idList = new ArrayList<Integer>();
|
|
122
|
|
- for (String id : idArray) {
|
|
123
|
|
- idList.add(Integer.parseInt(id));
|
|
|
123
|
+ if(idArray.length>0 && idArray!=null){
|
|
|
124
|
+ for (String id : idArray) {
|
|
|
125
|
+ id = id.replaceAll("\\p{P}", "");
|
|
|
126
|
+ if(null !=id && "" != id && id.length()>0){
|
|
|
127
|
+ idList.add(Integer.parseInt(id));
|
|
|
128
|
+ }
|
|
|
129
|
+ }
|
|
|
130
|
+ if(idList!=null && idList.size()>0){
|
|
|
131
|
+ createCriteria.andIdIn(idList);
|
|
|
132
|
+ createCriteria.andTypeEqualTo(fileType);
|
|
|
133
|
+ fileMapper.updateByExampleSelective(businessFile, example);
|
|
|
134
|
+ }
|
|
124
|
135
|
}
|
|
125
|
|
-
|
|
126
|
|
- createCriteria.andIdIn(idList);
|
|
127
|
|
- createCriteria.andTypeEqualTo(fileType);
|
|
128
|
|
- fileMapper.updateByExampleSelective(businessFile, example);
|
|
129
|
136
|
}
|
|
130
|
137
|
}
|
|
131
|
138
|
|