| 
						
						
							
								
							
						
						
					 | 
					@ -4,6 +4,8 @@ package com.epmet.controller; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.slf4j.Logger; | 
					 | 
					 | 
					import org.slf4j.Logger; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.slf4j.LoggerFactory; | 
					 | 
					 | 
					import org.slf4j.LoggerFactory; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.RequestMethod; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.ResponseBody; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.web.bind.annotation.RestController; | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.RestController; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import javax.servlet.http.HttpServletRequest; | 
					 | 
					 | 
					import javax.servlet.http.HttpServletRequest; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -114,4 +116,27 @@ public class WxController { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        String s = new String(tempArr); | 
					 | 
					 | 
					        String s = new String(tempArr); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return s; | 
					 | 
					 | 
					        return s; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * 打开开发者模式签名认证 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param signature | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param timestamp | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param nonce | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @param echostr | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @ResponseBody | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @RequestMapping(value = "/service", method = RequestMethod.GET) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public Object defaultView(String signature, String timestamp, String nonce, String echostr) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (echostr == null || echostr.isEmpty()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return nonce; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (this.checkSignature(signature, timestamp, nonce)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return echostr; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return nonce; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |