package com.engine.organization.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.organization.entity.po.Demo;
import com.engine.organization.service.DemoService;
import com.engine.organization.service.impl.DemoServiceImpl;
import com.engine.organization.util.response.ReturnResult;
import weaver.hrm.User;

import java.util.List;

/**
 * @Author weaver_cl
 * @description:
 * @Date 2022/4/26
 * @Version V1.0
 **/
public class DemoWrapper extends Service {

    private DemoService getDemoService(User user) {
        return ServiceUtil.getService(DemoServiceImpl.class,user);
    }

    public ReturnResult testDemo(String name) {
        List<Demo> list = getDemoService(user).list(name);
        return  ReturnResult.successed(list);
    }
}
