Explorar o código

update graphql

Csy817 %!s(int64=6) %!d(string=hai) anos
pai
achega
1b57c42657
Modificáronse 3 ficheiros con 512 adicións e 56 borrados
  1. 252 28
      ec.txt
  2. 252 22
      ec_enhance.txt
  3. 8 6
      src/utils/gql.js

+ 252 - 28
ec.txt

@@ -38,7 +38,7 @@ query specificationStockbyid($id: ID) {
     specificationStockbyid: specificationStock_by_id(id: $id) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -47,6 +47,7 @@ query specificationStockbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -59,6 +60,18 @@ query specificationStockbyid($id: ID) {
     }
 }
 
+query categorybyprops($name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String) {
+    categorybyprops: category_by_props(name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 query orderPaybyprops($user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
     orderPaybyprops: orderPay_by_props(user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
         id
@@ -108,7 +121,7 @@ query userCartbyid($id: ID) {
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -117,6 +130,7 @@ query userCartbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -195,7 +209,7 @@ query userCollectbyprops($user_id: ID, $createdAt: String, $updatedAt: String) {
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -204,6 +218,7 @@ query userCollectbyprops($user_id: ID, $createdAt: String, $updatedAt: String) {
             id
             intro
             price
+
             img
             stock
         }
@@ -212,9 +227,9 @@ query userCollectbyprops($user_id: ID, $createdAt: String, $updatedAt: String) {
     }
 }
 
-query productbyprops($category: String, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
-    productbyprops: product_by_props(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
-        category
+query productbyprops($recommend: Int, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    productbyprops: product_by_props(recommend: $recommend updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status intro: $intro price: $price category_id: $category_id img: $img stock: $stock) {
+        recommend
         updatedAt
         unit
         name
@@ -223,6 +238,15 @@ query productbyprops($category: String, $updatedAt: String, $unit: String, $name
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -272,7 +296,7 @@ query specificationStockbyprops($product_id: ID, $color: String, $size: String,
     specificationStockbyprops: specificationStock_by_props(product_id: $product_id color: $color size: $size stock: $stock status: $status createdAt: $createdAt updatedAt: $updatedAt) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -281,6 +305,7 @@ query specificationStockbyprops($product_id: ID, $color: String, $size: String,
             id
             intro
             price
+
             img
             stock
         }
@@ -299,7 +324,7 @@ query orderProductbyid($id: ID) {
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -308,6 +333,7 @@ query orderProductbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -381,7 +407,7 @@ query userCollectbyid($id: ID) {
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -390,6 +416,7 @@ query userCollectbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -488,6 +515,17 @@ query userAddressbyid($id: ID) {
     }
 }
 
+query slideshowbyid($id: ID) {
+    slideshowbyid: slideshow_by_id(id: $id) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 query orderLogisticsbyprops($updatedAt: String, $logisticsFee: Float, $expressId: String, $createdAt: String, $order_id: ID, $consigneeTel: String, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String) {
     orderLogisticsbyprops: orderLogistics_by_props(updatedAt: $updatedAt logisticsFee: $logisticsFee expressId: $expressId createdAt: $createdAt order_id: $order_id consigneeTel: $consigneeTel consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName) {
         updatedAt
@@ -528,6 +566,23 @@ query orderLogisticsbyprops($updatedAt: String, $logisticsFee: Float, $expressId
     }
 }
 
+query shopbyprops($description: String, $address: String, $updatedAt: String, $telephone: String, $name: String, $createdAt: String, $status: String, $notice: String, $intro: String) {
+    shopbyprops: shop_by_props(description: $description address: $address updatedAt: $updatedAt telephone: $telephone name: $name createdAt: $createdAt status: $status notice: $notice intro: $intro) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
 query orderbyid($id: ID) {
     orderbyid: order_by_id(id: $id) {
         deliveryTime
@@ -596,7 +651,7 @@ query orderProductbyprops($updatedAt: String, $productColor: String, $unit: Stri
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -605,6 +660,7 @@ query orderProductbyprops($updatedAt: String, $productColor: String, $unit: Stri
             id
             intro
             price
+
             img
             stock
         }
@@ -666,7 +722,7 @@ query orderProductbyprops($updatedAt: String, $productColor: String, $unit: Stri
 
 query productbyid($id: ID) {
     productbyid: product_by_id(id: $id) {
-        category
+        recommend
         updatedAt
         unit
         name
@@ -675,6 +731,15 @@ query productbyid($id: ID) {
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -712,6 +777,18 @@ query userDatabyprops($nickname: String, $avatar: String, $isVip: Boolean, $vipC
     }
 }
 
+query categorybyid($id: ID) {
+    categorybyid: category_by_id(id: $id) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 query userCartbyprops($user_id: ID, $product_id: ID, $specificationStock_id: ID, $count: Int, $createdAt: String, $updatedAt: String) {
     userCartbyprops: userCart_by_props(user_id: $user_id product_id: $product_id specificationStock_id: $specificationStock_id count: $count createdAt: $createdAt updatedAt: $updatedAt) {
         id
@@ -726,7 +803,7 @@ query userCartbyprops($user_id: ID, $product_id: ID, $specificationStock_id: ID,
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -735,6 +812,7 @@ query userCartbyprops($user_id: ID, $product_id: ID, $specificationStock_id: ID,
             id
             intro
             price
+
             img
             stock
         }
@@ -754,6 +832,23 @@ query userCartbyprops($user_id: ID, $product_id: ID, $specificationStock_id: ID,
     }
 }
 
+query shopbyid($id: ID) {
+    shopbyid: shop_by_id(id: $id) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
 query userbyprops($openid: String, $username: String, $password: String, $telephone: String, $email: String, $userData_id: ID, $createdAt: String, $updatedAt: String) {
     userbyprops: user_by_props(openid: $openid username: $username password: $password telephone: $telephone email: $email userData_id: $userData_id createdAt: $createdAt updatedAt: $updatedAt) {
         email
@@ -839,6 +934,17 @@ query orderbyprops($deliveryTime: String, $remark: String, $updatedAt: String, $
     }
 }
 
+query slideshowbyprops($name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String) {
+    slideshowbyprops: slideshow_by_props(name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 mutation createorderPay($id: ID!, $user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
     createorderPay: create_orderPay(id: $id user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
         id
@@ -897,9 +1003,41 @@ mutation createuser($email: String, $updatedAt: String, $password: String, $tele
     }
 }
 
-mutation updateproduct($category: String, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
-    updateproduct: update_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
-        category
+mutation updateslideshow($id: ID, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String) {
+    updateslideshow: update_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
+mutation updateshop($description: String, $address: String, $updatedAt: String, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID, $slideshow: String, $notice: String, $intro: String, $img: String) {
+    updateshop: update_shop(description: $description address: $address updatedAt: $updatedAt telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id slideshow: $slideshow notice: $notice intro: $intro img: $img) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
+mutation deletecategory($id: ID, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String) {
+    deletecategory: delete_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt)
+}
+
+mutation updateproduct($recommend: Int, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    updateproduct: update_product(recommend: $recommend updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock) {
+        recommend
         updatedAt
         unit
         name
@@ -908,6 +1046,15 @@ mutation updateproduct($category: String, $updatedAt: String, $unit: String, $na
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -936,6 +1083,27 @@ mutation updateuser($email: String, $updatedAt: String, $password: String, $tele
     }
 }
 
+mutation createshop($description: String, $address: String, $updatedAt: String, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID!, $slideshow: String, $notice: String, $intro: String, $img: String) {
+    createshop: create_shop(description: $description address: $address updatedAt: $updatedAt telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id slideshow: $slideshow notice: $notice intro: $intro img: $img) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
+mutation deleteslideshow($id: ID, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String) {
+    deleteslideshow: delete_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt)
+}
+
 mutation updateuserData($id: ID, $nickname: String, $avatar: String, $isVip: Boolean, $vipCode: String, $userPoint: Int, $createdAt: String, $updatedAt: String) {
     updateuserData: update_userData(id: $id nickname: $nickname avatar: $avatar isVip: $isVip vipCode: $vipCode userPoint: $userPoint createdAt: $createdAt updatedAt: $updatedAt) {
         id
@@ -963,7 +1131,7 @@ mutation createuserCollect($id: ID!, $product_id: ID, $user_id: ID, $createdAt:
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -972,6 +1140,7 @@ mutation createuserCollect($id: ID!, $product_id: ID, $user_id: ID, $createdAt:
             id
             intro
             price
+
             img
             stock
         }
@@ -1040,6 +1209,29 @@ mutation updateuserAddress($address: String, $updatedAt: String, $telephone: Str
     }
 }
 
+mutation updatecategory($id: ID, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String) {
+    updatecategory: update_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
+}
+
+mutation createslideshow($id: ID!, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String) {
+    createslideshow: create_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 mutation updateadmin($id: ID, $openid: String, $username: String, $password: String, $telephone: String, $email: String, $createdAt: String, $updatedAt: String) {
     updateadmin: update_admin(id: $id openid: $openid username: $username password: $password telephone: $telephone email: $email createdAt: $createdAt updatedAt: $updatedAt) {
         id
@@ -1076,9 +1268,9 @@ mutation createuserSearch($id: ID!, $keyword: Int, $user_id: ID, $createdAt: Str
     }
 }
 
-mutation createproduct($category: String, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID!, $intro: String, $price: Float, $img: String, $stock: Int) {
-    createproduct: create_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
-        category
+mutation createproduct($recommend: Int, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID!, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    createproduct: create_product(recommend: $recommend updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock) {
+        recommend
         updatedAt
         unit
         name
@@ -1087,6 +1279,15 @@ mutation createproduct($category: String, $updatedAt: String, $unit: String, $na
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -1100,7 +1301,7 @@ mutation createspecificationStock($id: ID!, $product_id: ID, $color: String, $si
     createspecificationStock: create_specificationStock(id: $id product_id: $product_id color: $color size: $size stock: $stock status: $status createdAt: $createdAt updatedAt: $updatedAt) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1109,6 +1310,7 @@ mutation createspecificationStock($id: ID!, $product_id: ID, $color: String, $si
             id
             intro
             price
+
             img
             stock
         }
@@ -1121,6 +1323,10 @@ mutation createspecificationStock($id: ID!, $product_id: ID, $color: String, $si
     }
 }
 
+mutation deleteshop($description: String, $address: String, $updatedAt: String, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID, $notice: String, $intro: String) {
+    deleteshop: delete_shop(description: $description address: $address updatedAt: $updatedAt telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id notice: $notice intro: $intro)
+}
+
 mutation deleteorderProduct($updatedAt: String, $productColor: String, $unit: String, $product_id: ID, $productSize: String, $orderPay: Float, $createdAt: String, $productImg: String, $productName: String, $specificationStock_id: ID, $order_id: ID, $productPrice: Float, $id: ID, $count: Int, $productPay: Float, $user_id: ID, $orderPay_id: ID) {
     deleteorderProduct: delete_orderProduct(updatedAt: $updatedAt productColor: $productColor unit: $unit product_id: $product_id productSize: $productSize orderPay: $orderPay createdAt: $createdAt productImg: $productImg productName: $productName specificationStock_id: $specificationStock_id order_id: $order_id productPrice: $productPrice id: $id count: $count productPay: $productPay user_id: $user_id orderPay_id: $orderPay_id)
 }
@@ -1143,7 +1349,7 @@ mutation updateuserCollect($id: ID, $product_id: ID, $user_id: ID, $createdAt: S
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1152,6 +1358,7 @@ mutation updateuserCollect($id: ID, $product_id: ID, $user_id: ID, $createdAt: S
             id
             intro
             price
+
             img
             stock
         }
@@ -1172,7 +1379,7 @@ mutation updatespecificationStock($id: ID, $product_id: ID, $color: String, $siz
     updatespecificationStock: update_specificationStock(id: $id product_id: $product_id color: $color size: $size stock: $stock status: $status createdAt: $createdAt updatedAt: $updatedAt) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1181,6 +1388,7 @@ mutation updatespecificationStock($id: ID, $product_id: ID, $color: String, $siz
             id
             intro
             price
+
             img
             stock
         }
@@ -1212,7 +1420,7 @@ mutation updateuserCart($id: ID, $user_id: ID, $product_id: ID, $specificationSt
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1221,6 +1429,7 @@ mutation updateuserCart($id: ID, $user_id: ID, $product_id: ID, $specificationSt
             id
             intro
             price
+
             img
             stock
         }
@@ -1258,7 +1467,7 @@ mutation createuserCart($id: ID!, $user_id: ID, $product_id: ID, $specificationS
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1267,6 +1476,7 @@ mutation createuserCart($id: ID!, $user_id: ID, $product_id: ID, $specificationS
             id
             intro
             price
+
             img
             stock
         }
@@ -1575,7 +1785,7 @@ mutation createorderProduct($updatedAt: String, $productColor: String, $unit: St
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1584,6 +1794,7 @@ mutation createorderProduct($updatedAt: String, $productColor: String, $unit: St
             id
             intro
             price
+
             img
             stock
         }
@@ -1643,8 +1854,20 @@ mutation createorderProduct($updatedAt: String, $productColor: String, $unit: St
     }
 }
 
-mutation deleteproduct($category: String, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
-    deleteproduct: delete_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock)
+mutation deleteproduct($recommend: Int, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    deleteproduct: delete_product(recommend: $recommend updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock)
+}
+
+mutation createcategory($id: ID!, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String) {
+    createcategory: create_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
 }
 
 mutation updateorderProduct($updatedAt: String, $productColor: String, $unit: String, $product_id: ID, $productSize: String, $orderPay: Float, $createdAt: String, $productImg: String, $productName: String, $specificationStock_id: ID, $order_id: ID, $productPrice: Float, $id: ID, $count: Int, $productPay: Float, $user_id: ID, $orderPay_id: ID) {
@@ -1653,7 +1876,7 @@ mutation updateorderProduct($updatedAt: String, $productColor: String, $unit: St
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1662,6 +1885,7 @@ mutation updateorderProduct($updatedAt: String, $productColor: String, $unit: St
             id
             intro
             price
+
             img
             stock
         }

+ 252 - 22
ec_enhance.txt

@@ -42,7 +42,7 @@ query specificationStockbyid($id: ID) {
     specificationStockbyid: specificationStock_by_id(id: $id) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -51,6 +51,7 @@ query specificationStockbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -63,6 +64,18 @@ query specificationStockbyid($id: ID) {
     }
 }
 
+query categorybyprops($updatedAt: String, $where: category_filter, $sort_by: category_sort_by, $limit: Int, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $order: Int, $img: String, $skip: Int) {
+    categorybyprops: category_by_props(updatedAt: $updatedAt where: $where sort_by: $sort_by limit: $limit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status order: $order img: $img skip: $skip) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 query orderPaybyprops($where: orderPay_filter, $sort_by: orderPay_sort_by, $limit: Int, $payTime: String, $order_by: OrderBy, $transactionId: String, $totalPay: Float, $filter: Filter, $order_id: ID, $user_id: ID, $skip: Int) {
     orderPaybyprops: orderPay_by_props(where: $where sort_by: $sort_by limit: $limit payTime: $payTime order_by: $order_by transactionId: $transactionId totalPay: $totalPay filter: $filter order_id: $order_id user_id: $user_id skip: $skip) {
         id
@@ -112,7 +125,7 @@ query userCartbyid($id: ID) {
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -121,6 +134,7 @@ query userCartbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -199,7 +213,7 @@ query userCollectbyprops($updatedAt: String, $where: userCollect_filter, $sort_b
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -208,6 +222,7 @@ query userCollectbyprops($updatedAt: String, $where: userCollect_filter, $sort_b
             id
             intro
             price
+
             img
             stock
         }
@@ -216,9 +231,9 @@ query userCollectbyprops($updatedAt: String, $where: userCollect_filter, $sort_b
     }
 }
 
-query productbyprops($category: String, $updatedAt: String, $where: product_filter, $sort_by: product_sort_by, $limit: Int, $unit: String, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $intro: String, $price: Float, $img: String, $stock: Int, $skip: Int) {
-    productbyprops: product_by_props(category: $category updatedAt: $updatedAt where: $where sort_by: $sort_by limit: $limit unit: $unit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status intro: $intro price: $price img: $img stock: $stock skip: $skip) {
-        category
+query productbyprops($recommend: Int, $updatedAt: String, $where: product_filter, $sort_by: product_sort_by, $limit: Int, $unit: String, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int, $skip: Int) {
+    productbyprops: product_by_props(recommend: $recommend updatedAt: $updatedAt where: $where sort_by: $sort_by limit: $limit unit: $unit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status intro: $intro price: $price category_id: $category_id img: $img stock: $stock skip: $skip) {
+        recommend
         updatedAt
         unit
         name
@@ -227,6 +242,15 @@ query productbyprops($category: String, $updatedAt: String, $where: product_filt
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -280,7 +304,7 @@ query specificationStockbyprops($updatedAt: String, $where: specificationStock_f
     specificationStockbyprops: specificationStock_by_props(updatedAt: $updatedAt where: $where color: $color sort_by: $sort_by limit: $limit product_id: $product_id order_by: $order_by createdAt: $createdAt size: $size filter: $filter status: $status stock: $stock skip: $skip) {
         id
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -289,6 +313,7 @@ query specificationStockbyprops($updatedAt: String, $where: specificationStock_f
             id
             intro
             price
+
             img
             stock
         }
@@ -307,7 +332,7 @@ query orderProductbyid($id: ID) {
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -316,6 +341,7 @@ query orderProductbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -389,7 +415,7 @@ query userCollectbyid($id: ID) {
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -398,6 +424,7 @@ query userCollectbyid($id: ID) {
             id
             intro
             price
+
             img
             stock
         }
@@ -496,6 +523,29 @@ query userAddressbyid($id: ID) {
     }
 }
 
+query slideshowsearch($updatedAt: String, $limit: Int, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: Int, $breakout: Field, $aggregate: Aggregation, $img: String, $skip: Int) {
+    slideshowsearch: slideshow_search(updatedAt: $updatedAt limit: $limit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status breakout: $breakout aggregate: $aggregate img: $img skip: $skip)
+}
+
+query slideshowbyid($id: ID) {
+    slideshowbyid: slideshow_by_id(id: $id) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
+query categorysearch($updatedAt: String, $limit: Int, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $breakout: Field, $order: Int, $aggregate: Aggregation, $img: String, $skip: Int) {
+    categorysearch: category_search(updatedAt: $updatedAt limit: $limit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status breakout: $breakout order: $order aggregate: $aggregate img: $img skip: $skip)
+}
+
+query shopsearch($description: String, $address: String, $updatedAt: String, $limit: Int, $order_by: OrderBy, $telephone: String, $name: String, $createdAt: String, $filter: Filter, $status: String, $breakout: Field, $notice: String, $intro: String, $aggregate: Aggregation, $skip: Int) {
+    shopsearch: shop_search(description: $description address: $address updatedAt: $updatedAt limit: $limit order_by: $order_by telephone: $telephone name: $name createdAt: $createdAt filter: $filter status: $status breakout: $breakout notice: $notice intro: $intro aggregate: $aggregate skip: $skip)
+}
+
 query orderLogisticsbyprops($updatedAt: String, $where: orderLogistics_filter, $logisticsFee: Float, $sort_by: orderLogistics_sort_by, $limit: Int, $expressId: String, $order_by: OrderBy, $createdAt: String, $filter: Filter, $order_id: ID, $consigneeTel: String, $consignAddress: String, $LogisticsStatus: String, $user_id: ID, $consigneeName: String, $skip: Int) {
     orderLogisticsbyprops: orderLogistics_by_props(updatedAt: $updatedAt where: $where logisticsFee: $logisticsFee sort_by: $sort_by limit: $limit expressId: $expressId order_by: $order_by createdAt: $createdAt filter: $filter order_id: $order_id consigneeTel: $consigneeTel consignAddress: $consignAddress LogisticsStatus: $LogisticsStatus user_id: $user_id consigneeName: $consigneeName skip: $skip) {
         updatedAt
@@ -536,6 +586,23 @@ query orderLogisticsbyprops($updatedAt: String, $where: orderLogistics_filter, $
     }
 }
 
+query shopbyprops($description: String, $address: String, $updatedAt: String, $where: shop_filter, $sort_by: shop_sort_by, $limit: Int, $order_by: OrderBy, $telephone: String, $name: String, $createdAt: String, $filter: Filter, $status: String, $notice: String, $intro: String, $skip: Int) {
+    shopbyprops: shop_by_props(description: $description address: $address updatedAt: $updatedAt where: $where sort_by: $sort_by limit: $limit order_by: $order_by telephone: $telephone name: $name createdAt: $createdAt filter: $filter status: $status notice: $notice intro: $intro skip: $skip) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
 query usersearch($email: String, $updatedAt: String, $limit: Int, $password: String, $order_by: OrderBy, $telephone: String, $username: String, $createdAt: String, $filter: Filter, $openid: String, $breakout: Field, $userData_id: ID, $aggregate: Aggregation, $skip: Int) {
     usersearch: user_search(email: $email updatedAt: $updatedAt limit: $limit password: $password order_by: $order_by telephone: $telephone username: $username createdAt: $createdAt filter: $filter openid: $openid breakout: $breakout userData_id: $userData_id aggregate: $aggregate skip: $skip)
 }
@@ -616,7 +683,7 @@ query orderProductbyprops($updatedAt: String, $where: orderProduct_filter, $sort
         productColor
         unit
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -625,6 +692,7 @@ query orderProductbyprops($updatedAt: String, $where: orderProduct_filter, $sort
             id
             intro
             price
+
             img
             stock
         }
@@ -686,7 +754,7 @@ query orderProductbyprops($updatedAt: String, $where: orderProduct_filter, $sort
 
 query productbyid($id: ID) {
     productbyid: product_by_id(id: $id) {
-        category
+        recommend
         updatedAt
         unit
         name
@@ -695,6 +763,15 @@ query productbyid($id: ID) {
         id
         intro
         price
+        category_id {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
         img
         stock
     }
@@ -741,6 +818,18 @@ query specificationStocksearch($updatedAt: String, $color: String, $limit: Int,
     specificationStocksearch: specificationStock_search(updatedAt: $updatedAt color: $color limit: $limit product_id: $product_id order_by: $order_by createdAt: $createdAt size: $size filter: $filter status: $status breakout: $breakout aggregate: $aggregate stock: $stock skip: $skip)
 }
 
+query categorybyid($id: ID) {
+    categorybyid: category_by_id(id: $id) {
+        id
+        name
+        img
+        order
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 query userCartsearch($updatedAt: String, $limit: Int, $product_id: ID, $order_by: OrderBy, $createdAt: String, $specificationStock_id: ID, $filter: Filter, $count: Int, $breakout: Field, $user_id: ID, $aggregate: Aggregation, $skip: Int) {
     userCartsearch: userCart_search(updatedAt: $updatedAt limit: $limit product_id: $product_id order_by: $order_by createdAt: $createdAt specificationStock_id: $specificationStock_id filter: $filter count: $count breakout: $breakout user_id: $user_id aggregate: $aggregate skip: $skip)
 }
@@ -759,7 +848,7 @@ query userCartbyprops($updatedAt: String, $where: userCart_filter, $sort_by: use
             id
         }
         product_id {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -768,6 +857,7 @@ query userCartbyprops($updatedAt: String, $where: userCart_filter, $sort_by: use
             id
             intro
             price
+
             img
             stock
         }
@@ -799,8 +889,25 @@ query ordersearch($deliveryTime: String, $remark: String, $updatedAt: String, $o
     ordersearch: order_search(deliveryTime: $deliveryTime remark: $remark updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id limit: $limit payTime: $payTime order_by: $order_by orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id filter: $filter orderShipFee: $orderShipFee count: $count breakout: $breakout user_id: $user_id productTotalPay: $productTotalPay aggregate: $aggregate orderPay_id: $orderPay_id skip: $skip)
 }
 
-query productsearch($category: String, $updatedAt: String, $limit: Int, $unit: String, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $breakout: Field, $intro: String, $aggregate: Aggregation, $price: Float, $img: String, $stock: Int, $skip: Int) {
-    productsearch: product_search(category: $category updatedAt: $updatedAt limit: $limit unit: $unit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status breakout: $breakout intro: $intro aggregate: $aggregate price: $price img: $img stock: $stock skip: $skip)
+query shopbyid($id: ID) {
+    shopbyid: shop_by_id(id: $id) {
+        description
+        address
+        updatedAt
+        telephone
+        name
+        createdAt
+        status
+        id
+        slideshow
+        notice
+        intro
+        img
+    }
+}
+
+query productsearch($recommend: Int, $updatedAt: String, $limit: Int, $unit: String, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: String, $breakout: Field, $intro: String, $aggregate: Aggregation, $price: Float, $category_id: ID, $img: String, $stock: Int, $skip: Int) {
+    productsearch: product_search(recommend: $recommend updatedAt: $updatedAt limit: $limit unit: $unit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status breakout: $breakout intro: $intro aggregate: $aggregate price: $price category_id: $category_id img: $img stock: $stock skip: $skip)
 }
 
 query userCollectsearch($updatedAt: String, $limit: Int, $order_by: OrderBy, $createdAt: String, $filter: Filter, $breakout: Field, $user_id: ID, $aggregate: Aggregation, $skip: Int) {
@@ -892,6 +999,17 @@ query orderbyprops($deliveryTime: String, $remark: String, $updatedAt: String, $
     }
 }
 
+query slideshowbyprops($updatedAt: String, $where: slideshow_filter, $sort_by: slideshow_sort_by, $limit: Int, $order_by: OrderBy, $name: String, $createdAt: String, $filter: Filter, $status: Int, $img: String, $skip: Int) {
+    slideshowbyprops: slideshow_by_props(updatedAt: $updatedAt where: $where sort_by: $sort_by limit: $limit order_by: $order_by name: $name createdAt: $createdAt filter: $filter status: $status img: $img skip: $skip) {
+        id
+        name
+        img
+        status
+        createdAt
+        updatedAt
+    }
+}
+
 mutation createorderPay($id: ID!, $user_id: ID, $order_id: ID, $totalPay: Float, $transactionId: String, $payTime: String) {
     createorderPay: create_orderPay(id: $id user_id: $user_id order_id: $order_id totalPay: $totalPay transactionId: $transactionId payTime: $payTime) {
         result
@@ -922,11 +1040,49 @@ mutation createuser($email: String, $updatedAt: String, $password: String, $tele
     }
 }
 
-mutation updateproduct($category: String, $updatedAt: String, $where: product_filter, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
-    updateproduct: update_product(category: $category updatedAt: $updatedAt where: $where unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
+mutation updateslideshow($id: ID, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String, $where: slideshow_filter) {
+    updateslideshow: update_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt where: $where) {
+        result
+        slideshow {
+            id
+            name
+            img
+            status
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+mutation updateshop($description: String, $address: String, $updatedAt: String, $where: shop_filter, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID, $slideshow: String, $notice: String, $intro: String, $img: String) {
+    updateshop: update_shop(description: $description address: $address updatedAt: $updatedAt where: $where telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id slideshow: $slideshow notice: $notice intro: $intro img: $img) {
+        result
+        shop {
+            description
+            address
+            updatedAt
+            telephone
+            name
+            createdAt
+            status
+            id
+            slideshow
+            notice
+            intro
+            img
+        }
+    }
+}
+
+mutation deletecategory($id: ID, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String, $where: category_filter) {
+    deletecategory: delete_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt where: $where)
+}
+
+mutation updateproduct($recommend: Int, $updatedAt: String, $where: product_filter, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    updateproduct: update_product(recommend: $recommend updatedAt: $updatedAt where: $where unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock) {
         result
         product {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -935,6 +1091,7 @@ mutation updateproduct($category: String, $updatedAt: String, $where: product_fi
             id
             intro
             price
+
             img
             stock
         }
@@ -957,6 +1114,30 @@ mutation updateuser($email: String, $updatedAt: String, $where: user_filter, $pa
     }
 }
 
+mutation createshop($description: String, $address: String, $updatedAt: String, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID!, $slideshow: String, $notice: String, $intro: String, $img: String) {
+    createshop: create_shop(description: $description address: $address updatedAt: $updatedAt telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id slideshow: $slideshow notice: $notice intro: $intro img: $img) {
+        result
+        shop {
+            description
+            address
+            updatedAt
+            telephone
+            name
+            createdAt
+            status
+            id
+            slideshow
+            notice
+            intro
+            img
+        }
+    }
+}
+
+mutation deleteslideshow($id: ID, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String, $where: slideshow_filter) {
+    deleteslideshow: delete_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt where: $where)
+}
+
 mutation updateuserData($updatedAt: String, $where: userData_filter, $userPoint: Int, $nickname: String, $createdAt: String, $id: ID, $avatar: String, $vipCode: String, $isVip: Boolean) {
     updateuserData: update_userData(updatedAt: $updatedAt where: $where userPoint: $userPoint nickname: $nickname createdAt: $createdAt id: $id avatar: $avatar vipCode: $vipCode isVip: $isVip) {
         result
@@ -1034,6 +1215,35 @@ mutation updateuserAddress($address: String, $updatedAt: String, $where: userAdd
     }
 }
 
+mutation updatecategory($id: ID, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String, $where: category_filter) {
+    updatecategory: update_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt where: $where) {
+        result
+        category {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
+    }
+}
+
+mutation createslideshow($id: ID!, $name: String, $img: String, $status: Int, $createdAt: String, $updatedAt: String) {
+    createslideshow: create_slideshow(id: $id name: $name img: $img status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        result
+        slideshow {
+            id
+            name
+            img
+            status
+            createdAt
+            updatedAt
+        }
+    }
+}
+
 mutation updateadmin($email: String, $updatedAt: String, $where: admin_filter, $password: String, $telephone: String, $username: String, $createdAt: String, $openid: String, $id: ID) {
     updateadmin: update_admin(email: $email updatedAt: $updatedAt where: $where password: $password telephone: $telephone username: $username createdAt: $createdAt openid: $openid id: $id) {
         result
@@ -1067,11 +1277,11 @@ mutation createuserSearch($id: ID!, $keyword: Int, $user_id: ID, $createdAt: Str
     }
 }
 
-mutation createproduct($category: String, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID!, $intro: String, $price: Float, $img: String, $stock: Int) {
-    createproduct: create_product(category: $category updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock) {
+mutation createproduct($recommend: Int, $updatedAt: String, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID!, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    createproduct: create_product(recommend: $recommend updatedAt: $updatedAt unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock) {
         result
         product {
-            category
+            recommend
             updatedAt
             unit
             name
@@ -1080,6 +1290,7 @@ mutation createproduct($category: String, $updatedAt: String, $unit: String, $na
             id
             intro
             price
+
             img
             stock
         }
@@ -1106,6 +1317,10 @@ mutation createspecificationStock($id: ID!, $product_id: ID, $color: String, $si
     }
 }
 
+mutation deleteshop($description: String, $address: String, $updatedAt: String, $where: shop_filter, $telephone: String, $name: String, $createdAt: String, $status: String, $id: ID, $notice: String, $intro: String) {
+    deleteshop: delete_shop(description: $description address: $address updatedAt: $updatedAt where: $where telephone: $telephone name: $name createdAt: $createdAt status: $status id: $id notice: $notice intro: $intro)
+}
+
 mutation deleteorderProduct($updatedAt: String, $where: orderProduct_filter, $productColor: String, $unit: String, $product_id: ID, $productSize: String, $orderPay: Float, $createdAt: String, $productImg: String, $productName: String, $specificationStock_id: ID, $order_id: ID, $productPrice: Float, $id: ID, $count: Int, $productPay: Float, $user_id: ID, $orderPay_id: ID) {
     deleteorderProduct: delete_orderProduct(updatedAt: $updatedAt where: $where productColor: $productColor unit: $unit product_id: $product_id productSize: $productSize orderPay: $orderPay createdAt: $createdAt productImg: $productImg productName: $productName specificationStock_id: $specificationStock_id order_id: $order_id productPrice: $productPrice id: $id count: $count productPay: $productPay user_id: $user_id orderPay_id: $orderPay_id)
 }
@@ -1351,8 +1566,23 @@ mutation createorderProduct($updatedAt: String, $productColor: String, $unit: St
     }
 }
 
-mutation deleteproduct($category: String, $updatedAt: String, $where: product_filter, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $img: String, $stock: Int) {
-    deleteproduct: delete_product(category: $category updatedAt: $updatedAt where: $where unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price img: $img stock: $stock)
+mutation deleteproduct($recommend: Int, $updatedAt: String, $where: product_filter, $unit: String, $name: String, $createdAt: String, $status: String, $id: ID, $intro: String, $price: Float, $category_id: ID, $img: String, $stock: Int) {
+    deleteproduct: delete_product(recommend: $recommend updatedAt: $updatedAt where: $where unit: $unit name: $name createdAt: $createdAt status: $status id: $id intro: $intro price: $price category_id: $category_id img: $img stock: $stock)
+}
+
+mutation createcategory($id: ID!, $name: String, $img: String, $order: Int, $status: String, $createdAt: String, $updatedAt: String) {
+    createcategory: create_category(id: $id name: $name img: $img order: $order status: $status createdAt: $createdAt updatedAt: $updatedAt) {
+        result
+        category {
+            id
+            name
+            img
+            order
+            status
+            createdAt
+            updatedAt
+        }
+    }
 }
 
 mutation updateorderProduct($updatedAt: String, $where: orderProduct_filter, $productColor: String, $unit: String, $product_id: ID, $productSize: String, $orderPay: Float, $createdAt: String, $productImg: String, $productName: String, $specificationStock_id: ID, $order_id: ID, $productPrice: Float, $id: ID, $count: Int, $productPay: Float, $user_id: ID, $orderPay_id: ID) {

+ 8 - 6
src/utils/gql.js

@@ -1,7 +1,9 @@
 const productbyprops = `
-    query productbyprops($category: String, $updatedAt: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
-        productbyprops: product_by_props(category: $category updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
-            category
+    query productbyprops($category_id: ID, $updatedAt: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
+        productbyprops: product_by_props(category_id: $category_id updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
+            category_id{
+                id
+            }
             updatedAt
             unit
             name
@@ -19,7 +21,9 @@ const productbyprops = `
 const productbyid = `
     query productbyid($id: ID) {
         productbyid: product_by_id(id: $id) {
-            category
+            category_id{
+                id
+            }
             updatedAt
             unit
             name
@@ -42,7 +46,6 @@ const cart_by_userid = `
             id
             product_id{
                 id
-                category
                 img
                 intro
                 name
@@ -170,7 +173,6 @@ const orderProduct_by_props = `
         productColor
         unit
         product_id {
-            category
             updatedAt
             unit
             name