package com.moral.api.pojo.vo.menu;
|
|
import com.moral.api.entity.Menu;
|
import com.moral.api.pojo.dto.menu.MenuDTO;
|
import com.moral.constant.ResponseCodeEnum;
|
|
/**
|
* @ClassName MenuInsertVO
|
* @Description TODO
|
* @Author 陈凯裕
|
* @Date 2021/4/26 11:40
|
* @Version TODO
|
**/
|
public class MenuInsertVO extends MenuVO {
|
|
public static MenuInsertVO convert(MenuDTO dto) {
|
if (dto.getCode() != ResponseCodeEnum.SUCCESS.getCode())
|
return null;
|
MenuInsertVO vo = new MenuInsertVO();
|
Menu menu = dto.getMenu();
|
vo.setId(menu.getId());
|
vo.setParentId(menu.getParentId());
|
vo.setName(menu.getName());
|
return vo;
|
}
|
}
|