package com.fjs.scenic.handler;

import java.util.Date;

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

import com.fjs.scenic.entity.user.User;
import com.fjs.scenic.service.user.UserService;
import com.fjs.scenic.utils.ReturnResult;

import me.chanjar.weixin.mp.bean.result.WxMpUser;

@Component
public class WxUserService {
	
	@Autowired
	private UserService userService;
	
	public ReturnResult optionUser(WxMpUser wxMpUser){
		User user = new User();
		user.setCreateTime(new Date());
		user.setHeadPic(wxMpUser.getHeadImgUrl());
		user.setNickName(wxMpUser.getNickname());
		user.setOpenid(wxMpUser.getOpenId());
		user.setSex(wxMpUser.getSex()+"");
		wxMpUser.getOpenId();
		
		return null;
	}

}
