package com.iamberry.wechat.service.home.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.drp.PlaceInfo;
import com.iamberry.wechat.core.entity.member.Member;
import com.iamberry.wechat.service.home.dao.HomeServiceDao;
import com.iamberry.wechat.service.mapper.HomeMemberMapper;
import com.iamberry.wechat.service.mapper.PlaceInfoMapper;
/**
 * @author 何秀刚
 * Class Description: DAO实现类
 * Create Date:2016年4月18日
 * Update Date:2016年4月18日
 */
@Repository
public class HomeServiceDaoImpl implements HomeServiceDao {

	@Autowired
	private PlaceInfoMapper placeInfoMapper;
	public void setMomeMemberMapper(HomeMemberMapper momeMemberMapper) {
		this.momeMemberMapper = momeMemberMapper;
	}
	
	@Autowired
	private HomeMemberMapper momeMemberMapper;
	public void setHomeMemberMapper(HomeMemberMapper memberMapper) {
		this.momeMemberMapper = memberMapper;
	}
	
	@Override
	public Member selectMemberInfoByOpenId(String openid) {
		// TODO Auto-generated method stub
		return momeMemberMapper.selectMemberInfoByOpenId(openid);
	}

	@Override
	public Integer updateWechatMemberInfoByByOpenid(Member member) {
		// TODO Auto-generated method stub
		return momeMemberMapper.updateWechatMemberInfoByByOpenid(member);
	}

	@Override
	public Integer insertMemberInfo(Member member) {
		// TODO Auto-generated method stub
		return momeMemberMapper.insertMemberInfo(member);
	}

	@Override
	public Integer updateUserResAndTypeByOpenid(Member member) {
		// TODO Auto-generated method stub
		return momeMemberMapper.updateUserResAndTypeByOpenid(member);
	}

	@Override
	public Integer updateMemberStatusByOpenId(String openid) {
		// TODO Auto-generated method stub
		return momeMemberMapper.updateMemberStatusByOpenId(openid);
	}

	@Override
	public Member selectMemberQrcodeUrlByOpenid(String openid) {
		// TODO Auto-generated method stub
		return momeMemberMapper.selectMemberQrcodeUrlByOpenid(openid);
	}

	@Override
	public Integer updateMemberQrcodeByOpenid(Member member) {
		// TODO Auto-generated method stub
		return momeMemberMapper.updateMemberQrcodeByOpenid(member);
	}

	@Override
	public PlaceInfo selectOnePlaceInfoByCode(String code) {
		// TODO Auto-generated method stub
		return placeInfoMapper.selectOnePlaceInfoByCode(code);
	}

	@Override
	public Integer updateOpenidById(PlaceInfo info) {
		// TODO Auto-generated method stub
		return placeInfoMapper.updateOpenidById(info);
	}

	@Override
	public Integer selectUserIntegralByOpenid(String openid) {
		// TODO Auto-generated method stub
		return momeMemberMapper.selectUserIntegralByOpenid(openid);
	}

	@Override
	public Member selectUserInfoByPlaceId(Integer placeId) {
		// TODO Auto-generated method stub
		return momeMemberMapper.selectUserInfoByPlaceId(placeId);
	}
}
