价格方案优化

This commit is contained in:
“wanyongkang”
2021-05-11 14:32:34 +08:00
parent 5305cb5e12
commit 7178575309
12 changed files with 43 additions and 287 deletions

View File

@@ -90,7 +90,7 @@ namespace Home.Controllers
var user_Info = await m_UserService.GetById(userInfo.UserId);
var ProductAccountCount = user_Info.ProductAccountCount;
if(user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)){
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
//根据折扣设置价格
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
@@ -740,7 +740,7 @@ namespace Home.Controllers
var ProductAccountCount = user_Info.ProductAccountCount;
var dis_price = 1000000M;
if(user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)){
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
//根据折扣设置价格
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
if (discount != null)
@@ -808,7 +808,7 @@ namespace Home.Controllers
//从user表获取用户信息
var user_Info = await m_UserService.GetById(userInfo.UserId);
if(user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)){
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
//根据折扣设置价格
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
@@ -872,7 +872,7 @@ namespace Home.Controllers
var user_Info = await m_UserService.GetById(userId);
var dis_price = 1000000M;
if(user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)){
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
//根据折扣设置价格
var discount = await m_ProductPriceSchemeService.GetById(user_Info.discount_id);
if (discount != null)

View File

@@ -289,15 +289,15 @@
<div style="font-size: 15px;">
<h3 style="margin-top: 0px;margin-bottom: 10px;display:inline;color:red;background-color:#FFFF00;">公告</h3><a style="cursor:pointer;display:inline;float:right;" onclick="know()">X</a>
<h4 style="margin-top: 10px;">聚IP官网已更新为自动更改折扣优惠价</h4>
<p>总消费超过200自动升级为白银9折</p>
<p>总消费超过500自动升级为黄金8折</p>
<p>...</p>
<p>几乎所有用户在此次自动更新后优惠都变的更大了,可能出现个别用户价格比之前的高,可联系客服帮您更改手动更改折扣。</p>
<p>如果您对价格有疑问也可联系客服帮您更改折扣!</p>
<p>如果您有更大用量或销量,可咨询客服获取更低的折扣!</p>
<p style="margin-top: 10px;">五一活动会员定向优惠抄底折扣将于5月10日结束。</p>
<p>活动结束后,所有会员将恢复原来价格。</p>
<p>对价格问题若有疑问,可联系在线客服帮您调价!</p>
<p>复工季活动将于5月15日结束</p>
<p>聚IP助力开工全部产品所有套餐9折狂欢价月卡低至61元量大价更低</p>
<p>其他活动:</p>
<p>1.动态IP一毛钱一天每用户限一次。</p>
<p>2.复工季聚IP助力开工全部产品所有套餐8折狂欢价月卡低至50多量大价更低</p>
<p>2.极客IP西瓜IP双月卡送一个月。</p>
<p>3.需求5个以上可联系客服设置优惠折扣</p>
</div>
<p >

View File

@@ -38,7 +38,7 @@
<a target="_blank" href="https://item.taobao.com/item.htm?spm=a230r.1.14.54.79837218R25iC8&id=640496688304&ns=1&abbucket=9#detail"><h4 style="color: #e45b4b;">欢迎淘宝下单每次下单都会随机赠送优惠券最低54元<br>优惠券支持所有套餐!<span style="color:#FFFF00;">点击去淘宝店铺付款&nbsp;<span class="glyphicon glyphicon-arrow-right"></span></span></h4></a>
</div>
<div class="col-md-3 col-md-offset-1" style="padding-top:2%;">
<h1>总消费满<span style="color: red;font-size:49px;">200</span>元,即可享受超值优惠价</h1>
<h1>需求<span style="color: red;font-size:49px;">五个</span>以上</h1>
<h2>联系客服设置优惠价</h2>
<a target="_blank" href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true"><h3 style="color: #e45b4b;">>>>联系客服<<<</h3></a>
</div>

View File

@@ -30,7 +30,7 @@
<a target="_blank" href="https://item.taobao.com/item.htm?spm=a230r.1.14.54.79837218R25iC8&id=640496688304&ns=1&abbucket=9#detail"><h4 style="color: #e45b4b;">欢迎淘宝下单每次下单都会随机赠送优惠券最低54元<br>优惠券支持所有套餐!<span style="color:#FFFF00;">点击去淘宝店铺付款&nbsp;<span class="glyphicon glyphicon-arrow-right"></span></span></h4></a>
</div>
<div class="col-md-3 col-md-offset-1" style="padding-top:2%;">
<h1>总消费满<span style="color: red;font-size:49px;">200</span>元,即可享受超值优惠价</h1>
<h1>需求<span style="color: red;font-size:49px;">五个</span>以上</h1>
<h2>联系客服设置优惠价</h2>
<a target="_blank" href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true"><h3 style="color: #e45b4b;">>>>联系客服<<<</h3></a>
</div>

View File

@@ -458,45 +458,13 @@
total= total < 0 ? 0 : total;
total = parseFloat(total.toFixed(2));
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '自动升级至 9 折会员';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '自动升级至 8 折会员';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '自动升级至 7 折会员';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '自动升级至 6.5 折会员';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '自动升级至 6 折会员';
}
var need_cost = 100000000;
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.OneBuyModel.ConnectCount * discount / 100 - this.OneBuyModel.CouponAmount;
}
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
}
return total.toFixed(2);
},
@@ -514,45 +482,14 @@
total= total < 0 ? 0 : total;
total = parseFloat(total.toFixed(2));
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '自动升级至 9 折会员';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '自动升级至 8 折会员';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '自动升级至 7 折会员';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '自动升级至 6.5 折会员';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '自动升级至 6 折会员';
}
var need_cost = 100000000;
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
}
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
}
return total.toFixed(2);
}

