Merge remote-tracking branch 'origin/driver' into driver
This commit is contained in:
commit
2d0febebce
@ -282,7 +282,10 @@ public class DataViewServiceImpl implements DataViewService {
|
||||
Map<String, Object> rtnMap = new HashMap<>();
|
||||
rtnMap.put("all",list.size());
|
||||
//按courseType分组
|
||||
Map<String,List<DlDriveSchoolStaffVO>> map = list.stream().collect(Collectors.groupingBy(DlDriveSchoolStaffVO::getCourseType));
|
||||
Map<String, List<DlDriveSchoolStaffVO>> map = list.stream()
|
||||
.filter(item -> item.getCourseType() != null) // 过滤掉 courseType 为 null 的元素
|
||||
.collect(Collectors.groupingBy(DlDriveSchoolStaffVO::getCourseType));
|
||||
|
||||
for (String key:map.keySet()){
|
||||
rtnMap.put(key,map.get(key).size());
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.iocoder.yudao.common.SchoolRoleEnum;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCoachMapper;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolStudentMapper;
|
||||
|
@ -34,5 +34,9 @@ public class DriveSchoolContract extends TenantBaDO
|
||||
@Excel(name = "学员姓名")
|
||||
private String userName;
|
||||
private String address;
|
||||
/**
|
||||
* 签名图片
|
||||
*/
|
||||
private String userUrl;
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ public class AppTrainController {
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
pageReqVO.setUserId(userId);
|
||||
}
|
||||
pageReqVO.setIsEnd(true);
|
||||
return success(trainService.queryTrainListPage(pageReqVO,page));
|
||||
}
|
||||
|
||||
|
@ -21,4 +21,8 @@ public class TrainVO extends Train {
|
||||
* 课程类型
|
||||
*/
|
||||
private String courseType;
|
||||
/**
|
||||
* 是否结束(不为空时,分页查询会忽略当前进行中的)
|
||||
*/
|
||||
private Boolean isEnd;
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updater != null">updater,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="userUrl != null">user_url,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
@ -59,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updater != null">#{updater},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="userUrl != null">#{userUrl},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -57,16 +57,20 @@
|
||||
drive_school_train dst
|
||||
LEFT JOIN drive_school_course dsc ON dst.course_id = dsc.id
|
||||
where
|
||||
dst.deleted = 0
|
||||
<if test="entity.userId != null and entity.userId != ''">
|
||||
and dst.user_id =#{entity.userId}
|
||||
</if>
|
||||
<if test="entity.coachId != null and entity.coachId != ''">
|
||||
and dst.coach_id =#{entity.coachId}
|
||||
</if>
|
||||
<if test="entity.courseId != null and entity.courseId != ''">
|
||||
and dst.course_id =#{entity.courseId}
|
||||
</if>
|
||||
dst.deleted = 0
|
||||
<if test="entity.userId != null and entity.userId != ''">
|
||||
and dst.user_id =#{entity.userId}
|
||||
</if>
|
||||
<if test="entity.coachId != null and entity.coachId != ''">
|
||||
and dst.coach_id =#{entity.coachId}
|
||||
</if>
|
||||
<if test="entity.courseId != null and entity.courseId != ''">
|
||||
and dst.course_id =#{entity.courseId}
|
||||
</if>
|
||||
<if test="entity.isEnd != null and entity.isEnd != ''">
|
||||
and dst.end_time IS NOT NULL
|
||||
</if>
|
||||
order by dst.create_time desc
|
||||
</select>
|
||||
<select id="listJoinBatchByIds" resultType="cn.iocoder.yudao.module.train.vo.TrainVO">
|
||||
SELECT
|
||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO;
|
||||
@ -47,6 +48,9 @@ public class AdminUserApiImpl implements AdminUserApi {
|
||||
@Override
|
||||
public Long createUser(UserDTO userDTO) {
|
||||
UserSaveReqVO userSaveReqVO = BeanUtils.toBean(userDTO, UserSaveReqVO.class);
|
||||
//获取当前租户id
|
||||
Long tenantId = TenantContextHolder.getTenantId();
|
||||
userSaveReqVO.setTenantId(tenantId);
|
||||
return userService.createUser(userSaveReqVO);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user