package com.jpsoft.shinestar.modules.wechat.service.impl;

import com.jpsoft.shinestar.modules.wechat.dao.AccessContorlDAO;
import com.jpsoft.shinestar.modules.wechat.entity.AccessControl;
import com.jpsoft.shinestar.modules.wechat.service.IAccessControlService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 墨鱼_mo
 * @date 2019-12-3 15:55
 */
@Service
public class AccessControlServiceImpl implements IAccessControlService {

    @Resource(name="accessContorlDAO")
    private AccessContorlDAO accessContorlDAO;




    @Override
    public AccessControl findByOpenId(String openId) {
        return accessContorlDAO.findByOpenId(openId);
    }

    @Override
    public AccessControl findByOwnerId(String id) {
        return accessContorlDAO.findByOwner(id);
    }

    @Override
    public void save(AccessControl accessControl) {
        accessContorlDAO.save(accessControl);
    }

    @Override
    public void update(AccessControl accessControl) {
        accessContorlDAO.update(accessControl);
    }


}
