Commit 5cf10dc1 by 吕明尚

更改占用时间

parent b0c7d084
......@@ -89,6 +89,12 @@ public class SRoom extends BaseEntity
@TableField(exist = false)
private List<SPack> packList;
/**
* 美团点评店铺id
*/
@TableField(exist = false)
private String openShopUuid;
}
......@@ -96,6 +96,12 @@ public class SRoomVo extends BaseEntity
@TableField(exist = false)
private List<SPack> packList;
/**
* 美团点评店铺id
*/
@TableField(exist = false)
private String openShopUuid;
@Override
......
......@@ -16,6 +16,7 @@ import share.system.service.ISOrderService;
import share.system.service.ISStoreService;
import share.system.service.RoomStatusService;
import java.text.ParseException;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
......@@ -50,10 +51,14 @@ public class RoomStatusServiceImpl implements RoomStatusService {
private List<RoomStatusVo> generatorRoomStatusList(SStore store,Long roomId,List<SOrder> orderList,Date day){
String nowTime = "00:00";
String dayStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day);
//如果day等于当天,nowTime设置为当前时间+30分钟
//如果day等于当天,判断当前时间是否小于30分钟,小于改为30
if(StringUtils.equals(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,day)
,DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,DateUtils.getNowDate()))){
nowTime = DateUtils.parseDateToStr("HH:mm",DateUtils.addMinutes(DateUtils.getNowDate(), Constants.ROOM_LOCK_DELAY_MINUTE));
String m = DateUtils.parseDateToStr("m", DateUtils.getNowDate());
if (Integer.valueOf(m).compareTo(new Integer(30)) < 0) {
nowTime = "30";
}
// nowTime = DateUtils.parseDateToStr("HH:mm",DateUtils.addMinutes(DateUtils.getNowDate(), Constants.ROOM_LOCK_DELAY_MINUTE));
}
List<RoomStatusVo> voList = new ArrayList<>();
String finalNowTime = nowTime;
......
......@@ -247,6 +247,7 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper, SRoom> implements
@Override
public SRoom queryById(Long id) {
SRoom room = sRoomMapper.selectById(id);
room.setOpenShopUuid(sStoreService.selectSStoreById(room.getStoreId()).getOpenShopUuid());
room.setPackList(getPackByRoomId(room.getId()));
return room;
}
......
......@@ -14,6 +14,7 @@
<result property="manager" column="manager" />
<result property="phone" column="phone" />
<result property="info" column="info" />
<result property="openShopUuid" column="open_shop_uuid"/>
<result property="deviceGroup" column="device_group"/>
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
......@@ -36,6 +37,7 @@
manager,
phone,
info,
open_shop_uuid,
device_group,
create_by,
create_time,
......@@ -60,6 +62,7 @@
<if test="manager != null and manager != ''"> and manager = #{manager}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="info != null and info != ''"> and info = #{info}</if>
<if test="openShopUuid != null and openShopUuid != ''">and open_shop_uuid = #{openShopUuid}</if>
<if test="deviceGroup != null and deviceGroup != ''">and device_group = #{deviceGroup}</if>
<if test="status != null "> and status = #{status}</if>
<if test="openStartTime != null "> and open_start_time = #{openStartTime}</if>
......@@ -84,6 +87,7 @@
<if test="manager != null">manager,</if>
<if test="phone != null">phone,</if>
<if test="info != null">info,</if>
<if test="openShopUuid != null">open_shop_uuid,</if>
<if test="deviceGroup != null">device_group,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
......@@ -104,6 +108,7 @@
<if test="manager != null">#{manager},</if>
<if test="phone != null">#{phone},</if>
<if test="info != null">#{info},</if>
<if test="openShopUuid != null">#{openShopUuid},</if>
<if test="deviceGroup != null">#{deviceGroup},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -128,6 +133,7 @@
<if test="manager != null">manager = #{manager},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="info != null">info = #{info},</if>
<if test="openShopUuid != null">open_shop_uuid = #{openShopUuid},</if>
<if test="deviceGroup != null">device_group = #{deviceGroup},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......
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