feat(REQ-2106): 日志操作类型枚举

This commit is contained in:
chenwenjian 2024-04-18 11:05:27 +08:00
parent 47928d8a66
commit abd891330f
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,41 @@
package cn.axzo.nanopart.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
/**
* 素材或广告位操作日志类型
*
* @author chenwenjian
* @version 1.0
* @date 2024/4/18 10:39
*/
@Getter
@AllArgsConstructor
public enum LogOperationTypeEnum {
CREATE("create", "新增"),
UPDATE("update", "编辑"),
DELETE("delete", "删除"),
UPDATE_STATUS("updateStatus", "更新状态");
private final String type;
private final String desc;
public static LogOperationTypeEnum getLogOperationType(String type) {
if (StringUtils.isEmpty(type)) {
return null;
}
return Arrays.stream(values())
.filter(item -> item.type.equals(type))
.findFirst()
.orElse(null);
}
}

View File

@ -108,11 +108,21 @@ public class MaterialResp extends PageMaterialResp {
*/
private Long createBy;
/**
* 创建人姓名
*/
private String createByName;
/**
* 更新人
*/
private Long updateBy;
/**
* 更新人姓名
*/
private String updateByName;
/**
* 所属终端取值CMS:安心筑CMSCMCMP安心筑工人端APP安心筑管理端APP
* <p>