package com.huimv.video.controller;

import com.huimv.video.domain.MobileUser;
import com.huimv.video.result.Result;
import com.huimv.video.service.MobileUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/mobileUser")
public class MobileUserController {

	@Autowired
	private MobileUserService service;

	@RequestMapping("/register")
	public Result add(MobileUser childcareEntity){ return service.add(childcareEntity); }

	@RequestMapping("/remove")
	public Result remove(Integer[] ids){ return service.remove(ids); }

	@RequestMapping("/update")
	public Result update(MobileUser childcareEntity){ return service.update(childcareEntity); }

	@RequestMapping("/findAllById")
	public Result findAllById(Integer id){ return service.findAllById(id); }


	@RequestMapping("/findAll")
	public Result findAll(String name , Integer pageNum , Integer pageSize){
		return service.findAll(name,pageNum,pageSize);
	}

	@RequestMapping("/login")
	public Result login(String account, String password){ return service.login(account,password); }

}
