From cf90e2d8daf29766864b36e6e021110c47441259 Mon Sep 17 00:00:00 2001 From: gwbvipvip Date: Thu, 18 Jan 2024 13:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseDto/DtoValidator.cs | 65 +------------ .../Entity/BPA_MemberInfo.cs | 91 ------------------- .../Entity/BPA_MemberTag.cs | 25 ----- 3 files changed, 1 insertion(+), 180 deletions(-) delete mode 100644 BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberInfo.cs delete mode 100644 BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberTag.cs diff --git a/BPA.KitChen.GroupMealOrder.Application/BaseDto/DtoValidator.cs b/BPA.KitChen.GroupMealOrder.Application/BaseDto/DtoValidator.cs index e065e0e..2c9cef7 100644 --- a/BPA.KitChen.GroupMealOrder.Application/BaseDto/DtoValidator.cs +++ b/BPA.KitChen.GroupMealOrder.Application/BaseDto/DtoValidator.cs @@ -14,69 +14,6 @@ namespace BPA.KitChen.StoreManagementOrder.Application.BaseDto public class DtoValidator { - /// - /// 验证会员 - /// - /// - /// - public static ValidationResult Member(string id) - { - var data = SqlSugarDb.Db.Queryable().First(x => x.Id == id&&x.IsDeleted==0); - return data == null ? new ValidationResult("会员不存在") : ValidationResult.Success; - } - - - /// - /// 验证会员标签的合法性 - /// - /// - /// - public static ValidationResult MemberTag(string id) - { - var data = SqlSugarDb.Db.Queryable().First(x=>x.Id==id); - return data == null ? new ValidationResult("会员标签不存在") : ValidationResult.Success; - } - /// - /// 验证会员标签的合法性 - /// - /// - /// - public static ValidationResult MemberTagList(List ids) - { - var data = SqlSugarDb.Db.Queryable().Where(x => ids.Contains(x.Id) && x.IsDeleted == 0&&x.Status== CommonStatus.ENABLE).ToList(); - return data.Count<=0 ? new ValidationResult("会员标签不存在") : ValidationResult.Success; - } - - /// - /// 会员平台 - /// - /// - /// - public static ValidationResult MemberPlatformType(int type) - { - return !System.Enum.IsDefined(typeof(PlatformType), type) ? new ValidationResult("平台类型不存在") : ValidationResult.Success; - - } - - /// - /// 会员平台 - /// - /// - /// - public static ValidationResult Status(int type) - { - return !System.Enum.IsDefined(typeof(CommonStatus), type) ? new ValidationResult("状态错误") : ValidationResult.Success; - - } - /// - /// 优惠券使用 - /// - /// - /// - public static ValidationResult CouponUseType(int type) - { - return !System.Enum.IsDefined(typeof(CouponUseType), type) ? new ValidationResult("状态错误") : ValidationResult.Success; - - } + } } diff --git a/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberInfo.cs b/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberInfo.cs deleted file mode 100644 index 44cbd35..0000000 --- a/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberInfo.cs +++ /dev/null @@ -1,91 +0,0 @@ -using BPA.KitChen.StoreManagementOrder.Core.Entity.Base; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BPA.KitChen.StoreManagementOrder.Core.Entity -{ - /// - /// 会员 - /// - [SugarTable("BPA_MemberInfo")] - public class BPA_MemberInfo : IBaseGroupIdEntity - { - - /// - /// - /// - [SugarColumn(IsNullable = true)] - public string NickName { get; set; } - /// - /// 0=未知 1=男 2=女 - /// - public int Sex { get; set; } - /// - /// 头像 - /// - [SugarColumn(IsNullable = true)] - public string HeadImgUrl { get; set; } - /// - /// 国家 - /// - [SugarColumn(IsNullable = true)] - public string Country { get; set; } - /// - /// 省 - /// - [SugarColumn(IsNullable = true)] - public string Province { get; set; } - /// - /// 市 - /// - [SugarColumn(IsNullable = true)] - public string City { get; set; } - /// - /// 县(区) - /// - [SugarColumn(IsNullable = true)] - public string County { get; set; } - /// - /// 具体地址 - /// - [SugarColumn(IsNullable = true)] - public string Address { get; set; } - /// - /// 出生日期 - /// - public DateTime Birthday { get; set; } - /// - /// 电话 - /// - [SugarColumn(IsNullable = true)] - public string Phone { get; set; } - /// - /// 真实姓名 - /// - [SugarColumn(IsNullable = true)] - public string RealName { get; set; } - /// - /// 身份证号码 - /// - [SugarColumn(IsNullable = true)] - public string CardNum { get; set; } - /// - /// 等级 - /// - [SugarColumn(IsNullable = true)] - public string Level_Id { get; set; } - /// - /// 向外展示那个平台的信息 0:默认 1.微信 2.支付宝 - /// - public int ShowPlatformType { get; set; } - - /// - /// 积分 - /// - public decimal Integral { get; set; } - } -} diff --git a/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberTag.cs b/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberTag.cs deleted file mode 100644 index 7e8eebb..0000000 --- a/BPA.KitChen.GroupMealOrder.Core/Entity/BPA_MemberTag.cs +++ /dev/null @@ -1,25 +0,0 @@ -using BPA.KitChen.StoreManagementOrder.Core.Entity.Base; -using SqlSugar; - -namespace BPA.KitChen.StoreManagementOrder.Core.Entity -{ - /// - /// 会员标签 - /// - [SugarTable("BPA_MemberTag")] - public class BPA_MemberTag : IBaseGroupIdEntity - { - /// - /// 会员标签名称 - /// - public string Name { get; set; } - /// - /// 排序 - /// - public int Sort { get; set; } - /// - /// 平台标签 0:默认 1.微信 2.支付宝 - /// - public int PlatformType { get; set; } - } -}