1
This commit is contained in:
parent
ba96bbd790
commit
77db6a0963
@ -21,7 +21,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
@RestController
|
||||
@RequestMapping("/base/dl-drive-school-course")
|
||||
@Validated
|
||||
public class DlDriveSchoolCouseController {
|
||||
public class DlDriveSchoolCourseController {
|
||||
|
||||
@Resource
|
||||
private DlDriveSchoolCourseService courseService;
|
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.base.entity;
|
||||
|
||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 驾校教练 DO
|
||||
*
|
||||
* @author pqz
|
||||
*/
|
||||
@TableName("drive_school_coach_course")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DlDriveSchoolCoachCourse extends TenantBaseDO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 教练id
|
||||
*/
|
||||
private String coachId;
|
||||
/**
|
||||
* 课程id
|
||||
*/
|
||||
private String courseId;
|
||||
/**
|
||||
* 科目
|
||||
*/
|
||||
private String subject;
|
||||
|
||||
}
|
@ -1,8 +1,13 @@
|
||||
package cn.iocoder.yudao.module.base.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCourse;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCourseVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 驾校课程Mapper
|
||||
@ -11,6 +16,15 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface DlDriveSchoolCourseMapper extends BaseMapper<DlDriveSchoolCourse> {
|
||||
|
||||
/**
|
||||
* 分页查询驾校课程
|
||||
*
|
||||
* @param entity {@link DlDriveSchoolCourseVO}
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.base.vo.DlDriveSchoolCourseVO>
|
||||
* @author PQZ
|
||||
* @date 7:10 2025/1/17
|
||||
**/
|
||||
IPage<DlDriveSchoolCourseVO> queryListPage(@Param("entity") DlDriveSchoolCourseVO entity, Page<DlDriveSchoolCourseVO> page);
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.base.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCourse;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCoachMapper;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCourseMapper;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCourseService;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCourseVO;
|
||||
@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -25,6 +27,8 @@ import java.util.List;
|
||||
@Validated
|
||||
public class DlDriveSchoolCourseServiceImpl extends ServiceImpl<DlDriveSchoolCourseMapper, DlDriveSchoolCourse> implements DlDriveSchoolCourseService {
|
||||
|
||||
@Resource
|
||||
private DlDriveSchoolCourseMapper courseMapper;
|
||||
|
||||
/**
|
||||
* 分页查询驾校课程
|
||||
@ -37,7 +41,7 @@ public class DlDriveSchoolCourseServiceImpl extends ServiceImpl<DlDriveSchoolCou
|
||||
**/
|
||||
@Override
|
||||
public IPage<DlDriveSchoolCourseVO> queryListPage(DlDriveSchoolCourseVO pageReqVO, Page<DlDriveSchoolCourseVO> page) {
|
||||
return null;
|
||||
return courseMapper.queryListPage(pageReqVO,page);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,8 +17,11 @@
|
||||
<where>
|
||||
main.deleted = 0
|
||||
<if test="entity.type != null and entity.type != '' ">and main.type = #{entity.type}</if>
|
||||
<if test="entity.name != null and entity.name != ''">and main.name like concat('%', #{entity.name}, '%')</if>
|
||||
<if test="entity.phone != null and entity.phone != ''">and main.phone like concat('%', #{entity.phone}, '%')</if>
|
||||
<if test="entity.name != null and entity.name != ''">and main.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.phone != null and entity.phone != ''">and main.phone like concat('%', #{entity.phone},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by main.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCourseMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<select id="queryListPage" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolCourseVO">
|
||||
SELECT
|
||||
main.*
|
||||
FROM
|
||||
drive_school_course main
|
||||
<where>
|
||||
main.deleted = 0
|
||||
<if test="entity.name != null and entity.name != ''">and main.name like concat('%', #{entity.name}, '%')</if>
|
||||
</where>
|
||||
order by main.create_time desc
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user