public async Task recharge(BalanceDto dto, UserType roleId) { var rechangeEntity = dto.MapTo <RechargeEntity>(); var id = _rechangeRpo.InsertAndGetId(rechangeEntity); var orgId = _staffRepository.GetOrgId(dto.SalesMan).OrgId; var dataInOrg = new DataInOrgEntity { DataId = id.ToString(), DataType = (int)DataType.Recharge, OrgId = orgId, RoleId = ((int)roleId).ToString() }; _dataInOrgRepository.Inserts(dataInOrg); }
public async Task balance(BalanceDto dto, UserType roleId) { var entity = dto.MapTo <BalanceEntity>(); await _repo.ChangeBalance(entity); var orgId = _staffRepository.GetOrgId(dto.SalesMan).OrgId; var dataInOrg = new DataInOrgEntity { DataId = dto.UserId, DataType = (int)DataType.Balance, OrgId = orgId, RoleId = ((int)roleId).ToString() }; _dataInOrgRepository.Inserts(dataInOrg); }