package com.gic.haoban.manage.service.service.impl;

import java.util.Date;

import com.gic.commons.util.ToolUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper;
import com.gic.haoban.manage.service.entity.MemberUnionidRelated;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService;

@Service
public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService {

	@Autowired
	private MemberUnionidRelatedMapper mapper;
	
	@Override
	public String addMemberUnionidRelated(MemberUnionidRelatedDTO dto) {
		return ToolUtil.randomUUID();
	}

	@Override
	public MemberUnionidRelatedDTO getBySelfExternalUserId(String wxEnterpriseId, String selfExternalUserId) {
		MemberUnionidRelated unionidRelated = mapper.getBySelfExternalUserId(null,wxEnterpriseId, selfExternalUserId);
		return EntityUtil.changeEntityNew(MemberUnionidRelatedDTO.class, unionidRelated);
	}
}
