diff --git a/server/HoneyBox/src/HoneyBox.Admin.Business/Models/Goods/GoodsModels.cs b/server/HoneyBox/src/HoneyBox.Admin.Business/Models/Goods/GoodsModels.cs
index 5c49b4bd..54c2618f 100644
--- a/server/HoneyBox/src/HoneyBox.Admin.Business/Models/Goods/GoodsModels.cs
+++ b/server/HoneyBox/src/HoneyBox.Admin.Business/Models/Goods/GoodsModels.cs
@@ -184,6 +184,11 @@ public class GoodsCreateRequest
/// 下架金额
///
public decimal XiajiaJine { get; set; }
+
+ ///
+ /// 解锁金额(用户需消费满此金额才能看到此盒子,0表示无需解锁)
+ ///
+ public decimal UnlockAmount { get; set; }
}
///
@@ -288,6 +293,11 @@ public class GoodsListResponse
///
public int ChoujiangXianzhi { get; set; }
+ ///
+ /// 解锁金额
+ ///
+ public decimal UnlockAmount { get; set; }
+
///
/// 创建时间
///
diff --git a/server/HoneyBox/src/HoneyBox.Admin.Business/Services/GoodsService.cs b/server/HoneyBox/src/HoneyBox.Admin.Business/Services/GoodsService.cs
index 36ec09ae..f15df34d 100644
--- a/server/HoneyBox/src/HoneyBox.Admin.Business/Services/GoodsService.cs
+++ b/server/HoneyBox/src/HoneyBox.Admin.Business/Services/GoodsService.cs
@@ -129,6 +129,7 @@ public class GoodsService : IGoodsService
XiajiaLirun = (int)request.XiajiaLirun,
XiajiaAutoCoushu = (int)request.XiajiaAutoCoushu,
XiajiaJine = (int)request.XiajiaJine,
+ UnlockAmount = request.UnlockAmount,
Status = 0, // 默认下架
PrizeNum = 0,
IsFlw = (byte)(request.Type == 15 ? 1 : 0),
@@ -207,6 +208,7 @@ public class GoodsService : IGoodsService
goods.XiajiaLirun = (int)request.XiajiaLirun;
goods.XiajiaAutoCoushu = (int)request.XiajiaAutoCoushu;
goods.XiajiaJine = (int)request.XiajiaJine;
+ goods.UnlockAmount = request.UnlockAmount;
goods.IsFlw = (byte)(request.Type == 15 ? 1 : 0);
goods.UpdatedAt = DateTime.Now;
@@ -677,6 +679,7 @@ public class GoodsService : IGoodsService
FlwEndTime = goods.FlwEndTime,
OpenTime = goods.OpenTime,
ChoujiangXianzhi = goods.ChoujiangXianzhi,
+ UnlockAmount = goods.UnlockAmount,
CreatedAt = goods.CreatedAt,
UpdatedAt = goods.UpdatedAt
};
@@ -712,6 +715,7 @@ public class GoodsService : IGoodsService
FlwEndTime = goods.FlwEndTime,
OpenTime = goods.OpenTime,
ChoujiangXianzhi = goods.ChoujiangXianzhi,
+ UnlockAmount = goods.UnlockAmount,
GoodsDescribe = goods.GoodsDescribe,
NewIs = goods.NewIs,
IsShouZhe = goods.IsShouZhe,
diff --git a/server/HoneyBox/src/HoneyBox.Admin.Business/Services/UserBusinessService.cs b/server/HoneyBox/src/HoneyBox.Admin.Business/Services/UserBusinessService.cs
index d8779d51..674511ed 100644
--- a/server/HoneyBox/src/HoneyBox.Admin.Business/Services/UserBusinessService.cs
+++ b/server/HoneyBox/src/HoneyBox.Admin.Business/Services/UserBusinessService.cs
@@ -1099,8 +1099,7 @@ public class UserBusinessService : IUserBusinessService
if (request.UserId.HasValue)
{
- query = query.Where(u => u.Id == request.UserId.Value);
- query = query.Where(u => u.Uid == request.UserId.ToString());
+ query = query.Where(u => u.Id == request.UserId.Value || u.Uid == request.UserId.ToString());
}
if (!string.IsNullOrWhiteSpace(request.Mobile))
diff --git a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/api/business/goods.ts b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/api/business/goods.ts
index 6d82d5b3..4e895bc9 100644
--- a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/api/business/goods.ts
+++ b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/api/business/goods.ts
@@ -62,6 +62,7 @@ export interface GoodsListItem {
flwEndTime: string | null
openTime: string | null
choujiangXianzhi: number
+ unlockAmount: number
createdAt: string
updatedAt: string
}
@@ -81,6 +82,7 @@ export interface GoodsDetail extends GoodsListItem {
flwEndTime: string | null
openTime: string | null
choujiangXianzhi: number
+ unlockAmount: number
goodsDescribe: string | null
newIs: number
isShouZhe: number
@@ -124,6 +126,7 @@ export interface GoodsCreateRequest {
xiajiaLirun?: number
xiajiaAutoCoushu?: number
xiajiaJine?: number
+ unlockAmount?: number
}
/** 更新盒子请求 */
diff --git a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsEditDialog.vue b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsEditDialog.vue
index 19b59a9f..7952d401 100644
--- a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsEditDialog.vue
+++ b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsEditDialog.vue
@@ -497,6 +497,7 @@ const loadGoodsDetail = async () => {
formData.imgUrlDetail = detail.imgUrlDetail
formData.categoryId = detail.categoryId
formData.couponPro = detail.couponPro
+ formData.unlockAmount = (detail as any).unlockAmount || 0
// 福利屋时间
formData.flwStartTime = detail.flwStartTime ? formatDateTime(detail.flwStartTime) : ''
@@ -598,6 +599,7 @@ const handleSubmit = async () => {
xiajiaLirun: formData.xiajiaLirun,
xiajiaAutoCoushu: formData.xiajiaAutoCoushu,
xiajiaJine: formData.xiajiaJine,
+ unlockAmount: formData.unlockAmount,
}
await updateGoods(props.goodsId, requestData)
diff --git a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsTable.vue b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsTable.vue
index da7d437a..8da28c0d 100644
--- a/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsTable.vue
+++ b/server/HoneyBox/src/HoneyBox.Admin/admin-web/src/views/business/goods/components/GoodsTable.vue
@@ -62,6 +62,14 @@
+
+
+
+ ¥{{ row.unlockAmount }}
+ -
+
+
+
@@ -268,6 +276,11 @@ const formatTime = (time: string | null) => {
font-weight: 500;
}
+.unlock-value {
+ color: #409eff;
+ font-weight: 500;
+}
+
.image-error {
display: flex;
justify-content: center;