View File

@@ -228,45 +228,13 @@
total= total < 0 ? 0 : total;
total = parseFloat(total.toFixed(2));
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '自动升级至 9 折会员';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '自动升级至 8 折会员';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '自动升级至 7 折会员';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '自动升级至 6.5 折会员';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '自动升级至 6 折会员';
}
var need_cost = 100000000;
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.OneBuyModel.ConnectCount * count * discount / 100 - this.OneBuyModel.CouponAmount;
}
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
}
return total.toFixed(2);
}

View File

@@ -678,15 +678,15 @@
<div style="font-size: 15px;">
<h3 style="margin-top: 0px;margin-bottom: 10px;display:inline;color:red;background-color:#FFFF00;">公告</h3><a style="cursor:pointer;display:inline;float:right;" onclick="know()">X</a>
<h4 style="margin-top: 10px;">聚IP官网已更新为自动更改折扣优惠价</h4>
<p>总消费超过200自动升级为白银9折</p>
<p>总消费超过500自动升级为黄金8折</p>
<p>...</p>
<p>几乎所有用户在此次自动更新后优惠都变的更大了,可能出现个别用户价格比之前的高,可联系客服帮您更改手动更改折扣。</p>
<p>如果您对价格有疑问也可联系客服帮您更改折扣!</p>
<p>如果您有更大用量或销量,可咨询客服获取更低的折扣!</p>
<h4 style="margin-top: 10px;">五一活动会员定向优惠抄底折扣将于5月10日结束。</h4>
<p>活动结束后,所有会员将恢复原来价格。</p>
<p>对价格问题若有疑问,可联系在线客服帮您调价!</p>
<p>复工季活动将于5月15日结束</p>
<p>聚IP助力开工全部产品所有套餐9折狂欢价月卡低至61元量大价更低</p>
<p>其他活动:</p>
<p>1.动态IP一毛钱一天每用户限一次。</p>
<p>2.复工季聚IP助力开工全部产品所有套餐8折狂欢价月卡低至50多量大价更低</p>
<p>2.极客IP西瓜IP双月卡送一个月。</p>
<p>3.需求5个以上可联系客服设置优惠折扣</p>
</div>
<p >

View File

@@ -491,7 +491,7 @@
<div class="row" style="color:white;width:calc(100vw-1px);">
<div class="col-md-3 col-md-offset-1" style="padding-top:2%;text-align:center;">
<h3>总消费满<span style="color: red;font-size:49px;">200</span>元,即可享受超值优惠价</h3>
<h1>需求<span style="color: red;font-size:49px;">五个</span>以上</h1>
<h2>联系客服设置优惠价</h2>
<a target="_blank" href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true"><h3 style="color: #e45b4b;">>>>联系客服<<<</h3></a>
</div>
@@ -791,7 +791,7 @@
</div>
<div style="margin-left:26%">
<div style="border: 1px dashed #ccc;margin-top:30px;width:50%;margin-left: 63px;background-color:#FFCC33">
<p class="youhuiNew" style="padding-bottom:0px;">总消费满200元即可享受超值优惠价</p>
<p class="youhuiNew" style="padding-bottom:0px;">温馨提示需求5个以上可以联系客服设置优惠价</p>
<p class="youhuiNew" style="padding-top:0px;padding-bottom:0px;">开通后有任何问题可无理由退款,并支持自助提现</p>
</div>

View File

@@ -370,7 +370,7 @@
<div class="row" style="color:white;width:calc(100vw-1px);">
<div class="col-md-3 col-md-offset-1" style="padding-top:2%;text-align:center;">
<h3>总消费满<span style="color: red;font-size:49px;">200</span>元,即可享受超值优惠价</h3>
<h1>需求<span style="color: red;font-size:49px;">五个</span>以上</h1>
<h2>联系客服设置优惠价</h2>
<a target="_blank" href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true"><h3 style="color: #e45b4b;">>>>联系客服<<<</h3></a>
</div>
@@ -613,7 +613,7 @@
</div></div>
<div style="margin-left:26%">
<div style="border: 1px dashed #ccc;margin-top:30px;width:50%;margin-left: 63px;background-color:#FFCC33">
<p class="youhuiNew" style="padding-bottom:0px;">总消费满200元即可享受超值优惠价</p>
<p class="youhuiNew" style="padding-bottom:0px;">温馨提示需求5个以上可以联系客服设置优惠价</p>
<p class="youhuiNew" style="padding-top:0px;padding-bottom:0px;">开通后有任何问题可无理由退款,并支持自助提现</p>
</div>

