/// <summary> /// 查询商品的易捷币抵用信息 /// </summary> public static CanInsteadCashDTO GetCommodityCashPercent(Guid?esAppId, OrderInsteadCashInputDTO input) { var emptyResult = new CanInsteadCashDTO { YJBInfo = new OrderInsteadCashDTO { Enabled = false }, YJCouponInfo = null }; if (!esAppId.HasValue) { return(emptyResult); } if (esAppId != Jinher.AMP.YJB.Deploy.CustomDTO.YJBConsts.YJAppId) { return(emptyResult); } return(YJBSV.GetCommodityCashPercent(input)); }
/// <summary> /// 查询用户可用的商品的抵现比例 /// </summary> public static CanInsteadCashDTO GetCommodityCashPercent(OrderInsteadCashInputDTO input) { var emptyResult = new CanInsteadCashDTO { YJBInfo = new OrderInsteadCashDTO { Enabled = false }, YJCouponInfo = new YJCouponCanInsteadCashDTO { YJCoupons = new List <MUserCouponDto>() } }; if (input == null || input.Commodities == null || input.Commodities.Count == 0) { return(emptyResult); } var result = Instance.GetCommodityCashPercent(input); LogHelper.Info("YJBSV.GetCommodityCashPercent,输入:" + JsonHelper.JsonSerializer(input) + ",输出:" + JsonHelper.JsonSerializer(result)); if (result == null) { return(emptyResult); } return(result); }
public CanInsteadCashDTO GetCommodityCashPercent(OrderInsteadCashInputDTO input) { ResultDTO <CanInsteadCashDTO> result = null; try { Jinher.AMP.YJB.ISV.Facade.YJBInfoFacade facade = new YJB.ISV.Facade.YJBInfoFacade(); //facade.ContextDTO = AuthorizeHelper.CoinInitAuthorizeInfo(); result = facade.GetCommodityCashPercent(input); } catch (Exception ex) { LogHelper.Error("YJBSV.GetCommodityCashPercent服务异常,获取商品的抵现比例信息异常。 输入:" + JsonHelper.JsonSerializer(input), ex); } if (result != null && result.IsSuccess) { return(result.Data); } else { LogHelper.Error("YJBSV.GetCommodityCashPercent服务失败,获取商品的抵现比例信息失败。 输入:" + JsonHelper.JsonSerializer(input) + ",返回:" + JsonHelper.JsonSerializer(result)); return(null); } }