qmj 2 недель назад
Родитель
Сommit
644ad603cb

+ 2 - 3
ruoyi-admin/src/main/java/com/ruoyi/app/mendian/PosStoreController.java

@@ -197,9 +197,8 @@ public class PosStoreController extends BaseController {
         posStoreEnrichService.enrichStoreList(stores);
         StoreOutput storeOutput = new StoreOutput();
         BeanUtils.copyProperties(stores.getFirst(), storeOutput);
-        JSONObject json = JSONUtil.parseObj(storeOutput, false);
-        json.set("collect", !list.isEmpty() ? 1 : 0);
-        return success(json);
+        storeOutput.setCollect(!list.isEmpty() ? 1 : 0);
+        return success(storeOutput);
 
     }
 

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/app/user/dto/StoreOutput.java

@@ -11,5 +11,6 @@ public class StoreOutput extends PosStore {
 
     private List<PosFood> foodList;
 
-
+    /** 是否已收藏 0=未收藏 1=已收藏 */
+    private Integer collect;
 }