From ce710740e6e6c4da9e12d607b13f1b2ac3439c2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A1=C2=B7=C3=A6?= <279202647@qq.com>
Date: Sun, 14 Nov 2021 15:10:18 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E5=95=86=E5=93=81=E9=93=BE?=
=?UTF-8?q?=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../HuiYan/itemlabelsBusiness.cs | 21 +++++++++++++++++--
.../DTO/ItemlabelInfoDto.cs | 6 ++++++
src/Coldairarrow.Entity/HuiYan/items.cs | 4 ++++
.../vuepage/client/src/views/items/Index.vue | 4 ++--
4 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
index e68e130..5f33af7 100644
--- a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
+++ b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
@@ -78,7 +78,8 @@ namespace Coldairarrow.Business.HuiYan
{
GoodsId = b.GoodsId,
HasFilter = b.HasFilter,
- Platform = b.Platform
+ Platform = b.Platform,
+ GoodsUrl=b.GoodsUrl
};
select = select.BuildExtendSelectExpre();
@@ -124,6 +125,21 @@ namespace Coldairarrow.Business.HuiYan
Platform = (int)model.Platform
};
+ item.GoodsUrl = string.Empty;
+ switch (model.Platform)
+ {
+ case ItemPlatform.Taobao:
+ item.GoodsUrl = $"https://item.taobao.com/item.htm?id={item.GoodsId}";
+ break;
+ case ItemPlatform.Jd:
+ item.GoodsUrl = $"https://item.jd.com/{item.GoodsId}.html";
+ break;
+ case ItemPlatform.ALBB:
+ item.GoodsUrl = $"https://detail.1688.com/offer/{item.GoodsId}.html";
+ break;
+ }
+
+
int row = Db.Insert(item);
if (row <= 0)
@@ -320,7 +336,8 @@ namespace Coldairarrow.Business.HuiYan
{
GoodsId = b.GoodsId,
HasFilter = b.HasFilter,
- Platform = b.Platform
+ Platform = b.Platform,
+ GoodsUrl=b.GoodsUrl
};
select = select.BuildExtendSelectExpre();
diff --git a/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs b/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs
index 8e03aa2..9199c7a 100644
--- a/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs
+++ b/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs
@@ -23,6 +23,12 @@ namespace Coldairarrow.Entity.DTO
/// 宝贝ID
///
public string GoodsId { get; set; }
+
+ ///