yangys
2025-11-05 10c5247722995e571b3fd4dbffb178964a9bd6ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.qianwen.smartman.modules.resource.wrapper;
 
import java.util.Objects;
import com.qianwen.smartman.common.cache.DictCache;
import com.qianwen.smartman.common.enums.DictEnum;
import com.qianwen.core.mp.support.BaseEntityWrapper;
import com.qianwen.core.tool.utils.BeanUtil;
import com.qianwen.smartman.modules.resource.entity.Sms;
import com.qianwen.smartman.modules.resource.vo.SmsVO;
 
 
public class SmsWrapper extends BaseEntityWrapper<Sms, SmsVO> {
    public static SmsWrapper build() {
        return new SmsWrapper();
    }
 
    public SmsVO entityVO(Sms sms) {
        SmsVO smsVO = (SmsVO) Objects.requireNonNull(BeanUtil.copy(sms, SmsVO.class));
        String categoryName = DictCache.getValue(DictEnum.SMS, sms.getCategory());
        String statusName = DictCache.getValue(DictEnum.YES_NO, sms.getStatus());
        smsVO.setCategoryName(categoryName);
        smsVO.setStatusName(statusName);
        return smsVO;
    }
}