Commit fc1ed3eb by 杨卫

feat:检测师查询接口

1 parent 9d664a46
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/aus-admin/src/main/resources/static/main/tinymce/ /aus-admin/src/main/resources/static/main/tinymce/
/aus-admin/src/main/resources/static/main/index.html /aus-admin/src/main/resources/static/main/index.html
target/ **/target/
!.mvn/wrapper/maven-wrapper.jar !.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/ !**/src/main/**/target/
!**/src/test/**/target/ !**/src/test/**/target/
......
...@@ -166,6 +166,8 @@ ...@@ -166,6 +166,8 @@
<groupId>com.github.xingfudeshi</groupId> <groupId>com.github.xingfudeshi</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -191,6 +193,7 @@ ...@@ -191,6 +193,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- Spring Boot 打包插件(核心配置) --> <!-- Spring Boot 打包插件(核心配置) -->
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -211,18 +214,10 @@ ...@@ -211,18 +214,10 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<configuration>
<source>17</source> <!-- 对应你的Java版本(8/11/17) -->
<target>17</target>
<!-- 核心:添加-parameters参数,保留参数名 -->
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
<executions> <executions>
<execution> <execution>
<id>exclude-slf4j-simple</id> <id>exclude-slf4j-simple</id>
<phase>process-resources</phase> <phase>package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>copy-dependencies</goal>
</goals> </goals>
......
...@@ -3,6 +3,8 @@ package com.glsx.usedcar.web.rest.inspect; ...@@ -3,6 +3,8 @@ package com.glsx.usedcar.web.rest.inspect;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.glsx.usedcar.module.inspect.service.InspectorService; import com.glsx.usedcar.module.inspect.service.InspectorService;
import com.glsx.usedcar.module.inspect.vo.InspectorAddVO; 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.InspectorUpdateVO;
import com.glsx.usedcar.resp.BaseResp; import com.glsx.usedcar.resp.BaseResp;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -13,9 +15,11 @@ import jakarta.validation.constraints.NotNull; ...@@ -13,9 +15,11 @@ import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive; import jakarta.validation.constraints.Positive;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.summerframework.core.exception.BusinessCodeException; import org.summerframework.core.exception.BusinessCodeException;
import org.summerframework.orm.paging.Pagination;
import org.summerframework.orm.validator.UpdateValidGroup; import org.summerframework.orm.validator.UpdateValidGroup;
/** /**
...@@ -52,9 +56,9 @@ public class InspectorController { ...@@ -52,9 +56,9 @@ public class InspectorController {
} }
@Operation(summary = "修改检测师", description = "根据检测师ID修改检测师信息") @Operation(summary = "修改检测师", description = "根据检测师ID修改检测师信息")
@PutMapping("/update/{id}") @PostMapping("/update/{id}")
public BaseResp<Void> updateInspector( public BaseResp<Void> updateInspector(
@Parameter(description = "检测师ID") @Parameter(description = "检测师ID", required = true)
@NotNull(message = "检测师ID不能为空") @NotNull(message = "检测师ID不能为空")
@Positive(message = "检测师ID必须为正数") @Positive(message = "检测师ID必须为正数")
@PathVariable("id") Long id, @PathVariable("id") Long id,
...@@ -65,7 +69,7 @@ public class InspectorController { ...@@ -65,7 +69,7 @@ public class InspectorController {
inspectorService.updateInspector(id, updateVO); inspectorService.updateInspector(id, updateVO);
} catch (BusinessCodeException be) { } catch (BusinessCodeException be) {
log.error("修改检测师失败!业务异常!", be); log.error("修改检测师失败!业务异常!", be);
return BaseResp.fail(StrUtil.toString(be.getCode()), StrUtil.toString(be.getMessage())); return BaseResp.fail(StrUtil.toString(be.getCode()), be.getMessage());
} catch (Exception e) { } catch (Exception e) {
log.error("修改检测师失败!系统异常!", e); log.error("修改检测师失败!系统异常!", e);
return BaseResp.fail("系统异常: " + e.getMessage()); return BaseResp.fail("系统异常: " + e.getMessage());
...@@ -75,7 +79,7 @@ public class InspectorController { ...@@ -75,7 +79,7 @@ public class InspectorController {
} }
@Operation(summary = "删除检测师", description = "根据检测师ID删除检测师(逻辑删除)") @Operation(summary = "删除检测师", description = "根据检测师ID删除检测师(逻辑删除)")
@DeleteMapping("/delete/{id}") @PostMapping("/delete/{id}")
public BaseResp<Void> deleteInspector( public BaseResp<Void> deleteInspector(
@Parameter(description = "检测师ID", required = true) @Parameter(description = "检测师ID", required = true)
@NotNull(message = "检测师ID不能为空") @NotNull(message = "检测师ID不能为空")
...@@ -87,7 +91,7 @@ public class InspectorController { ...@@ -87,7 +91,7 @@ public class InspectorController {
inspectorService.deleteInspector(id); inspectorService.deleteInspector(id);
} catch (BusinessCodeException be) { } catch (BusinessCodeException be) {
log.error("删除检测师失败!业务异常!", be); log.error("删除检测师失败!业务异常!", be);
return BaseResp.fail(StrUtil.toString(be.getCode()), StrUtil.toString(be.getMessage())); return BaseResp.fail(StrUtil.toString(be.getCode()), be.getMessage());
} catch (Exception e) { } catch (Exception e) {
log.error("删除检测师失败!系统异常!", e); log.error("删除检测师失败!系统异常!", e);
return BaseResp.fail("系统异常: " + e.getMessage()); return BaseResp.fail("系统异常: " + e.getMessage());
...@@ -95,4 +99,18 @@ public class InspectorController { ...@@ -95,4 +99,18 @@ public class InspectorController {
return BaseResp.success(); return BaseResp.success();
} }
@Operation(summary = "分页查询检测师", description = "分页查询检测师列表,支持姓名或手机号模糊查询,自动过滤逻辑删除数据")
@PostMapping("/page")
public BaseResp<Page<InspectorRespVO>> pageInspectors(@Validated @RequestBody Pagination<InspectorQryVO> pagination) {
log.info("分页查询检测师请求: offset={}, limit={}", pagination.getOffset(), pagination.getLimit());
try {
Page<InspectorRespVO> result = inspectorService.pageInspectors(pagination);
return BaseResp.success(result);
} catch (Exception e) {
log.error("分页查询检测师失败!系统异常!", e);
return BaseResp.fail("系统异常: " + e.getMessage());
}
}
} }
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<executions> <executions>
<execution> <execution>
<id>exclude-slf4j-simple</id> <id>exclude-slf4j-simple</id>
<phase>process-resources</phase> <phase>package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>copy-dependencies</goal>
</goals> </goals>
......
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
<artifactId>pinyin4j</artifactId> <artifactId>pinyin4j</artifactId>
<version>2.5.1</version> <version>2.5.1</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -185,6 +186,53 @@ ...@@ -185,6 +186,53 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- QueryDSL APT 处理器配置 -->
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
<!-- QueryDSL APT 处理器配置 -->
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven编译器插件配置 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<encoding>UTF-8</encoding>
<generatedSourcesDirectory>target/generated-sources/java</generatedSourcesDirectory>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file \ No newline at end of file
package com.glsx.usedcar.config;
import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* query dsl 全局配置
* @author yangwei
* @version 1.0
* @since 2026/02/10 15:00
*/
@Configuration
@ConditionalOnClass(name = "com.querydsl.jpa.impl.JPAQueryFactory")
class QueryDslConfig {
@Bean
public JPAQueryFactory jpaQueryFactory(EntityManager em) {
return new JPAQueryFactory(em);
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.usedcar.consts.common;
/**
* @author yangwei
* @version 1.0
* @since 2026/02/10 15:42
*/
public interface SymbolConsts {
/** % */
String PERCENT = "%";
}
package com.glsx.usedcar.consts.inspect;
/**
* JPA 查询常量
* @author yangwei
* @version 1.0
* @since 2026/02/10 15:33
*/
public interface JpaQueryConstants {
/**
* 检测师
* @see com.glsx.usedcar.module.inspect.entity.Inspector
* @author yangwei
* @since 2026/2/10 15:34
*/
interface Inspector
{
String ID = "id";
/**
* 关键字,检测师名称或手机号,模糊查询
*/
String KEYWORD = "keyword";
/**
* 创建时间
*/
String UPDATE_TIME = "updateTime";
}
}
...@@ -2,6 +2,7 @@ package com.glsx.usedcar.module.inspect.dao; ...@@ -2,6 +2,7 @@ package com.glsx.usedcar.module.inspect.dao;
import com.glsx.usedcar.module.inspect.entity.Inspector; import com.glsx.usedcar.module.inspect.entity.Inspector;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.summerframework.orm.BaseRepository; import org.summerframework.orm.BaseRepository;
...@@ -13,7 +14,7 @@ import java.util.Optional; ...@@ -13,7 +14,7 @@ import java.util.Optional;
* @since 2026/2/9 15:34 * @since 2026/2/9 15:34
*/ */
@Repository @Repository
public interface InspectorRepository extends BaseRepository<Inspector, Long>, JpaSpecificationExecutor<Inspector> { public interface InspectorRepository extends BaseRepository<Inspector, Long>, JpaSpecificationExecutor<Inspector>, QuerydslPredicateExecutor<Inspector> {
/** /**
...@@ -22,5 +23,13 @@ public interface InspectorRepository extends BaseRepository<Inspector, Long>, Jp ...@@ -22,5 +23,13 @@ public interface InspectorRepository extends BaseRepository<Inspector, Long>, Jp
* @param phone 手机号 * @param phone 手机号
* @return 检测师信息 * @return 检测师信息
*/ */
Optional<Inspector> findByPhone(String phone); Optional<Inspector> findByPhoneAndDeleteFlag(String phone, String deletedFlag);
/**
* 根据ID查询检测师
*
* @param id 检测师ID
* @return 检测师信息
*/
Optional<Inspector> findByIdAndDeleteFlag(Long id, String deletedFlag);
} }
package com.glsx.usedcar.module.inspect.service; package com.glsx.usedcar.module.inspect.service;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.glsx.usedcar.consts.common.SymbolConsts;
import com.glsx.usedcar.consts.inspect.JpaQueryConstants;
import com.glsx.usedcar.enums.common.DeleteFlag; import com.glsx.usedcar.enums.common.DeleteFlag;
import com.glsx.usedcar.enums.inspect.InspectorStatus; import com.glsx.usedcar.enums.inspect.InspectorStatus;
import com.glsx.usedcar.module.inspect.dao.InspectorRepository; import com.glsx.usedcar.module.inspect.dao.InspectorRepository;
import com.glsx.usedcar.module.inspect.entity.Inspector; import com.glsx.usedcar.module.inspect.entity.Inspector;
import com.glsx.usedcar.module.inspect.entity.QInspector;
import com.glsx.usedcar.module.inspect.vo.InspectorAddVO; 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.InspectorUpdateVO;
import com.google.common.collect.Sets;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Projections;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.summerframework.core.enums.ErrorCodeEnum; import org.summerframework.core.enums.ErrorCodeEnum;
import org.summerframework.core.exception.BusinessCodeException; import org.summerframework.core.exception.BusinessCodeException;
import org.summerframework.orm.paging.Pagination;
import java.util.Objects; import java.util.*;
/** /**
* 检测师服务 * 检测师服务
...@@ -28,6 +44,7 @@ import java.util.Objects; ...@@ -28,6 +44,7 @@ import java.util.Objects;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class InspectorService { public class InspectorService {
private final JPAQueryFactory jpaQueryFactory;
private final InspectorRepository inspectorRepository; private final InspectorRepository inspectorRepository;
/** /**
...@@ -38,9 +55,9 @@ public class InspectorService { ...@@ -38,9 +55,9 @@ public class InspectorService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void addInspector(InspectorAddVO addVO) { public void addInspector(InspectorAddVO addVO) {
synchronized (addVO.getPhone().intern()) {
// 检查手机号是否已存在 // 检查手机号是否已存在
if (inspectorRepository.findByPhone(addVO.getPhone()).isPresent()) { if (inspectorRepository.findByPhoneAndDeleteFlag(addVO.getPhone(), DeleteFlag.NOT_DELETED.getCode()).isPresent()) {
throw new BusinessCodeException(ErrorCodeEnum.PHONE_ALREADY_EXISTS, addVO.getPhone()); throw new BusinessCodeException(ErrorCodeEnum.PHONE_ALREADY_EXISTS, addVO.getPhone());
} }
...@@ -57,6 +74,7 @@ public class InspectorService { ...@@ -57,6 +74,7 @@ public class InspectorService {
inspectorRepository.save(inspector); inspectorRepository.save(inspector);
log.info("检测师新增成功: ID={}", inspector.getId()); log.info("检测师新增成功: ID={}", inspector.getId());
} }
}
/** /**
* 修改检测师 * 修改检测师
...@@ -67,13 +85,14 @@ public class InspectorService { ...@@ -67,13 +85,14 @@ public class InspectorService {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void updateInspector(Long id, InspectorUpdateVO updateVO) { public void updateInspector(Long id, InspectorUpdateVO updateVO) {
synchronized (updateVO.getPhone().intern()) {
// 查找检测师 // 查找检测师
Inspector inspector = inspectorRepository.findById(id) Inspector inspector = inspectorRepository.findByIdAndDeleteFlag(id, DeleteFlag.NOT_DELETED.getCode())
.orElseThrow(() -> new BusinessCodeException(ErrorCodeEnum.DATA_NOT_EXIST, "检测师不存在")); .orElseThrow(() -> new BusinessCodeException(ErrorCodeEnum.DATA_NOT_EXIST, "检测师不存在"));
// 检查手机号是否已被其他检测师使用 // 检查手机号是否已被其他检测师使用
if (updateVO.getPhone() != null && !Objects.equals(inspector.getPhone(), updateVO.getPhone())) { if (updateVO.getPhone() != null && !Objects.equals(inspector.getPhone(), updateVO.getPhone())) {
if (inspectorRepository.findByPhone(updateVO.getPhone()).isPresent()) { if (inspectorRepository.findByPhoneAndDeleteFlag(updateVO.getPhone(), DeleteFlag.NOT_DELETED.getCode()).isPresent()) {
throw new BusinessCodeException(ErrorCodeEnum.PHONE_ALREADY_EXISTS, updateVO.getPhone()); throw new BusinessCodeException(ErrorCodeEnum.PHONE_ALREADY_EXISTS, updateVO.getPhone());
} }
} }
...@@ -81,12 +100,12 @@ public class InspectorService { ...@@ -81,12 +100,12 @@ public class InspectorService {
// 更新检测师信息 // 更新检测师信息
inspector.setName(updateVO.getName()); inspector.setName(updateVO.getName());
inspector.setPhone(updateVO.getPhone()); inspector.setPhone(updateVO.getPhone());
inspector.setStatus(updateVO.getStatus());
// 保存到数据库 // 保存到数据库
inspectorRepository.save(inspector); inspectorRepository.save(inspector);
log.info("检测师修改成功: ID={}", inspector.getId()); log.info("检测师修改成功: ID={}", inspector.getId());
} }
}
/** /**
* 删除检测师(逻辑删除) * 删除检测师(逻辑删除)
...@@ -97,7 +116,7 @@ public class InspectorService { ...@@ -97,7 +116,7 @@ public class InspectorService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void deleteInspector(Long id) { public void deleteInspector(Long id) {
// 查找检测师 // 查找检测师
Inspector inspector = inspectorRepository.findById(id) Inspector inspector = inspectorRepository.findByIdAndDeleteFlag(id, DeleteFlag.NOT_DELETED.getCode())
.orElseThrow(() -> new BusinessCodeException(ErrorCodeEnum.DATA_NOT_EXIST, "检测师不存在")); .orElseThrow(() -> new BusinessCodeException(ErrorCodeEnum.DATA_NOT_EXIST, "检测师不存在"));
// 逻辑删除 // 逻辑删除
...@@ -105,4 +124,65 @@ public class InspectorService { ...@@ -105,4 +124,65 @@ public class InspectorService {
inspectorRepository.save(inspector); inspectorRepository.save(inspector);
log.info("检测师删除成功: ID={}", inspector.getId()); log.info("检测师删除成功: ID={}", inspector.getId());
} }
/**
* 分页查询检测师
* @author yangwei
* @since 2026/2/10 11:45
* @param pagination 分页参数
* @return 分页结果
*/
public Page<InspectorRespVO> pageInspectors(Pagination<InspectorQryVO> pagination) {
QInspector qInspector = QInspector.inspector;
BooleanBuilder predicate = new BooleanBuilder();
predicate.and(qInspector.deleteFlag.eq(DeleteFlag.NOT_DELETED.getCode()));
// 添加过滤条件
Set<String> queryParameters = Sets.newHashSet(JpaQueryConstants.Inspector.KEYWORD);
Optional.ofNullable(pagination.getFilters())
.filter(CollUtil::isNotEmpty)
.orElseGet(ArrayList::new)
.stream()
.filter(filter -> queryParameters.contains(filter.getField()))
.forEach(filter -> {
String field = filter.getField();
if (JpaQueryConstants.Inspector.KEYWORD.equals(field)) {
Optional.ofNullable(filter.getValue())
.filter(key -> StrUtil.isNotEmpty((String) key))
.ifPresent(value -> {
predicate.and(qInspector.name.like(SymbolConsts.PERCENT + value + SymbolConsts.PERCENT)
.or(qInspector.phone.like(SymbolConsts.PERCENT + value + SymbolConsts.PERCENT)));
});
}
});
long total = Optional.ofNullable(jpaQueryFactory.select(qInspector.count())
.from(qInspector)
.where(predicate)
.fetchOne()).orElse(0L);
int page = (pagination.getOffset() + pagination.getLimit() - 1) / pagination.getLimit();
// 查询数据列表
List<InspectorRespVO> content = jpaQueryFactory.select(
Projections.constructor(InspectorRespVO.class,
qInspector.id,
qInspector.name,
qInspector.password,
qInspector.phone,
qInspector.status
)
).from(qInspector)
.where(predicate)
.offset(pagination.getOffset())
.limit(pagination.getLimit())
.orderBy(qInspector.updateTime.desc(), qInspector.id.desc())
.fetch();
// todo 查询当前任务和本月单量
return new PageImpl<>(content, PageRequest.of(page, pagination.getLimit(),
Sort.by(Sort.Order.desc(JpaQueryConstants.Inspector.UPDATE_TIME))), total);
}
} }
package com.glsx.usedcar.module.inspect.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 检测师查询请求VO
* @author yangwei
* @version 1.0
* @since 2026/02/10 14:11
*/
@Data
@Schema(description = "检测师查询请求VO")
public class InspectorQryVO implements Serializable {
@Serial
private static final long serialVersionUID = 7322309152558854043L;
@Schema(description = "关键字")
private String keyword;
}
package com.glsx.usedcar.module.inspect.vo;
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.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;
/**
* 检测师查询响应VO
* @author yangwei
* @version 1.0
* @since 2026/02/10 14:12
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "检测师查询响应VO")
public class InspectorRespVO implements Serializable {
@Serial
private static final long serialVersionUID = -2193361787441423518L;
/**
* 主键ID
*/
@Schema(description = "主键ID")
@JsonView(value = Inspector.Summary.class)
private Long id;
/**
* 姓名
*/
@Schema(description = "姓名")
@JsonView(value = Inspector.Summary.class)
private String name;
/**
* 初始密码
*/
@Schema(description = "初始密码")
@JsonView(value = Inspector.Summary.class)
private String password;
/**
* 手机号
*/
@Schema(description = "手机号")
@JsonView(value = Inspector.Summary.class)
private String phone;
/**
* 状态 1:正常 0:禁用
*/
@JsonView(value = Inspector.Summary.class)
@Schema(description = "状态 1:正常 0:禁用")
private Integer status = 1;
}
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
\ No newline at end of file \ No newline at end of file
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<executions> <executions>
<execution> <execution>
<id>exclude-slf4j-simple</id> <id>exclude-slf4j-simple</id>
<phase>process-resources</phase> <phase>package</phase>
<goals> <goals>
<goal>copy-dependencies</goal> <goal>copy-dependencies</goal>
</goals> </goals>
......
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
</properties> </properties>
<modules> <modules>
<module>aus-framework</module>
<module>aus-admin</module> <module>aus-admin</module>
<module>aus-api</module> <module>aus-api</module>
<module>aus-config</module> <module>aus-config</module>
<module>aus-core</module> <module>aus-core</module>
<module>aus-framework</module>
<module>aus-gsc</module> <module>aus-gsc</module>
<module>aus-task</module> <module>aus-task</module>
</modules> </modules>
...@@ -110,6 +110,25 @@ ...@@ -110,6 +110,25 @@
</repository> </repository>
</repositories> </repositories>
<dependencies>
<!-- QueryDSL JPA -->
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>5.0.0</version>
<classifier>jakarta</classifier>
</dependency>
<!-- QueryDSL APT (用于生成 Q 类) -->
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>5.0.0</version>
<classifier>jakarta</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- 框架BOM依赖 --> <!-- 框架BOM依赖 -->
...@@ -417,6 +436,24 @@ ...@@ -417,6 +436,24 @@
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
...@@ -425,6 +462,7 @@ ...@@ -425,6 +462,7 @@
<source>${maven.compiler.source}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
<generatedSourcesDirectory>target/generated-sources/java</generatedSourcesDirectory>
<compilerArgs> <compilerArgs>
<arg>-parameters</arg> <arg>-parameters</arg>
</compilerArgs> </compilerArgs>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!