package com.crm.manager.controller;

import com.crm.login.rely.backend.controller.BaseLoginController;
import com.crm.manager.service.UserGroupService;
import com.crm.manager.service.UserInfoService;
import com.crm.manager.service.UserRoleService;
import com.crm.rely.backend.core.constant.Constants;
import com.crm.rely.backend.core.constant.PrefixEnum;
import com.crm.rely.backend.core.constant.RegexpConstants;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
import com.crm.rely.backend.core.dto.user.group.UserGroupDto;
import com.crm.rely.backend.core.dto.user.info.UserInfoDto;
import com.crm.rely.backend.core.dto.user.info.UserInfoSearchDto;
import com.crm.rely.backend.core.dto.user.info.UserStaticDto;
import com.crm.rely.backend.core.dto.user.role.UserNodeDisplayDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
import com.crm.rely.backend.core.entity.user.info.*;
import com.crm.rely.backend.util.DateUtil;
import com.crm.rely.backend.util.GetIpAndMac;
import com.crm.rely.backend.util.MD5Util;
import com.google.common.base.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;

import static java.util.regex.Pattern.matches;

/**
 * @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;
    }
}
