Commit 10f56e85 by huluobin

修改预约

parent f4e0d5a8
......@@ -757,7 +757,8 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List<ScheduleServe> typeConflictScheduleServe = scheduleServeMapper.selectConflictType(
scheduleManageDTO.getScheduledUser(),
scheduleManageDTO.getArriveTime(),
baseServe.getSchTypeId());
baseServe.getSchTypeId(),
scheduleServeCommand.getId());
if (ListUtil.isNotEmpty(typeConflictScheduleServe)) {
throw new RRException("同类型服务一天只能预约一次");
}
......@@ -765,10 +766,10 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
});
}
private String getScheduleNo(Integer deparmentId) {
private String getScheduleNo(Integer debarmentId) {
//调用店铺服务根据id查询店铺
StoreManage storeManage = storeManageMapper.selectById(deparmentId);
StoreManage storeManage = storeManageMapper.selectById(debarmentId);
//生成预约单号
String shortCode = storeManage.getShortCode();
......
......@@ -11,5 +11,6 @@ public interface ScheduleServeMapper extends BaseMapper<ScheduleServe> {
List<ScheduleServe> selectConflictType(@Param("scheduledUser") Integer scheduledUser,
@Param("days") Date days,
@Param("schTypeId") Integer schTypeId);
@Param("schTypeId") Integer schTypeId,
@Param("scheduleServeId") Integer scheduleServeId);
}
......@@ -13,6 +13,9 @@
and TO_DAYS(t1.start_time) = TO_DAYS(#{days})
and t1.main_serve_id is null
and t2.`status` = 1
<if test="scheduleServeId!=null">
and t1.id != #{scheduleServeId}
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment