gql.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. const productbyprops = `
  2. query productbyprops($category: String, $updatedAt: String, $name: String, $createdAt: String, $status: String, $intro: String, $price: Float, $img: String, $stock: Int) {
  3. productbyprops: product_by_props(category: $category updatedAt: $updatedAt name: $name createdAt: $createdAt status: $status intro: $intro price: $price img: $img stock: $stock) {
  4. category
  5. updatedAt
  6. unit
  7. name
  8. createdAt
  9. status
  10. id
  11. intro
  12. price
  13. img
  14. stock
  15. }
  16. }
  17. `
  18. const productbyid = `
  19. query productbyid($id: ID) {
  20. productbyid: product_by_id(id: $id) {
  21. category
  22. updatedAt
  23. unit
  24. name
  25. createdAt
  26. status
  27. id
  28. intro
  29. price
  30. img
  31. stock
  32. }
  33. }
  34. `
  35. const cart_by_userid = `
  36. query findUserCart($user_id:ID){
  37. cartList:userCart_by_props(user_id:$user_id){
  38. count
  39. createdAt
  40. id
  41. product_id{
  42. category
  43. createdAt
  44. img
  45. intro
  46. name
  47. price
  48. status
  49. stock
  50. unit
  51. updatedAt
  52. }
  53. }
  54. }
  55. `
  56. const userAddressbyprops = `
  57. query userAddressbyprops($address: String, $updatedAt: String, $telephone: String, $default: Int, $city: String, $username: String, $postcode: String, $createdAt: String, $deletedAt: String, $user_id: ID, $area: String, $province: String) {
  58. userAddressbyprops: userAddress_by_props(address: $address updatedAt: $updatedAt telephone: $telephone
  59. default: $default city: $city username: $username postcode: $postcode createdAt: $createdAt deletedAt: $deletedAt user_id: $user_id area: $area province: $province) {
  60. address
  61. updatedAt
  62. telephone
  63. default
  64. city
  65. username
  66. postcode
  67. createdAt
  68. deletedAt
  69. id
  70. user_id {
  71. email
  72. updatedAt
  73. password
  74. telephone
  75. username
  76. createdAt
  77. openid
  78. id
  79. }
  80. area
  81. province
  82. }
  83. }
  84. `
  85. const orderbyprops = `
  86. query orderbyprops($deliveryTime: String, $updatedAt: String, $orderLogistics_id: ID, $payTime: String, $orderTotalPay: Float, $createdAt: String, $orderStatus: String, $userAddress_id: ID, $orderShipFee: Float, $count: Int, $user_id: ID, $productTotalPay: Float, $orderPay_id: ID) {
  87. orderbyprops: order_by_props(deliveryTime: $deliveryTime updatedAt: $updatedAt orderLogistics_id: $orderLogistics_id payTime: $payTime orderTotalPay: $orderTotalPay createdAt: $createdAt orderStatus: $orderStatus userAddress_id: $userAddress_id orderShipFee: $orderShipFee count: $count user_id: $user_id productTotalPay: $productTotalPay orderPay_id: $orderPay_id) {
  88. deliveryTime
  89. updatedAt
  90. orderLogistics_id {
  91. updatedAt
  92. logisticsFee
  93. expressId
  94. createdAt
  95. consigneeTel
  96. id
  97. consignAddress
  98. LogisticsStatus
  99. consigneeName
  100. }
  101. payTime
  102. orderTotalPay
  103. createdAt
  104. orderStatus
  105. userAddress_id {
  106. address
  107. updatedAt
  108. telephone
  109. default
  110. city
  111. username
  112. postcode
  113. createdAt
  114. deletedAt
  115. id
  116. area
  117. province
  118. }
  119. id
  120. orderShipFee
  121. count
  122. productTotalPay
  123. orderPay_id {
  124. id
  125. totalPay
  126. transactionId
  127. payTime
  128. }
  129. }
  130. }
  131. `
  132. export {
  133. productbyprops,
  134. productbyid,
  135. cart_by_userid,
  136. userAddressbyprops,
  137. orderbyprops
  138. }