修改了美甲师查询的逻辑

This commit is contained in:
gaomusan 2024-11-10 15:47:33 +08:00
parent 0effa3a931
commit 52bb2b6b51
2 changed files with 16 additions and 11 deletions

View File

@ -164,7 +164,7 @@ create table if not exists manicurist
rating DECIMAL(3, 2) comment '美甲师的服务评分',
salary DECIMAL(10, 2) comment '美甲师的基本薪资',
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 '记录创建时间',
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
INDEX idx_userId (userId)
@ -179,7 +179,7 @@ create table if not exists manicurist_auth
certificate_path VARCHAR(255) COMMENT '证书文件的存储路径或链接',
createTime DATETIME default CURRENT_TIMESTAMP not null 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)
) comment ='美甲师认证表' COLLATE = utf8mb4_unicode_ci;
@ -191,22 +191,25 @@ CREATE TABLE IF NOT EXISTS appointments
id BIGINT AUTO_INCREMENT COMMENT '预约ID' PRIMARY KEY,
userId BIGINT NOT NULL COMMENT '用户ID关联用户表',
userName VARCHAR(100) NOT NULL COMMENT '用户姓名',
phone varchar(64) not null comment '手机号',
phone varchar(64) NOT NULL COMMENT '手机号',
businessId BIGINT NOT NULL COMMENT '商家ID关联商家表',
manicuristId BIGINT COMMENT '美甲师ID, 如果为空到店分配',
manicuristId BIGINT COMMENT '美甲师ID, 如果为空到店分配',
appointmentTime DATETIME NOT NULL COMMENT '预约时间',
serviceMode TINYINT NOT NULL COMMENT '服务方式0 - 线上, 1 - 到店)',
payMethod tinyint not null comment '支付方式0微信支付',
notes varchar(128) null comment '备注',
payMethod TINYINT NOT NULL COMMENT '支付方式0微信支付',
notes varchar(128) COMMENT '备注',
status TINYINT DEFAULT 0 NOT NULL COMMENT '预约状态0 - 已确认, 1 - 已完成, 2 - 已取消)',
createTime DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
isDelete TINYINT DEFAULT 0 NOT NULL COMMENT '是否删除',
orderId BIGINT COMMENT '订单ID关联订单表',
INDEX idx_userId (userId),
INDEX idx_businessId (businessId),
INDEX idx_manicuristId (manicuristId)
INDEX idx_manicuristId (manicuristId),
INDEX idx_orderId (orderId)
) COMMENT '预约表' COLLATE = utf8mb4_unicode_ci;
-- 订单表
CREATE TABLE IF NOT EXISTS orders
(

View File

@ -204,11 +204,13 @@ public class ManicuristController {
*/
@ApiOperation(value = "用户查询全部美甲师")
@GetMapping("/userQueryAll")
public BaseResponse<List<ManicuristVO>> UserQueryAllManicurist(){
public BaseResponse<List<ManicuristVO>> UserQueryAllManicurist(int businessId){
List<Manicurist> manicuristList = manicuristService.list();
List<ManicuristVO> manicuristVO = manicuristService.getManicuristVO(manicuristList);
return ResultUtils.success(manicuristVO);
QueryWrapper<Manicurist> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("businessId", businessId);
List<Manicurist> manicuristList = manicuristService.list(queryWrapper);
List<ManicuristVO> manicuristVOList = manicuristService.getManicuristVO(manicuristList);
return ResultUtils.success(manicuristVOList);
}
// /**