解绑优化
This commit is contained in:
@ -490,18 +490,20 @@ public class DiningPlatesServiceImpl implements DiningPlatesService {
|
||||
DiningPlatesDO diningPlatesDO = diningPlatesMapper.selectOne(Wrappers.<DiningPlatesDO>lambdaQuery()
|
||||
.eq(DiningPlatesDO::getDiningPlatesNum, diningPlatesNum)
|
||||
.eq(DiningPlatesDO::getStoreId, storeId));
|
||||
LocalDateTime bindingTime = diningPlatesDO.getBindingTime();
|
||||
long seconds = Duration.between(bindingTime, LocalDateTime.now()).getSeconds();
|
||||
if(diningPlatesDO == null ) {
|
||||
map.put("data", "absent");
|
||||
map.put("msg",null);
|
||||
}else if (diningPlatesDO.getUserId() == null){
|
||||
map.put("data", "unbind");
|
||||
map.put("msg",null);
|
||||
}else if (seconds <= 3){
|
||||
}else {
|
||||
if (diningPlatesDO.getBindingTime()!=null){
|
||||
LocalDateTime bindingTime = diningPlatesDO.getBindingTime();
|
||||
long seconds = Duration.between(bindingTime, LocalDateTime.now()).getSeconds();
|
||||
if(seconds <=3){
|
||||
throw exception(DINING_PLATES_TIME);
|
||||
}
|
||||
else {
|
||||
}
|
||||
unbind(diningPlatesNum,storeId);
|
||||
map.put("data", "bind");
|
||||
map.put("msg","餐盘已解绑");
|
||||
|
Reference in New Issue
Block a user