fix(): 企业查询修复
parent
0b297a028f
commit
5012e3c895
|
@ -50,7 +50,7 @@ public class SysEnt extends BaseEntity {
|
|||
private String email;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
* 企业编码
|
||||
*/
|
||||
private Long databaseName;
|
||||
private String entCode;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public class SysEntController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取企业信息
|
||||
* @return 响应结果
|
||||
*/
|
||||
@GetMapping
|
||||
@Operation(summary = "获取企业信息", description = "现有的基础企业信息")
|
||||
|
@ -41,6 +42,8 @@ public class SysEntController extends BaseController {
|
|||
|
||||
/**
|
||||
* 查询企业信息列表
|
||||
* @param entListReq 企业列表请求对象
|
||||
* @return 响应结果
|
||||
*/
|
||||
@PostMapping(value = "/selectList")
|
||||
@Operation(summary = "查询企业信息列表", description = "分页展示企业信息")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.system.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@ -19,25 +20,30 @@ public class EntListReq {
|
|||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@Schema(title = "企业名称", type = "String", defaultValue = "长安汽车", description = "企业名称")
|
||||
private String entName;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@Schema(title = "负责人", type = "String", defaultValue = "张三", description = "负责人")
|
||||
private String leader;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@Schema(title = "手机号码", type = "String", defaultValue = "18321974313", description = "手机号码")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@Schema(title = "邮箱", type = "String", defaultValue = "12123@qq.com", description = "邮箱账号")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
* 企业编码
|
||||
*/
|
||||
private String databaseName;
|
||||
@Schema(title = "企业编码", type = "String", defaultValue = "db", description = "连接的数据源")
|
||||
private String entCode;
|
||||
}
|
||||
|
|
|
@ -49,12 +49,15 @@ public class EntResp {
|
|||
private String email;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
* 企业编码
|
||||
*/
|
||||
private Long databaseName;
|
||||
@Schema(title = "企业编码", type = "String", defaultValue = "db", description = "连接的数据源")
|
||||
private String entCode;
|
||||
|
||||
/**
|
||||
* 企业管理响应对象构建者模式
|
||||
* @param sysEnt 企业管理
|
||||
* @return 企业信息响应对象
|
||||
*/
|
||||
public static EntResp entBuild(SysEnt sysEnt) {
|
||||
return EntResp.builder()
|
||||
|
@ -63,7 +66,7 @@ public class EntResp {
|
|||
.leader(sysEnt.getLeader())
|
||||
.phoneNumber(sysEnt.getPhoneNumber())
|
||||
.email(sysEnt.getEmail())
|
||||
.databaseName(sysEnt.getDatabaseName())
|
||||
.entCode(sysEnt.getEntCode())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ public class SysEntServiceImpl extends ServiceImpl<SysEntMapper, SysEnt> impleme
|
|||
SysEnt::getEmail, entListReq.getEmail()
|
||||
);
|
||||
queryWrapper.eq(
|
||||
StringUtils.isNotEmpty(entListReq.getDatabaseName()),
|
||||
SysEnt::getDatabaseName, entListReq.getDatabaseName()
|
||||
StringUtils.isNotEmpty(entListReq.getEntCode()),
|
||||
SysEnt::getEntCode, entListReq.getEntCode()
|
||||
|
||||
);
|
||||
List<SysEnt> sysEntList = this.list(queryWrapper);
|
||||
|
|
Loading…
Reference in New Issue