6 changed files with 113 additions and 51 deletions
@ -0,0 +1,50 @@ |
|||||
|
using BBWY.Server.Business; |
||||
|
using BBWY.Server.Model.Dto; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace BBWY.Server.API.Controllers |
||||
|
{ |
||||
|
|
||||
|
public class EvaluationAssistantController : BaseApiController |
||||
|
{ |
||||
|
private EvaluationAssistantBusiness evaluationAssistantBusiness; |
||||
|
|
||||
|
public EvaluationAssistantController(IHttpContextAccessor httpContextAccessor, EvaluationAssistantBusiness evaluationAssistantBusiness) : base(httpContextAccessor) |
||||
|
{ |
||||
|
this.evaluationAssistantBusiness = evaluationAssistantBusiness; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增/编辑赠品模板
|
||||
|
/// </summary>
|
||||
|
/// <param name="request"></param>
|
||||
|
[HttpPost] |
||||
|
public void AddOrEditGiftTemplate([FromBody] AddOrEditGiftTemplateRequest request) |
||||
|
{ |
||||
|
evaluationAssistantBusiness.AddOrEditGiftTemplate(request); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取赠品模板列表
|
||||
|
/// </summary>
|
||||
|
/// <param name="shopId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("{shopId}")] |
||||
|
public IList<GiftTemplateResponse> GetGiftTemplateList([FromRoute] long shopId) |
||||
|
{ |
||||
|
return evaluationAssistantBusiness.GetGiftTemplateList(shopId); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除赠品模板
|
||||
|
/// </summary>
|
||||
|
/// <param name="giftTemplateId"></param>
|
||||
|
[HttpDelete("{giftTemplateId}")] |
||||
|
public void DeleteGiftTemplate([FromRoute] long giftTemplateId) |
||||
|
{ |
||||
|
evaluationAssistantBusiness.DeleteGiftTemplate(giftTemplateId); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -1,44 +0,0 @@ |
|||||
using FreeSql.DatabaseModel;using System; |
|
||||
using System.Collections; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Reflection; |
|
||||
using System.Threading.Tasks; |
|
||||
using Newtonsoft.Json; |
|
||||
using FreeSql.DataAnnotations; |
|
||||
|
|
||||
namespace BBWY.Server.Model.Db { |
|
||||
|
|
||||
[JsonObject(MemberSerialization.OptIn), Table(Name = "gifttemplatesku", DisableSyncStructure = true)] |
|
||||
public partial class Gifttemplatesku { |
|
||||
|
|
||||
[JsonProperty, Column(IsPrimary = true)] |
|
||||
public long Id { get; set; } |
|
||||
|
|
||||
[JsonProperty, Column(DbType = "datetime")] |
|
||||
public DateTime? CreateTime { get; set; } |
|
||||
|
|
||||
[JsonProperty] |
|
||||
public long? GiftTemplateId { get; set; } |
|
||||
|
|
||||
[JsonProperty, Column(DbType = "decimal(18,2)")] |
|
||||
public decimal? JdPrice { get; set; } |
|
||||
|
|
||||
[JsonProperty] |
|
||||
public string Logo { get; set; } |
|
||||
|
|
||||
[JsonProperty] |
|
||||
public long? ShopId { get; set; } |
|
||||
|
|
||||
[JsonProperty] |
|
||||
public string Sku { get; set; } |
|
||||
|
|
||||
[JsonProperty, Column(StringLength = 50)] |
|
||||
public string Spu { get; set; } |
|
||||
|
|
||||
[JsonProperty, Column(StringLength = 100)] |
|
||||
public string Title { get; set; } |
|
||||
|
|
||||
} |
|
||||
|
|
||||
} |
|
@ -0,0 +1,11 @@ |
|||||
|
using BBWY.Server.Model.Db; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace BBWY.Server.Model.Dto |
||||
|
{ |
||||
|
public class GiftTemplateResponse : GiftTemplate |
||||
|
{ |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue