Skip to content

Commit

Permalink
SocioboardUpdate 3.0
Browse files Browse the repository at this point in the history
Github Commit:
—---------------
-Implement refrral program
-Implement ewallet
-Implement image library
-Implement shareathon queue in content
studio module
-fixed some content studio bugs
  • Loading branch information
socioboard committed Aug 28, 2017
1 parent be4f025 commit c220dd5
Show file tree
Hide file tree
Showing 226 changed files with 5,803 additions and 1,906 deletions.
Binary file modified .vs/Socioboard/v14/.suo
Binary file not shown.
10 changes: 7 additions & 3 deletions .vs/restore.dg
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard\Socioboard.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Pinterest\Socioboard.Pinterest.xproj
#:E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Instagram\Socioboard.Instagram.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.LinkedIn\Socioboard.LinkedIn.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Twitter\Socioboard.Twitter.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\SociobordRssDataServices\SociobordRssDataServices.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Google\Socioboard.Google.xproj
E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Socioboard.Facebook\Socioboard.Facebook.xproj|E:\D DRIVE\socioboardgithub\githubUpdated\Socioboard-Core-3.0\src\Domain.Socioboard\Domain.Socioboard.xproj
82 changes: 41 additions & 41 deletions src/Api.Socioboard/Controllers/ContentStudioController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,51 +41,12 @@ public IActionResult GetAdvanceSearchData(string keywords)
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
return Ok(Repositories.ContentStudioRepository.GetAdvanceSearchdata(keywords, _redisCache, _appSettings));
}


//[HttpPost("saveDataIdForShare")]
//public IActionResult saveDataIdForShare(HttpRequestMessage shareData, [FromBody] Domain.Socioboard.Models.Mongo.ContentFeedsShareathon getAll)//List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> shareData
//{
// Object FacebookPageId = Request.Form["shareData"];
// string s = JsonConvert.SerializeObject(FacebookPageId);
// DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
// //string res = Repositories.ContentStudioRepository.saveContentDataIdReposi(shareData, fbuserIds, timeIntervals, _redisCache, _appSettings);
// return Ok(true);
//}

//[HttpPost("saveDataIdForShare")]
//public IActionResult saveDataIdForShare(Domain.Socioboard.Models.Mongo.postdata objdata)
//{

// //string s = JsonConvert.SerializeObject(FacebookPageId);
// DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
// //string res = Repositories.ContentStudioRepository.saveContentDataIdReposi(shareData, fbuserIds, timeIntervals, _redisCache, _appSettings);
// return Ok(true);
//}






[HttpPost("saveDataIdForShare")]
public IActionResult saveDataIdForShare(string fbuserIds, int timeIntervals)
{
//List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> shareData
var FacebookPageId = Request.Form["shareData"];
List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> lstshareData = JsonConvert.DeserializeObject<List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon>>(FacebookPageId);
var fbuserIds1 = Request.Form["FacebookPageId"];
//string s = JsonConvert.SerializeObject(FacebookPageId);
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
//string res = Repositories.ContentStudioRepository.saveContentDataIdReposi(shareData, fbuserIds, timeIntervals, _redisCache, _appSettings);
return Ok(true);
}



[HttpGet("GetYTAdvanceSearchData")]
public IActionResult GetYTAdvanceSearchData(Domain.Socioboard.Enum.NetworkType network, int skip, int count)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
skip = 0;
MongoRepository mongorepo = new MongoRepository("AdvanceSerachData", _appSettings);
if (skip + count < 100)
{
Expand Down Expand Up @@ -134,6 +95,7 @@ public IActionResult GetSortByData(string sortType, int skip, int count)
public IActionResult QuickTopics(Domain.Socioboard.Enum.NetworkType networkType, int skip, int count)
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
skip = 0;
MongoRepository mongorepo = new MongoRepository("AdvanceSerachData", _appSettings);
if (skip + count < 100)
{
Expand All @@ -154,5 +116,43 @@ public IActionResult QuickTopics(Domain.Socioboard.Enum.NetworkType networkType,
}


[HttpPost("saveDataIdForShare")]
public IActionResult saveDataIdForShare(long userId, string fbuserIds, int timeIntervals)
{
//List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> shareData
var FacebookPageId = Request.Form["shareData"];
List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> lstshareData = JsonConvert.DeserializeObject<List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon>>(FacebookPageId);

DatabaseRepository dbr = new DatabaseRepository(_logger, _appEnv);
string res = Repositories.ContentStudioRepository.saveContentDataIdReposi(lstshareData, userId, fbuserIds, timeIntervals, _redisCache, _appSettings, dbr);
return Ok(res);
}

[HttpGet("ShareathonQueue")]
public IActionResult ShareathonQueue(long userId)
{
MongoRepository mongorepo = new MongoRepository("AdvanceSerachData", _appSettings);
IList<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> lstdata = Repositories.ContentStudioRepository.ShareathonQueueReposi(userId, _appSettings);
return Ok(lstdata);

}


[HttpPost("DeleteShareathon")]
public IActionResult DeleteShareathon(string PageShareathodId)
{
string pagedata = Repositories.ContentStudioRepository.Deleteshareathon(PageShareathodId, _appSettings);
return Ok(pagedata);
}


[HttpGet("UserpageShareathon")]
public IActionResult UserpageShareathon(long userId)
{
List<Domain.Socioboard.Models.Mongo.ContentFeedsShareathon> lstPageShareathon = Repositories.ContentStudioRepository.updateShareathonByUserId(userId, _appSettings, _redisCache);
return Ok(lstPageShareathon);
}


}
}
82 changes: 82 additions & 0 deletions src/Api.Socioboard/Controllers/EwalletController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using Api.Socioboard.Model;
using Microsoft.AspNetCore.Cors;
using System.Xml;
using System.Text.RegularExpressions;
using Socioboard.Twitter.App.Core;
using MongoDB.Driver;
using Domain.Socioboard.Models;

// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

namespace Api.Socioboard.Controllers
{
[EnableCors("AllowAll")]
[Route("api/[controller]")]
public class EwalletController : Controller
{
public EwalletController(ILogger<EwalletController> logger, Microsoft.Extensions.Options.IOptions<Helper.AppSettings> settings, IHostingEnvironment env)
{
_logger = logger;
_appSettings = settings.Value;
_redisCache = new Helper.Cache(_appSettings.RedisConfiguration);
_env = env;
}
private readonly ILogger _logger;
private Helper.AppSettings _appSettings;
private Helper.Cache _redisCache;
private readonly IHostingEnvironment _env;

//Ads verfication

[HttpGet("GetEwalletTransactions")]
public IActionResult GetEwalletTransactions(long userid)
{
try
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
List<Ewallet> lsturl = dbr.Find<Ewallet>(t => t.UserId == userid).ToList();
if (lsturl != null)
{
return Ok(lsturl);
}
else
{
return NotFound();
}
}
catch(Exception ex)
{
return NotFound();
}


}

[HttpGet("UserBalance")]
public IActionResult UserBalance(long userid)
{
try
{
DatabaseRepository dbr = new DatabaseRepository(_logger, _env);
double AddMoney = dbr.Find<Ewallet>(t => t.UserId == userid && t.TransactionStatus == "Money Added").Sum(t => t.Amount);
double withdrawMoney = dbr.Find<Ewallet>(t => t.UserId == userid && t.TransactionStatus == "Money withdraw").Sum(t => t.Amount);
double Balance = AddMoney - withdrawMoney;
return Ok(Balance);
}
catch(Exception ex)
{
return BadRequest();
}


}

}
}
4 changes: 4 additions & 0 deletions src/Api.Socioboard/Controllers/GoogleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public IActionResult GoogleLogin(string code,Domain.Socioboard.Enum.SBAccountTyp
{
if (lstUser.First().ActivationStatus == Domain.Socioboard.Enum.SBUserActivationStatus.Active)
{
if (lstUser.First().RefrralCode == null)
{
lstUser.First().RefrralCode = "SOCIOBOARD_" + lstUser.First().Id;
}
DateTime d1 = DateTime.UtcNow;
//User userTable = dbr.Single<User>(t => t.EmailId == EmailId);
//userTable.LastLoginTime = d1;
Expand Down
2 changes: 1 addition & 1 deletion src/Api.Socioboard/Controllers/GroupMemberController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public IActionResult InviteGroupMembers(long groupId, string members)
string html = System.IO.File.ReadAllText(path);
html = html.Replace("[FirstName]", member.firstName);
html = html.Replace("[JoinLink]", _appSettings.Domain + "/Home/GroupInvite?Token=" + member.memberCode + "&email=" + member.email);
_emailSender.SendMailSendGrid(_appSettings.frommail, "", member.email, "", "", "Socioboard Group Invitation Link", html, _appSettings.SendgridUserName, _appSettings.SendGridPassword);
_emailSender.SendMailSendGrid(_appSettings.frommail, "", member.email, "", "", "Socioboard Team Invitation Link", html, _appSettings.SendgridUserName, _appSettings.SendGridPassword);
}

}
Expand Down
Loading

0 comments on commit c220dd5

Please sign in to comment.