package com.prolog.upcloud.base.wh.operate.service.impl;

import cn.hutool.core.lang.Assert;
import com.prolog.framework.authority.core.dto.UserDTO;
import com.prolog.framework.authority.user.UserTemplate;
import com.prolog.upcloud.base.wh.operate.service.UserService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class UserServiceImpl implements UserService {
    @Resource
    private UserTemplate template;

    @Override
    public UserDTO getUser() {
        UserDTO user = template.getUserDTO();
        Assert.notNull(user, "您无权操作");
        return user;
    }
}
