最新代码
This commit is contained in:
@@ -59,6 +59,10 @@ public class CustomSecurityContextHolder {
|
||||
return Convert.toLong(get(SecurityConstants.DETAILS_DEPT_ID));
|
||||
}
|
||||
|
||||
public static String getUserId() {
|
||||
return Convert.toStr(get(SecurityConstants.DETAILS_USER_ID));
|
||||
}
|
||||
|
||||
public static void setDeptId(String deptId) {
|
||||
set(SecurityConstants.DETAILS_DEPT_ID, deptId);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.starry.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
@@ -52,10 +51,6 @@ public class BaseEntity<T> implements Serializable {
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
@Version
|
||||
@ApiModelProperty(value = "数据版本")
|
||||
private Long version;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.starry.common.utils;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/13 下午11:07
|
||||
**/
|
||||
public class IdUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 生成16位的UUID
|
||||
*
|
||||
* @return UUID
|
||||
*/
|
||||
public static String getUuid() {
|
||||
return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 12);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user