public static string Channelrebateapplyalllist(int pageindex, int pagesize, int comid, string operstatus) { int totalcount = 0; IList <Member_channel_rebateApplylog> list = new Member_channel_rebateApplylogData().Channelrebateapplyalllist(pageindex, pagesize, comid, operstatus, out totalcount); if (list.Count > 0) { var result = from b in list select new { b.id, b.applytime, b.applytype, b.applydetail, b.applymoney, b.opertor, b.opertime, b.operstatus, b.operremark, b.zhuanzhangsucimg, zhuanzhangsucimgurl = FileSerivce.GetImgUrl(b.zhuanzhangsucimg), b.comid, b.channelid, channelinfo = new Member_channel_rebateApplyaccountData().GetchanelrebateApplyaccount(b.channelid), }; return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalcount = totalcount })); } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "" })); } }
public static string Confirmcompletedakuan(int id, int operstatus, int opertor, string operremark, int zhuanzhangsucimg) { int r = new Member_channel_rebateApplylogData().Confirmcompletedakuan(id, operstatus, opertor, operremark, zhuanzhangsucimg); if (r > 0) { return(JsonConvert.SerializeObject(new { type = 100, msg = "成功" })); } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "" })); } }
public static string Channelrebateapplylist(int pageindex, int pagesize, int channelid, string operstatus) { int totalcount = 0; IList <Member_channel_rebateApplylog> list = new Member_channel_rebateApplylogData().Channelrebateapplylist(pageindex, pagesize, channelid, operstatus, out totalcount); if (list.Count > 0) { return(JsonConvert.SerializeObject(new { type = 100, msg = list, totalcount = totalcount })); } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "" })); } }
public static string Channelapplyrebate(int channelid, string applytype, string applydetail, decimal applymoney, int comid) { Member_Channel m = new MemberChannelData().GetChannelDetail(channelid); if (m != null) { decimal rebatemoney = m.Rebatemoney; if (rebatemoney < applymoney) { return(JsonConvert.SerializeObject(new { type = 1, msg = "提现金额不可大于账户余额" })); } Member_channel_rebateApplylog applylog = new Member_channel_rebateApplylog { id = 0, applytime = DateTime.Now, applytype = applytype, applydetail = applydetail, applymoney = applymoney, channelid = channelid, operstatus = 0, comid = comid }; int r = new Member_channel_rebateApplylogData().Insrebateapplylog(applylog); if (r > 0) { ////账户提现,返佣表和 渠道表变动 //获得渠道人的返佣余额 decimal channelrebatemoney = new Member_channel_rebatelogData().Getrebatemoney(channelid); //返佣记录 Member_channel_rebatelog rebatelog = new Member_channel_rebatelog { id = 0, channelid = channelid, orderid = 0, payment = 2, payment_type = "返佣提现", proid = "0", proname = applytype + "-" + applydetail, subdatetime = DateTime.Now, ordermoney = 0, rebatemoney = -applymoney, over_money = decimal.Round(channelrebatemoney - applymoney, 2), comid = comid }; //增加返佣记录 同时增加渠道人的返佣金额 new Member_channel_rebatelogData().Editrebatelog(rebatelog); new Member_channel_rebatelogData().Editchannelrebate(rebatelog.channelid, rebatelog.over_money); return(JsonConvert.SerializeObject(new { type = 100, msg = "成功" })); } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "意外错误" })); } } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "意外错误" })); } }