package com.hotent.uc.manager.impl;

import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.uc.dao.UcCustomDao;
import com.hotent.uc.manager.UcCustomManager;
import com.hotent.uc.model.CustomUser;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * 三方接口授权 服务实现类
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2024-02-28
 */
@Service
public class UcCustomManagerImpl extends BaseManagerImpl<UcCustomDao, CustomUser> implements UcCustomManager {

	@Override
	public CustomUser getDetail(String id) {
		CustomUser ucCustom = this.get(id);
		return ucCustom;
	}

	@Override
	@Transactional
	public void createOrUpdate(CustomUser ucCustom) {
		//新建或更新
		this.saveOrUpdate(ucCustom);
	}

	@Override
	public CustomUser getByCustomKey(String customKey) {
		return baseMapper.getByCustomKey(customKey);
	}
}
