From ac9a9743d185d46ec7dca7577402dfef6a553eed Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期三, 27 四月 2022 11:09:00 +0800
Subject: [PATCH] Merge branch 'huacheng' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java | 218 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 200 insertions(+), 18 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java
index 90b2cc1..15c7fbc 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/MicroCommercialStreetApi.java
@@ -4,7 +4,8 @@
import javax.annotation.Resource;
-import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.DeleteProductDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.PutUserInfoDTO;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -15,15 +16,19 @@
import org.springframework.web.bind.annotation.RestController;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.DisableOrEnableMcsMerchantDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsEvaluateDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsGameDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsInfoDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsProductDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageJoinGameListDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsEvaluateDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsInformationDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsMerchantDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsProductDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageVerifyRecordDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetPopularForGameDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForGameDTO;
import com.panzhihua.common.model.dtos.community.microCommercialStreet.SetShelfForInfoDTO;
@@ -31,12 +36,14 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.microCommercialStreet.McsConfigVO;
import com.panzhihua.service_community.service.McsConfigService;
+import com.panzhihua.service_community.service.McsCouponService;
import com.panzhihua.service_community.service.McsEvaluateService;
import com.panzhihua.service_community.service.McsGameService;
import com.panzhihua.service_community.service.McsInformationService;
import com.panzhihua.service_community.service.McsLabelService;
import com.panzhihua.service_community.service.McsMerchantService;
import com.panzhihua.service_community.service.McsProductService;
+import com.panzhihua.service_community.service.McsVerifiedRecordService;
/**
* @title: MicroCommercialStreetApi
@@ -63,6 +70,10 @@
private McsProductService mcsProductService;
@Resource
private McsLabelService mcsLabelService;
+ @Resource
+ private McsCouponService mcsCouponService;
+ @Resource
+ private McsVerifiedRecordService mcsVerifiedRecordService;
/**
* 新增数字商业街商家
@@ -296,15 +307,7 @@
*/
@GetMapping("/statistics/top")
public R getTopStatistics(@RequestParam("type") Integer type, @RequestParam("userId") Long userId) {
- if (type.equals(1)) {
- //戳戳游戏
- return mcsGameService.getTopStatistics(userId);
- } else if (type.equals(2)) {
- //戳戳资讯
- return mcsInformationService.getTopStatistics(userId);
- } else {
- return R.fail("未知错误");
- }
+ return mcsGameService.getTopStatistics(userId, type);
}
/**
@@ -360,13 +363,12 @@
/**
* 删除产品信息
- * @param productId
- * @param userId
+ * @param deleteProductDTO
* @return
*/
- @DeleteMapping("/product/delete")
- public R deleteMcsProduct(@RequestParam("productId") Long productId, @RequestParam("userId") Long userId) {
- return mcsProductService.deleteMcsProduct(productId, userId);
+ @PostMapping("/product/delete")
+ public R deleteMcsProduct(@RequestBody DeleteProductDTO deleteProductDTO) {
+ return mcsProductService.deleteMcsProduct(deleteProductDTO);
}
/**
@@ -411,16 +413,16 @@
/**
* 完成订单更新/新增商家信息
- * @param merchantName
+ * @param orderNo
* @param configId
* @param userId
* @return
*/
@GetMapping("/updateAfterOrder")
- public R updateMcsMerchantAfterOrder(@RequestParam(value = "merchantName", required = false) String merchantName,
+ public R updateMcsMerchantAfterOrder(@RequestParam(value = "orderNo") String orderNo,
@RequestParam("configId") Long configId,
@RequestParam("userId") Long userId) {
- return mcsMerchantService.updateOrAddMcsMerchantAfterOrder(merchantName, configId, userId);
+ return mcsMerchantService.updateOrAddMcsMerchantAfterOrder(orderNo, configId, userId);
}
/**
@@ -432,4 +434,184 @@
public R loginWithPhone(@RequestBody LoginWithPhoneDTO loginDTO) {
return mcsMerchantService.loginWithPhone(loginDTO);
}
+
+ /**
+ * 首页顶部数据
+ * @return
+ */
+ @GetMapping("/index/topData")
+ public R getMcsIndexTopData() {
+ return mcsMerchantService.getMcsIndexTopData();
+ }
+
+ /**
+ * 戳戳卷领取
+ * @param gameId
+ * @param userId
+ * @return
+ */
+ @GetMapping("/coupon/apply")
+ public R applyMcsCoupon(@RequestParam("gameId") Long gameId, @RequestParam("userId") Long userId) {
+ return mcsGameService.applyMcsCoupon(gameId, userId);
+ }
+
+ /**
+ * h5分页查询戳戳资讯
+ * @param pageMcsInformationDTO
+ * @return
+ */
+ @PostMapping("/information/pageH5")
+ public R pageH5McsInfo(@RequestBody PageMcsInformationDTO pageMcsInformationDTO) {
+ return mcsInformationService.pageH5McsInfo(pageMcsInformationDTO);
+ }
+
+ /**
+ * h5分页查询戳戳游戏
+ * @param pageMcsGameDTO
+ * @return
+ */
+ @PostMapping("/game/pageH5")
+ public R pageH5McsGame(@RequestBody PageMcsGameDTO pageMcsGameDTO) {
+ return mcsGameService.pageH5McsGame(pageMcsGameDTO);
+ }
+
+ /**
+ * 游戏详情
+ * @param gameId
+ * @return
+ */
+ @GetMapping("/game/get")
+ public R getMcsGame(@RequestParam("gameId") Long gameId) {
+ return mcsGameService.getMcsGame(gameId);
+ }
+
+ /**
+ * 资讯详情
+ * @param infoId
+ * @return
+ */
+ @GetMapping("/info/get")
+ public R getMcsInfo(@RequestParam("infoId") Long infoId) {
+ return mcsInformationService.getMcsInfo(infoId);
+ }
+
+ /**
+ * H5分页查询数字商业街商家
+ * @param pageMcsMerchantDTO
+ * @return
+ */
+ @PostMapping("/merchant/pageH5")
+ public R pageH5McsMerchant(@RequestBody PageMcsMerchantDTO pageMcsMerchantDTO) {
+ return mcsMerchantService.pageH5McsMerchant(pageMcsMerchantDTO);
+ }
+
+ /**
+ * 我的戳戳卷
+ * @param type
+ * @param userId
+ * @return
+ */
+ @GetMapping("/myCoupon")
+ public R getMyCoupon(@RequestParam(value = "type", required = false) Integer type, @RequestParam("userId") Long userId) {
+ return mcsCouponService.getMyCoupon(type, userId);
+ }
+
+ /**
+ * 新增评价记录
+ * @param mcsEvaluateDTO
+ * @return
+ */
+ @PostMapping("/evaluate/add")
+ public R addMcsEvaluate(@RequestBody McsEvaluateDTO mcsEvaluateDTO) {
+ return mcsEvaluateService.addMcsEvaluate(mcsEvaluateDTO);
+ }
+
+ /**
+ * 我的评价-参与游戏列表
+ * @param pageJoinGameListDTO
+ * @return
+ */
+ @PostMapping("/joinGame/page")
+ public R getJoinGameList(@RequestBody PageJoinGameListDTO pageJoinGameListDTO) {
+ return mcsCouponService.getJoinGameList(pageJoinGameListDTO);
+ }
+
+ /**
+ * 戳戳卷核销
+ * @param couponId
+ * @param userId
+ * @return
+ */
+ @GetMapping("/coupon/verify")
+ public R verifyMcsCoupon(@RequestParam("couponId") Long couponId, @RequestParam("userId") Long userId) {
+ return mcsCouponService.verifyMcsCoupon(couponId, userId);
+ }
+
+ /**
+ * 分页查询核销记录
+ * @param pageVerifyRecordDTO
+ * @return
+ */
+ @PostMapping("/verifyRecord/page")
+ public R pageMcsVerifyRecord(@RequestBody PageVerifyRecordDTO pageVerifyRecordDTO) {
+ return mcsVerifiedRecordService.pageMcsVerifyRecord(pageVerifyRecordDTO);
+ }
+
+ /**
+ * 游戏统计
+ * @param userId
+ * @return
+ */
+ @GetMapping("/game/statistics")
+ public R getMcsGameStatistics(@RequestParam("userId") Long userId) {
+ return mcsCouponService.getMcsGameStatistics(userId);
+ }
+
+ /**
+ * 修改用戶信息
+ * @param putUserInfoDTO
+ * @return
+ */
+ @PutMapping("/putUserInfo")
+ public R putUserInfo(@RequestBody PutUserInfoDTO putUserInfoDTO) {
+ return mcsMerchantService.putUserInfo(putUserInfoDTO);
+ }
+
+ /**
+ * 根据userId获取商家信息
+ * @param userId
+ * @return
+ */
+ @GetMapping("/retrieveMcsMerchantInfoByUserId")
+ public R retrieveMcsMerchantInfoByUserId(@RequestParam("userId") Long userId) {
+ return mcsMerchantService.retrieveMcsMerchantInfoByUserId(userId);
+ }
+
+ /**
+ * 定时任务-每隔5分钟执行一次,将已到期的微商业街商家旗下所有的游戏/资讯全部下架
+ * @return
+ */
+ @GetMapping("/offResourceForMcsMerchant")
+ public R offResourceForMcsMerchant() {
+ return mcsMerchantService.offResourceForMcsMerchant();
+ }
+
+ /**
+ * 获取产品信息详情
+ * @param productId
+ * @return
+ */
+ @GetMapping("/product/get")
+ public R getMcsProduct(@RequestParam("productId") Long productId) {
+ return mcsProductService.getMcsProduct(productId);
+ }
+
+ /**
+ * 定时任务-每隔5分钟执行一次,将已到期的微商业街游戏结束
+ * @return
+ */
+ @GetMapping("/endStatusForMcsGame")
+ public R endStatusForMcsGame() {
+ return mcsGameService.endStatusForMcsGame();
+ }
}
--
Gitblit v1.7.1