package com.hhh.cloud.framework.example.auth.service.impl;

import com.hhh.cloud.framework.example.auth.model.UserDemo;
import com.hhh.cloud.framework.megrez.starter.auth.service.IUserDetailService;
import com.hhh.cloud.framework.megrez.utils.model.UserJwt;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class UserDetailDemoServiceImpl implements IUserDetailService {

    @Override
    public UserJwt loadUserFromCustom(UserJwt userJwt) {
        //TODO 自定用户类获取逻辑编写
        userJwt.setEntName("普通的生产单位");
        UserDemo userDemo = new UserDemo(userJwt);
        userDemo.setEntName("普通的生产单位");
        List<String> projectIds = new ArrayList<>();
        projectIds.add("123");
        projectIds.add("124");
        projectIds.add("125");
        userDemo.setProjectIds(projectIds);
        return userDemo;
    }
}
