Himall.Web/Areas/SellerAdmin/Controllers/AccountController.cs

(开头部分) 4KB

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

using Himall.Core;
using Himall.IServices;
using Himall.IServices.QueryModel;
using Himall.Model;
using Himall.Web.Areas.Admin.Models;
using Himall.Web.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Web.Mvc;

namespace Himall.Web.Areas.SellerAdmin.Controllers
{
	public class AccountController : BaseSellerController
	{
		public AccountController()
		{
		}

		public ActionResult AccountDetail(long id)
		{
			AccountInfo account = ServiceHelper.Create<IAccountService>().GetAccount(id);
			if (account.ShopId != base.CurrentSellerManager.ShopId)
			{
				throw new HimallException(string.Concat("不存在该结算信息", id));
			}
			return View(account);
		}

		[HttpPost]
		[UnAuthorize]
		public JsonResult DetailList(long accountId, int enumOrderTypeId, DateTime? startDate, DateTime? endDate, int page, int rows)
		{
			AccountQuery accountQuery = new AccountQuery()
			{
				StartDate = startDate,
				EndDate = (endDate.HasValue ? new DateTime?(endDate.Value.AddDays(1)) : endDate),
				AccountId = accountId,
				PageSize = rows,
				EnumOrderType = (AccountDetailInfo.EnumOrderType)enumOrderTypeId,
				PageNo = page,
				ShopId = new long?(base.CurrentSellerManager.ShopId)
			};
			PageModel<AccountDetailInfo> accountDetails = ServiceHelper.Create<IAccountService>().GetAccountDetails(accountQuery);
			var list = 
				from p in accountDetails.Models.ToList()
				select new { Id = p.Id, OrderType = p.OrderType, OrderTypeDescription = p.OrderType.ToDescription(), OrderId = p.OrderId, ProductActualPaidAmount = p.ProductActualPaidAmount, FreightAmount = p.FreightAmount, CommissionAmount = p.CommissionAmount, RefundCommisAmount = p.RefundCommisAmount, RefundTotalAmount = p.RefundTotalAmount, Date = p.Date.ToString(), OrderDate = p.OrderDate.ToString(), OrderRefundsDates = p.OrderRefundsDates };
			return Json(new { rows = list, total = accountDetails.Total });
		}

		[HttpPost]
		[UnAuthorize]
		public JsonResult List(int status, int page, int rows)
		{
			AccountQuery accountQuery = new AccountQuery()
			{
				Status = new AccountInfo.AccountStatus?((AccountInfo.AccountStatus)status),
				PageSize = rows,
				PageNo = page,
后面还有 68 行代码,购买后查看完整代码

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

AI 解读

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

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