class TenantController extends BaseController {

    @ApiOperation(value = "createTenant", notes = "CREATE_TENANT_NOTES")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tenantCode", value = "TENANT_CODE", required = true, dataType = "String"),
            @ApiImplicitParam(name = "tenantName", value = "TENANT_NAME", required = true, dataType = "String"),
            @ApiImplicitParam(name = "queueId", value = "QUEUE_ID", required = true, dataType = "Int", example = "100"),
            @ApiImplicitParam(name = "description", value = "TENANT_DESC", dataType = "String")

    })
    @PostMapping(value = "/create")
    @ResponseStatus(HttpStatus.CREATED)
    @ApiException(CREATE_TENANT_ERROR)
    public Result createTenant(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                               @RequestParam(value = "tenantCode") String tenantCode,
                               @RequestParam(value = "tenantName") String tenantName,
                               @RequestParam(value = "queueId") int queueId,
                               @RequestParam(value = "description", required = false) String description) throws Exception {
        logger.info("login user {}, create tenant, tenantCode: {}, tenantName: {}, queueId: {}, desc: {}",
                loginUser.getUserName(), tenantCode, tenantName, queueId, description);
        Map<String, Object> result = tenantService.createTenant(loginUser, tenantCode, tenantName, queueId, description);
        return returnDataList(result);
    }

}