From 8d71505c7d7c6a2cd5f32716ad850429238a1a82 Mon Sep 17 00:00:00 2001 From: kwings6 <151895399+kwings6@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:33:18 +0800 Subject: [PATCH] Update the shopping project (#1149) --- .../dubbo/shop/web/ads/AdsController.java | 43 ---------- .../src/main/resources/application.yml | 28 ------- .../dubbo-shop-web-checkout/pom.xml | 78 ------------------- .../shop/web/checkout/CheckoutController.java | 39 ---------- .../CheckoutControllerApplication.java | 30 ------- .../src/main/resources/application.yml | 28 ------- .../dubbo-shop-web-goodsDetails/pom.xml | 78 ------------------- .../GoodsDetailsControllerApplication.java | 29 ------- .../src/main/resources/application.yml | 28 ------- .../dubbo-shop-web-hotGoods/pom.xml | 78 ------------------- .../shop/web/hotGoods/HotGoodsController.java | 41 ---------- .../HotGoodsControllerApplication.java | 29 ------- .../src/main/resources/application.yml | 28 ------- .../dubbo-shop-web-newGoods/pom.xml | 76 ------------------ .../shop/web/newGoods/NewGoodsController.java | 43 ---------- .../NewGoodsControllerApplication.java | 28 ------- .../pom.xml | 19 +---- .../apache/dubbo/shop/web/WebController.java} | 45 ++++++++++- .../shop/web/WebControllerApplication.java} | 6 +- .../src/main/resources/application.yml | 2 +- dubbo-samples-shop/dubbo-shop/pom.xml | 6 +- .../onlineShopping/src/apis/checkout.js | 2 +- .../onlineShopping/src/apis/detail.js | 7 +- .../onlineShopping/src/apis/home.js | 2 +- .../src/components/imageView/index.vue | 29 +------ .../src/components/sku/index.vue | 8 +- .../src/components/sku/power-set.js | 2 +- .../src/views/Checkout/index.vue | 56 +------------ .../onlineShopping/src/views/Detail/index.vue | 54 +------------ .../src/views/Home/components/HomePanel.vue | 4 +- .../views/Layout/components/LayoutFixed.vue | 11 +-- .../views/Layout/components/LayoutFooter.vue | 20 +---- .../views/Layout/components/LayoutHeader.vue | 24 +----- .../onlineShopping/src/views/Pay/index.vue | 24 +----- .../onlineShopping/vite.config.js | 41 +--------- 35 files changed, 70 insertions(+), 996 deletions(-) delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsController.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/resources/application.yml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/pom.xml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutController.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutControllerApplication.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/resources/application.yml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/pom.xml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsControllerApplication.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/resources/application.yml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/pom.xml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsController.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsControllerApplication.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/resources/application.yml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/pom.xml delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsController.java delete mode 100644 dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsControllerApplication.java rename dubbo-samples-shop/dubbo-shop/{dubbo-shop-web-ads => dubbo-shop-web}/pom.xml (69%) rename dubbo-samples-shop/dubbo-shop/{dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsController.java => dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebController.java} (51%) rename dubbo-samples-shop/dubbo-shop/{dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsControllerApplication.java => dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebControllerApplication.java} (88%) rename dubbo-samples-shop/dubbo-shop/{dubbo-shop-web-newGoods => dubbo-shop-web}/src/main/resources/application.yml (98%) diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsController.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsController.java deleted file mode 100644 index 4adec20a22..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.ads; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.dubbo.shop.common.ReturnResult; -import org.apache.dubbo.shop.common.pojo.Ads.AdsGood; -import org.apache.dubbo.shop.common.pojo.Ads.AdsGoodsList; -import org.apache.dubbo.shop.common.pojo.HotGoodsList.HotGoodsList; -import org.apache.dubbo.shop.service.AdsService; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Component -@RestController -@RequestMapping("/goods") -@CrossOrigin(originPatterns = "*",allowCredentials = "true") -public class AdsController { - @DubboReference - AdsService adsService; - @GetMapping("/hot") - public ReturnResult adsGoosList(){ - AdsGoodsList adsGoodsList = adsService.adsGoodsListResult(); - return ReturnResult.success(adsGoodsList); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/resources/application.yml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/resources/application.yml deleted file mode 100644 index 9496d91b44..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/resources/application.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -server: - port: 50003 - -dubbo: - application: - logger: slf4j - qos-enable: false - check-serializable: false - registry: - address: nacos://${nacos.address:127.0.0.1}:8848?username=nacos&password=nacos - protocol: - port: 20888 - name: dubbo diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/pom.xml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/pom.xml deleted file mode 100644 index 976c7f24ba..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - dubbo-shop - org.apache.dubbo - 1.0-SNAPSHOT - - 4.0.0 - - dubbo-shop-web-checkout - - - 17 - 17 - UTF-8 - - - - org.apache.dubbo - dubbo-spring-boot-starter - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - - org.apache.dubbo - dubbo-nacos-spring-boot-starter - - - org.apache.dubbo - dubbo-shop-interface - 1.0-SNAPSHOT - compile - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutController.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutController.java deleted file mode 100644 index f5cd820deb..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.checkout; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.dubbo.shop.common.pojo.checkout.CheckoutData; -import org.apache.dubbo.shop.service.CheckoutService; -import org.apache.dubbo.shop.common.ReturnResult; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.*; - - -@Component -@RestController -@RequestMapping("/member") -@CrossOrigin(originPatterns = "*",allowCredentials = "true") -public class CheckoutController { - @DubboReference - CheckoutService checkoutService; - @GetMapping("/order") - public ReturnResult checkout(){ - CheckoutData checkoutData = checkoutService.checkoutResult(); - return ReturnResult.success(checkoutData); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutControllerApplication.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutControllerApplication.java deleted file mode 100644 index 95cbc14a91..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/java/org/apache/dubbo/shop/web/checkout/CheckoutControllerApplication.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.checkout; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -@SpringBootApplication -@EnableDubbo -public class CheckoutControllerApplication { - public static void main(String[] args) { - SpringApplication.run(CheckoutControllerApplication.class, args); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/resources/application.yml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/resources/application.yml deleted file mode 100644 index 1739de2c7f..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-checkout/src/main/resources/application.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -server: - port: 50004 - -dubbo: - application: - logger: slf4j - qos-enable: false - check-serializable: false - registry: - address: nacos://${nacos.address:127.0.0.1}:8848?username=nacos&password=nacos - protocol: - port: 20900 - name: dubbo diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/pom.xml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/pom.xml deleted file mode 100644 index 96a76acf13..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - dubbo-shop - org.apache.dubbo - 1.0-SNAPSHOT - - 4.0.0 - - dubbo-shop-web-goodsDetails - - - 17 - 17 - UTF-8 - - - - org.apache.dubbo - dubbo-spring-boot-starter - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - - org.apache.dubbo - dubbo-nacos-spring-boot-starter - - - org.apache.dubbo - dubbo-shop-interface - 1.0-SNAPSHOT - compile - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsControllerApplication.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsControllerApplication.java deleted file mode 100644 index c06b421906..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsControllerApplication.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package oeg.apache.dubbo.shop.web.goodsDetails; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -@EnableDubbo -public class GoodsDetailsControllerApplication { - public static void main(String[] args) { - SpringApplication.run(GoodsDetailsControllerApplication.class,args); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/resources/application.yml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/resources/application.yml deleted file mode 100644 index 00a862e655..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/resources/application.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -server: - port: 50002 - -dubbo: - application: - logger: slf4j - qos-enable: false - check-serializable: false - registry: - address: nacos://${nacos.address:127.0.0.1}:8848?username=nacos&password=nacos - protocol: - port: 20885 - name: dubbo diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/pom.xml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/pom.xml deleted file mode 100644 index f63d57d338..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - dubbo-shop - org.apache.dubbo - 1.0-SNAPSHOT - - 4.0.0 - - dubbo-shop-web-hotGoods - - - 17 - 17 - UTF-8 - - - - org.apache.dubbo - dubbo-spring-boot-starter - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - - org.apache.dubbo - dubbo-nacos-spring-boot-starter - - - org.apache.dubbo - dubbo-shop-interface - 1.0-SNAPSHOT - compile - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsController.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsController.java deleted file mode 100644 index 5ff01b74c9..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.hotGoods; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.dubbo.shop.common.ReturnResult; -import org.apache.dubbo.shop.common.pojo.HotGoodsList.HotGoodsList; -import org.apache.dubbo.shop.service.HotGoodsService; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Component -@RestController -@RequestMapping("/good") -@CrossOrigin(originPatterns = "*",allowCredentials = "true") -public class HotGoodsController { - @DubboReference - HotGoodsService hotGoodsService; - @GetMapping("/hot") - public ReturnResult newGoodsList(){ - HotGoodsList hotGoodsList = hotGoodsService.hotGoodsListResult(); - return ReturnResult.success(hotGoodsList); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsControllerApplication.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsControllerApplication.java deleted file mode 100644 index b53c0eeb70..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/java/org/apache/dubbo/shop/web/hotGoods/HotGoodsControllerApplication.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.hotGoods; - -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -@EnableDubbo -public class HotGoodsControllerApplication { - public static void main(String[] args){ - SpringApplication.run(HotGoodsControllerApplication.class,args); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/resources/application.yml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/resources/application.yml deleted file mode 100644 index 19b495f21e..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-hotGoods/src/main/resources/application.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -server: - port: 50001 - -dubbo: - application: - logger: slf4j - qos-enable: false - check-serializable: false - registry: - address: nacos://${nacos.address:127.0.0.1}:8848?username=nacos&password=nacos - protocol: - port: 20883 - name: dubbo diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/pom.xml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/pom.xml deleted file mode 100644 index b435583e80..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - dubbo-shop - org.apache.dubbo - 1.0-SNAPSHOT - - 4.0.0 - - dubbo-shop-web-newGoods - - - 17 - 17 - UTF-8 - - - - org.apache.dubbo - dubbo-spring-boot-starter - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-log4j2 - - - - org.apache.dubbo - dubbo-nacos-spring-boot-starter - - - org.apache.dubbo - dubbo-shop-interface - 1.0-SNAPSHOT - compile - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsController.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsController.java deleted file mode 100644 index a53f37074f..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.newGoods; - -import org.apache.dubbo.config.annotation.DubboReference; -import org.apache.dubbo.shop.common.ReturnResult; -import org.apache.dubbo.shop.common.pojo.NewGoodsList.NewGoodsList; -import org.apache.dubbo.shop.common.ReturnResult; -import org.apache.dubbo.shop.service.NewGoodsService; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Component -@RestController -@RequestMapping("/good") -@CrossOrigin(originPatterns = "*",allowCredentials = "true") -public class NewGoodsController { - @DubboReference - NewGoodsService newGoodsService; - - @GetMapping("/new") - public ReturnResult newGoodsList(){ - NewGoodsList newGoodsList = newGoodsService.newGoodsListResult(); - return ReturnResult.success(newGoodsList); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsControllerApplication.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsControllerApplication.java deleted file mode 100644 index 817778de2c..0000000000 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/java/org/apache/dubbo/shop/web/newGoods/NewGoodsControllerApplication.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.dubbo.shop.web.newGoods; -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -@EnableDubbo -public class NewGoodsControllerApplication { - public static void main(String[] args){ - SpringApplication.run(NewGoodsControllerApplication.class,args); - } -} diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/pom.xml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/pom.xml similarity index 69% rename from dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/pom.xml rename to dubbo-samples-shop/dubbo-shop/dubbo-shop-web/pom.xml index 1add72d9da..801133ca9d 100644 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/pom.xml +++ b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/pom.xml @@ -1,20 +1,4 @@ - @@ -25,7 +9,7 @@ 4.0.0 - dubbo-shop-web-ads + dubbo-shop-web 17 @@ -73,3 +57,4 @@ + diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsController.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebController.java similarity index 51% rename from dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsController.java rename to dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebController.java index 56bc96ebda..ffb97efe02 100644 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-goodsDetails/src/main/java/oeg/apache/dubbo/shop/web/goodsDetails/GoodsDetailsController.java +++ b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebController.java @@ -14,28 +14,65 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package oeg.apache.dubbo.shop.web.goodsDetails; +package org.apache.dubbo.shop.web; import org.apache.dubbo.config.annotation.DubboReference; import org.apache.dubbo.shop.common.ReturnResult; +import org.apache.dubbo.shop.common.pojo.Ads.AdsGoodsList; import org.apache.dubbo.shop.common.pojo.GoodsDetails.Details; +import org.apache.dubbo.shop.common.pojo.HotGoodsList.HotGoodsList; +import org.apache.dubbo.shop.common.pojo.NewGoodsList.NewGoodsList; +import org.apache.dubbo.shop.common.pojo.checkout.CheckoutData; +import org.apache.dubbo.shop.service.AdsService; +import org.apache.dubbo.shop.service.CheckoutService; import org.apache.dubbo.shop.service.GoodsDetails; +import org.apache.dubbo.shop.service.HotGoodsService; +import org.apache.dubbo.shop.service.NewGoodsService; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; + @Component @RestController -@RequestMapping("/detail") @CrossOrigin(originPatterns = "*",allowCredentials = "true") -public class GoodsDetailsController { +public class WebController { + @DubboReference + AdsService adsService; + @DubboReference + CheckoutService checkoutService; @DubboReference GoodsDetails goodsDetails; - @GetMapping("/id") + @DubboReference + HotGoodsService hotGoodsService; + @DubboReference + NewGoodsService newGoodsService; + @GetMapping("/goods/hot") + public ReturnResult adsGoosList(){ + AdsGoodsList adsGoodsList = adsService.adsGoodsListResult(); + return ReturnResult.success(adsGoodsList); + } + @GetMapping("/member/order") + public ReturnResult checkout(){ + CheckoutData checkoutData = checkoutService.checkoutResult(); + return ReturnResult.success(checkoutData); + } + @GetMapping("/detail/id") public ReturnResult GoodsDetailsList(@RequestParam("id") Integer id){ Details details = goodsDetails.GoodsResult(id); return ReturnResult.success(details); } + @GetMapping("/good/new") + public ReturnResult newGoodsList(){ + NewGoodsList newGoodsList = newGoodsService.newGoodsListResult(); + return ReturnResult.success(newGoodsList); + } + @GetMapping("/good/hot") + public ReturnResult hotGoodsList(){ + HotGoodsList hotGoodsList = hotGoodsService.hotGoodsListResult(); + return ReturnResult.success(hotGoodsList); + } + } diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsControllerApplication.java b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebControllerApplication.java similarity index 88% rename from dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsControllerApplication.java rename to dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebControllerApplication.java index 9718864a64..905b97f58d 100644 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-ads/src/main/java/org/apache/dubbo/shop/web/ads/AdsControllerApplication.java +++ b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/java/org/apache/dubbo/shop/web/WebControllerApplication.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.dubbo.shop.web.ads; +package org.apache.dubbo.shop.web; import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; import org.springframework.boot.SpringApplication; @@ -22,8 +22,8 @@ @SpringBootApplication @EnableDubbo -public class AdsControllerApplication { +public class WebControllerApplication { public static void main(String[] args) { - SpringApplication.run(AdsControllerApplication.class,args); + SpringApplication.run(WebControllerApplication.class,args); } } diff --git a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/resources/application.yml b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/resources/application.yml similarity index 98% rename from dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/resources/application.yml rename to dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/resources/application.yml index f2370e85bc..088bc0ecdd 100644 --- a/dubbo-samples-shop/dubbo-shop/dubbo-shop-web-newGoods/src/main/resources/application.yml +++ b/dubbo-samples-shop/dubbo-shop/dubbo-shop-web/src/main/resources/application.yml @@ -24,5 +24,5 @@ dubbo: registry: address: nacos://${nacos.address:127.0.0.1}:8848?username=nacos&password=nacos protocol: - port: 20881 + port: 20890 name: dubbo diff --git a/dubbo-samples-shop/dubbo-shop/pom.xml b/dubbo-samples-shop/dubbo-shop/pom.xml index 6d41fc1ff7..1c5ab8234e 100644 --- a/dubbo-samples-shop/dubbo-shop/pom.xml +++ b/dubbo-samples-shop/dubbo-shop/pom.xml @@ -26,17 +26,13 @@ 1.0-SNAPSHOT dubbo-shop-interface - dubbo-shop-web-checkout dubbo-shop-service-checkout dubbo-shop-common-mapper dubbo-shop-common-pojo - dubbo-shop-web-newGoods dubbo-shop-service-newGoods - dubbo-shop-web-hotGoods dubbo-shop-service-hotGoods - dubbo-shop-web-goodsDetails dubbo-shop-service-goodsDetails - dubbo-shop-web-ads + dubbo-shop-web diff --git a/dubbo-samples-shop/onlineShopping/src/apis/checkout.js b/dubbo-samples-shop/onlineShopping/src/apis/checkout.js index 85ffb9fae5..a40773a2bc 100644 --- a/dubbo-samples-shop/onlineShopping/src/apis/checkout.js +++ b/dubbo-samples-shop/onlineShopping/src/apis/checkout.js @@ -18,5 +18,5 @@ import http from '@/utils/http' // 获取详情接口 export const getCheckInfoAPI = () => { - return http.get('http://localhost:50004/member/order'); + return http.get('http://localhost:50000/member/order'); } diff --git a/dubbo-samples-shop/onlineShopping/src/apis/detail.js b/dubbo-samples-shop/onlineShopping/src/apis/detail.js index 9ab669c9c8..90f4a38085 100644 --- a/dubbo-samples-shop/onlineShopping/src/apis/detail.js +++ b/dubbo-samples-shop/onlineShopping/src/apis/detail.js @@ -22,8 +22,7 @@ import http from "@/utils/http"; * @return {*} */ export function getDetail(id){ - return http.get('http://localhost:50002/detail/id',{params:{id}}); - // return http.get('http://localhost:50002/goods',{params:{id}}) + return http.get('http://localhost:50000/detail/id',{params:{id}}); } /** * 获取热榜商品 @@ -32,9 +31,9 @@ export function getDetail(id){ * @param {Number} limit - 获取个数 */ export const getHotGoodsAPI = ({ id, type, limit = 3 }) => { - return http.get('http://localhost:50003/goods/hot',{params:{ + return http.get('http://localhost:50000/goods/hot',{params:{ id, type, limit }}); -} \ No newline at end of file +} diff --git a/dubbo-samples-shop/onlineShopping/src/apis/home.js b/dubbo-samples-shop/onlineShopping/src/apis/home.js index 9264f73304..13431df574 100644 --- a/dubbo-samples-shop/onlineShopping/src/apis/home.js +++ b/dubbo-samples-shop/onlineShopping/src/apis/home.js @@ -30,5 +30,5 @@ export const getNewAPI = () => { * @return {*} */ export const getHotAPI = () => { - return http.get('http://localhost:50001/good/hot') + return http.get('http://localhost:50000/good/hot') } diff --git a/dubbo-samples-shop/onlineShopping/src/components/imageView/index.vue b/dubbo-samples-shop/onlineShopping/src/components/imageView/index.vue index 2b50817372..75a1b84b37 100644 --- a/dubbo-samples-shop/onlineShopping/src/components/imageView/index.vue +++ b/dubbo-samples-shop/onlineShopping/src/components/imageView/index.vue @@ -1,4 +1,3 @@ - @@ -130,4 +121,4 @@ const { y } = useScroll(window) } } } - \ No newline at end of file + diff --git a/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutFooter.vue b/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutFooter.vue index 44e1ca0f09..de88398cda 100644 --- a/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutFooter.vue +++ b/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutFooter.vue @@ -21,11 +21,6 @@ under the License.
- - - - -
关注我们
@@ -34,19 +29,6 @@ under the License.
github
- - - - - - - - - - - - -
@@ -250,4 +232,4 @@ under the License. } \ No newline at end of file + diff --git a/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutHeader.vue b/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutHeader.vue index 3291ae299f..442cec9b48 100644 --- a/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutHeader.vue +++ b/dubbo-samples-shop/onlineShopping/src/views/Layout/components/LayoutHeader.vue @@ -16,8 +16,6 @@ * limitations under the License. */ import HeaderCart from "@/views/Layout/components/HeaderCart.vue"; -// import {useCategoryStore} from "@/stores/categoryStore"; -// const categoryStore = useCategoryStore();