public static void Update(Guid companyId, Account account, string operatorAccount) { var repository = Factory.CreateAccountRepository(); repository.Save(companyId, account); if (account.Type == AccountType.Receiving) { //将此账号设置为VIP账户 AccountBaseService.SetVipAccount(account.No); } var companysrv = SMSCompanySmsParamService.Query(account.Type, companyId); if (companysrv == null) { var company = CompanyService.GetCompanyInfo(companyId); var emp = EmployeeService.QueryCompanyAdmin(companyId); //绑定收款账号 SMSCompanySmsParamService.SaveAccount(new ChinaPay.SMS.Service.Domain.CompanySmsParam() { AccountNo = account.No, CompanyId = company.Id, CompanyName = company.AbbreviateName, CompanyType = company.Type, CompanyNo = emp.Login, AccountType = AccountType.Receiving }); } else { companysrv.AccountNo = account.No; //修改收付款账号绑定 SMSCompanySmsParamService.UpdateAccount(companysrv); } // 记录日志 saveAddLog("收/付款账号", string.Format("账号:{0},账号类型:{1},是否有效:{2},账号绑定时间:{3}", account.No, account.Type.GetDescription(), account.Valid == true ? "是" : "否", account.Time.ToString()), account.No, operatorAccount); }
public static void Enable(Guid companyId, AccountType type, string operatorAccount) { Account orginAccount = Query(companyId, type); UpdateStatus(companyId, type, true); if (type == AccountType.Receiving) { //将此账号设置为VIP账户 AccountBaseService.SetVipAccount(orginAccount.No); } // 记录日志 saveUpdateLog("收/付款账号", string.Format("公司Id:{0},账号:{1},账号类型:{2},账号状态:{3}", companyId, orginAccount.No, orginAccount.Type.GetDescription(), orginAccount.Valid == true ? "是" : "否"), string.Format("公司Id:{0},账号:{1},账号类型:{2},账号状态:{3}", companyId, orginAccount.No, orginAccount.Type.GetDescription(), "是"), orginAccount.No, operatorAccount); }