|  | @@ -0,0 +1,57 @@
 | 
	
		
			
				|  |  | +package cn.com.usky.iot.controller;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import javax.annotation.PostConstruct;
 | 
	
		
			
				|  |  | +import javax.annotation.Resource;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import org.springframework.stereotype.Controller;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestMethod;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | +import org.springframework.web.servlet.ModelAndView;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import cn.com.usky.iot.userstatus.service.YtiotTAdminStateEntityService;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +@Controller
 | 
	
		
			
				|  |  | +@RequestMapping("/iot/userstate")
 | 
	
		
			
				|  |  | +public class UserStateController {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	@Resource
 | 
	
		
			
				|  |  | +	private YtiotTAdminStateEntityService ytiotTAdminStateEntityService;
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	private static UserStateController userStateController;
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	 @PostConstruct
 | 
	
		
			
				|  |  | +	 public void init() {
 | 
	
		
			
				|  |  | +		 userStateController = this;
 | 
	
		
			
				|  |  | +		 userStateController.ytiotTAdminStateEntityService = this.ytiotTAdminStateEntityService;
 | 
	
		
			
				|  |  | +	 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	@RequestMapping(value="/getUserStateList",method= {RequestMethod.GET,RequestMethod.POST})
 | 
	
		
			
				|  |  | +	public ModelAndView  getUserStateList(@RequestParam(value = "queryJson", required = false) String queryJson) {
 | 
	
		
			
				|  |  | +		ModelAndView mav = new ModelAndView();
 | 
	
		
			
				|  |  | +		mav.setViewName("return");
 | 
	
		
			
				|  |  | +		try {
 | 
	
		
			
				|  |  | +			String ret =  userStateController.ytiotTAdminStateEntityService.getUserStateList(queryJson);
 | 
	
		
			
				|  |  | +			mav.addObject("ret_str", ret);
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  | +		} catch (Exception e) {
 | 
	
		
			
				|  |  | +			e.printStackTrace();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		return mav;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +	
 | 
	
		
			
				|  |  | +	@RequestMapping(value="/updateUserState",method= {RequestMethod.GET,RequestMethod.POST})
 | 
	
		
			
				|  |  | +	public ModelAndView updateUserState(@RequestParam(value = "queryJson", required = false) String queryJson) {
 | 
	
		
			
				|  |  | +		ModelAndView mav = new ModelAndView();
 | 
	
		
			
				|  |  | +		mav.setViewName("return");
 | 
	
		
			
				|  |  | +		try {
 | 
	
		
			
				|  |  | +			String ret =  userStateController.ytiotTAdminStateEntityService.updateUserState(queryJson);
 | 
	
		
			
				|  |  | +			mav.addObject("ret_str",ret);
 | 
	
		
			
				|  |  | +		} catch (Exception e) {
 | 
	
		
			
				|  |  | +			e.printStackTrace();
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		return mav;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 |