diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs new file mode 100644 index 00000000..6184b91e --- /dev/null +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -0,0 +1,27 @@ +using BBWY.Common.Http; +using BBWY.Common.Models; +using BBWY.Server.Model; +using BBWY.Server.Model.Dto; +using Microsoft.Extensions.Options; +using Yitter.IdGenerator; + +namespace BBWY.Server.Business +{ + public class EvaluationAssistantBusiness : BasePlatformRelayBusiness, IDenpendency + { + private IFreeSql fsql; + + private IIdGenerator idGenerator; + + public EvaluationAssistantBusiness(RestApiService restApiService, IOptions options, YunDingBusiness yunDingBusiness, IFreeSql fsql, IIdGenerator idGenerator) : base(restApiService, options, yunDingBusiness) + { + this.fsql = fsql; + this.idGenerator = idGenerator; + } + + public void AddOrEditGiftTemplate(AddOrEditGiftTemplateRequest request) + { + + } + } +} diff --git a/BBWY.Server.Model/Db/EvaluationAssistant/GiftTemplate.cs b/BBWY.Server.Model/Db/EvaluationAssistant/GiftTemplate.cs new file mode 100644 index 00000000..f88327ce --- /dev/null +++ b/BBWY.Server.Model/Db/EvaluationAssistant/GiftTemplate.cs @@ -0,0 +1,30 @@ +using FreeSql.DataAnnotations; +using System; + +namespace BBWY.Server.Model.Db +{ + + [Table(Name = "gifttemplate", DisableSyncStructure = true)] + public partial class GiftTemplate { + + [Column(IsPrimary = true)] + public long Id { get; set; } + + [Column(DbType = "datetime")] + public DateTime? CreateTime { get; set; } + + public int GiftCount { get; set; } + + [Column(StringLength = 100)] + public string Name { get; set; } + + public Enums.Platform Platform { get; set; } + + public long ShopId { get; set; } + + [Column(StringLength = 50)] + public string Spu { get; set; } + + } + +} diff --git a/BBWY.Server.Model/Db/EvaluationAssistant/Gifttemplatesku.cs b/BBWY.Server.Model/Db/EvaluationAssistant/Gifttemplatesku.cs new file mode 100644 index 00000000..8467d4fb --- /dev/null +++ b/BBWY.Server.Model/Db/EvaluationAssistant/Gifttemplatesku.cs @@ -0,0 +1,44 @@ +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; } + + } + +} diff --git a/BBWY.Server.Model/Dto/Request/GiftTemplate/AddOrEditGiftTemplateRequest.cs b/BBWY.Server.Model/Dto/Request/GiftTemplate/AddOrEditGiftTemplateRequest.cs new file mode 100644 index 00000000..b6a4973d --- /dev/null +++ b/BBWY.Server.Model/Dto/Request/GiftTemplate/AddOrEditGiftTemplateRequest.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace BBWY.Server.Model.Dto +{ + public class AddOrEditGiftTemplateRequest + { + /// + /// 如果Id=0 则视为新增 + /// + public long Id { get; set; } + + /// + /// 赠品模板名称 + /// + public string GiftTemplateName { get; set; } + + /// + /// 店铺 + /// + public long ShopId { get; set; } + + /// + /// 模板SPU + /// + public string GiftSpu { get; set; } + + /// + /// 选中的赠品Sku + /// + public IList GiftSkus { get; set; } + } +}