All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.migoo.framework.infra.convert.developer.sms.SmsChannelConvert Maven / Gradle / Ivy

The newest version!
package xyz.migoo.framework.infra.convert.developer.sms;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import xyz.migoo.framework.common.pojo.PageResult;
import xyz.migoo.framework.common.pojo.SimpleData;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelCreateReqVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelRespVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelSimpleRespVO;
import xyz.migoo.framework.infra.controller.developer.sms.vo.channel.SmsChannelUpdateReqVO;
import xyz.migoo.framework.infra.dal.dataobject.developer.sms.SmsChannelDO;
import xyz.migoo.framework.infra.dal.dataobject.developer.sms.SmsTemplateDO;
import xyz.migoo.framework.sms.core.property.SmsChannelProperties;

import java.util.List;

import static xyz.migoo.framework.common.enums.CommonStatus.isDisabled;

@Mapper
public interface SmsChannelConvert {

    SmsChannelConvert INSTANCE = Mappers.getMapper(SmsChannelConvert.class);

    SmsChannelDO convert(SmsChannelCreateReqVO bean);

    SmsChannelDO convert(SmsChannelUpdateReqVO bean);

    SmsChannelRespVO convert(SmsChannelDO bean);

    List convertList(List list);

    PageResult convertPage(PageResult page);

    SmsChannelProperties convert01(SmsChannelDO bean);

    List convertList02(List list);

    List convertList03(List list);

    List convertList04(List list);

    default SimpleData convert(SmsTemplateDO bean) {
        return new SimpleData(bean.getCode(), bean.getName(), isDisabled(bean.getStatus()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy