package com.crm.manager.controller;

import com.crm.login.rely.backend.controller.BaseLoginController;
import com.crm.manager.service.UserGroupService;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.user.group.UserGroupDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2019-07-25 15:57
 */
@RestController
@RequestMapping("/user/group")
public class UserGroupController extends BaseLoginController {

    @Autowired
    private UserGroupService userGroupService;


    @PostMapping("/get")
    public BaseResultDto<List<UserGroupDto>> get() throws Exception {
        BaseResultDto<List<UserGroupDto>> resultDto=   userGroupService.getAllGroup();

        return resultDto;
    }
}
