示例#1
0
        private void FX3(int gid, int oid, string[] fromShareUserIds, decimal profit1, decimal profit2, decimal profit3)
        {
            string shareId = string.Empty;
            pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();

            ResultInfo <bool> resultIsExistByFromShareOrderId1 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[0])), 3);

            if (resultIsExistByFromShareOrderId1.Result && !resultIsExistByFromShareOrderId1.Data)
            {
                //三级级分销
                ResultInfo <bool> resultAddMyShareProfit1 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 3, profit3, Utility.Util.ParseHelper.ToInt(fromShareUserIds[0]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }

            ResultInfo <bool> resultIsExistByFromShareOrderId2 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[0])), 2);

            if (resultIsExistByFromShareOrderId2.Result && !resultIsExistByFromShareOrderId2.Data)
            {
                //二级级分销
                ResultInfo <bool> resultAddMyShareProfit2 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 2, profit2, Utility.Util.ParseHelper.ToInt(fromShareUserIds[1]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }

            ResultInfo <bool> resultIsExistByFromShareOrderId3 = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(Utility.Util.ParseHelper.ToInt(Utility.Util.ParseHelper.ToInt(fromShareUserIds[1])), 1);

            if (resultIsExistByFromShareOrderId3.Result && !resultIsExistByFromShareOrderId3.Data)
            {
                //一级分销
                ResultInfo <bool> resultAddMyShareProfit3 = pbsBasicMyShareProfitService.AddMyShareProfit(
                    Utility.Util.ParseHelper.ToInt(gid), 1, profit1, Utility.Util.ParseHelper.ToInt(fromShareUserIds[2]),
                    0, oid, DateTime.Now, DateTime.Now, 0, string.Empty, ref shareId);
            }
        }
示例#2
0
 public void TestIsExistByFromShareOrderIdAndShareLevel()
 {
     int fromShareOrderId = 50;
     int ShareLevel       = 1;
     pbs_basic_MyShareProfitService pbsBasicMyShareProfitService = new pbs_basic_MyShareProfitService();
     var result = pbsBasicMyShareProfitService.IsExistByFromShareOrderIdAndShareLevel(fromShareOrderId, ShareLevel);
 }