package cn.stylefeng.team.portal.modular.management.factory;

import cn.stylefeng.team.portal.modular.management.entity.PortalNews;
import cn.stylefeng.team.portal.modular.management.pojo.request.PortalNewsRequest;

public class NewsFactory {

    public static void commonFillParam(PortalNewsRequest portalNewsRequest, PortalNews portalNews) {
        portalNews.setDesignId(portalNewsRequest.getDesignId());
        portalNews.setNewsCategoryId(portalNewsRequest.getNewsCategoryId());
        portalNews.setNewsTitle(portalNewsRequest.getNewsTitle());
        portalNews.setNewsSummary(portalNewsRequest.getNewsSummary());
        portalNews.setNewsContent(portalNewsRequest.getNewsContent());
        portalNews.setShowPublishTime(portalNewsRequest.getShowPublishTime());
        portalNews.setShowPublishUser(portalNewsRequest.getShowPublishUser());
        portalNews.setShowPhotoUser(portalNewsRequest.getShowPhotoUser());
        portalNews.setCoverFileId(portalNewsRequest.getCoverFileId());
        portalNews.setNewsStatus(portalNewsRequest.getNewsStatus());
        portalNews.setNewsTopFlag(portalNewsRequest.getNewsTopFlag());
        portalNews.setNewsSort(portalNewsRequest.getNewsSort());
        portalNews.setNewsType(portalNewsRequest.getNewsType());
        portalNews.setLinkUrl(portalNewsRequest.getLinkUrl());
    }

}
