移动系统liao
2024-11-12 1cb49b04ae6709e6054c328f5ed12bff9ca014c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/***********************************************************************
 *            Project: baifenBinfa
 *        ProjectName: 百分兵法管理系统                               
 *                Web: http://chuanyin.com                     
 *             Author:                                        
 *              Email:                               
 *         CreateTime: 202403/02   
 *        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
 
        //验证接口====================================================================================================
 
 
    }
}