Prechádzať zdrojové kódy

门店详情接口回显营业时间businessHours

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
qmj 1 deň pred
rodič
commit
f490cce805

+ 8 - 1
ruoyi-admin/src/main/java/com/ruoyi/app/mendian/PosStoreController.java

@@ -442,7 +442,14 @@ public class PosStoreController extends BaseController {
     @PreAuthorize("@ss.hasPermi('chanting:store:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(posStoreService.selectPosStoreById(id));
+        PosStore posStore = posStoreService.selectPosStoreById(id);
+        // 回显营业时间(按周几分组的 timeSlots),供编辑门店时显示
+        if (posStore != null) {
+            LambdaQueryWrapper<OperatingHours> wrapper = new LambdaQueryWrapper<>();
+            wrapper.eq(OperatingHours::getMdId, id);
+            posStore.setBusinessHours(getStoreOperatOutput(operatingHoursService.list(wrapper), id));
+        }
+        return success(posStore);
     }
 
     /**