package com.engine.organization.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.organization.service.CardAccessService;
import com.engine.organization.service.impl.CardAccessServiceImpl;
import com.engine.organization.util.OrganizationWrapper;
import weaver.hrm.User;

import java.util.Map;

/**
 * @Author weaver_cl
 * @Description:
 * @Date 2022/11/1
 * @Version V1.0
 **/
public class CardAccessWrapper extends OrganizationWrapper {

    public CardAccessService getCardAccessService(User user) {
        return ServiceUtil.getService(CardAccessServiceImpl.class, user);
    }

    public Map<String, Object> listPage() {
        return getCardAccessService(user).tablePage();
    }

    public Map<String, Object> hasRight() {
        return getCardAccessService(user).hasRight();
    }

    public int save(Map<String, Object> params) {
        return getCardAccessService(user).save(params);
    }

    public Map<String, Object> getCardButtonTable() {
        return getCardAccessService(user).getCardButtonTable();
    }

    public int saveCardButton(Map<String, Object> params) {
        return getCardAccessService(user).saveCardButton(params);
    }
}
