package cn.com.countrygarden.bi.main.controller.resident;

import cn.com.countrygarden.bi.main.core.Response;
import cn.com.countrygarden.bi.main.service.resident.ContractTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * Created by chenweijiang on 2017/11/13.
 */

@RestController("ContractTypeController")
@RequestMapping("/api/resident/contract/type")
public class ContractTypeController {
    @Autowired
    private ContractTypeService contractTypeService;

    @RequestMapping(value = "",method = {RequestMethod.GET},produces = {"application/json;charset=utf-8"})
    public Object listAll(){
        List<Map<String, Object>> results = contractTypeService.cascade();
        return Response.response(results);
    }
}
