|
|
@@ -507,10 +507,15 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
public string SycnData(int BrandId, int OpType = 0)
|
|
|
{
|
|
|
string date = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
|
|
|
- string check = function.ReadInstance("/Balance/" + BrandId + "/" + date + ".txt");
|
|
|
+ string OpTypeString = "";
|
|
|
+ if(OpType > 0)
|
|
|
+ {
|
|
|
+ OpTypeString += "-" + OpType;
|
|
|
+ }
|
|
|
+ string check = function.ReadInstance("/Balance/" + BrandId + "/" + date + OpTypeString + ".txt");
|
|
|
if (string.IsNullOrEmpty(check))
|
|
|
{
|
|
|
- function.WritePage("/Balance/" + BrandId + "/", date + ".txt", DateTime.Now.ToString());
|
|
|
+ function.WritePage("/Balance/" + BrandId + "/", date + OpTypeString + ".txt", DateTime.Now.ToString());
|
|
|
// DoTradeProfit(BrandId, date, OpType);
|
|
|
// DoSubsidyProfit(BrandId, date, OpType);
|
|
|
RedisDbconn.Instance.AddList("SycnProfitQueue", BrandId + "#cut#" + date + "#cut#" + OpType + "#cut#" + SysUserName);
|
|
|
@@ -522,10 +527,15 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
public string SycnDataByCondi(int BrandId, string MakerCode, int OpType = 0)
|
|
|
{
|
|
|
string date = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
|
|
|
- string check = function.ReadInstance("/Balance/" + BrandId + "/" + MakerCode + "/" + date + ".txt");
|
|
|
+ string OpTypeString = "";
|
|
|
+ if(OpType > 0)
|
|
|
+ {
|
|
|
+ OpTypeString += "-" + OpType;
|
|
|
+ }
|
|
|
+ string check = function.ReadInstance("/Balance/" + BrandId + "/" + MakerCode + "/" + date + OpTypeString + ".txt");
|
|
|
if (string.IsNullOrEmpty(check))
|
|
|
{
|
|
|
- function.WritePage("/Balance/" + BrandId + "/" + MakerCode + "/", date + ".txt", DateTime.Now.ToString());
|
|
|
+ function.WritePage("/Balance/" + BrandId + "/" + MakerCode + "/", date + OpTypeString + ".txt", DateTime.Now.ToString());
|
|
|
UserForMakerCode forMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode) ?? new UserForMakerCode();
|
|
|
DoTradeProfitByCondi(forMakerCode.UserId, BrandId, date, OpType);
|
|
|
DoSubsidyProfitByCondi(forMakerCode.UserId, BrandId, date, OpType);
|