package com.ym.mec.auth.service.impl;

import com.ym.mec.auth.api.entity.TenantInfo;
import com.ym.mec.auth.dal.dao.TenantInfoDao;
import com.ym.mec.auth.service.TenantInfoService;
import com.ym.mec.common.dal.BaseDAO;
import com.ym.mec.common.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TenantInfoServiceImpl extends BaseServiceImpl<Integer, TenantInfo>  implements TenantInfoService {
	
	@Autowired
	private TenantInfoDao tenantInfoDao;

	@Override
	public BaseDAO<Integer, TenantInfo> getDAO() {
		return tenantInfoDao;
	}

	@Override
	public TenantInfo getOpenTenant(Integer tenantId) {
		return tenantInfoDao.getOpenTenant(tenantId);
	}

	@Override
	public void updatePhone(String newPhone, String oldPhone) {
		tenantInfoDao.updatePhone(newPhone, oldPhone);
	}


}