mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:53:25 +08:00
【新增】增加DTO类库,将逐步完善dto层。 【修复】修复【分类】切换后,切换回来未清零原始数据,导致更新数据重复的问题。 【调整】移除模板库功能,防止出现审核因为模板库页面存在而导致的审核失败。暂将模板库的代码存放到会员QQ群内,方便下载使用。 【调整】代码生成器【Repository.tpl】移除Cache手动增删改,【SqlSugarSetup】增加sqlsugar自动检测增删改后清理二级缓存。 【调整】后端新增秒杀独立组件,用于区分团购及秒杀的差异,首页新增秒杀组件。 【优化】重写首页所有组件样式及接口数据获取效率。 【优化】优化拼团,秒杀,团购,接龙数据获取逻辑,提升列表及详情页面数据获取效率。 【优化】调整拼团,秒杀,团购,服务商品推广海报为新式海报效果。增加服务商品推广海报。 【优化】清理h5相关代码判断,移除h5支付组件,提高响应速度。 【优化】移除小程序前端冗余代码。加快代码执行效率。
83 lines
2.8 KiB
C#
83 lines
2.8 KiB
C#
/***********************************************************************
|
|
* Project: CoreCms
|
|
* ProjectName: 核心内容管理系统
|
|
* Web: https://www.corecms.net
|
|
* Author: 大灰灰
|
|
* Email: jianweie@163.com
|
|
* CreateTime: 2021/1/31 21:45:10
|
|
* Description: 暂无
|
|
***********************************************************************/
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using CoreCms.Net.Auth.HttpContextUser;
|
|
using CoreCms.Net.Configuration;
|
|
using CoreCms.Net.IServices;
|
|
using CoreCms.Net.Model.FromBody;
|
|
using CoreCms.Net.Model.ViewModels.UI;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SqlSugar;
|
|
|
|
namespace CoreCms.Net.Web.WebApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 团购调用接口数据
|
|
/// </summary>
|
|
[Route("api/[controller]/[action]")]
|
|
[ApiController]
|
|
public class GroupController : ControllerBase
|
|
{
|
|
|
|
private readonly IHttpContextUser _user;
|
|
private readonly ICoreCmsPromotionServices _coreCmsPromotionServices;
|
|
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public GroupController(IHttpContextUser user, ICoreCmsPromotionServices coreCmsPromotionServices)
|
|
{
|
|
_user = user;
|
|
_coreCmsPromotionServices = coreCmsPromotionServices;
|
|
}
|
|
|
|
|
|
//公共接口====================================================================================================
|
|
|
|
#region 获取秒杀团购列表===========================================================
|
|
/// <summary>
|
|
/// 获取秒杀团购列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<WebApiCallBack> GetList([FromBody] FMGroupGetListPost entity)
|
|
{
|
|
var jm = await _coreCmsPromotionServices.GetGroupList(entity.type, entity.status, entity.page, entity.limit);
|
|
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
#region 获取秒杀团购详情===========================================================
|
|
/// <summary>
|
|
/// 获取秒杀团购详情
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<WebApiCallBack> GetGoodsDetial([FromBody] FMGetGoodsDetial entity)
|
|
{
|
|
var jm = await _coreCmsPromotionServices.GetGroupDetail(entity.id, 0, entity.type, entity.needSku);
|
|
return jm;
|
|
}
|
|
#endregion
|
|
|
|
//验证接口====================================================================================================
|
|
|
|
|
|
}
|
|
}
|