From b394df082b875856884d6d02cce2a43c49ad6704 Mon Sep 17 00:00:00 2001 From: xin <1099200748@qq.com> Date: Fri, 30 May 2025 16:44:46 +0800 Subject: [PATCH] Merge branch 'feature/pc-base' into xin --- oying-system/src/main/java/com/oying/modules/pc/category/converter/PlatformCategoryViewAssembler.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/oying-system/src/main/java/com/oying/modules/pc/category/converter/PlatformCategoryViewAssembler.java b/oying-system/src/main/java/com/oying/modules/pc/category/converter/PlatformCategoryViewAssembler.java new file mode 100644 index 0000000..8b70f78 --- /dev/null +++ b/oying-system/src/main/java/com/oying/modules/pc/category/converter/PlatformCategoryViewAssembler.java @@ -0,0 +1,25 @@ +package com.oying.modules.pc.category.converter; + +import cn.hutool.core.bean.BeanUtil; +import com.oying.modules.pc.category.domain.PlatformCategory; +import com.oying.modules.pc.category.view.PlatformCategoryCustomerView; +import com.oying.modules.pc.category.view.PlatformCategoryView; +import org.springframework.stereotype.Component; + +@Component +public class PlatformCategoryViewAssembler { + + public PlatformCategoryView toPlatformCategoryResponse(PlatformCategory category) { + PlatformCategoryView categoryView = new PlatformCategoryView(); + BeanUtil.copyProperties(category, categoryView); + categoryView.setIconUrl(""); + return categoryView; + } + + public PlatformCategoryCustomerView toCustomerPlatformCategoryResponse(PlatformCategory category) { + PlatformCategoryCustomerView categoryView = new PlatformCategoryCustomerView(); + BeanUtil.copyProperties(category, categoryView); + categoryView.setIconUrl(""); + return categoryView; + } +} -- Gitblit v1.9.3