| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | 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; |
| | |
| | | */ |
| | | @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 删除产品信息 |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 完成订单更新/新增商家信息 |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 戳戳卷核销 |
| | | * @param couponId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/coupon/verify") |
| | | public R verifyMcsCoupon(@RequestParam("couponId") Long couponId) { |
| | | return mcsCouponService.verifyMcsCoupon(couponId); |
| | | public R verifyMcsCoupon(@RequestParam("couponId") Long couponId, @RequestParam("userId") Long userId) { |
| | | return mcsCouponService.verifyMcsCoupon(couponId, userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param pageVerifyRecordDTO |
| | | * @return |
| | | */ |
| | | @GetMapping("/verifyRecord/page") |
| | | @PostMapping("/verifyRecord/page") |
| | | public R pageMcsVerifyRecord(@RequestBody PageVerifyRecordDTO pageVerifyRecordDTO) { |
| | | return mcsVerifiedRecordService.pageMcsVerifyRecord(pageVerifyRecordDTO); |
| | | } |
| | |
| | | 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(); |
| | | } |
| | | } |