/// <summary>
        /// 商户修改绑定银行卡功能 add by caoheyang 20150511
        /// </summary>
        /// <param name="cardModifyBpm">参数实体</param>
        /// <returns></returns>
        public ResultModel <object> CardModifyB(CardModifyBPM cardModifyBpm)
        {
            FinanceCardModifyB boolRes = CheckCardModifyB(cardModifyBpm);

            if (boolRes != FinanceCardModifyB.Success)
            {
                return(ResultModel <object> .Conclude(boolRes));
            }
            using (IUnitOfWork tran = EdsUtilOfWorkFactory.GetUnitOfWorkOfEDS())
            {
                _businessFinanceAccountDao.Update(new BusinessFinanceAccount()
                {
                    Id          = cardModifyBpm.Id,
                    BusinessId  = cardModifyBpm.BusinessId,             //商户ID
                    TrueName    = cardModifyBpm.TrueName,               //户名
                    AccountNo   = DES.Encrypt(cardModifyBpm.AccountNo), //卡号(DES加密)
                    BelongType  = cardModifyBpm.BelongType,             //账号类别  0 个人账户 1 公司账户
                    OpenBank    = cardModifyBpm.OpenBank,               //开户行
                    OpenSubBank = cardModifyBpm.OpenSubBank,            //开户支行
                    UpdateBy    = cardModifyBpm.UpdateBy                //修改人  当前登录人
                });
                tran.Complete();
                return(ResultModel <object> .Conclude(SystemState.Success));
            }
        }
 /// <summary>
 /// 商户修改绑定银行卡功能有效性验证  add by caoheyang 20150511
 /// </summary>
 /// <param name="cardModifyBpm"></param>
 /// <returns></returns>
 private FinanceCardModifyB CheckCardModifyB(CardModifyBPM cardModifyBpm)
 {
     if (cardModifyBpm == null)
     {
         return(FinanceCardModifyB.NoPara);
     }
     if (cardModifyBpm.BelongType == (int)BusinessFinanceAccountBelongType.Conpany &&
         string.IsNullOrWhiteSpace(cardModifyBpm.OpenSubBank))   //公司帐户开户支行不能为空
     {
         return(FinanceCardModifyB.BelongTypeError);
     }
     return(FinanceCardModifyB.Success);
 }
Exemplo n.º 3
0
 public ResultModel <object> CardModifyB([FromBody] CardModifyBPM cardModifyBpm)
 {
     return(iBusinessFinanceAccountProvider.CardModifyB(cardModifyBpm));
 }