package com.huimv.admin.controller.secondary;

import com.huimv.admin.domain.secondary.DaZsda;
import com.huimv.admin.service.secondary.DaZsdaService;
import com.huimv.admin.utils.Result;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/DaZsda")
public class DaZsdaController {

	@Autowired
	private DaZsdaService service;

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

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

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

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


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

}
