agent_update
This commit is contained in:
@@ -787,15 +787,22 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
|
||||
//根据折扣设置价格
|
||||
var score_money = 0.00M;
|
||||
if((userEntity.agent_id == 0||(userEntity.agent_id != 0 && userEntity.discount_id != 0)) && userEntity.discount_id >= 0){
|
||||
// if((userEntity.agent_id == 0||(userEntity.agent_id != 0 && userEntity.discount_id != 0)) && userEntity.discount_id >= 0){
|
||||
// //获取代理折扣
|
||||
// var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
|
||||
// var packageEntity = await m_ProductPackageService.GetById(order.PackageId);
|
||||
// var price = packageEntity.LinePrice * discount.discount / 100;
|
||||
// score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * price;
|
||||
// } else {
|
||||
// var agentPriceEntity = await m_AgentPriceService.Query(m => m.agent_id == order.agent_id && m.package_id == order.PackageId).FirstOrDefaultAsync();
|
||||
// score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * agentPriceEntity.price;
|
||||
// }
|
||||
if(agentEntity.discount_id != 0){
|
||||
//获取代理折扣
|
||||
var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
|
||||
var packageEntity = await m_ProductPackageService.GetById(order.PackageId);
|
||||
var price = packageEntity.LinePrice * discount.discount / 100;
|
||||
score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * price;
|
||||
} else {
|
||||
var agentPriceEntity = await m_AgentPriceService.Query(m => m.agent_id == order.agent_id && m.package_id == order.PackageId).FirstOrDefaultAsync();
|
||||
score_money = order.PaymentAmount - order.ConnectCount * order.AccountCount * agentPriceEntity.price;
|
||||
}
|
||||
|
||||
|
||||
@@ -1077,14 +1084,18 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
//
|
||||
|
||||
var re_money = 0.00M;
|
||||
if((userEntity.agent_id == 0||(userEntity.agent_id != 0 && userEntity.discount_id != 0)) && userEntity.discount_id >= 0){
|
||||
//获取代理折扣
|
||||
// if((userEntity.agent_id == 0||(userEntity.agent_id != 0 && userEntity.discount_id != 0)) && userEntity.discount_id >= 0){
|
||||
// //获取代理折扣
|
||||
// var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
|
||||
// re_money = useDay * (refundDayPrice - (product.RefundDayPrice).ToDecimal() * discount.discount / 100) * accountInfo.ConnectCount;
|
||||
// } else {
|
||||
// var agentPriceEntity = await m_AgentPriceService.Query(m => m.agent_id == order.agent_id && m.package_id == order.PackageId).FirstOrDefaultAsync();
|
||||
// //使用天数 回补佣金
|
||||
// re_money = useDay * (refundDayPrice - agentPriceEntity.refund) * accountInfo.ConnectCount;
|
||||
// }
|
||||
if(agentEntity.discount_id != 0){
|
||||
var discount = await m_ProductPriceSchemeService.GetById(agentEntity.discount_id);
|
||||
re_money = useDay * (refundDayPrice - (product.RefundDayPrice).ToDecimal() * discount.discount / 100) * accountInfo.ConnectCount;
|
||||
} else {
|
||||
var agentPriceEntity = await m_AgentPriceService.Query(m => m.agent_id == order.agent_id && m.package_id == order.PackageId).FirstOrDefaultAsync();
|
||||
//使用天数 回补佣金
|
||||
re_money = useDay * (refundDayPrice - agentPriceEntity.refund) * accountInfo.ConnectCount;
|
||||
}
|
||||
|
||||
//佣金
|
||||
|
||||
Reference in New Issue
Block a user