| 
					
				 | 
			
			
				@ -591,7 +591,7 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @RequestMapping(value = "append") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ResponseBody 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String append(@RequestParam String consult, @RequestParam String content, @RequestParam int type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String append(@RequestParam String consult, @RequestParam String content, @RequestParam int type,@RequestParam(required = false,defaultValue = "0") Integer times) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<ConsultTeamLog> logs = new ArrayList<ConsultTeamLog>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            ConsultTeam consultModel = consultTeamService.findByCode(consult); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -605,8 +605,24 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String[] arr = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (type == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(type==3){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               String path =  fetchWxVoices(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               JSONObject obj = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 将临时语音拷贝到正式存储路径下 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNotEmpty(path)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    content = CommonUtil.copyTempVoice(path); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    obj.put("path",content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    obj.put("times",times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    content = obj.toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                ConsultTeamLog log = new ConsultTeamLog(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                log.setConsult(consult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                log.setContent(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                log.setDel("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                log.setChatType(type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                log.setType(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logs.add(log); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else if (type == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                // 图片消息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isEmpty(content)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String images = request.getParameter("mediaIds"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -614,7 +630,6 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (!StringUtils.isEmpty(images)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        arr = images.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    content = fetchWxImages(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    arr = content.split(","); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -658,7 +673,7 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if(resObj.getInt("status")==-1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        return invalidUserException(new RuntimeException(resObj.getString("message")), -1, "追问失败!"+resObj.getString("message")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    failed.add(response); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    failed.add(String.valueOf(resObj.get("data"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200, "追问成功!", "data", failed); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -684,8 +699,8 @@ public class ConsultController extends WeixinBaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (consultModel == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                return error(-1, "咨询记录不存在!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           JSONArray array =  ImUtill.getTopicMessage(consultModel.getConsult(),consultModel.getStartMsgId(),consultModel.getEndMsgId(),page,pagesize,getUID()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200, "查询成功", "list", array); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            JSONObject messageObj =  ImUtill.getTopicMessage(consultModel.getConsult(),consultModel.getStartMsgId(),consultModel.getEndMsgId(),page,pagesize,getUID()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return write(200, "查询成功", "list", messageObj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            error(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return invalidUserException(e, -1, "查询失败!"); 
			 |