Commit f15e4cd2 by huluobin

睫毛卸除、卸甲、延长,跳色(辅助服务)与主服务一起时,不需要单独开单,主服务开单即可。 店员端若要修改主服务的话,系统将辅助服务一并清空,美甲师选服务的时候跟用户端一样,弹出是否需要辅助服务

parent 56850520
......@@ -600,12 +600,13 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
@Override
public void updateScheduledServeStatus(Integer scheduleServeId, Integer status, Integer forceLeisureConfig) {
ScheduleServe scheduleServe = scheduleServeMapper.selectById(scheduleServeId);
if (scheduleServe.getMainServeId() != null) {
throw new RRException("不能对辅助服务开单");
}
//所有需要更新的服务
List<ScheduleServe> updateList = scheduleServeMapper.selectList(new LambdaQueryWrapper<ScheduleServe>()
.eq(ScheduleServe::getSchId, scheduleServe.getSchId())
.eq(ScheduleServe::getServeId, scheduleServe.getServeId()));
List<ScheduleServe> updateList = scheduleServeMapper.selectUpdateStatusList(scheduleServe.getSchId(), scheduleServe.getServeId());
//预约
ScheduleManage scheduleManage = scheduleManageMapper.selectById(scheduleServe.getSchId());
//更新某一个服务状态已完成
......@@ -837,7 +838,8 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
}
/**ScheduleManageServiceImpl
/**
* ScheduleManageServiceImpl
* 通过ScheduleServe构建TreeProgram
*
* @param scheduleServe
......
......@@ -13,4 +13,13 @@ public interface ScheduleServeMapper extends BaseMapper<ScheduleServe> {
@Param("days") Date days,
@Param("schTypeId") Integer schTypeId,
@Param("serveId") Integer serveId);
/**
* 更新服务状态需要更新的预约服务列表
*
* @param schId
* @param serveId
* @return
*/
List<ScheduleServe> selectUpdateStatusList(@Param("schId") Integer schId, @Param("serveId") Integer serveId);
}
......@@ -17,5 +17,11 @@
and t1.serve_id != #{serveId}
</if>
</select>
<select id="selectUpdateStatusList" resultType="com.gogirl.domain.order.serve.ScheduleServe">
select *
from scheduled_serve
where sch_id = #{schId}
and (serve_id = #{serveId} or main_serve_id = #{serveId})
</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