From 51f538f6441253a7bcb73ddb9a57a88978667417 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sat, 23 Apr 2022 18:24:20 +0800 Subject: [PATCH] 1 --- .../APIServices/PurchaseOrderService.cs | 2 +- BBWY.Client/App.xaml.cs | 4 +- BBWY.Server.Business/Vender/VenderBusiness.cs | 8 +- BBWY.Server.Model/Db/Mds/Shops.cs | 100 ++++++++++++++++++ 4 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 BBWY.Server.Model/Db/Mds/Shops.cs diff --git a/BBWY.Client/APIServices/PurchaseOrderService.cs b/BBWY.Client/APIServices/PurchaseOrderService.cs index 9347a5b3..c063d583 100644 --- a/BBWY.Client/APIServices/PurchaseOrderService.cs +++ b/BBWY.Client/APIServices/PurchaseOrderService.cs @@ -106,7 +106,7 @@ namespace BBWY.Client.APIServices string buyerAccount, string sellerAccount) { - return SendRequest(globalContext.BBYWApiHost, "api/purchaseOrder/FastCreateOrder", new + return SendRequest(globalContext.BBYWApiHost, "api/purchaseOrder/NewFastCreateOrder", new { purchaseOrderMode, consignee, diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs index 5642637d..f6a33d56 100644 --- a/BBWY.Client/App.xaml.cs +++ b/BBWY.Client/App.xaml.cs @@ -28,8 +28,8 @@ namespace BBWY.Client var gl = new GlobalContext(); string userToken = string.Empty; #if DEBUG - userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDA1MTUxNjE5NTk0NTg4MTYwIiwidGVhbUlkIjoiMTQzOTg5OTEyMzk1NTI3MzcyOCIsImV4cCI6MTY3MTkwMTU1NH0.UaUubqP442qxVc6ppQt7FO0jcFs3w6KR6q1OeBuL1i8"; //齐越小一 - //"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTE0MjYwNjQwNTY3Mjk2IiwidGVhbUlkIjoiIiwiZXhwIjoxNjgyMDUyNjc0fQ.VhJugJphNMdrqeCpfhCDZhks2_64smil3ckDt2J9DSA"; //齐越青子 + userToken = //"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDA1MTUxNjE5NTk0NTg4MTYwIiwidGVhbUlkIjoiMTQzOTg5OTEyMzk1NTI3MzcyOCIsImV4cCI6MTY3MTkwMTU1NH0.UaUubqP442qxVc6ppQt7FO0jcFs3w6KR6q1OeBuL1i8"; //齐越小一 + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTEyNjg0MDk4MTYyNjg4IiwidGVhbUlkIjoiMTQzOTg5ODY0MDU0OTE1NDgxNiIsImV4cCI6MTY4MjI0MDM4OX0.qNk6qNTdDpa4icCi6LN4lKRTa2gTRXuzvCY-BKNXKUQ"; //齐越青子 #else var uid = e.Args.Count() > 0 ? e.Args.LastOrDefault(args => args.StartsWith("uid:")) : string.Empty; if (string.IsNullOrEmpty(uid)) diff --git a/BBWY.Server.Business/Vender/VenderBusiness.cs b/BBWY.Server.Business/Vender/VenderBusiness.cs index d0a4954e..6500137e 100644 --- a/BBWY.Server.Business/Vender/VenderBusiness.cs +++ b/BBWY.Server.Business/Vender/VenderBusiness.cs @@ -72,6 +72,12 @@ namespace BBWY.Server.Business public long SaveShopSetting(ShopSettingRequest shopSettingRequest) { + //根据shopId查询mds shop的主键Id + var shopId = shopSettingRequest.ShopId.ToString(); + var mdsShop = freeSqlMultiDBManager.MDSfsql.Select().Where(s => s.ShopId == shopId).ToOne(); + if (mdsShop == null) + throw new BusinessException($"mds未找到shopId {shopSettingRequest.ShopId}"); + if (shopSettingRequest.PurchaseAccountId == 0) { shopSettingRequest.PurchaseAccountId = idGenerator.NewLong(); @@ -100,7 +106,7 @@ namespace BBWY.Server.Business CreatorId = "", Deleted = 0, PurchasePlatformId = ((int)shopSettingRequest.PurchasePlatformId).ToString(), - ShopId = shopSettingRequest.ShopId.ToString() + ShopId = mdsShop.Id }; diff --git a/BBWY.Server.Model/Db/Mds/Shops.cs b/BBWY.Server.Model/Db/Mds/Shops.cs new file mode 100644 index 00000000..11ee9df0 --- /dev/null +++ b/BBWY.Server.Model/Db/Mds/Shops.cs @@ -0,0 +1,100 @@ +using FreeSql.DataAnnotations; +using System; + +namespace BBWY.Server.Model.Db.Mds +{ + + [Table(Name = "shops", DisableSyncStructure = true)] + public partial class Shops + { + + /// + /// Id + /// + [Column(StringLength = 50, IsPrimary = true, IsNullable = false)] + public string Id { get; set; } + + /// + /// 店铺Key + /// + + public string AppKey { get; set; } + + /// + /// 店铺Secret + /// + + public string AppSecret { get; set; } + + /// + /// 店铺Token + /// + + public string AppToken { get; set; } + + /// + /// 创建时间 + /// + [Column(DbType = "datetime")] + public DateTime CreateTime { get; set; } + + /// + /// 创建人Id + /// + [Column(StringLength = 50)] + public string CreatorId { get; set; } + + /// + /// 创建人 + /// + [Column(StringLength = 50, IsNullable = false)] + public string CreatorRealName { get; set; } + + /// + /// 0淘宝,1京东,2阿里巴巴 + /// + + public int? PlatformId { get; set; } + + /// + /// 平台名称 + /// + [Column(StringLength = 50)] + public string PlatformName { get; set; } + + + public string PurchaseAppKey { get; set; } + + + public string PurchaseAppSecret { get; set; } + + /// + /// 采购平台 + /// + [Column(StringLength = 50)] + public string PurchasePlatformId { get; set; } + + /// + /// 店铺ID + /// + + public string ShopId { get; set; } + + + public string ShopName { get; set; } + + /// + /// 店铺账号 + /// + + public string ShopNick { get; set; } + + /// + /// 店铺类型 + /// + + public string ShopType { get; set; } + + } + +}