| | |
| | | emailService.insert(tEmail); |
| | | } |
| | | } |
| | | |
| | | if(type == 1){//用户分享 |
| | | UserInfo userInfo1 = userInfoMapper.selectById(uid); |
| | | List<Map<String, Object>> query = userActivityInviteMapper.query(userInfo1.getCompanyId()); |
| | |
| | | |
| | | |
| | | @Override |
| | | public ResultUtil facebookLogin(String id, String name, String email, Double lat, Double lng, Integer uid, Integer language) throws Exception { |
| | | UserInfo userInfo = this.selectOne(new EntityWrapper<UserInfo>().eq("faceBookId", id).ne("flag", 3)); |
| | | public ResultUtil facebookLogin(String id, String name, String email, Double lat, Double lng, Integer uid, Integer language,int type) throws Exception { |
| | | UserInfo userInfo=null; |
| | | if(type==1){ |
| | | userInfo = this.selectOne(new EntityWrapper<UserInfo>().eq("faceBookId", id).ne("flag", 3)); |
| | | }else { |
| | | userInfo = this.selectOne(new EntityWrapper<UserInfo>().eq("twitterId", id).ne("flag", 3)); |
| | | } |
| | | if(null == userInfo){ |
| | | userInfo = new UserInfo(); |
| | | userInfo.setEmail(email); |
| | |
| | | userInfo.setBalance(0D); |
| | | userInfo.setIntegral(0); |
| | | userInfo.setPassWord(ShiroKit.md5("", salt)); |
| | | userInfo.setFaceBookId(id); |
| | | if(type==1){ |
| | | userInfo.setFaceBookId(id); |
| | | }else { |
| | | userInfo.setTwitterId(id); |
| | | } |
| | | userInfo.setState(1); |
| | | userInfo.setFlag(1); |
| | | userInfo.setInsertTime(new Date()); |
| | |
| | | } |
| | | emailService.insert(tEmail); |
| | | } |
| | | |
| | | |
| | | this.addCoupon(userInfo, language);//添加优惠券 |
| | | } |
| | | |