1.代客下单 桌号获取
This commit is contained in:
@@ -648,7 +648,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
}
|
}
|
||||||
redisTemplate.opsForValue().set("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, String.valueOf(Integer.parseInt(orderCode) + 1));
|
redisTemplate.opsForValue().set("SHOP:CODE:" + clientType + ":" + shopId + ":" + day, String.valueOf(Integer.parseInt(orderCode) + 1));
|
||||||
boolean flag = Boolean.TRUE.equals(redisTemplate.opsForValue().setIfAbsent("SHOP:CODE:SET" + clientType + ":" + shopId + ":" + day, orderCode));
|
boolean flag = Boolean.TRUE.equals(redisTemplate.opsForValue().setIfAbsent("SHOP:CODE:SET" + clientType + ":" + shopId + ":" + day, orderCode));
|
||||||
if (!flag) {
|
if (flag) {
|
||||||
return generateOrderCode(day, clientType, shopId);
|
return generateOrderCode(day, clientType, shopId);
|
||||||
}
|
}
|
||||||
// 增加计数器
|
// 增加计数器
|
||||||
|
|||||||
Reference in New Issue
Block a user