Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cda205d0
authored
Mar 10, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:检测人员管理
1 parent
417c7707
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
467 additions
and
58 deletions
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectorController.java
aus-config/pom.xml
aus-core/src/main/java/com/glsx/usedcar/consts/common/SymbolConsts.java
aus-core/src/main/java/com/glsx/usedcar/consts/inspect/JpaQueryConstants.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectorOpLogRepository.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectorRepository.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/Inspector.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectorOpLog.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectorService.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorAddVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorDetailRespVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorOpLogRespVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorQryVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorRespVO.java
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorUpdateVO.java
aus-framework/src/main/java/org/summerframework/core/enums/ErrorCodeEnum.java
aus-framework/src/main/java/org/summerframework/core/util/StringUtils.java
aus-framework/src/main/java/org/summerframework/orm/dictionary/Dictionary_.java
aus-framework/src/main/java/org/summerframework/orm/entity/AuditingEntity_.java
aus-framework/src/main/java/org/summerframework/orm/entity/AuditingTimeEntity_.java
aus-admin/src/main/java/com/glsx/usedcar/web/rest/inspect/InspectorController.java
View file @
cda205d
...
...
@@ -6,6 +6,7 @@ import com.glsx.usedcar.module.inspect.vo.InspectorAddVO;
import
com.glsx.usedcar.module.inspect.vo.InspectorQryVO
;
import
com.glsx.usedcar.module.inspect.vo.InspectorRespVO
;
import
com.glsx.usedcar.module.inspect.vo.InspectorUpdateVO
;
import
com.glsx.usedcar.module.inspect.vo.InspectorDetailRespVO
;
import
com.glsx.usedcar.resp.BaseResp
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
...
...
@@ -79,7 +80,8 @@ public class InspectorController {
}
@Operation
(
summary
=
"删除检测师"
,
description
=
"根据检测师ID删除检测师(逻辑删除)"
)
@PostMapping
(
"/delete/{id}"
)
// @PostMapping("/delete/{id}")
@Deprecated
public
BaseResp
<
Void
>
deleteInspector
(
@Parameter
(
description
=
"检测师ID"
,
required
=
true
)
@NotNull
(
message
=
"检测师ID不能为空"
)
...
...
@@ -100,9 +102,34 @@ public class InspectorController {
return
BaseResp
.
success
();
}
@Operation
(
summary
=
"禁用/启用检测师"
,
description
=
"根据检测师ID修改状态,0-禁用,1-启用"
)
@PostMapping
(
"/status/{id}"
)
public
BaseResp
<
Void
>
updateStatus
(
@Parameter
(
description
=
"检测师ID"
,
required
=
true
)
@NotNull
(
message
=
"检测师ID不能为空"
)
@Positive
(
message
=
"检测师ID必须为正数"
)
@PathVariable
(
"id"
)
Long
id
,
@Parameter
(
description
=
"状态值:0-禁用,1-启用"
,
required
=
true
)
@NotNull
(
message
=
"状态值不能为空"
)
@RequestParam
(
"status"
)
Integer
status
)
{
log
.
info
(
"禁用/启用检测师请求: ID={}, status={}"
,
id
,
status
);
try
{
inspectorService
.
updateStatus
(
id
,
status
);
}
catch
(
BusinessCodeException
be
)
{
log
.
error
(
"禁用/启用检测师失败!业务异常!"
,
be
);
return
BaseResp
.
fail
(
StrUtil
.
toString
(
be
.
getCode
()),
be
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"禁用/启用检测师失败!系统异常!"
,
e
);
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
}
return
BaseResp
.
success
();
}
@Operation
(
summary
=
"分页查询检测师"
,
description
=
"分页查询检测师列表,支持姓名或手机号模糊查询,自动过滤逻辑删除数据"
)
@PostMapping
(
"/page"
)
public
BaseResp
<
Page
<
InspectorRespVO
>>
pageInspectors
(
@Valid
ated
@RequestBody
Pagination
<
InspectorQryVO
>
pagination
)
{
public
BaseResp
<
Page
<
InspectorRespVO
>>
pageInspectors
(
@Valid
@RequestBody
Pagination
<
InspectorQryVO
>
pagination
)
{
log
.
info
(
"分页查询检测师请求: offset={}, limit={}"
,
pagination
.
getOffset
(),
pagination
.
getLimit
());
try
{
...
...
@@ -113,4 +140,25 @@ public class InspectorController {
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
}
}
@Operation
(
summary
=
"查询检测师详情"
,
description
=
"查询检测师账号基本信息和操作日志"
)
@GetMapping
(
"/detail/{id}"
)
public
BaseResp
<
InspectorDetailRespVO
>
getDetail
(
@Parameter
(
description
=
"检测师ID"
,
required
=
true
)
@NotNull
(
message
=
"检测师ID不能为空"
)
@Positive
(
message
=
"检测师ID必须为正数"
)
@PathVariable
(
"id"
)
Long
id
)
{
log
.
info
(
"查询检测师详情请求: ID={}"
,
id
);
try
{
InspectorDetailRespVO
result
=
inspectorService
.
getDetail
(
id
);
return
BaseResp
.
success
(
result
);
}
catch
(
BusinessCodeException
be
)
{
log
.
error
(
"查询检测师详情失败!业务异常!"
,
be
);
return
BaseResp
.
fail
(
StrUtil
.
toString
(
be
.
getCode
()),
be
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"查询检测师详情失败!系统异常!"
,
e
);
return
BaseResp
.
fail
(
"系统异常: "
+
e
.
getMessage
());
}
}
}
aus-config/pom.xml
View file @
cda205d
...
...
@@ -15,6 +15,12 @@
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-config
</artifactId>
...
...
aus-core/src/main/java/com/glsx/usedcar/consts/common/SymbolConsts.java
View file @
cda205d
...
...
@@ -10,4 +10,7 @@ public interface SymbolConsts {
/** % */
String
PERCENT
=
"%"
;
/** 逗号 */
String
COMMA
=
","
;
}
aus-core/src/main/java/com/glsx/usedcar/consts/inspect/JpaQueryConstants.java
View file @
cda205d
...
...
@@ -25,6 +25,16 @@ public interface JpaQueryConstants {
String
KEYWORD
=
"keyword"
;
/**
* 城市编码,精确匹配
*/
String
REGION
=
"region"
;
/**
* 账号状态,精确匹配
*/
String
STATUS
=
"status"
;
/**
* 创建时间
*/
String
UPDATE_TIME
=
"updateTime"
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectorOpLogRepository.java
0 → 100644
View file @
cda205d
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
dao
;
import
com.glsx.usedcar.module.inspect.entity.InspectorOpLog
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.querydsl.QuerydslPredicateExecutor
;
import
org.springframework.stereotype.Repository
;
import
org.summerframework.orm.BaseRepository
;
import
java.util.List
;
/**
* 检测师操作日志数据访问层
* @author yangwei
* @since 2026/3/9
*/
@Repository
public
interface
InspectorOpLogRepository
extends
BaseRepository
<
InspectorOpLog
,
Long
>,
JpaSpecificationExecutor
<
InspectorOpLog
>,
QuerydslPredicateExecutor
<
InspectorOpLog
>
{
/**
* 根据检测师ID查询操作日志列表
*
* @param inspectorId 检测师ID
* @return 操作日志列表
*/
List
<
InspectorOpLog
>
findByInspectorIdAndDeleteFlag
(
Long
inspectorId
,
String
deleteFlag
);
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/inspect/dao/InspectorRepository.java
View file @
cda205d
...
...
@@ -6,6 +6,7 @@ import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import
org.springframework.stereotype.Repository
;
import
org.summerframework.orm.BaseRepository
;
import
java.util.List
;
import
java.util.Optional
;
/**
...
...
@@ -26,6 +27,14 @@ public interface InspectorRepository extends BaseRepository<Inspector, Long>, Jp
Optional
<
Inspector
>
findByPhoneAndDeleteFlag
(
String
phone
,
String
deletedFlag
);
/**
* 根据手机号查询检测师
*
* @param phone 手机号
* @return 检测师信息
*/
List
<
Inspector
>
findByPhone
(
String
phone
);
/**
* 根据ID查询检测师
*
* @param id 检测师ID
...
...
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/Inspector.java
View file @
cda205d
...
...
@@ -14,6 +14,8 @@ import org.summerframework.orm.validator.UpdateValidGroup;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
jakarta
.
persistence
.
GenerationType
.
IDENTITY
;
...
...
@@ -82,6 +84,13 @@ public class Inspector extends AuditingEntity implements Serializable {
private
String
region
;
/**
* 所属区域
*/
@Size
(
max
=
128
,
groups
=
{
CreateValidGroup
.
class
,
UpdateValidGroup
.
class
})
@Column
(
name
=
"REGION_NAME"
,
nullable
=
true
,
length
=
128
)
private
String
regionName
;
/**
* 手机号
*/
@Size
(
max
=
20
,
groups
=
{
CreateValidGroup
.
class
,
UpdateValidGroup
.
class
})
...
...
@@ -117,5 +126,13 @@ public class Inspector extends AuditingEntity implements Serializable {
@Column
(
name
=
"REMARK"
,
nullable
=
true
,
length
=
512
)
private
String
remark
;
@OneToMany
(
mappedBy
=
"inspector"
,
fetch
=
FetchType
.
LAZY
,
cascade
=
{
CascadeType
.
PERSIST
,
CascadeType
.
MERGE
},
orphanRemoval
=
true
)
@OrderBy
(
"createTime DESC"
)
private
List
<
InspectorOpLog
>
inspectorOpLogs
=
new
ArrayList
<>();
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/inspect/entity/InspectorOpLog.java
0 → 100644
View file @
cda205d
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
entity
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
jakarta.persistence.*
;
import
jakarta.validation.constraints.Size
;
import
lombok.*
;
import
org.hibernate.annotations.DynamicInsert
;
import
org.hibernate.annotations.DynamicUpdate
;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
org.summerframework.orm.entity.AuditingEntity
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
static
jakarta
.
persistence
.
GenerationType
.
IDENTITY
;
/**
* 检测师操作日志表(InspectorOpLog)实体类
* @author yangwei
* @since 2026/3/9
*/
@Entity
@Getter
@Setter
@Builder
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"inspectors_op_log"
)
@EntityListeners
(
AuditingEntityListener
.
class
)
public
class
InspectorOpLog
extends
AuditingEntity
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
8929192115233965496L
;
public
interface
Summary
{
}
/**
* 主键ID
*/
@Id
@GeneratedValue
(
strategy
=
IDENTITY
)
@Column
(
name
=
"ID"
,
unique
=
true
,
nullable
=
false
)
@JsonView
(
value
=
Summary
.
class
)
private
Long
id
;
/**
* inspectors.id关联外键
*/
@JsonView
(
value
=
Summary
.
class
)
@Column
(
name
=
"INSPECTOR_ID"
,
nullable
=
false
)
private
Long
inspectorId
;
/**
* 操作描述
*/
@JsonView
(
value
=
Summary
.
class
)
@Size
(
max
=
256
,
groups
=
{})
@Column
(
name
=
"DESCRIPET"
,
nullable
=
true
,
length
=
256
)
private
String
description
;
/**
* 删除标识 N:未删除 D:已删除
*/
@Builder
.
Default
@Column
(
name
=
"DELETE_FLAG"
,
nullable
=
false
,
length
=
1
)
private
String
deleteFlag
=
"N"
;
/**
* 关联的检测师
*/
@ManyToOne
(
fetch
=
FetchType
.
LAZY
)
@JoinColumn
(
name
=
"INSPECTOR_ID"
,
insertable
=
false
,
updatable
=
false
)
private
Inspector
inspector
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/service/InspectorService.java
View file @
cda205d
This diff is collapsed.
Click to expand it.
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorAddVO.java
View file @
cda205d
...
...
@@ -2,6 +2,7 @@ package com.glsx.usedcar.module.inspect.vo;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.NotNull
;
import
jakarta.validation.constraints.Pattern
;
import
jakarta.validation.constraints.Size
;
import
lombok.Data
;
...
...
@@ -22,20 +23,59 @@ public class InspectorAddVO implements Serializable {
@Serial
private
static
final
long
serialVersionUID
=
374733149988979493L
;
@Schema
(
description
=
"姓名"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"张三"
)
@Schema
(
description
=
"姓名(最大 20 个字符)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
maxLength
=
20
,
example
=
"张三"
)
@NotBlank
(
message
=
"姓名不能为空"
)
@Size
(
max
=
64
,
message
=
"姓名长度不能超过64
个字符"
)
@Size
(
max
=
20
,
message
=
"姓名长度不能超过{max}
个字符"
)
private
String
name
;
@Schema
(
description
=
"手机号"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"13800138000"
)
@Schema
(
description
=
"手机号(11 位)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"13800138000"
,
maxLength
=
11
)
@NotBlank
(
message
=
"手机号不能为空"
)
@Pattern
(
regexp
=
"^1[3-9]\\d{9}$"
,
message
=
"手机号格式不正确"
)
@Size
(
max
=
20
,
message
=
"手机号长度不能超过20
个字符"
)
@Size
(
max
=
11
,
message
=
"手机号长度不能超过{max}
个字符"
)
private
String
phone
;
@Schema
(
description
=
"初始密码"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"123456"
)
@NotBlank
(
message
=
"初始密码不能为空"
)
@Size
(
min
=
6
,
max
=
20
,
message
=
"密码长度必须在6-20个字符之间"
)
private
String
password
;
/**
* 所属区域
*/
@Schema
(
description
=
"城市编码(最大 128 个字符)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
maxLength
=
128
,
example
=
"110000"
)
@NotBlank
(
message
=
"城市不能为空"
)
private
String
region
;
/**
* 所属区域
*/
@Schema
(
description
=
"城市名称(最大 128 个字符)"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
maxLength
=
128
,
example
=
"北京"
)
@NotBlank
(
message
=
"城市不能为空"
)
private
String
regionName
;
/**
* 状态 1:正常 0:禁用
*/
@Schema
(
description
=
"状态 1:正常 0:禁用"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"1"
)
@NotNull
(
message
=
"状态不能为空"
)
private
Integer
status
;
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorDetailRespVO.java
0 → 100644
View file @
cda205d
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 检测师详情响应VO(包含账号信息和操作日志)
* @author yangwei
* @since 2026/3/9
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"检测师详情响应VO"
)
public
class
InspectorDetailRespVO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
-
2193361787441423520L
;
/**
* 账号基本信息
*/
@Schema
(
description
=
"账号基本信息"
)
private
InspectorRespVO
account
;
/**
* 操作日志列表
*/
@Schema
(
description
=
"操作日志列表"
)
private
List
<
InspectorOpLogRespVO
>
opLogs
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorOpLogRespVO.java
0 → 100644
View file @
cda205d
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
com.glsx.usedcar.module.inspect.entity.InspectorOpLog
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 检测师操作日志查询响应VO
* @author yangwei
* @since 2026/3/9
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"检测师操作日志查询响应VO"
)
public
class
InspectorOpLogRespVO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
-
2193361787441423519L
;
/**
* 主键ID
*/
@Schema
(
description
=
"主键ID"
)
@JsonView
(
value
=
InspectorOpLog
.
Summary
.
class
)
private
Long
id
;
/**
* 操作描述
*/
@Schema
(
description
=
"操作描述"
)
@JsonView
(
value
=
InspectorOpLog
.
Summary
.
class
)
private
String
description
;
/**
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
@JsonView
(
value
=
InspectorOpLog
.
Summary
.
class
)
private
LocalDateTime
createTime
;
/**
* 创建人
*/
@Schema
(
description
=
"创建人"
)
private
String
createBy
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorQryVO.java
View file @
cda205d
...
...
@@ -22,5 +22,11 @@ public class InspectorQryVO implements Serializable {
@Schema
(
description
=
"关键字"
)
private
String
keyword
;
@Schema
(
description
=
"城市编码"
)
private
String
region
;
@Schema
(
description
=
"账号状态:0-禁用,1-启用"
)
private
Integer
status
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorRespVO.java
View file @
cda205d
package
com
.
glsx
.
usedcar
.
module
.
inspect
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
com.glsx.usedcar.module.inspect.entity.Inspector
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* 检测师查询响应VO
...
...
@@ -17,6 +20,7 @@ import java.io.Serializable;
* @since 2026/02/10 14:12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"检测师查询响应VO"
)
...
...
@@ -39,12 +43,6 @@ public class InspectorRespVO implements Serializable {
@JsonView
(
value
=
Inspector
.
Summary
.
class
)
private
String
name
;
/**
* 初始密码
*/
@Schema
(
description
=
"初始密码"
)
@JsonView
(
value
=
Inspector
.
Summary
.
class
)
private
String
password
;
/**
* 手机号
...
...
@@ -60,6 +58,23 @@ public class InspectorRespVO implements Serializable {
@Schema
(
description
=
"状态 1:正常 0:禁用"
)
private
Integer
status
=
1
;
@Schema
(
description
=
"所属区域"
,
example
=
"110000"
)
private
String
region
;
@Schema
(
description
=
"所属区域名称"
,
example
=
"北京"
)
private
String
regionName
;
/**
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
}
aus-core/src/main/java/com/glsx/usedcar/module/inspect/vo/InspectorUpdateVO.java
View file @
cda205d
...
...
@@ -2,9 +2,9 @@ package com.glsx.usedcar.module.inspect.vo;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.Pattern
;
import
jakarta.validation.constraints.Size
;
import
lombok.Data
;
import
org.summerframework.orm.validator.UpdateValidGroup
;
import
java.io.Serial
;
import
java.io.Serializable
;
...
...
@@ -21,53 +21,44 @@ public class InspectorUpdateVO implements Serializable {
@Serial
private
static
final
long
serialVersionUID
=
-
3467823456789012345L
;
/**
* 姓名
*/
@Schema
(
description
=
"姓名"
,
example
=
"张三"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@NotBlank
(
message
=
"姓名不能为空"
,
groups
=
UpdateValidGroup
.
class
)
@Size
(
max
=
64
,
message
=
"姓名长度不能超过64个字符"
,
groups
=
UpdateValidGroup
.
class
)
@Schema
(
description
=
"姓名"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
maxLength
=
20
,
example
=
"张三"
)
@NotBlank
(
message
=
"姓名不能为空"
)
@Size
(
max
=
20
,
message
=
"姓名长度不能超过{max}个字符"
)
private
String
name
;
/**
* 工号
*/
@Schema
(
description
=
"工号"
,
example
=
"EMP001"
)
@Size
(
max
=
64
,
message
=
"工号长度不能超过64个字符"
,
groups
=
UpdateValidGroup
.
class
)
private
String
employeeNo
;
@Schema
(
description
=
"手机号"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"13800138000"
,
maxLength
=
11
)
@NotBlank
(
message
=
"手机号不能为空"
)
@Pattern
(
regexp
=
"^1[3-9]\\d{9}$"
,
message
=
"手机号格式不正确"
)
@Size
(
max
=
11
,
message
=
"手机号长度不能超过{max}个字符"
)
private
String
phone
;
/**
* 所属区域
*/
@Schema
(
description
=
"所属区域"
,
example
=
"北京"
)
@Size
(
max
=
128
,
message
=
"所属区域长度不能超过128个字符"
,
groups
=
UpdateValidGroup
.
class
)
@Schema
(
description
=
"所属区域"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
maxLength
=
128
,
example
=
"110000"
)
@NotBlank
(
message
=
"所属区域不能为空"
)
private
String
region
;
/**
* 手机号
*/
@Schema
(
description
=
"手机号"
,
example
=
"13800138000"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
)
@NotBlank
(
message
=
"手机号不能为空"
,
groups
=
UpdateValidGroup
.
class
)
@Size
(
max
=
20
,
message
=
"手机号长度不能超过{max}个字符"
,
groups
=
UpdateValidGroup
.
class
)
private
String
phone
;
/**
* 邮箱
*/
@Schema
(
description
=
"邮箱"
,
example
=
"zhangsan@example.com"
)
@Size
(
max
=
128
,
message
=
"邮箱长度不能超过{max}个字符"
,
groups
=
UpdateValidGroup
.
class
)
private
String
email
;
/**
* 状态 1:正常 0:禁用
*/
@Schema
(
description
=
"状态 1:正常 0:禁用"
,
example
=
"1"
)
private
Integer
status
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
,
example
=
"优秀检测师"
)
@Size
(
max
=
512
,
message
=
"备注长度不能超过{max}个字符"
,
groups
=
UpdateValidGroup
.
class
)
private
String
remark
;
@Schema
(
description
=
"所属区域名称"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"北京"
)
@NotBlank
(
message
=
"所属区域名称不能为空"
)
private
String
regionName
;
}
\ No newline at end of file
aus-framework/src/main/java/org/summerframework/core/enums/ErrorCodeEnum.java
View file @
cda205d
...
...
@@ -20,6 +20,7 @@ public enum ErrorCodeEnum {
DATA_NOT_EXIST
(
1004
,
"数据不存在"
),
VALIDATION_ERROR
(
1005
,
"参数校验失败"
),
LOGIN_ERROR
(
1006
,
"未登录或登录已过期,请重新登录"
),
COMMON_ERROR
(
1000000
,
"{0}"
),
/* 七位错误码,第一位标志位,前三位模块,后三位具体错误码 */
/** 检测模块 1001 */
...
...
aus-framework/src/main/java/org/summerframework/core/util/StringUtils.java
View file @
cda205d
...
...
@@ -25,6 +25,10 @@ public class StringUtils {
* @return java.lang.String
*/
public
String
templateFormat
(
String
template
,
Object
...
params
)
{
if
(
StrUtil
.
isEmpty
(
template
)
||
params
==
null
)
{
return
template
;
}
return
MessageFormat
.
format
(
template
,
params
);
}
...
...
aus-framework/src/main/java/org/summerframework/orm/dictionary/Dictionary_.java
0 → 100644
View file @
cda205d
package
org
.
summerframework
.
orm
.
dictionary
;
import
jakarta.annotation.Generated
;
import
jakarta.persistence.metamodel.SingularAttribute
;
import
jakarta.persistence.metamodel.StaticMetamodel
;
@Generated
(
value
=
"org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor"
,
date
=
"2022-04-19T00:11:15.562+0800"
)
@StaticMetamodel
(
Dictionary
.
class
)
public
abstract
class
Dictionary_
extends
org
.
summerframework
.
orm
.
entity
.
AuditingEntity_
{
public
static
volatile
SingularAttribute
<
Dictionary
,
String
>
dictionaryName
;
public
static
volatile
SingularAttribute
<
Dictionary
,
String
>
optionCode
;
public
static
volatile
SingularAttribute
<
Dictionary
,
Integer
>
dictionaryId
;
public
static
volatile
SingularAttribute
<
Dictionary
,
String
>
remark
;
public
static
volatile
SingularAttribute
<
Dictionary
,
String
>
optionName
;
public
static
volatile
SingularAttribute
<
Dictionary
,
Boolean
>
enabled
;
public
static
final
String
DICTIONARY_NAME
=
"dictionaryName"
;
public
static
final
String
OPTION_CODE
=
"optionCode"
;
public
static
final
String
DICTIONARY_ID
=
"dictionaryId"
;
public
static
final
String
REMARK
=
"remark"
;
public
static
final
String
OPTION_NAME
=
"optionName"
;
public
static
final
String
ENABLED
=
"enabled"
;
}
aus-framework/src/main/java/org/summerframework/orm/entity/AuditingEntity_.java
0 → 100644
View file @
cda205d
package
org
.
summerframework
.
orm
.
entity
;
import
jakarta.annotation.Generated
;
import
jakarta.persistence.metamodel.SingularAttribute
;
import
jakarta.persistence.metamodel.StaticMetamodel
;
@Generated
(
value
=
"org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor"
,
date
=
"2022-03-23T23:13:22.492+0800"
)
@StaticMetamodel
(
AuditingEntity
.
class
)
public
abstract
class
AuditingEntity_
extends
AuditingTimeEntity_
{
public
static
volatile
SingularAttribute
<
AuditingEntity
,
String
>
createBy
;
public
static
volatile
SingularAttribute
<
AuditingEntity
,
String
>
updateBy
;
public
static
final
String
CREATE_BY
=
"createBy"
;
public
static
final
String
UPDATE_BY
=
"updateBy"
;
}
aus-framework/src/main/java/org/summerframework/orm/entity/AuditingTimeEntity_.java
0 → 100644
View file @
cda205d
package
org
.
summerframework
.
orm
.
entity
;
import
jakarta.annotation.Generated
;
import
jakarta.persistence.metamodel.SingularAttribute
;
import
jakarta.persistence.metamodel.StaticMetamodel
;
import
java.time.LocalDateTime
;
@Generated
(
value
=
"org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor"
,
date
=
"2022-03-23T23:13:22.658+0800"
)
@StaticMetamodel
(
AuditingTimeEntity
.
class
)
public
abstract
class
AuditingTimeEntity_
{
public
static
volatile
SingularAttribute
<
AuditingTimeEntity
,
LocalDateTime
>
createTime
;
public
static
volatile
SingularAttribute
<
AuditingTimeEntity
,
LocalDateTime
>
updateTime
;
public
static
final
String
CREATE_TIME
=
"createTime"
;
public
static
final
String
UPDATE_TIME
=
"updateTime"
;
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment