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.PlatformCategoryAdminView;
|
import org.springframework.stereotype.Component;
|
|
@Component
|
public class PlatformCategoryViewAssembler {
|
|
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;
|
}
|
}
|