xin
2025-07-02 84277cefdc270f88cd9f2ece3419a428495c7cf2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
        return categoryView;
    }
 
    public PlatformCategoryCustomerView toCustomerPlatformCategoryResponse(PlatformCategory category) {
        PlatformCategoryCustomerView categoryView = new PlatformCategoryCustomerView();
        BeanUtil.copyProperties(category, categoryView);
        return categoryView;
    }
}