| | |
| | | private readonly ICoreCmsDistributionServices _coreCmsDistributionServices; |
| | | private readonly ICoreCmsAreaServices _coreCmsAreaServices; |
| | | |
| | | private readonly ICoreCmsGoodsCategoryServices _coreCmsGoodsCategoryServices; |
| | | /// <summary> |
| | | /// 构造函数 |
| | | ///</summary> |
| | | public CoreCmsStockController(IWebHostEnvironment webHostEnvironment |
| | | , ICoreCmsStockServices stockServices, ICoreCmsProductsServices productsServices, IHttpContextUser user, ICoreCmsStockLogServices stockLogServices, ISysUserServices sysUserServices |
| | | , ICoreCmsDistributionServices coreCmsDistributionServices |
| | | , ICoreCmsAreaServices coreCmsAreaServices) |
| | | , ICoreCmsAreaServices coreCmsAreaServices |
| | | , ICoreCmsGoodsCategoryServices coreCmsGoodsCategoryServices) |
| | | { |
| | | _webHostEnvironment = webHostEnvironment; |
| | | _stockServices = stockServices; |
| | |
| | | _sysUserServices = sysUserServices; |
| | | _coreCmsDistributionServices = coreCmsDistributionServices; |
| | | _coreCmsAreaServices = coreCmsAreaServices; |
| | | _coreCmsGoodsCategoryServices = coreCmsGoodsCategoryServices; |
| | | } |
| | | |
| | | #region 获取列表============================================================ |
| | |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [Description("首页数据")] |
| | | public AdminUiCallBack GetIndex() |
| | | public async Task<AdminUiCallBack> GetIndex() |
| | | { |
| | | //返回数据 |
| | | var jm = new AdminUiCallBack { code = 0 }; |
| | | |
| | | var stockType = EnumHelper.EnumToList<GlobalEnumVars.StockType>(); |
| | | stockType = stockType.Where(p => p.value < 3).ToList(); |
| | | |
| | | var categories = await _coreCmsGoodsCategoryServices.QueryListByClauseAsync(p => p.isShow, p => p.sort, OrderByType.Asc, true, true); |
| | | var categoriesTree = GoodsHelper.GetTree(categories, false); |
| | | jm.data = new |
| | | { |
| | | stockType, |
| | | stockType |
| | | |
| | | }; |
| | | return jm; |
| | | } |
| | |
| | | |
| | | var products = await _productsServices.GetProducts(); |
| | | |
| | | var distributions = await _coreCmsDistributionServices.QueryListByClauseAsync(p => p.isDelete == false && p.verifyStatus == 1, p => p.createTime, OrderByType.Desc, true, true); |
| | | var distributions = await _coreCmsDistributionServices.QueryListByClauseAsync(p => p.isDelete == false && p.verifyStatus == 1 && p.profession == "校园代理", p => p.createTime, OrderByType.Desc, true, true); |
| | | |
| | | jm.data = new |
| | | { |