Преглед изворни кода

商家端 分类管理 桌号管理 修改提示语

qinxuyang пре 1 месец
родитељ
комит
229409520e

+ 2 - 4
alien-entity/src/main/resources/mapper/StoreReservationMapper.xml

@@ -119,10 +119,8 @@
         GROUP BY
             ur.id
         ORDER BY
-            ur.status DESC,
-            ur.reservation_date DESC,
-            ur.start_time ASC,
-            ur.created_time DESC
+            CASE WHEN ur.status = 1 THEN 0 ELSE 1 END ASC,
+            ur.reservation_date ASC
     </select>
 
 </mapper>

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreBookingCategoryController.java

@@ -102,7 +102,7 @@ public class StoreBookingCategoryController {
         } catch (Exception e) {
             log.error("新增预订服务分类失败", e);
             // 如果是名称已存在的错误,直接返回友好提示
-            return R.fail("新增失败:" + e.getMessage());
+            return R.fail(e.getMessage());
         }
         return R.success("新增成功");
     }

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/impl/StoreBookingCategoryServiceImpl.java

@@ -170,7 +170,7 @@ public class StoreBookingCategoryServiceImpl extends ServiceImpl<StoreBookingCat
                 if (duplicateCategory != null) {
                     log.warn("更新预订服务分类失败:当前门店下分类名称已存在,storeId={}, categoryName={}, id={}", 
                             existingCategory.getStoreId(), categoryName, category.getId());
-                    throw new RuntimeException("此名称已存在不能编辑");
+                    throw new RuntimeException("此名称已存在");
                 }
             }
         }

+ 3 - 3
alien-store/src/main/java/shop/alien/store/service/impl/StoreBookingTableServiceImpl.java

@@ -226,7 +226,7 @@ public class StoreBookingTableServiceImpl extends ServiceImpl<StoreBookingTableM
         if (existingTable != null) {
             log.warn("新增预订服务桌号失败:同一分类下桌号已存在,storeId={}, categoryId={}, tableNumber={}", 
                     table.getStoreId(), table.getCategoryId(), tableNumber);
-            throw new RuntimeException("该分类下桌号已存在不能添加");
+            throw new RuntimeException("此桌号已存在");
         }
         
         table.setCreatedUserId(userId);
@@ -305,9 +305,9 @@ public class StoreBookingTableServiceImpl extends ServiceImpl<StoreBookingTableM
             log.warn("批量新增预订服务桌号失败:同一分类下桌号已存在,storeId={}, categoryId={}, existingNumbers={}", 
                     storeId, categoryId, existingNumbers);
             if (existingNumbers.size() == 1) {
-                throw new RuntimeException("该分类下桌号已存在不能添加");
+                throw new RuntimeException("此桌号已存在");
             } else {
-                throw new RuntimeException("该分类下以下桌号已存在不能添加:" + String.join("、", existingNumbers));
+                throw new RuntimeException("此桌号已存在:" + String.join("、", existingNumbers));
             }
         }