修改了美甲师查询的逻辑
This commit is contained in:
parent
0effa3a931
commit
52bb2b6b51
|
@ -164,7 +164,7 @@ create table if not exists manicurist
|
||||||
rating DECIMAL(3, 2) comment '美甲师的服务评分',
|
rating DECIMAL(3, 2) comment '美甲师的服务评分',
|
||||||
salary DECIMAL(10, 2) comment '美甲师的基本薪资',
|
salary DECIMAL(10, 2) comment '美甲师的基本薪资',
|
||||||
manStatus int DEFAULT 0 comment'美甲师状态 0 表示正常 1 表示禁用',
|
manStatus int DEFAULT 0 comment'美甲师状态 0 表示正常 1 表示禁用',
|
||||||
isDeleted TINYINT DEFAULT 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
isDelete TINYINT DEFAULT 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||||
createTime DATETIME DEFAULT CURRENT_TIMESTAMP not null comment '记录创建时间',
|
createTime DATETIME DEFAULT CURRENT_TIMESTAMP not null comment '记录创建时间',
|
||||||
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
||||||
INDEX idx_userId (userId)
|
INDEX idx_userId (userId)
|
||||||
|
@ -179,7 +179,7 @@ create table if not exists manicurist_auth
|
||||||
certificate_path VARCHAR(255) COMMENT '证书文件的存储路径或链接',
|
certificate_path VARCHAR(255) COMMENT '证书文件的存储路径或链接',
|
||||||
createTime DATETIME default CURRENT_TIMESTAMP not null comment '记录创建时间',
|
createTime DATETIME default CURRENT_TIMESTAMP not null comment '记录创建时间',
|
||||||
updateTime DATETIME default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
updateTime DATETIME default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
||||||
isDeleted TINYINT default 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
isDelete TINYINT default 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||||
INDEX idx_artistId (artistId)
|
INDEX idx_artistId (artistId)
|
||||||
) comment ='美甲师认证表' COLLATE = utf8mb4_unicode_ci;
|
) comment ='美甲师认证表' COLLATE = utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
@ -191,22 +191,25 @@ CREATE TABLE IF NOT EXISTS appointments
|
||||||
id BIGINT AUTO_INCREMENT COMMENT '预约ID' PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT COMMENT '预约ID' PRIMARY KEY,
|
||||||
userId BIGINT NOT NULL COMMENT '用户ID(关联用户表)',
|
userId BIGINT NOT NULL COMMENT '用户ID(关联用户表)',
|
||||||
userName VARCHAR(100) NOT NULL COMMENT '用户姓名',
|
userName VARCHAR(100) NOT NULL COMMENT '用户姓名',
|
||||||
phone varchar(64) not null comment '手机号',
|
phone varchar(64) NOT NULL COMMENT '手机号',
|
||||||
businessId BIGINT NOT NULL COMMENT '商家ID(关联商家表)',
|
businessId BIGINT NOT NULL COMMENT '商家ID(关联商家表)',
|
||||||
manicuristId BIGINT COMMENT '美甲师ID, 如果为空到店分配',
|
manicuristId BIGINT COMMENT '美甲师ID, 如果为空到店分配',
|
||||||
appointmentTime DATETIME NOT NULL COMMENT '预约时间',
|
appointmentTime DATETIME NOT NULL COMMENT '预约时间',
|
||||||
serviceMode TINYINT NOT NULL COMMENT '服务方式(0 - 线上, 1 - 到店)',
|
serviceMode TINYINT NOT NULL COMMENT '服务方式(0 - 线上, 1 - 到店)',
|
||||||
payMethod tinyint not null comment '支付方式:0微信支付',
|
payMethod TINYINT NOT NULL COMMENT '支付方式:0微信支付',
|
||||||
notes varchar(128) null comment '备注',
|
notes varchar(128) COMMENT '备注',
|
||||||
status TINYINT DEFAULT 0 NOT NULL COMMENT '预约状态(0 - 已确认, 1 - 已完成, 2 - 已取消)',
|
status TINYINT DEFAULT 0 NOT NULL COMMENT '预约状态(0 - 已确认, 1 - 已完成, 2 - 已取消)',
|
||||||
createTime DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
|
createTime DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
|
||||||
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
isDelete TINYINT DEFAULT 0 NOT NULL COMMENT '是否删除',
|
isDelete TINYINT DEFAULT 0 NOT NULL COMMENT '是否删除',
|
||||||
|
orderId BIGINT COMMENT '订单ID(关联订单表)',
|
||||||
INDEX idx_userId (userId),
|
INDEX idx_userId (userId),
|
||||||
INDEX idx_businessId (businessId),
|
INDEX idx_businessId (businessId),
|
||||||
INDEX idx_manicuristId (manicuristId)
|
INDEX idx_manicuristId (manicuristId),
|
||||||
|
INDEX idx_orderId (orderId)
|
||||||
) COMMENT '预约表' COLLATE = utf8mb4_unicode_ci;
|
) COMMENT '预约表' COLLATE = utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
|
||||||
-- 订单表
|
-- 订单表
|
||||||
CREATE TABLE IF NOT EXISTS orders
|
CREATE TABLE IF NOT EXISTS orders
|
||||||
(
|
(
|
||||||
|
|
|
@ -204,11 +204,13 @@ public class ManicuristController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "用户查询全部美甲师")
|
@ApiOperation(value = "用户查询全部美甲师")
|
||||||
@GetMapping("/userQueryAll")
|
@GetMapping("/userQueryAll")
|
||||||
public BaseResponse<List<ManicuristVO>> UserQueryAllManicurist(){
|
public BaseResponse<List<ManicuristVO>> UserQueryAllManicurist(int businessId){
|
||||||
|
|
||||||
List<Manicurist> manicuristList = manicuristService.list();
|
QueryWrapper<Manicurist> queryWrapper = new QueryWrapper<>();
|
||||||
List<ManicuristVO> manicuristVO = manicuristService.getManicuristVO(manicuristList);
|
queryWrapper.eq("businessId", businessId);
|
||||||
return ResultUtils.success(manicuristVO);
|
List<Manicurist> manicuristList = manicuristService.list(queryWrapper);
|
||||||
|
List<ManicuristVO> manicuristVOList = manicuristService.getManicuristVO(manicuristList);
|
||||||
|
return ResultUtils.success(manicuristVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user