xin
2025-06-24 b5e0a4f030f4741825b7a8d3d65bc1c2ba616ea1
oying-system/src/main/java/com/oying/modules/pc/category/converter/PlatformCategoryViewAssembler.java
@@ -3,23 +3,21 @@
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 com.oying.modules.pc.category.view.PlatformCategoryAdminView;
import org.springframework.stereotype.Component;
@Component
public class PlatformCategoryViewAssembler {
    public PlatformCategoryView toPlatformCategoryResponse(PlatformCategory category) {
        PlatformCategoryView categoryView = new PlatformCategoryView();
    public PlatformCategoryAdminView toPlatformCategoryResponse(PlatformCategory category) {
        PlatformCategoryAdminView categoryView = new PlatformCategoryAdminView();
        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;
    }
}