View File

@@ -514,38 +514,6 @@
total = parseFloat(total.toFixed(2));
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '(自动升级至 9 折会员)';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '(自动升级至 8 折会员)';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '(自动升级至 7 折会员)';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '(自动升级至 6.5 折会员)';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '(自动升级至 6 折会员)';
}
var need_cost = 100000000;
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.OneBuyModel.ConnectCount * discount / 100 - this.OneBuyModel.CouponAmount;
}
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
if(total != 0.1){
//最低价
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount;
@@ -554,7 +522,6 @@
}
}
}
return total.toFixed(2);
},
@@ -572,43 +539,10 @@
total = total < 0 ? 0 : total;
total = parseFloat(total.toFixed(2));
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '(自动升级至 9 折会员)';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '(自动升级至 8 折会员)';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '(自动升级至 7 折会员)';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '(自动升级至 6.5 折会员)';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '(自动升级至 6 折会员)';
}
var need_cost = 100000000;
//计算折扣价
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix * discount / 100 - this.MoreBuyModel.CouponAmount;
}
//比较价格,走最低价
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
return total.toFixed(2);

View File

@@ -292,45 +292,10 @@
total= total < 0 ? 0 : total;
total = parseFloat(total.toFixed(2));
//自动折扣
if(@(userEntity.agent_id) == 0){
var consume_value = @(userEntity.ConsumeAmount);
var cost_money = total + consume_value;
var discount = 100;
if (cost_money>=200 && cost_money<500){
discount = 90;
this.auto_discount_text = '(自动升级至 9 折会员)';
} else if(cost_money>=500 && cost_money<1500) {
discount = 80;
this.auto_discount_text = '(自动升级至 8 折会员)';
} else if(cost_money>=1500 && cost_money<3000) {
discount = 70;
this.auto_discount_text = '(自动升级至 7 折会员)';
} else if(cost_money>=3000 && cost_money<6000) {
discount = 65;
this.auto_discount_text = '(自动升级至 6.5 折会员)';
} else if(cost_money>=6000) {
discount = 60;
this.auto_discount_text = '(自动升级至 6 折会员)';
}
var need_cost = 100000000;
if(discount != 100){
need_cost = @(Model.Package.LinePrice) * this.OneBuyModel.ConnectCount * count * discount / 100 - this.OneBuyModel.CouponAmount;
}
if(need_cost<total){
total = need_cost;
} else {
this.auto_discount_text = '';
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
//最低价
var min_cost = @(Model.Package.MinPrice) * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount;
if(total<min_cost){
total = min_cost;
}
return total.toFixed(2);

View File

@@ -263,7 +263,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var dis_price = 1000000M;
if(userEntity.agent_id == 0||(userEntity.agent_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(userEntity.discount_id);
if (discount != null)
@@ -273,54 +273,6 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
is_user_price = false;
}
}
if(userEntity.agent_id == 0){
var cost_price = price;
if(cost_price > dis_price){
cost_price = dis_price;
}
//自动使用折扣
var cost = 0M;
if (request.OrderType == OrderType.New || request.OrderType == OrderType.AgainBuy)
{
cost = cost_price * request.ConnectCount;
}
if (request.OrderType == OrderType.News)
{
var accounts = GreateBatchAccount(request.Account, request.MinPostfix, request.MaxPostfix);
cost = cost_price * request.ConnectCount * accounts.Count;
}
if (request.OrderType == OrderType.AgainBuys)
{
int count = request.Account.Split(",").Length;
cost = cost_price * request.ConnectCount * count;
}
var cost_money = cost + userEntity.ConsumeAmount;
var discount_reset = 100;
if (cost_money>=200 && cost_money<500){
discount_reset = 90;
} else if(cost_money>=500 && cost_money<1500) {
discount_reset = 80;
} else if(cost_money>=1500 && cost_money<3000) {
discount_reset = 70;
} else if(cost_money>=3000 && cost_money<6000) {
discount_reset = 65;
} else if(cost_money>=6000) {
discount_reset = 60;
}
if (discount != null)
{
if(discount_reset<discount.discount){
dis_price = packageEntity.LinePrice * discount_reset / 100;
}
} else {
dis_price = packageEntity.LinePrice * discount_reset / 100;
}
}
} else {
//根据会员价
var userPrice = await this.m_ProductUserPriceService.Query(true).FirstOrDefaultAsync(m => m.UserId == userId && m.PackageId == packageEntity.Id && m.Status == 1);
@@ -824,7 +776,7 @@ 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)){
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);
@@ -1009,7 +961,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
//折扣
var refundDayPrice = 10.00M;
var userEntity = await m_UserService.GetById(userId);
if(userEntity.agent_id == 0||(userEntity.agent_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(userEntity.discount_id);
if (discount != null){
@@ -1100,7 +1052,7 @@ 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)){
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;
@@ -1165,7 +1117,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
//折扣
var refundDayPrice = 10.00M;
var userEntity = await m_UserService.GetById(userId);
if(userEntity.agent_id == 0||(userEntity.agent_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(userEntity.discount_id);
if (discount != null){