package cn.iocoder.yudao.module.mdm.service.item;
|
|
import cn.iocoder.yudao.module.mdm.controller.admin.item.vo.MdmItemSaveReqVO;
|
|
/**
|
* 单行导入的解析结果:失败时只带文案,成功时带组装好的 SaveReqVO。
|
*/
|
public record MdmItemRowResolution(String failureMessage, MdmItemSaveReqVO saveReqVO) {
|
|
public boolean isSuccess() {
|
return failureMessage == null;
|
}
|
|
public static MdmItemRowResolution failure(String failureMessage) {
|
return new MdmItemRowResolution(failureMessage, null);
|
}
|
|
public static MdmItemRowResolution success(MdmItemSaveReqVO saveReqVO) {
|
return new MdmItemRowResolution(null, saveReqVO);
|
}
|
}
|