|
|
@@ -118,7 +118,7 @@ public class WorkflowAction extends ActionSupport implements ServletRequestAwar
|
|
|
if (workflow.getStatus() == 2){//审批通过
|
|
|
// 新的酒店图片
|
|
|
List<FileInfo> fileInfoList = fileService.queryList("and link_id ='"+workflow1.getId()+"'");
|
|
|
- if (fileInfoList.size() > 0){
|
|
|
+ if (fileInfoList != null && fileInfoList.size() > 0){
|
|
|
fileService.delLinkFile(String.valueOf(workflow1.getLinkId()));
|
|
|
fileInfoList.forEach(file -> {
|
|
|
file.setLinkId(workflow1.getLinkId());
|
|
|
@@ -127,7 +127,7 @@ public class WorkflowAction extends ActionSupport implements ServletRequestAwar
|
|
|
}
|
|
|
workflow1.setStatus(2);//审批通过
|
|
|
//民宿信息修改
|
|
|
- Hotel hotel = new Hotel();
|
|
|
+ Hotel hotel = hotelService.getByManagerId(Integer.parseInt(workflow1.getLinkId()));
|
|
|
boolean isUpdateHotel = false;
|
|
|
if (workflow1.getCoverImg() != null && !"".equals(workflow1.getCoverImg())){
|
|
|
hotel.setCoverImg(workflow1.getCoverImg());
|
|
|
@@ -138,7 +138,6 @@ public class WorkflowAction extends ActionSupport implements ServletRequestAwar
|
|
|
isUpdateHotel = true;
|
|
|
}
|
|
|
if (isUpdateHotel){
|
|
|
- hotel.setId(Integer.valueOf(workflow1.getLinkId()));
|
|
|
hotelService.updateHotel(hotel);
|
|
|
}
|
|
|
}else {//审批拒绝
|