package com.inkasso.factoring.system.department.controller;

import com.inkasso.adapter.response.ResponseData;
import com.inkasso.auth.response.ResponseJson;
import com.inkasso.factoring.system.department.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description : 区域信息Controller
 * @Author : L.Jia
 * @Date: 2024-01-23 11:41
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private IDepartmentService departmentService;

    /**
     * 查找省市区行政区划
     */
    @GetMapping("/findAll")
    public Object doFindAll(@RequestParam(required = false) Boolean flag) {
        return ResponseData.success(departmentService.findAll(flag));
    }
}
