淘宝充值判断

This commit is contained in:
wanyongkang
2020-10-15 10:38:41 +08:00
parent 6207f41b5a
commit a9ce8c8d01

View File

@@ -583,7 +583,8 @@ namespace Home.Controllers
var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.ReceiverPhone : notifyOrder.ReceiverMobile; var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.ReceiverPhone : notifyOrder.ReceiverMobile;
if (phone.NotHas()) return false; if (phone.NotHas()) return false;
var userEntity = await m_UserService.Query(m => m.Phone == phone).FirstOrDefaultAsync(); var userEntity = await m_UserService.Query(m => m.Phone == phone || m.TaoBao == notifyOrder.BuyerNick).FirstOrDefaultAsync();
if (userEntity == null) if (userEntity == null)
{ {
@@ -597,6 +598,8 @@ namespace Home.Controllers
}; };
var ret = await m_UserService.Regist(userEntity); var ret = await m_UserService.Regist(userEntity);
if (ret.Code != ResultCode.C_SUCCESS) return false; if (ret.Code != ResultCode.C_SUCCESS) return false;
} else {
phone = userEntity.Phone;
} }
var amountInfo = new UpdateAmountRequest() var amountInfo = new UpdateAmountRequest()
@@ -608,10 +611,7 @@ namespace Home.Controllers
AttchInfo = notifyOrder.Tid AttchInfo = notifyOrder.Tid
}; };
var retAmount = await m_UserService.UpdateAmount(amountInfo); var retAmount = await m_UserService.UpdateAmount(amountInfo);
//判断是否是同一个旺旺 await m_CouponService.TaoBaoGive(userEntity.Id, 9, userEntity.TaoBao);
if(userEntity.TaoBao != notifyOrder.BuyerNick ){
await m_CouponService.TaoBaoGive(userEntity.Id, 9, userEntity.TaoBao);
}
var taobaoEntity = notifyOrder.MapTo<TaoBaoOrderEntity>(); var taobaoEntity = notifyOrder.MapTo<TaoBaoOrderEntity>();