Service/CashAccountLogService.cs

(开头部分) 14KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ViewModel;
using ServiceCommon;
using Domain;
using Common;
using IDao;
using IService;
using System.Data;


namespace Service
{
    public class CashAccountLogService : ICashAccountLogService
    {
        private ICashAccountLogRepository _ICashaccountlog { get; set; }

        private IRechargeRuleRepository _IRecharegerule { get; set; }

        private ILssueVouchersRepository _ILssue { get; set; }

        private ICustomersVoucherLogRepository _ICusVoucher { get; set; }

        private ISendVoucherRepository _ISend { get; set; }

        private ICustomerRepository _ICustomer { get; set; }

        public CashAccountLogService(ILssueVouchersRepository ILssue, ICustomersVoucherLogRepository ICusVoucher,ISendVoucherRepository ISend, ICashAccountLogRepository ICashaccountlog, IRechargeRuleRepository IRecharegerule, ICustomerRepository ICustomer)
        {
            this._ICashaccountlog = ICashaccountlog;
            this._IRecharegerule = IRecharegerule;
            this._ICustomer = ICustomer;
            this._ILssue = ILssue;
            this._ISend = ISend;
            this._ICusVoucher = ICusVoucher;
        }

        /// <summary>
        /// 现金账户  充值或者消费的时候调用的业务逻辑 实现  如果是消费  CashAccountLogMdl只需传入customerId、AccountState和Spendmoney参数即可
        /// </summary>
        /// <param name="Mdl">充值记录model</param>
        /// <param name="SpendMoney">消费金额</param>
        /// <param name="Msg">报错的消息结果</param>
        /// <returns></returns>
        public bool insertApiCashAccountLog(decimal SpendMoney, out String Msg, CashAccountLogMdl Mdl = null)
        {
            bool flag = true;
            String StrMsg="";
            try
            {
                if (Mdl != null)
                {
                    decimal RuleMoney = 0;//充值或消费总额度
                    decimal OldMoney = 0;//原来的账户余额
                    decimal NewMoney = 0;//新的账户余额

                    CustomerMdl CML = GetCustomerMdl(Mdl.Customer_ID);
                    if (CML != null)
后面还有 293 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。