1
This commit is contained in:
parent
4a5a81f1d3
commit
72f42a050b
@ -111,5 +111,20 @@ public class DlDriveSchoolCoachController {
|
|||||||
return success(BeanUtils.toBean(dlDriveSchoolCoach, DlDriveSchoolCoachRespVO.class));
|
return success(BeanUtils.toBean(dlDriveSchoolCoach, DlDriveSchoolCoachRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id获取教练信息
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||||
|
* @author PQZ
|
||||||
|
* @date 13:47 2025/2/12
|
||||||
|
**/
|
||||||
|
@GetMapping("/getCoachById")
|
||||||
|
@Operation(summary = "获得驾校教练")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
public CommonResult<?> appGetCoach(@RequestParam("id") String id) {
|
||||||
|
return success(dlDriveSchoolCoachService.getCoachById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -89,5 +89,14 @@ public interface DlDriveSchoolCoachService extends IService<DlDriveSchoolCoach>
|
|||||||
*/
|
*/
|
||||||
DlDriveSchoolCoachRespVO getDlDriveSchoolCoachByUserId(Long userId);
|
DlDriveSchoolCoachRespVO getDlDriveSchoolCoachByUserId(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过教练id查询教练信息(APP使用)
|
||||||
|
* @author PQZ
|
||||||
|
* @date 13:49 2025/2/12
|
||||||
|
* @param id 教练id
|
||||||
|
* @return cn.iocoder.yudao.module.base.vo.CoachInfoVO
|
||||||
|
**/
|
||||||
|
CoachInfoVO getCoachById(String id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -5,10 +5,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach;
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach;
|
||||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCoachMapper;
|
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCoachMapper;
|
||||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
||||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachPageReqVO;
|
import cn.iocoder.yudao.module.base.vo.*;
|
||||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
|
||||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachSaveReqVO;
|
|
||||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO;
|
|
||||||
import cn.iocoder.yudao.module.jx.utils.StringUtils;
|
import cn.iocoder.yudao.module.jx.utils.StringUtils;
|
||||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
@ -198,5 +195,23 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
|||||||
return schoolCoach;
|
return schoolCoach;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过教练id查询教练信息(APP使用)
|
||||||
|
*
|
||||||
|
* @param id 教练id
|
||||||
|
* @return cn.iocoder.yudao.module.base.vo.CoachInfoVO
|
||||||
|
* @author PQZ
|
||||||
|
* @date 13:49 2025/2/12
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public CoachInfoVO getCoachById(String id) {
|
||||||
|
CoachInfoVO result = new CoachInfoVO();
|
||||||
|
DlDriveSchoolCoach coach = getById(id);
|
||||||
|
//教练信息
|
||||||
|
result.setCoachInfo(coach);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.module.base.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach;
|
||||||
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||||
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||||
|
import cn.iocoder.yudao.module.train.entity.Train;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CoachInfoVO {
|
||||||
|
/**教练基本信息*/
|
||||||
|
private DlDriveSchoolCoach coachInfo;
|
||||||
|
|
||||||
|
}
|
@ -12,6 +12,8 @@ public class DlDriveSchoolStaffVO {
|
|||||||
private String type;
|
private String type;
|
||||||
/**人员姓名*/
|
/**人员姓名*/
|
||||||
private String name;
|
private String name;
|
||||||
|
/**头像*/
|
||||||
|
private String avatar;
|
||||||
/**教龄*/
|
/**教龄*/
|
||||||
private Integer seniority;
|
private Integer seniority;
|
||||||
/**车牌*/
|
/**车牌*/
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
main.seniority AS seniority,
|
main.seniority AS seniority,
|
||||||
main.car_id AS carId,
|
main.car_id AS carId,
|
||||||
main.phone AS phone,
|
main.phone AS phone,
|
||||||
|
main.image AS avatar,
|
||||||
GROUP_CONCAT(DISTINCT dscc.course_type SEPARATOR ',') AS courseTypes
|
GROUP_CONCAT(DISTINCT dscc.course_type SEPARATOR ',') AS courseTypes
|
||||||
FROM
|
FROM
|
||||||
drive_school_coach main
|
drive_school_coach main
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
main.id AS id,
|
main.id AS id,
|
||||||
main.name AS name,
|
main.name AS name,
|
||||||
main.type AS type,
|
main.type AS type,
|
||||||
|
main.avatar AS avatar,
|
||||||
main.phone AS phone
|
main.phone AS phone
|
||||||
FROM
|
FROM
|
||||||
drive_school_student main
|
drive_school_student main
|
||||||
|
Loading…
Reference in New Issue
Block a user