1
This commit is contained in:
parent
344262667d
commit
0f2051c20c
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.base.service.DriveSchoolAddressService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 地址管理")
|
||||
@RestController
|
||||
@RequestMapping("/address")
|
||||
@Validated
|
||||
public class DriveSchoolAddressController {
|
||||
|
||||
@Resource
|
||||
private DriveSchoolAddressService addressService;
|
||||
|
||||
/**
|
||||
* 查满足条件的所有地址
|
||||
* @author vinjor-M
|
||||
* @date 18:38 2025/2/6
|
||||
* @param type 地点类型(0-训练|1-考试)
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||
**/
|
||||
@GetMapping("/getList")
|
||||
@Operation(summary = "查满足条件的所有地址")
|
||||
public CommonResult<?> getList(Integer type) {
|
||||
return success(addressService.getList(type));
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
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 若依
|
||||
*/
|
||||
@TableName("drive_school_address")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DriveSchoolAddress extends TenantBaseDO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
/**
|
||||
* 地点类型(0-训练|1-考试)
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 地址名称
|
||||
*/
|
||||
private String addressName;
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.base.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.base.entity.DriveSchoolAddress;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 驾校地址管理 Mapper
|
||||
*
|
||||
* @author 若依
|
||||
*/
|
||||
@Mapper
|
||||
public interface DriveSchoolAddressMapper extends BaseMapper<DriveSchoolAddress> {
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.base.service;
|
||||
|
||||
import cn.iocoder.yudao.module.base.entity.DriveSchoolAddress;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 地址管理 Service 接口
|
||||
*
|
||||
* @author lzt
|
||||
*/
|
||||
public interface DriveSchoolAddressService extends IService<DriveSchoolAddress> {
|
||||
|
||||
/**
|
||||
* 查满足条件的所有地址
|
||||
* @author vinjor-M
|
||||
* @date 18:39 2025/2/6
|
||||
* @param type 地点类型(0-训练|1-考试)
|
||||
* @return java.util.List<cn.iocoder.yudao.module.base.entity.DriveSchoolAddress>
|
||||
**/
|
||||
List<DriveSchoolAddress> getList(Integer type);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.base.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.module.base.entity.DriveSchoolAddress;
|
||||
import cn.iocoder.yudao.module.base.mapper.DriveSchoolAddressMapper;
|
||||
import cn.iocoder.yudao.module.base.service.DriveSchoolAddressService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 地址管理表 Service 实现类
|
||||
*
|
||||
* @author 若依
|
||||
*/
|
||||
@Service
|
||||
public class DriveSchoolAddressServiceImpl extends ServiceImpl<DriveSchoolAddressMapper, DriveSchoolAddress> implements DriveSchoolAddressService {
|
||||
|
||||
/**
|
||||
* 查满足条件的所有地址
|
||||
*
|
||||
* @param type 地点类型(0-训练|1-考试)
|
||||
* @return java.util.List<cn.iocoder.yudao.module.base.entity.DriveSchoolAddress>
|
||||
* @author vinjor-M
|
||||
* @date 18:39 2025/2/6
|
||||
**/
|
||||
@Override
|
||||
public List<DriveSchoolAddress> getList(Integer type) {
|
||||
LambdaQueryWrapper<DriveSchoolAddress> queryWrapper = new LambdaQueryWrapper<DriveSchoolAddress>();
|
||||
if(null!=type){
|
||||
queryWrapper.eq(DriveSchoolAddress::getType,type);
|
||||
}
|
||||
queryWrapper.orderByAsc(DriveSchoolAddress::getSort);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
@ -46,7 +46,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
}
|
||||
|
||||
/**
|
||||
* 教练查自己带教的课程和科目在训练中的学生
|
||||
* 教练查自己带教的课程和科目在训练中的学生-并且是未送考的
|
||||
*
|
||||
* @param process
|
||||
* @param page
|
||||
@ -66,6 +66,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
||||
}
|
||||
//状态等于1-训练中的
|
||||
queryWrapper.eq(Process::getStatus,"1")
|
||||
.isNull(Process::getExamStatus)
|
||||
.groupBy(Process::getUserId)
|
||||
.orderByDesc(BaseDO::getCreateTime);
|
||||
return this.page(page,queryWrapper);
|
||||
|
@ -11,13 +11,13 @@
|
||||
drive_school_exam_batch dseb
|
||||
WHERE dseb.deleted=0
|
||||
<if test="entity.coachId != null and entity.coachId != ''">
|
||||
and dsrc.coach_id =#{entity.coachId}
|
||||
and dseb.coach_id =#{entity.coachId}
|
||||
</if>
|
||||
<if test="entity.courseId != null and entity.courseId != ''">
|
||||
and dsrc.course_id =#{entity.courseId}
|
||||
and dseb.course_id =#{entity.courseId}
|
||||
</if>
|
||||
<if test="entity.subject != null and entity.subject != ''">
|
||||
and dsrc.subject =#{entity.subject}
|
||||
and dseb.subject =#{entity.subject}
|
||||
</if>
|
||||
ORDER BY dseb.create_time
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user