From 307ea3042f5b03e735772e5d3eaad8d5fc16b6ba Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期五, 18 二月 2022 17:23:22 +0800
Subject: [PATCH] Merge branch 'master' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 104 insertions(+), 12 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java
index 78af34d..72a50a7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ConvenientApi.java
@@ -1,13 +1,15 @@
package com.panzhihua.service_community.api;
+import java.time.Instant;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
+import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO;
-import com.panzhihua.common.model.dtos.community.convenient.PageMerchantProductDTO;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
+import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -387,7 +389,7 @@
}
/**
- * 分页查询便民服务商家
+ * 分页查询便民服务商家 运营后台
* @param pageConvenientMerchantDTO
* @return
*/
@@ -431,8 +433,8 @@
* @return
*/
@GetMapping("/service-category/all")
- public R getAllServiceCategories() {
- return convenientServiceCategoryService.getAllServiceCategories();
+ public R getAllServiceCategories(@RequestParam("areaCode") String areaCode) {
+ return convenientServiceCategoryService.getAllServiceCategories(areaCode);
}
/**
@@ -569,10 +571,11 @@
/**
* 获取所有产品分类
* @return
+ * @param merchantId
*/
@GetMapping("/product-category/all")
- public R getAllProductCategory() {
- return convenientProductCategoryService.getAllProductCategory();
+ public R getAllProductCategory(@RequestParam("merchantId") Long merchantId) {
+ return convenientProductCategoryService.getAllProductCategory(merchantId);
}
/**
@@ -581,8 +584,8 @@
* @return
*/
@GetMapping("/service-category/suitable")
- public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId) {
- return convenientServiceCategoryService.getSuitableServiceCategories(communityId);
+ public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId,@RequestParam("areaCode")String areaCode) {
+ return convenientServiceCategoryService.getSuitableServiceCategories(communityId,areaCode);
}
/**
@@ -617,11 +620,100 @@
/**
* 小程序获取商家产品
- * @param pageMerchantProductDTO
+ * @param merchantId
* @return
*/
- @PostMapping("/merchant/product")
- public R getMerchantProduct(@RequestBody PageMerchantProductDTO pageMerchantProductDTO) {
- return convenientProductService.getMerchantProduct(pageMerchantProductDTO);
+ @GetMapping("/product/list")
+ public R getMerchantProduct(@RequestParam("merchantId") Long merchantId) {
+ return convenientProductService.getMerchantProduct(merchantId);
+ }
+
+ /**
+ * 获取产品详情
+ * @param productId
+ * @return
+ */
+ @GetMapping("/product/detail")
+ public R getProductDetail(@RequestParam("productId") Long productId) {
+ return convenientProductService.getProduct(productId);
+ }
+
+ /**
+ * 搜索商家信息
+ * @param pageSearchDTO
+ * @return
+ */
+ @PostMapping("/merchant/search")
+ public R pageSearchMerchant(@RequestBody PageSearchDTO pageSearchDTO) {
+ return convenientMerchantService.pageSearchMerchant(pageSearchDTO);
+ }
+
+ /**
+ * 搜索商品信息
+ * @param pageSearchDTO
+ * @return
+ */
+ @PostMapping("/product/search")
+ public R pageSearchProduct(@RequestBody PageSearchDTO pageSearchDTO) {
+ return convenientProductService.pageSearchProduct(pageSearchDTO);
+ }
+
+ /**
+ * 增加商家店铺咨询量
+ * @param merchantId
+ * @return
+ */
+ @GetMapping("/merchant/consult")
+ public R consultMerchant(@RequestParam("merchantId") Long merchantId) {
+ return convenientMerchantService.consultMerchant(merchantId);
+ }
+
+ /**
+ * 增加商家店铺浏览量
+ * @param merchantId
+ * @return
+ */
+ @GetMapping("/merchant/incr-view")
+ public R incrMerchantView(@RequestParam("merchantId") Long merchantId) {
+ return convenientMerchantService.incrMerchantView(merchantId);
+ }
+
+ /**
+ * 增加产品浏览量
+ * @param productId
+ * @return
+ */
+ @GetMapping("/product/incr-view")
+ public R incrProductView(@RequestParam("productId") Long productId) {
+ return convenientProductService.incrProductView(productId);
+ }
+
+ /**
+ * 获取商家导出数据
+ * @param exportMerchantDTO
+ * @return
+ */
+ @PostMapping("/merchant/export")
+ public R exportMerchant(@RequestBody ExportMerchantDTO exportMerchantDTO) {
+ return convenientMerchantService.exportMerchant(exportMerchantDTO);
+ }
+
+ /**
+ * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中
+ * @return
+ */
+ @PostMapping("/timedTaskWriteDataToMerchantJobHandler")
+ public R timedTaskWriteDataToMerchantJobHandler() {
+ return convenientMerchantService.timedTaskWriteDataToMerchantJobHandler();
+ }
+
+ /**
+ * 获取商家上下架产品数量
+ * @param merchantId
+ * @return
+ */
+ @GetMapping("/product/shelf-num")
+ public R getProductShelfNum(@RequestParam("merchantId") Long merchantId) {
+ return convenientProductService.getProductShelfNum(merchantId);
}
}
--
Gitblit v1.7.1