Ejemplo n.º 1
0
 public ServiceResult <GetMerchantDetailOM> GetMerchantDetail(GetMerchantDetailIM im)
 {
     return(new ServiceResult <GetMerchantDetailOM>
     {
         Data = new MerchantComponent().GetMerchantDetail(im)
     });
 }
Ejemplo n.º 2
0
        public GetMerchantDetailOM GetMerchantDetail(GetMerchantDetailIM im)
        {
            var merchantDetail = new MerchantInformationDAC().GetMerchantDetailById(im.Id);

            if (merchantDetail == null)
            {
                Error($"{nameof(GetMerchantDetail)} 查询商家信息出错 id----{Newtonsoft.Json.JsonConvert.SerializeObject(im)}");
                throw new Exception("系统查询错误");
            }

            if (merchantDetail.Status != Status.Enabled || merchantDetail.IsPublic != Status.Enabled)
            {
                throw new CommonException(ReasonCode.MERCHANT_NOT_PUBLIC, MessageResources.MerchantNotPublic);
            }

            if (merchantDetail.AccountType == Entities.Enums.AccountType.User)
            {
                return(GetFiiiPayMerchantDetail(merchantDetail));
            }
            return(GetFiiiPosMerchantDetail(merchantDetail));
        }