pangqijun 8 mēneši atpakaļ
vecāks
revīzija
00d4436f07
88 mainītis faili ar 5316 papildinājumiem un 233 dzēšanām
  1. 0 59
      src/main/java/org/springblade/modules/api/controller/ApiOrderController.java
  2. 0 1
      src/main/java/org/springblade/modules/finance/service/IOrderService.java
  3. 0 88
      src/main/java/org/springblade/modules/finance/service/impl/OrderServiceImpl.java
  4. 164 0
      src/main/java/org/springblade/modules/groupon/controller/EmbersController.java
  5. 135 0
      src/main/java/org/springblade/modules/groupon/controller/FileContentController.java
  6. 218 0
      src/main/java/org/springblade/modules/groupon/controller/GrouponController.java
  7. 129 0
      src/main/java/org/springblade/modules/groupon/controller/GrouponGoodsController.java
  8. 129 0
      src/main/java/org/springblade/modules/groupon/controller/GrouponImageController.java
  9. 129 0
      src/main/java/org/springblade/modules/groupon/controller/GrouponSelfTakeController.java
  10. 129 0
      src/main/java/org/springblade/modules/groupon/controller/GrouponUserController.java
  11. 202 0
      src/main/java/org/springblade/modules/groupon/controller/SelfTakeController.java
  12. 177 0
      src/main/java/org/springblade/modules/groupon/controller/TzController.java
  13. 34 0
      src/main/java/org/springblade/modules/groupon/dto/EmbersDTO.java
  14. 34 0
      src/main/java/org/springblade/modules/groupon/dto/FileContentDTO.java
  15. 34 0
      src/main/java/org/springblade/modules/groupon/dto/GrouponDTO.java
  16. 34 0
      src/main/java/org/springblade/modules/groupon/dto/GrouponGoodsDTO.java
  17. 34 0
      src/main/java/org/springblade/modules/groupon/dto/GrouponImageDTO.java
  18. 34 0
      src/main/java/org/springblade/modules/groupon/dto/GrouponSelfTakeDTO.java
  19. 34 0
      src/main/java/org/springblade/modules/groupon/dto/GrouponUserDTO.java
  20. 34 0
      src/main/java/org/springblade/modules/groupon/dto/SelfTakeDTO.java
  21. 51 0
      src/main/java/org/springblade/modules/groupon/entity/Embers.java
  22. 60 0
      src/main/java/org/springblade/modules/groupon/entity/FileContent.java
  23. 101 0
      src/main/java/org/springblade/modules/groupon/entity/Groupon.java
  24. 47 0
      src/main/java/org/springblade/modules/groupon/entity/GrouponGoods.java
  25. 41 0
      src/main/java/org/springblade/modules/groupon/entity/GrouponImage.java
  26. 36 0
      src/main/java/org/springblade/modules/groupon/entity/GrouponSelfTake.java
  27. 41 0
      src/main/java/org/springblade/modules/groupon/entity/GrouponUser.java
  28. 77 0
      src/main/java/org/springblade/modules/groupon/entity/SelfTake.java
  29. 29 0
      src/main/java/org/springblade/modules/groupon/entity/UserSelfTake.java
  30. 46 0
      src/main/java/org/springblade/modules/groupon/mapper/EmbersMapper.java
  31. 28 0
      src/main/java/org/springblade/modules/groupon/mapper/EmbersMapper.xml
  32. 42 0
      src/main/java/org/springblade/modules/groupon/mapper/FileContentMapper.java
  33. 27 0
      src/main/java/org/springblade/modules/groupon/mapper/FileContentMapper.xml
  34. 47 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponGoodsMapper.java
  35. 54 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponGoodsMapper.xml
  36. 43 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponImageMapper.java
  37. 26 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponImageMapper.xml
  38. 50 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponMapper.java
  39. 50 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponMapper.xml
  40. 42 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponSelfTakeMapper.java
  41. 22 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponSelfTakeMapper.xml
  42. 42 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponUserMapper.java
  43. 23 0
      src/main/java/org/springblade/modules/groupon/mapper/GrouponUserMapper.xml
  44. 45 0
      src/main/java/org/springblade/modules/groupon/mapper/SelfTakeMapper.java
  45. 61 0
      src/main/java/org/springblade/modules/groupon/mapper/SelfTakeMapper.xml
  46. 8 0
      src/main/java/org/springblade/modules/groupon/mapper/UserSelfTakeMapper.java
  47. 6 0
      src/main/java/org/springblade/modules/groupon/mapper/UserSelfTakeMapper.xml
  48. 18 0
      src/main/java/org/springblade/modules/groupon/param/AddUserSelfTakeParam.java
  49. 44 0
      src/main/java/org/springblade/modules/groupon/service/IEmbersService.java
  50. 41 0
      src/main/java/org/springblade/modules/groupon/service/IFileContentService.java
  51. 66 0
      src/main/java/org/springblade/modules/groupon/service/IGrouponGoodsService.java
  52. 48 0
      src/main/java/org/springblade/modules/groupon/service/IGrouponImageService.java
  53. 49 0
      src/main/java/org/springblade/modules/groupon/service/IGrouponSelfTakeService.java
  54. 95 0
      src/main/java/org/springblade/modules/groupon/service/IGrouponService.java
  55. 45 0
      src/main/java/org/springblade/modules/groupon/service/IGrouponUserService.java
  56. 49 0
      src/main/java/org/springblade/modules/groupon/service/ISelfTakeService.java
  57. 11 0
      src/main/java/org/springblade/modules/groupon/service/IUserSelfTakeService.java
  58. 48 0
      src/main/java/org/springblade/modules/groupon/service/impl/EmbersServiceImpl.java
  59. 41 0
      src/main/java/org/springblade/modules/groupon/service/impl/FileContentServiceImpl.java
  60. 93 0
      src/main/java/org/springblade/modules/groupon/service/impl/GrouponGoodsServiceImpl.java
  61. 62 0
      src/main/java/org/springblade/modules/groupon/service/impl/GrouponImageServiceImpl.java
  62. 58 0
      src/main/java/org/springblade/modules/groupon/service/impl/GrouponSelfTakeServiceImpl.java
  63. 452 0
      src/main/java/org/springblade/modules/groupon/service/impl/GrouponServiceImpl.java
  64. 58 0
      src/main/java/org/springblade/modules/groupon/service/impl/GrouponUserServiceImpl.java
  65. 89 0
      src/main/java/org/springblade/modules/groupon/service/impl/SelfTakeServiceImpl.java
  66. 18 0
      src/main/java/org/springblade/modules/groupon/service/impl/UserSelfTakeServiceImpl.java
  67. 27 0
      src/main/java/org/springblade/modules/groupon/vo/AppointmentVO.java
  68. 36 0
      src/main/java/org/springblade/modules/groupon/vo/EmbersVO.java
  69. 124 0
      src/main/java/org/springblade/modules/groupon/vo/ExportAppointmentVO.java
  70. 63 0
      src/main/java/org/springblade/modules/groupon/vo/ExportPickUpAppointmentVO.java
  71. 47 0
      src/main/java/org/springblade/modules/groupon/vo/FileContentVO.java
  72. 42 0
      src/main/java/org/springblade/modules/groupon/vo/GrouponGoodsVO.java
  73. 36 0
      src/main/java/org/springblade/modules/groupon/vo/GrouponImageVO.java
  74. 36 0
      src/main/java/org/springblade/modules/groupon/vo/GrouponSelfTakeVO.java
  75. 36 0
      src/main/java/org/springblade/modules/groupon/vo/GrouponUserVO.java
  76. 179 0
      src/main/java/org/springblade/modules/groupon/vo/GrouponVO.java
  77. 78 0
      src/main/java/org/springblade/modules/groupon/vo/SelfTakeVO.java
  78. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/EmbersWrapper.java
  79. 57 0
      src/main/java/org/springblade/modules/groupon/wrapper/FileContentWrapper.java
  80. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/GrouponGoodsWrapper.java
  81. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/GrouponImageWrapper.java
  82. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/GrouponSelfTakeWrapper.java
  83. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/GrouponUserWrapper.java
  84. 46 0
      src/main/java/org/springblade/modules/groupon/wrapper/GrouponWrapper.java
  85. 49 0
      src/main/java/org/springblade/modules/groupon/wrapper/SelfTakeWrapper.java
  86. 1 13
      src/main/java/org/springblade/modules/platform/controller/AdsController.java
  87. 0 68
      src/main/java/org/springblade/modules/platform/controller/UserAppController.java
  88. 0 4
      src/main/java/org/springblade/modules/quartz/task/TimedTask.java

+ 0 - 59
src/main/java/org/springblade/modules/api/controller/ApiOrderController.java

@@ -28,20 +28,14 @@ import org.springblade.modules.api.response.UserOrderDetailResponse;
 import org.springblade.modules.api.response.UserOrderResponse;
 import org.springblade.modules.api.service.SubmitOrderService;
 import org.springblade.modules.api.service.impl.GrouponOrderServiceImpl;
-import org.springblade.modules.finance.entity.AfterSalesReason;
-import org.springblade.modules.finance.entity.ConfirmOrder;
 import org.springblade.modules.finance.entity.Order;
 import org.springblade.modules.finance.service.*;
-import org.springblade.modules.finance.entity.OrderGrouponGoods;
-import org.springblade.modules.groupon.vo.GrouponVO;
-import org.springblade.modules.system.entity.UserApp;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
-import java.util.List;
 
 /**
  * Author pangqijun
@@ -111,59 +105,6 @@ public class ApiOrderController extends BladeController {
         return R.success("订单已取消");
     }
 
-    @PostMapping("confirmOrder")
-    @ApiOperation(value = "取货核销", notes = "通过取货码进行核销")
-    public R confirmOrder(@ApiParam("取货码") String pickupCode){
-        grouponOrderService.confirmOrder(pickupCode, AuthUtil.getUserId());
-        return R.success("取货核销成功");
-    }
-
-    @PostMapping("getConfirmOrderList")
-    @ApiOperation(value = "获取核销记录")
-    public R<List<ConfirmOrder>> getConfirmOrderList(@RequestBody  Query query){
-        IPage<ConfirmOrder> page = confirmOrderService.page(Condition.getPage(query), Wrappers.lambdaQuery(ConfirmOrder.class)
-                .eq(BaseEntity::getCreateUserId, AuthUtil.getUserId())
-                .orderByDesc(BaseEntity::getCreateTime));
-        return R.data(page.getRecords());
-    }
-
-    @PostMapping("getOrderGoodsList")
-    @ApiOperation(value = "获取核销订单商品")
-    public R<List<OrderGrouponGoods>> getOrderGoodsList(Long orderId){
-        return R.data(grouponOrderService.getGroupGoodsList(orderId));
-    }
-
-    @PostMapping("/refund")
-    @ApiOperationSupport(order = 8)
-    @ApiOperation(value = "申请退款", notes = "传入订单号")
-    public R orderRefund(Long orderId) {
-        orderService.orderRefund(orderId);
-        return success("操作成功");
-    }
-
-    @GetMapping("/commander")
-    @ApiOperationSupport(order = 9)
-    @ApiOperation(value = "获取团长团购订单")
-    public R<IPage<GrouponVO>> getCommanderOrder(Query query, Integer grouponState) {
-        return R.data(orderGrouponService.getCommanderOrder(Condition.getPage(query), AuthUtil.getUserId(), grouponState));
-    }
-
-    @GetMapping("/commander/detail")
-    @ApiOperationSupport(order = 10)
-    @ApiOperation(value = "获取团长团购订单详情")
-    public R<GrouponVO> getCommanderOrderDetail(@ApiParam("团购ID") Long grouponId, @ApiParam("查询类型 1-网点订单  2-全部订单") Integer queryType,
-                                                @ApiParam("团购ID") Integer state) {
-        return R.data(orderGrouponService.getCommanderOrderDetail(grouponId, queryType, AuthUtil.getUserId(), state));
-    }
-
-    @PostMapping("/modifySelfTake")
-    @ApiOperationSupport(order = 11)
-    @ApiOperation(value = "更换自提点", notes = "传入订单号")
-    public R modifySelfTake(@RequestParam("orderId") Long orderId, @RequestParam("selfTakeId") Long selfTakeId) {
-        orderService.modifySelfTake(orderId, selfTakeId);
-        return success("操作成功");
-    }
-
     @Transactional(rollbackFor = Exception.class)
     @PostMapping("/return-goods")
     @ApiOperationSupport(order = 12)

+ 0 - 1
src/main/java/org/springblade/modules/finance/service/IOrderService.java

@@ -107,7 +107,6 @@ public interface IOrderService extends IService<Order> {
 
 	UserOrderDetailResponse getUserOrderDetail(Long orderId, Long afterSalesId, Double longitude, Double latitude);
 
-    void modifySelfTake(Long orderId, Long selfTakeId);
 
     Page<Order> getOrderByExpirationTime(Page page, Date time);
 }

+ 0 - 88
src/main/java/org/springblade/modules/finance/service/impl/OrderServiceImpl.java

@@ -29,12 +29,6 @@ import org.springblade.modules.finance.service.*;
 import org.springblade.modules.finance.vo.OrderVO;
 import org.springblade.modules.finance.mapper.OrderMapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.groupon.entity.Groupon;
-import org.springblade.modules.groupon.entity.SelfTake;
-import org.springblade.modules.groupon.service.IGrouponService;
-import org.springblade.modules.groupon.service.ISelfTakeService;
-import org.springblade.modules.groupon.vo.SelfTakeVO;
-import org.springblade.modules.groupon.wrapper.SelfTakeWrapper;
 import org.springblade.modules.mall.entity.Store;
 import org.springblade.modules.mall.service.IStoreService;
 import org.springblade.modules.mall.wrapper.StoreWrapper;
@@ -87,13 +81,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	@Resource
 	private IOrderGrouponService orderGrouponService;
 	@Resource
-	private ISelfTakeService selfTakeService;
-	@Resource
 	private OrderTimeoutService timeoutService;
 	@Resource
 	private IMessageService messageService;
-	@Resource
-	private IGrouponService grouponService;
 	@Lazy
 	@Resource
 	private IAfterSalesService afterSalesService;
@@ -306,76 +296,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	public UserOrderDetailResponse getUserOrderDetail(Long orderId, Long afterSalesId, Double longitude, Double latitude) {
 		UserOrderDetailResponse detail = baseMapper.getUserOrderDetail(orderId);
 
-		SelfTake selfTake = selfTakeService.getById(detail.getSelfTakeId());
-		if (selfTake != null) {
-			SelfTakeVO selfTakeVO = SelfTakeWrapper.build().entityVO(selfTake);
-			detail.setSelfTake(selfTakeVO);
-			double distance = 0.0;
-			if (longitude != null && latitude != null) {
-				distance = DistanceUtils.getDistance(longitude, latitude, selfTake.getLongitude(), selfTake.getLatitude());
-			}
-			selfTakeVO.setDistance(distance);
-		}
-		// 待支付的订单需计算支付剩余时间
-		if (OrderStateEnum.WAIT_PAY.getValue().equals(detail.getOrderState())) {
-			long timeoutTime = timeoutService.getTimeoutTime();
-			// 计算当前时间跟下单时间相差的秒数
-			LocalDateTime now = LocalDateTime.now();
-			long seconds = LocalDateTimeUtil.between(detail.getCreateTime(), now).getSeconds();
-			detail.setRemainTime(timeoutTime - seconds);
-		}
-
-		if (afterSalesId != null) {
-			AfterSales afterSales = afterSalesService.getById(afterSalesId);
-			detail.setAfterSalesReason(afterSales.getReason());
-			detail.setRefundApplyTime(afterSales.getCreateTime());
-			detail.setRefundNo(afterSales.getAfterSalesNo());
-			if (AfterSalesStatusEnum.FINISH.getValue().equals(afterSales.getStatus())) {
-				detail.setAfterSalesDesc("已退款");
-			} else {
-				detail.setAfterSalesDesc(AfterSalesStatusEnum.getNameByValue(afterSales.getStatus()));
-			}
-			List<OrderGrouponGoods> list;
-			if (AfterSalesTypeEnum.REFUND.getValue().equals(afterSales.getType())) {
-				detail.setRefundAmount(detail.getPaymentAmount());
-				list = orderGrouponGoodsService.lambdaQuery().eq(OrderGrouponGoods::getOrderId, orderId).list();
-			} else if (AfterSalesTypeEnum.PART_REFUND.getValue().equals(afterSales.getType()) || AfterSalesTypeEnum.NOT_ARRIVE_REFUND.getValue().equals(afterSales.getType())) {
-				list = afterSalesGoodsService.getGoodsByAfterSalesId(afterSalesId);
-				BigDecimal totalRefundAmount = BigDecimal.valueOf(0);
-				for (OrderGrouponGoods orderGrouponGoods : list) {
-					totalRefundAmount = totalRefundAmount.add(orderGrouponGoods.getGoodsPrice().multiply(BigDecimal.valueOf(orderGrouponGoods.getRefundGoodsNum())));
-				}
-				detail.setRefundAmount(totalRefundAmount);
-			} else {
-				OrderGrouponGoods goods = orderGrouponGoodsService.getById(afterSales.getOrderGrouponGoodsId());
-				detail.setRefundAmount(goods.getGoodsPrice().multiply(BigDecimal.valueOf(afterSales.getReturnGoodsNum())));
-				list = orderGrouponGoodsService.lambdaQuery().eq(BaseEntity::getId, afterSales.getOrderGrouponGoodsId()).list();
-				if (AfterSalesStatusEnum.PROCESSED.getValue().equals(afterSales.getStatus())) {
-					// 查询供应商信息
-					OrderGrouponGoods orderGrouponGoods = orderGrouponGoodsService.getById(afterSales.getOrderGrouponGoodsId());
-					Store store = storeService.getById(orderGrouponGoods.getSupplierId());
-					detail.setStore(StoreWrapper.build().entityVO(store));
-				}
-			}
-
-			detail.setAfterSales(afterSales);
-			detail.setGoodsList(list);
-		} else {
-			List<OrderGrouponGoods> list = orderGrouponGoodsService.lambdaQuery().eq(OrderGrouponGoods::getOrderId, orderId).list();
-			detail.setGoodsList(list);
-		}
 		return detail;
 	}
 
-	@Override
-	public void modifySelfTake(Long orderId, Long selfTakeId) {
-		OrderGroupon one = orderGrouponService.lambdaQuery().eq(OrderGroupon::getOrderId, orderId).one();
-		Assert.notNull(one, "数据不存在");
-		SelfTake selfTake = selfTakeService.getById(selfTakeId);
-		Assert.notNull(selfTake, "自提点数据不存在");
-		one.setSelfTakeId(selfTakeId);
-		orderGrouponService.updateById(one);
-	}
 
 	@Override
 	public Page<Order> getOrderByExpirationTime(Page page, Date time) {
@@ -401,17 +324,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 		Order order = this.getById(id);
 		Assert.notNull(order, "订单数据不存在");
 
-		OrderGroupon orderGroupon = orderGrouponService.lambdaQuery().eq(OrderGroupon::getOrderId, order.getId()).one();
-		Assert.notNull(orderGroupon, "数据不存在");
-		Groupon groupon = grouponService.getById(orderGroupon.getGrouponId());
-		Assert.notNull(groupon, "团购数据不存在");
-
-		if (YesOrNoEnum.YES.getValue().equals(orderGroupon.getIsArrive()) &&
-				!(OrderStateEnum.WAIT_DELIVERY.getValue().equals(order.getOrderState()) &&
-						groupon.getGrouponEndTime().isAfter(LocalDateTime.now()))) {
-			throw new ServiceException("当前订单不支持退款");
-		}
-
 
 		logger.info("发起退款", "订单号:" + order.getOrderNo() + "订单状态");
 		order.setOrderState(OrderStateEnum.AFTER_SALES.getValue());

+ 164 - 0
src/main/java/org/springblade/modules/groupon/controller/EmbersController.java

@@ -0,0 +1,164 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.distribution.entity.DistributionConfig;
+import org.springblade.modules.distribution.service.IDistributionConfigService;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.Embers;
+import org.springblade.modules.groupon.vo.EmbersVO;
+import org.springblade.modules.groupon.wrapper.EmbersWrapper;
+import org.springblade.modules.groupon.service.IEmbersService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * 团员列表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/embers")
+@Api(value = "团员列表", tags = "团员列表接口")
+public class EmbersController extends BladeController {
+
+	private final IEmbersService embersService;
+
+
+	@Resource
+	private IDistributionConfigService distributionConfigService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入embers")
+	public R<EmbersVO> detail(Embers embers) {
+		Embers detail = embersService.getOne(Condition.getQueryWrapper(embers));
+		return R.data(EmbersWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 团员列表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入embers")
+	public R<IPage<EmbersVO>> list(Embers embers, Query query) {
+		IPage<Embers> pages = embersService.page(Condition.getPage(query), Condition.getQueryWrapper(embers));
+		return R.data(EmbersWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 团员列表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入embers")
+	public R<IPage<EmbersVO>> page(EmbersVO embers, Query query) {
+		IPage<EmbersVO> pages = embersService.selectEmbersPage(Condition.getPage(query), embers);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 团员列表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入embers")
+	public R save(@Valid @RequestBody Embers embers) {
+		return R.status(embersService.save(embers));
+	}
+
+	/**
+	 * 修改 团员列表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入embers")
+	public R update(@Valid @RequestBody Embers embers) {
+		return R.status(embersService.updateById(embers));
+	}
+
+	/**
+	 * 新增或修改 团员列表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入embers")
+	public R submit(@Valid @RequestBody Embers embers) {
+		return R.status(embersService.saveOrUpdate(embers));
+	}
+
+
+	/**
+	 * 删除 团员列表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(embersService.removeByIds(Func.toLongList(ids)));
+	}
+
+	@PostMapping("/unbundleUser")
+	@ApiOperation(value = "解绑用户")
+	public void  unbundleUser(){
+		DistributionConfig config = distributionConfigService.lambdaQuery()
+				.eq(DistributionConfig::getIsDelete, 0)
+				.one();
+		if (Objects.isNull(config)){
+			return;
+		}
+		Integer bindingDays = config.getBindingDays();
+		if (Objects.isNull(bindingDays)){
+			return;
+		}
+		//获取应当解绑的时间
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(new Date());
+		calendar.add(calendar.DATE,-bindingDays);
+		Date time = calendar.getTime();
+		embersService.unbundleUser(time);
+	}
+
+
+
+}

+ 135 - 0
src/main/java/org/springblade/modules/groupon/controller/FileContentController.java

@@ -0,0 +1,135 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.FileContent;
+import org.springblade.modules.groupon.vo.FileContentVO;
+import org.springblade.modules.groupon.wrapper.FileContentWrapper;
+import org.springblade.modules.groupon.service.IFileContentService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ * 图文表,存储意见,投诉等信息 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/filecontent")
+@Api(value = "图文表,存储意见,投诉等信息", tags = "图文表,存储意见,投诉等信息接口")
+public class FileContentController extends BladeController {
+
+	private final IFileContentService fileContentService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入fileContent")
+	public R<FileContentVO> detail(FileContent fileContent) {
+		FileContent detail = fileContentService.getOne(Condition.getQueryWrapper(fileContent));
+		return R.data(FileContentWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 图文表,存储意见,投诉等信息
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入fileContent")
+	public R<IPage<FileContentVO>> list(FileContent fileContent, Query query) {
+		IPage<FileContent> pages = fileContentService.page(Condition.getPage(query), Condition.getQueryWrapper(fileContent));
+		return R.data(FileContentWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 图文表,存储意见,投诉等信息
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入fileContent")
+	public R<IPage<FileContentVO>> page(FileContentVO fileContent, Query query) {
+		IPage<FileContentVO> pages = fileContentService.selectFileContentPage(Condition.getPage(query), fileContent);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 图文表,存储意见,投诉等信息
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入fileContent")
+	public R save(@Valid @RequestBody FileContent fileContent) {
+		return R.status(fileContentService.save(fileContent));
+	}
+
+	/**
+	 * 修改 图文表,存储意见,投诉等信息
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入fileContent")
+	public R update(@Valid @RequestBody FileContent fileContent) {
+		return R.status(fileContentService.updateById(fileContent));
+	}
+
+	/**
+	 * 新增或修改 图文表,存储意见,投诉等信息
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入fileContent")
+	public R submit(@Valid @RequestBody FileContent fileContent) {
+		return R.status(fileContentService.saveOrUpdate(fileContent));
+	}
+
+
+	/**
+	 * 删除 图文表,存储意见,投诉等信息
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(fileContentService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 218 - 0
src/main/java/org/springblade/modules/groupon/controller/GrouponController.java

@@ -0,0 +1,218 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.lang.Assert;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.common.enums.GrouponSourceEnum;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.service.IGrouponGoodsService;
+import org.springblade.modules.groupon.service.IGrouponImageService;
+import org.springblade.modules.mall.entity.GoodsInfo;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+import org.springblade.modules.mall.wrapper.GoodsInfoWrapper;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.Groupon;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import org.springblade.modules.groupon.wrapper.GrouponWrapper;
+import org.springblade.modules.groupon.service.IGrouponService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 团购表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/groupon")
+@Api(value = "团购表", tags = "团购表接口")
+public class GrouponController extends BladeController {
+
+	private final IGrouponService grouponService;
+	private final IGrouponImageService grouponImageService;
+	private final IGrouponGoodsService grouponGoodsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入groupon")
+	public R<GrouponVO> detail(Groupon groupon) {
+		Groupon detail = grouponService.getOne(Condition.getQueryWrapper(groupon));
+		GrouponVO grouponVO = GrouponWrapper.build().entityVO(detail);
+		// 查询团购详情图片
+		List<GrouponImage> grouponImages = grouponImageService.lambdaQuery().eq(GrouponImage::getGrouponId, groupon.getId()).list();
+		if (CollUtil.isNotEmpty(grouponImages)) {
+			List<String> slideshow = grouponImages.stream().filter(e -> e.getType().equals(1)).map(GrouponImage::getUrl).collect(Collectors.toList());
+			List<String> detailImage = grouponImages.stream().filter(e -> e.getType().equals(2)).map(GrouponImage::getUrl).collect(Collectors.toList());
+			grouponVO.setSlideshow(slideshow);
+			grouponVO.setDetailImage(detailImage);
+		}
+		// 查询商品
+		List<GoodsInfoVO> goodsList = grouponGoodsService.getGoodsByGrouponId(detail.getId());
+		grouponVO.setGoodsList(goodsList);
+
+		return R.data(grouponVO);
+	}
+
+	/**
+	 * 分页 团购表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入groupon")
+	public R<IPage<GrouponVO>> list(Groupon groupon, Query query) {
+		IPage<Groupon> pages = grouponService.page(Condition.getPage(query), Condition.getQueryWrapper(groupon));
+		return R.data(GrouponWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 团购表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入groupon")
+	public R<IPage<GrouponVO>> page(GrouponVO groupon, Query query) {
+		IPage<GrouponVO> pages = grouponService.selectGrouponPage(Condition.getPage(query), groupon);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 团购表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入groupon")
+	public R save(@Valid @RequestBody GrouponVO groupon) {
+		Assert.notBlank(groupon.getMainTitle(), "主标题不能为空");
+		Assert.notBlank(groupon.getSubTitle(), "副标题不能为空");
+		Assert.notEmpty(groupon.getSelfTakeIds(), "自提点不能为空");
+		groupon.setSource(GrouponSourceEnum.PLATFORM.getValue());
+		grouponService.publishGroupon(groupon);
+		return R.status(true);
+	}
+
+	/**
+	 * 修改 团购表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入groupon")
+	@Transactional(rollbackFor = Exception.class)
+	public R update(@Valid @RequestBody GrouponVO groupon) {
+		grouponService.check(groupon);
+		boolean b = grouponService.updateById(groupon);
+		return R.status(b);
+	}
+
+
+	@PostMapping("/modify-status")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改状态", notes = "传入groupon")
+	public R modifyStatus(@RequestBody GrouponVO groupon) {
+		boolean b = grouponService.updateById(groupon);
+		return R.status(b);
+	}
+
+	/**
+	 * 新增或修改 团购表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入groupon")
+	public R submit(@Valid @RequestBody Groupon groupon) {
+		return R.status(grouponService.saveOrUpdate(groupon));
+	}
+
+	
+	/**
+	 * 删除 团购表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(grouponService.removeByIds(Func.toLongList(ids)));
+	}
+
+	@PostMapping("/audit")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "审核")
+	public R audit(@ApiParam(value = "id", required = true) @RequestParam String id,
+				   @ApiParam(value = "remark", required = true) @RequestParam Integer auditStatus,
+				   @ApiParam(value = "remark", required = true) @RequestParam String remark) {
+		grouponService.audit(id, auditStatus, remark);
+		return R.success("操作成功");
+	}
+
+
+	@PostMapping("/perfect")
+	@ApiOperationSupport(order = 9)
+	@ApiOperation(value = "完善信息")
+	public R perfect(@RequestBody GrouponVO grouponVO) {
+		List<GoodsInfoVO> goodsList = grouponVO.getGoodsList();
+		for (GoodsInfoVO goodsInfoVO : goodsList) {
+			if (goodsInfoVO.getGrouponPrice().doubleValue() <= 0) {
+				return R.fail("团购价格设置有误,请检查");
+			}
+		}
+		grouponService.perfect(grouponVO);
+		return R.success("操作成功");
+	}
+
+	/**
+	 * 生成团购测试数据
+	 * @return
+	 */
+	@GetMapping("/gen")
+	public R gen() {
+		GrouponVO groupon = new GrouponVO();
+		groupon.setMainTitle("测试" + DateUtil.formatDateTime(new Date()));
+		groupon.setSubTitle(groupon.getMainTitle());
+		LocalDateTime now = LocalDateTime.now();
+		groupon.setGrouponStartTime(now);
+		groupon.setGrouponEndTime(now.plusHours(1));
+		groupon.setTakeStartTime(now.plusDays(1));
+		groupon.setTakeEndTime(now.plusDays(2));
+		grouponService.gen(groupon);
+		return R.success("操作成功");
+	}
+}

+ 129 - 0
src/main/java/org/springblade/modules/groupon/controller/GrouponGoodsController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import org.springblade.modules.groupon.wrapper.GrouponGoodsWrapper;
+import org.springblade.modules.groupon.service.IGrouponGoodsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 团购商品表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/groupongoods")
+@Api(value = "团购商品表", tags = "团购商品表接口")
+public class GrouponGoodsController extends BladeController {
+
+	private final IGrouponGoodsService grouponGoodsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入grouponGoods")
+	public R<GrouponGoodsVO> detail(GrouponGoods grouponGoods) {
+		GrouponGoods detail = grouponGoodsService.getOne(Condition.getQueryWrapper(grouponGoods));
+		return R.data(GrouponGoodsWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 团购商品表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入grouponGoods")
+	public R<IPage<GrouponGoodsVO>> list(GrouponGoods grouponGoods, Query query) {
+		IPage<GrouponGoods> pages = grouponGoodsService.page(Condition.getPage(query), Condition.getQueryWrapper(grouponGoods));
+		return R.data(GrouponGoodsWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 团购商品表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入grouponGoods")
+	public R<IPage<GrouponGoodsVO>> page(GrouponGoodsVO grouponGoods, Query query) {
+		IPage<GrouponGoodsVO> pages = grouponGoodsService.selectGrouponGoodsPage(Condition.getPage(query), grouponGoods);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 团购商品表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入grouponGoods")
+	public R save(@Valid @RequestBody GrouponGoods grouponGoods) {
+		return R.status(grouponGoodsService.save(grouponGoods));
+	}
+
+	/**
+	 * 修改 团购商品表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入grouponGoods")
+	public R update(@Valid @RequestBody GrouponGoods grouponGoods) {
+		return R.status(grouponGoodsService.updateById(grouponGoods));
+	}
+
+	/**
+	 * 新增或修改 团购商品表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入grouponGoods")
+	public R submit(@Valid @RequestBody GrouponGoods grouponGoods) {
+		return R.status(grouponGoodsService.saveOrUpdate(grouponGoods));
+	}
+
+	
+	/**
+	 * 删除 团购商品表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(grouponGoodsService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 129 - 0
src/main/java/org/springblade/modules/groupon/controller/GrouponImageController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.vo.GrouponImageVO;
+import org.springblade.modules.groupon.wrapper.GrouponImageWrapper;
+import org.springblade.modules.groupon.service.IGrouponImageService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 团购图片表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/grouponimage")
+@Api(value = "团购图片表", tags = "团购图片表接口")
+public class GrouponImageController extends BladeController {
+
+	private final IGrouponImageService grouponImageService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入grouponImage")
+	public R<GrouponImageVO> detail(GrouponImage grouponImage) {
+		GrouponImage detail = grouponImageService.getOne(Condition.getQueryWrapper(grouponImage));
+		return R.data(GrouponImageWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 团购图片表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入grouponImage")
+	public R<IPage<GrouponImageVO>> list(GrouponImage grouponImage, Query query) {
+		IPage<GrouponImage> pages = grouponImageService.page(Condition.getPage(query), Condition.getQueryWrapper(grouponImage));
+		return R.data(GrouponImageWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 团购图片表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入grouponImage")
+	public R<IPage<GrouponImageVO>> page(GrouponImageVO grouponImage, Query query) {
+		IPage<GrouponImageVO> pages = grouponImageService.selectGrouponImagePage(Condition.getPage(query), grouponImage);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 团购图片表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入grouponImage")
+	public R save(@Valid @RequestBody GrouponImage grouponImage) {
+		return R.status(grouponImageService.save(grouponImage));
+	}
+
+	/**
+	 * 修改 团购图片表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入grouponImage")
+	public R update(@Valid @RequestBody GrouponImage grouponImage) {
+		return R.status(grouponImageService.updateById(grouponImage));
+	}
+
+	/**
+	 * 新增或修改 团购图片表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入grouponImage")
+	public R submit(@Valid @RequestBody GrouponImage grouponImage) {
+		return R.status(grouponImageService.saveOrUpdate(grouponImage));
+	}
+
+	
+	/**
+	 * 删除 团购图片表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(grouponImageService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 129 - 0
src/main/java/org/springblade/modules/groupon/controller/GrouponSelfTakeController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.vo.GrouponSelfTakeVO;
+import org.springblade.modules.groupon.wrapper.GrouponSelfTakeWrapper;
+import org.springblade.modules.groupon.service.IGrouponSelfTakeService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 团购自提点关联表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/grouponselftake")
+@Api(value = "团购自提点关联表", tags = "团购自提点关联表接口")
+public class GrouponSelfTakeController extends BladeController {
+
+	private final IGrouponSelfTakeService grouponSelfTakeService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入grouponSelfTake")
+	public R<GrouponSelfTakeVO> detail(GrouponSelfTake grouponSelfTake) {
+		GrouponSelfTake detail = grouponSelfTakeService.getOne(Condition.getQueryWrapper(grouponSelfTake));
+		return R.data(GrouponSelfTakeWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 团购自提点关联表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入grouponSelfTake")
+	public R<IPage<GrouponSelfTakeVO>> list(GrouponSelfTake grouponSelfTake, Query query) {
+		IPage<GrouponSelfTake> pages = grouponSelfTakeService.page(Condition.getPage(query), Condition.getQueryWrapper(grouponSelfTake));
+		return R.data(GrouponSelfTakeWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 团购自提点关联表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入grouponSelfTake")
+	public R<IPage<GrouponSelfTakeVO>> page(GrouponSelfTakeVO grouponSelfTake, Query query) {
+		IPage<GrouponSelfTakeVO> pages = grouponSelfTakeService.selectGrouponSelfTakePage(Condition.getPage(query), grouponSelfTake);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 团购自提点关联表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入grouponSelfTake")
+	public R save(@Valid @RequestBody GrouponSelfTake grouponSelfTake) {
+		return R.status(grouponSelfTakeService.save(grouponSelfTake));
+	}
+
+	/**
+	 * 修改 团购自提点关联表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入grouponSelfTake")
+	public R update(@Valid @RequestBody GrouponSelfTake grouponSelfTake) {
+		return R.status(grouponSelfTakeService.updateById(grouponSelfTake));
+	}
+
+	/**
+	 * 新增或修改 团购自提点关联表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入grouponSelfTake")
+	public R submit(@Valid @RequestBody GrouponSelfTake grouponSelfTake) {
+		return R.status(grouponSelfTakeService.saveOrUpdate(grouponSelfTake));
+	}
+
+	
+	/**
+	 * 删除 团购自提点关联表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(grouponSelfTakeService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 129 - 0
src/main/java/org/springblade/modules/groupon/controller/GrouponUserController.java

@@ -0,0 +1,129 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestParam;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.vo.GrouponUserVO;
+import org.springblade.modules.groupon.wrapper.GrouponUserWrapper;
+import org.springblade.modules.groupon.service.IGrouponUserService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 参团用户表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/grouponuser")
+@Api(value = "参团用户表", tags = "参团用户表接口")
+public class GrouponUserController extends BladeController {
+
+	private final IGrouponUserService grouponUserService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入grouponUser")
+	public R<GrouponUserVO> detail(GrouponUser grouponUser) {
+		GrouponUser detail = grouponUserService.getOne(Condition.getQueryWrapper(grouponUser));
+		return R.data(GrouponUserWrapper.build().entityVO(detail));
+	}
+
+	/**
+	 * 分页 参团用户表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入grouponUser")
+	public R<IPage<GrouponUserVO>> list(GrouponUser grouponUser, Query query) {
+		IPage<GrouponUser> pages = grouponUserService.page(Condition.getPage(query), Condition.getQueryWrapper(grouponUser));
+		return R.data(GrouponUserWrapper.build().pageVO(pages));
+	}
+
+
+	/**
+	 * 自定义分页 参团用户表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入grouponUser")
+	public R<IPage<GrouponUserVO>> page(GrouponUserVO grouponUser, Query query) {
+		IPage<GrouponUserVO> pages = grouponUserService.selectGrouponUserPage(Condition.getPage(query), grouponUser);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 参团用户表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入grouponUser")
+	public R save(@Valid @RequestBody GrouponUser grouponUser) {
+		return R.status(grouponUserService.save(grouponUser));
+	}
+
+	/**
+	 * 修改 参团用户表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入grouponUser")
+	public R update(@Valid @RequestBody GrouponUser grouponUser) {
+		return R.status(grouponUserService.updateById(grouponUser));
+	}
+
+	/**
+	 * 新增或修改 参团用户表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入grouponUser")
+	public R submit(@Valid @RequestBody GrouponUser grouponUser) {
+		return R.status(grouponUserService.saveOrUpdate(grouponUser));
+	}
+
+	
+	/**
+	 * 删除 参团用户表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "逻辑删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(grouponUserService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 202 - 0
src/main/java/org/springblade/modules/groupon/controller/SelfTakeController.java

@@ -0,0 +1,202 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.controller;
+
+import cn.hutool.core.util.NumberUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.entity.UserSelfTake;
+import org.springblade.modules.groupon.param.AddUserSelfTakeParam;
+import org.springblade.modules.groupon.service.ISelfTakeService;
+import org.springblade.modules.groupon.service.IUserSelfTakeService;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import org.springblade.modules.groupon.wrapper.SelfTakeWrapper;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 自提点表 控制器
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("groupon/selftake")
+@Api(value = "自提点表", tags = "自提点表接口")
+public class SelfTakeController extends BladeController {
+
+    private final ISelfTakeService selfTakeService;
+    @Resource
+    private IUserSelfTakeService userSelfTakeService;
+
+    /**
+     * 查询自己的自提点
+     */
+    @PostMapping("/listByUserId")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "查询团长自提点", notes = "userId")
+    public R listByUserId(@RequestParam Long userId) {
+
+        List<UserSelfTake> list = userSelfTakeService.lambdaQuery()
+                .eq(UserSelfTake::getUserId, userId)
+                .list();
+        if (list.size() <= 0) {
+            return R.success("没有查询到自提点");
+        }
+        List<Long> collect = list.stream().map(UserSelfTake::getSelfTakeId).collect(Collectors.toList());
+        LambdaQueryWrapper<SelfTake> q = new LambdaQueryWrapper<>();
+        q.in(SelfTake::getId, collect);
+        q.eq(SelfTake::getStatus, 1);
+        q.eq(SelfTake::getIsDelete, 0);
+        q.orderByDesc(SelfTake::getIsDefault);
+        q.orderByDesc(SelfTake::getCreateTime);
+		List<SelfTake> list1 = selfTakeService.list(q);
+		return R.data(list1);
+    }
+
+    /**
+     * 详情
+     */
+    @GetMapping("/detail")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "详情", notes = "传入selfTake")
+    public R<SelfTakeVO> detail(SelfTake selfTake) {
+        SelfTake detail = selfTakeService.getOne(Condition.getQueryWrapper(selfTake));
+        return R.data(SelfTakeWrapper.build().entityVO(detail));
+    }
+
+    /**
+     * 分页 自提点表
+     */
+    @GetMapping("/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "分页", notes = "传入selfTake")
+    public R<IPage<SelfTakeVO>> list(SelfTake selfTake, Query query, String isAdmin) {
+        String name = "";
+        if (StrUtil.isNotBlank(selfTake.getName())) {
+            name = selfTake.getName();
+            selfTake.setName(null);
+        }
+
+        QueryWrapper<SelfTake> queryWrapper = Condition.getQueryWrapper(selfTake);
+        if (StrUtil.isNotBlank(name)) {
+            queryWrapper.like("name", name);
+        }
+        if (StrUtil.isBlank(isAdmin)) {
+            queryWrapper.isNotNull("contact_number").ne("contact_number", "");
+        }
+        IPage<SelfTake> pages = selfTakeService.page(Condition.getPage(query), queryWrapper);
+        return R.data(SelfTakeWrapper.build().pageVO(pages));
+    }
+
+    /**
+     * 自定义分页 自提点表
+     */
+    @GetMapping("/page")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "分页", notes = "传入selfTake")
+    public R<IPage<SelfTakeVO>> page(SelfTakeVO selfTake, Query query) {
+        // 处理前端下拉多选时的bug
+        if (NumberUtil.isNumber(selfTake.getName()) && selfTake.getName().length() == 19) {
+            selfTake.setName("");
+        }
+        IPage<SelfTakeVO> pages = selfTakeService.selectSelfTakePage(Condition.getPage(query), selfTake);
+        return R.data(pages);
+    }
+
+    /**
+     * 新增 自提点表
+     */
+    @PostMapping("/save")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入selfTake")
+    public R save(@Valid @RequestBody SelfTake selfTake) {
+        return R.status(selfTakeService.save(selfTake));
+    }
+
+    /**
+     * 修改 自提点表
+     */
+    @PostMapping("/update")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "修改", notes = "传入selfTake")
+    public R update(@Valid @RequestBody SelfTake selfTake) {
+        return R.status(selfTakeService.updateById(selfTake));
+    }
+
+    /**
+     * 新增或修改 自提点表
+     */
+    @PostMapping("/submit")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "新增或修改", notes = "传入selfTake")
+    public R submit(@Valid @RequestBody SelfTake selfTake) {
+        return R.status(selfTakeService.saveOrUpdate(selfTake));
+    }
+
+    /**
+     * 删除 自提点表
+     */
+    @PostMapping("/remove")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "逻辑删除", notes = "传入ids")
+    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+        return R.status(selfTakeService.removeByIds(Func.toLongList(ids)));
+    }
+
+    /**
+     * 给团长添加自提点
+     */
+    @PostMapping("/addUserSelfTake")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "给团长添加自提点", notes = "传入ids")
+    public R addUserSelfTake(@RequestBody AddUserSelfTakeParam param) {
+        userSelfTakeService.lambdaUpdate()
+                .eq(UserSelfTake::getUserId, param.getUserId())
+                .remove();
+        List<UserSelfTake> list = new ArrayList<>();
+        for (Long selfTakeId : param.getSelfTakeList()) {
+            UserSelfTake userSelfTake = new UserSelfTake();
+            userSelfTake.setUserId(param.getUserId());
+            userSelfTake.setSelfTakeId(selfTakeId);
+            list.add(userSelfTake);
+        }
+        userSelfTakeService.saveBatch(list);
+        return R.success("操作成功");
+    }
+
+
+}

+ 177 - 0
src/main/java/org/springblade/modules/groupon/controller/TzController.java

@@ -0,0 +1,177 @@
+package org.springblade.modules.groupon.controller;
+
+import cn.hutool.core.lang.Assert;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springblade.common.enums.GrouponSourceEnum;
+import org.springblade.core.excel.util.ExcelUtil;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.modules.api.response.GroupStatisResponse;
+import org.springblade.modules.api.service.impl.GrouponOrderServiceImpl;
+import org.springblade.modules.finance.service.IAfterSalesService;
+import org.springblade.modules.finance.service.IOrderGrouponService;
+import org.springblade.modules.groupon.entity.UserSelfTake;
+import org.springblade.modules.groupon.service.IGrouponService;
+import org.springblade.modules.groupon.service.IUserSelfTakeService;
+import org.springblade.modules.groupon.vo.AppointmentVO;
+import org.springblade.modules.groupon.vo.ExportAppointmentVO;
+import org.springblade.modules.groupon.vo.ExportPickUpAppointmentVO;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import org.springblade.modules.platform.service.UserAppService;
+import org.springblade.modules.system.entity.UserApp;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+
+@RestController
+@RequestMapping("/tz")
+@Api(value = "团长后台接口", tags = "团长后台接口")
+public class TzController {
+
+    @Resource
+    private IGrouponService grouponService;
+    @Resource
+    private GrouponOrderServiceImpl grouponOrderService;
+    @Resource
+    private IOrderGrouponService orderGrouponService;
+    @Lazy
+    @Resource
+    private IAfterSalesService afterSalesService;
+    @Resource
+    private UserAppService userAppService;
+    @Resource
+    private IUserSelfTakeService userSelfTakeService;
+
+    @GetMapping("/groupon/statis")
+    @ApiOperationSupport(order = 1)
+    @ApiOperation(value = "查询团购统计")
+    public R<GroupStatisResponse> groupStatistics() {
+        GroupStatisResponse result = grouponService.groupStatistics(AuthUtil.getUserId());
+        return R.data(result);
+    }
+
+    @GetMapping("/groupon-mng/list")
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "查询团购管理列表")
+    public R<IPage<GrouponVO>> grouponMngList(@ApiParam("state") Integer state, Query query) {
+        return R.data(grouponService.grouponMngList(Condition.getPage(query), AuthUtil.getUserId(), state));
+    }
+
+    @GetMapping("/groupon-mng/detail")
+    @ApiOperationSupport(order = 3)
+    @ApiOperation(value = "查询团购管理列表详情")
+    public R<GrouponVO> grouponMngDetail(@ApiParam("拼团ID") Long groupId) {
+        return R.data(grouponService.grouponMngDetail(groupId));
+    }
+
+    @PostMapping("/publishGroupon")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "新增", notes = "传入groupon")
+    public R publishGroupon(@Valid @RequestBody GrouponVO groupon) {
+        Assert.notBlank(groupon.getMainTitle(), "主标题不能为空");
+        Assert.notBlank(groupon.getSubTitle(), "副标题不能为空");
+        Assert.notEmpty(groupon.getSelfTakeIds(), "自提点不能为空");
+        groupon.setSource(GrouponSourceEnum.PLATFORM.getValue());
+        groupon.setOrganizerUserId(AuthUtil.getUserId());
+        grouponService.publishGroupon(groupon);
+        return R.status(true);
+    }
+
+    @PostMapping("verification")
+    @ApiOperationSupport(order = 5)
+    @ApiOperation(value = "取货核销", notes = "通过取货码进行核销")
+    public R verification(@ApiParam("取货码") String pickupCode){
+        grouponOrderService.confirmOrder(pickupCode, AuthUtil.getUserId());
+        return R.success("取货核销成功");
+    }
+
+
+    @GetMapping("/commander")
+    @ApiOperationSupport(order = 6)
+    @ApiOperation(value = "获取团长团购订单")
+    public R<IPage<GrouponVO>> getCommanderOrder(Query query, Integer grouponState) {
+        return R.data(orderGrouponService.getCommanderOrder(Condition.getPage(query), AuthUtil.getUserId(), grouponState));
+    }
+
+    @GetMapping("/commander/detail")
+    @ApiOperationSupport(order = 7)
+    @ApiOperation(value = "获取团长团购订单详情")
+    public R<GrouponVO> getCommanderOrderDetail(@ApiParam("团购ID") Long grouponId, @ApiParam("查询类型 1-网点订单  2-全部订单") Integer queryType,
+                                                @ApiParam("团购ID") Integer state) {
+        return R.data(orderGrouponService.getCommanderOrderDetail(grouponId, queryType, AuthUtil.getUserId(), state));
+    }
+
+    @ApiOperationSupport(order = 8)
+    @ApiOperation(value = "同意售后")
+    @PostMapping("/after-sales/agree")
+    public R agree(@RequestParam("afterSalesNo") String afterSalesNo) {
+        afterSalesService.agree(afterSalesNo);
+        return R.success("ok");
+    }
+
+    @ApiOperationSupport(order = 2)
+    @ApiOperation(value = "驳回售后")
+    @PostMapping("/after-sales/refuse")
+    public R refuse(@RequestParam("afterSalesNo") String afterSalesNo, @RequestParam("refuseReason") String refuseReason) {
+        Assert.notBlank(refuseReason, "拒绝原因不能为空");
+        afterSalesService.refuse(afterSalesNo, refuseReason);
+        return R.success("ok");
+    }
+
+    @GetMapping("/pick-up/appointment")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "获取团长取货履约单列表")
+    public R<IPage<AppointmentVO>> getPickUpAppointment(Query query, Integer state) {
+        UserApp userApp = userAppService.getByUserId(AuthUtil.getUserId());
+        if(ObjectUtil.isEmpty(userApp.getLivingHall()) || !userApp.getLivingHall().equals(1)){
+            return R.fail("团长身份异常,请联系客服");
+        }
+        UserSelfTake userSelfTake = userSelfTakeService.getOne(Wrappers.lambdaQuery(UserSelfTake.class).eq(UserSelfTake::getUserId, userApp.getUserId()));
+        return R.data(orderGrouponService.getPickUpAppointment(Condition.getPage(query), null, state, userSelfTake.getSelfTakeId()));
+    }
+
+    @GetMapping("/pick-up/appointment/export")
+    @ApiOperationSupport(order = 10)
+    @ApiOperation(value = "导出团长取货履约单")
+    public void exportPickUpAppointment(Long grouponId, String grouponName, String stateDesc, String grouponStartTime, HttpServletResponse response) {
+        List<ExportPickUpAppointmentVO> list = orderGrouponService.getPickUpAppointmentData(grouponId);
+        for (ExportPickUpAppointmentVO e : list) {
+            e.setMainTitle(grouponName);
+            e.setState(stateDesc);
+            e.setGrouponStartTime(grouponStartTime);
+        }
+        ExcelUtil.export(response, "取货履约单", "取货履约单列表", list, ExportPickUpAppointmentVO.class);
+    }
+
+    @GetMapping("/appointment/all")
+    @ApiOperationSupport(order = 9)
+    @ApiOperation(value = "获取运营后台履约单列表")
+    public R<IPage<AppointmentVO>> getPickUpAppointmentAll(Query query, Integer state) {
+        return R.data(orderGrouponService.getPickUpAppointment(Condition.getPage(query), null, state, null));
+    }
+
+    @GetMapping("/appointment/all/export")
+    @ApiOperationSupport(order = 10)
+    @ApiOperation(value = "导出履约单")
+    public void exportPickUpAppointmentAll(Long grouponId, String grouponName, String stateDesc, String grouponStartTime,HttpServletResponse response) {
+        List<ExportAppointmentVO> list = orderGrouponService.getPickUpAppointmentDataAll(grouponId);
+        for (ExportAppointmentVO e : list) {
+            e.setMainTitle(grouponName);
+            e.setState(stateDesc);
+            e.setGrouponStartTime(grouponStartTime);
+        }
+        ExcelUtil.export(response, "履约单", "履约单列表", list, ExportAppointmentVO.class);
+    }
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/EmbersDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.Embers;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 团员列表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class EmbersDTO extends Embers {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/FileContentDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.FileContent;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 图文表,存储意见,投诉等信息数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FileContentDTO extends FileContent {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/GrouponDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.Groupon;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 团购表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GrouponDTO extends Groupon {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/GrouponGoodsDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 团购商品表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GrouponGoodsDTO extends GrouponGoods {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/GrouponImageDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.GrouponImage;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 团购图片表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GrouponImageDTO extends GrouponImage {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/GrouponSelfTakeDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 团购自提点关联表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GrouponSelfTakeDTO extends GrouponSelfTake {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/GrouponUserDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.GrouponUser;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 参团用户表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GrouponUserDTO extends GrouponUser {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/groupon/dto/SelfTakeDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.dto;
+
+import org.springblade.modules.groupon.entity.SelfTake;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 自提点表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SelfTakeDTO extends SelfTake {
+	private static final long serialVersionUID = 1L;
+
+}

+ 51 - 0
src/main/java/org/springblade/modules/groupon/entity/Embers.java

@@ -0,0 +1,51 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 团员列表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-20
+ */
+@Data
+@TableName("t_embers")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "Embers对象", description = "团员列表")
+public class Embers extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 分享人id
+	*/
+	@ApiModelProperty(value = "分享人id")
+	private Long shareUserId;
+	/**
+	* 绑定用户id
+	*/
+	@ApiModelProperty(value = "绑定用户id")
+	private Long bindUserId;
+	/**
+	* 团员名称
+	*/
+	@ApiModelProperty(value = "团员名称")
+	private String userName;
+	/**
+	* 用户电话
+	*/
+	@ApiModelProperty(value = "用户电话")
+	private String userTel;
+	/**
+	* 绑定状态 0:有效,1无效
+	*/
+	@ApiModelProperty(value = "绑定状态")
+	private Integer state;
+
+
+}

+ 60 - 0
src/main/java/org/springblade/modules/groupon/entity/FileContent.java

@@ -0,0 +1,60 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 图文表,存储意见,投诉等信息实体类
+ *
+ * @author zzyd
+ * @since 2023-06-15
+ */
+@Data
+@TableName("t_file_content")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "FileContent对象", description = "图文表,存储意见,投诉等信息")
+public class FileContent extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 处理人ID
+	*/
+	@ApiModelProperty(value = "处理人ID")
+	private Long replyUserId;
+	/**
+	* 类型
+	*/
+	@ApiModelProperty(value = "类型")
+	private Integer type;
+	/**
+	* 状态
+	*/
+	@ApiModelProperty(value = "状态")
+	private Integer status;
+	/**
+	* 回复内容
+	*/
+	@ApiModelProperty(value = "回复内容")
+	private String replyContent;
+	/**
+	* 内容
+	*/
+	@ApiModelProperty(value = "内容")
+	private String content;
+	/**
+	* 图片链接
+	*/
+	@ApiModelProperty(value = "图片链接")
+	private String imgUrl;
+
+
+	@ApiModelProperty(value = "电话号码")
+	private String phone;
+
+
+}

+ 101 - 0
src/main/java/org/springblade/modules/groupon/entity/Groupon.java

@@ -0,0 +1,101 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 团购表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_groupon")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "Groupon对象", description = "团购表")
+public class Groupon extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主标题
+	*/
+	@ApiModelProperty(value = "主标题")
+	private String mainTitle;
+	/**
+	* 副标题
+	*/
+	@ApiModelProperty(value = "副标题")
+	private String subTitle;
+	/**
+	* 团购开始时间
+	*/
+	@ApiModelProperty(value = "团购开始时间")
+	private LocalDateTime grouponStartTime;
+	/**
+	* 团购结束时间
+	*/
+	@ApiModelProperty(value = "团购结束时间")
+	private LocalDateTime grouponEndTime;
+	/**
+	* 取货开始时间
+	*/
+	@ApiModelProperty(value = "取货开始时间")
+	private LocalDateTime takeStartTime;
+	/**
+	* 取货结束时间
+	*/
+	@ApiModelProperty(value = "取货结束时间")
+	private LocalDateTime takeEndTime;
+	/**
+	* 状态
+	*/
+	@ApiModelProperty(value = "状态")
+	private Integer status;
+	/**
+	* 浏览量
+	*/
+	@ApiModelProperty(value = "浏览量")
+	private Integer views;
+	/**
+	* 审核状态
+	*/
+	@ApiModelProperty(value = "审核状态")
+	private Integer auditStatus;
+	/**
+	* 审核时间
+	*/
+	@ApiModelProperty(value = "审核时间")
+	private LocalDateTime auditTime;
+
+	@ApiModelProperty(value = "审核描述")
+	private String auditMessage;
+
+	@ApiModelProperty(value = "分享图片")
+	private String shareImage;
+
+	/**
+	* 来源 1-平台 2-用户
+	*/
+	@ApiModelProperty(value = "来源 1-平台 2-用户")
+	private Integer source;
+	/**
+	* 信息是否完善
+	*/
+	@ApiModelProperty(value = "信息是否完善")
+	private Integer isPerfect;
+
+	@ApiModelProperty(value = "是否生成履约单")
+	private Integer isAppoint;
+
+	@ApiModelProperty(value = "团长用户Id")
+	private Long organizerUserId;
+
+	@ApiModelProperty(value = "团购状态 1-待收货 2-待提货 3-已完成 4-售后")
+	private Integer grouponState;
+}

+ 47 - 0
src/main/java/org/springblade/modules/groupon/entity/GrouponGoods.java

@@ -0,0 +1,47 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * 团购商品表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_groupon_goods")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponGoods对象", description = "团购商品表")
+public class GrouponGoods extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 团购id
+	*/
+	@ApiModelProperty(value = "团购id")
+	private Long grouponId;
+	/**
+	* 商品ID
+	*/
+	@ApiModelProperty(value = "商品ID")
+	private Long goodsId;
+	/**
+	* 商品数量
+	*/
+	@ApiModelProperty(value = "商品数量")
+	private Integer goodsNum;
+
+	@ApiModelProperty(value = "团购价")
+	private BigDecimal grouponPrice;
+
+	@ApiModelProperty(value = "商品排序")
+	private Integer sort;
+}

+ 41 - 0
src/main/java/org/springblade/modules/groupon/entity/GrouponImage.java

@@ -0,0 +1,41 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 团购图片表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_groupon_image")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponImage对象", description = "团购图片表")
+public class GrouponImage extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 团购id
+	*/
+	@ApiModelProperty(value = "团购id")
+	private Long grouponId;
+	/**
+	* 图片url
+	*/
+	@ApiModelProperty(value = "图片url")
+	private String url;
+	/**
+	* 类型 1-轮播图 2-详情
+	*/
+	@ApiModelProperty(value = "类型 1-轮播图 2-详情")
+	private Integer type;
+
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/groupon/entity/GrouponSelfTake.java

@@ -0,0 +1,36 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 团购自提点关联表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_groupon_self_take")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponSelfTake对象", description = "团购自提点关联表")
+public class GrouponSelfTake extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 团购id
+	*/
+	@ApiModelProperty(value = "团购id")
+	private Long grouponId;
+	/**
+	* 自提点id
+	*/
+	@ApiModelProperty(value = "自提点id")
+	private Long selfTakeId;
+
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/groupon/entity/GrouponUser.java

@@ -0,0 +1,41 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 参团用户表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_groupon_user")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponUser对象", description = "参团用户表")
+public class GrouponUser extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 团购id
+	*/
+	@ApiModelProperty(value = "团购id")
+	private Long grouponId;
+	/**
+	* 用户ID
+	*/
+	@ApiModelProperty(value = "用户ID")
+	private Long userId;
+	/**
+	* 用户头像
+	*/
+	@ApiModelProperty(value = "用户头像")
+	private String userAvatar;
+
+
+}

+ 77 - 0
src/main/java/org/springblade/modules/groupon/entity/SelfTake.java

@@ -0,0 +1,77 @@
+package org.springblade.modules.groupon.entity;
+
+import org.springblade.common.base.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.sql.Time;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 自提点表实体类
+ *
+ * @author zzyd
+ * @since 2023-06-02
+ */
+@Data
+@TableName("t_self_take")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SelfTake对象", description = "自提点表")
+public class SelfTake extends BaseEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 自提点名字
+	*/
+	@ApiModelProperty(value = "自提点名字")
+	private String name;
+	/**
+	* 自提点地址
+	*/
+	@ApiModelProperty(value = "自提点地址")
+	private String address;
+	/**
+	* 经度
+	*/
+	@ApiModelProperty(value = "经度")
+	private Double longitude;
+	/**
+	* 纬度
+	*/
+	@ApiModelProperty(value = "纬度")
+	private Double latitude;
+	/**
+	* 营业开始时间
+	*/
+	@ApiModelProperty(value = "营业开始时间")
+	private Time busStartTime;
+	/**
+	* 营业结束时间
+	*/
+	@ApiModelProperty(value = "营业结束时间")
+	private Time busEndTime;
+	/**
+	* 来源 1-平台 2-用户
+	*/
+	@ApiModelProperty(value = "来源 1-平台 2-用户")
+	private Integer source;
+	/**
+	* 状态
+	*/
+	@ApiModelProperty(value = "状态")
+	private Integer status;
+
+
+	@ApiModelProperty(value = "是否是默认自提点0,不是。1是")
+	private Integer isDefault;
+
+	@ApiModelProperty(value = "自提点联系电话")
+	private String contactNumber;
+
+
+	@ApiModelProperty(value = "自提点联系人")
+	private String contactPerson;
+}

+ 29 - 0
src/main/java/org/springblade/modules/groupon/entity/UserSelfTake.java

@@ -0,0 +1,29 @@
+package org.springblade.modules.groupon.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.common.base.BaseEntity;
+
+@Data
+@TableName("t_user_self_take")
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "UserSelfTake对象", description = "团长自提点关联表")
+public class UserSelfTake extends BaseEntity {
+
+    /**
+     * 团购id
+     */
+    @ApiModelProperty(value = "团长id")
+    private Long userId;
+    /**
+     * 自提点id
+     */
+    @ApiModelProperty(value = "自提点id")
+    private Long selfTakeId;
+
+
+
+}

+ 46 - 0
src/main/java/org/springblade/modules/groupon/mapper/EmbersMapper.java

@@ -0,0 +1,46 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.groupon.entity.Embers;
+import org.springblade.modules.groupon.vo.EmbersVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 团员列表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+public interface EmbersMapper extends BaseMapper<Embers> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param embers
+	 * @return
+	 */
+	List<EmbersVO> selectEmbersPage(IPage page, EmbersVO embers);
+
+    void unbundleUser(@Param("time") Date time);
+}

+ 28 - 0
src/main/java/org/springblade/modules/groupon/mapper/EmbersMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.EmbersMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="embersResultMap" type="org.springblade.modules.groupon.entity.Embers">
+        <result column="id" property="id"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="share_user_id" property="shareUserId"/>
+        <result column="bind_user_id" property="bindUserId"/>
+        <result column="user_name" property="userName"/>
+        <result column="user_tel" property="userTel"/>
+        <result column="state" property="state"/>
+    </resultMap>
+    <update id="unbundleUser">
+        update t_embers SET state = 1,update_time = NOW() WHERE create_time <![CDATA[<]]> #{time}
+    </update>
+
+
+    <select id="selectEmbersPage" resultMap="embersResultMap">
+        select * from t_embers where is_delete = 0
+    </select>
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/groupon/mapper/FileContentMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.FileContent;
+import org.springblade.modules.groupon.vo.FileContentVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 图文表,存储意见,投诉等信息 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+public interface FileContentMapper extends BaseMapper<FileContent> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param fileContent
+	 * @return
+	 */
+	List<FileContentVO> selectFileContentPage(IPage page, FileContentVO fileContent);
+
+}

+ 27 - 0
src/main/java/org/springblade/modules/groupon/mapper/FileContentMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.FileContentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="fileContentResultMap" type="org.springblade.modules.groupon.entity.FileContent">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="reply_user_id" property="replyUserId"/>
+        <result column="type" property="type"/>
+        <result column="status" property="status"/>
+        <result column="reply_content" property="replyContent"/>
+        <result column="content" property="content"/>
+        <result column="img_url" property="imgUrl"/>
+        <result column="session_key" property="sessionKey"/>
+    </resultMap>
+
+
+    <select id="selectFileContentPage" resultMap="fileContentResultMap">
+        select * from t_file_content where is_delete = 0
+    </select>
+
+</mapper>

+ 47 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponGoodsMapper.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+
+import java.util.List;
+
+/**
+ * 团购商品表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface GrouponGoodsMapper extends BaseMapper<GrouponGoods> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponGoods
+	 * @return
+	 */
+	List<GrouponGoodsVO> selectGrouponGoodsPage(IPage page, GrouponGoodsVO grouponGoods);
+
+	List<GrouponGoodsVO> getGoodsCover(List<Long> ids);
+
+    List<GoodsInfoVO> getGoodsByGrouponId(Long grouponId);
+}

+ 54 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponGoodsMapper.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.GrouponGoodsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="grouponGoodsResultMap" type="org.springblade.modules.groupon.entity.GrouponGoods">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="groupon_id" property="grouponId"/>
+        <result column="goods_id" property="goodsId"/>
+        <result column="goods_num" property="goodsNum"/>
+    </resultMap>
+
+
+    <select id="selectGrouponGoodsPage" resultMap="grouponGoodsResultMap">
+        select * from t_groupon_goods where is_delete = 0
+    </select>
+    <select id="getGoodsCover" resultType="org.springblade.modules.groupon.vo.GrouponGoodsVO">
+            SELECT
+                gg.groupon_id grouponId,
+                gi.goods_cover goodsCover,
+                gg.groupon_price price
+            FROM
+                t_groupon_goods gg
+            JOIN t_goods_info gi ON gg.goods_id = gi.id
+            WHERE
+                gi.audit_status = 1
+                and gg.groupon_id in
+            <foreach item="item" index="index" collection="ids"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+            order by gg.sort
+
+    </select>
+    <select id="getGoodsByGrouponId" resultType="org.springblade.modules.mall.vo.GoodsInfoVO">
+        SELECT
+            gi.*,
+            gg.groupon_price
+        FROM
+            `t_groupon_goods` gg
+            JOIN t_goods_info gi ON gg.goods_id = gi.id
+        WHERE
+            gi.audit_status = 1
+            AND gg.groupon_id = #{grouponId}
+        ORDER BY
+            gg.sort
+    </select>
+
+</mapper>

+ 43 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponImageMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.vo.GrouponImageVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 团购图片表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface GrouponImageMapper extends BaseMapper<GrouponImage> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponImage
+	 * @return
+	 */
+	List<GrouponImageVO> selectGrouponImagePage(IPage page, GrouponImageVO grouponImage);
+
+    void deleteByGrouponId(Long grouponId);
+}

+ 26 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponImageMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.GrouponImageMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="grouponImageResultMap" type="org.springblade.modules.groupon.entity.GrouponImage">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="groupon_id" property="grouponId"/>
+        <result column="url" property="url"/>
+        <result column="type" property="type"/>
+    </resultMap>
+    <delete id="deleteByGrouponId">
+        delete from t_groupon_image where groupon_id = #{gruponId}
+    </delete>
+
+
+    <select id="selectGrouponImagePage" resultMap="grouponImageResultMap">
+        select * from t_groupon_image where is_delete = 0
+    </select>
+
+</mapper>

+ 50 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponMapper.java

@@ -0,0 +1,50 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.Groupon;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 团购表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface GrouponMapper extends BaseMapper<Groupon> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param groupon
+	 * @return
+	 */
+	List<GrouponVO> selectGrouponPage(IPage page, GrouponVO groupon);
+
+	/**
+	 * 查询团购列表
+	 * @param page
+	 * @param type 1-最新团购 2-历史团购
+	 * @return
+	 */
+	List<GrouponVO> selectGroupon(IPage page, Integer type, String address);
+
+}

+ 50 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.GrouponMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="grouponResultMap" type="org.springblade.modules.groupon.entity.Groupon">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="main_title" property="mainTitle"/>
+        <result column="sub_title" property="subTitle"/>
+        <result column="groupon_start_time" property="grouponStartTime"/>
+        <result column="groupon_end_time" property="grouponEndTime"/>
+        <result column="take_start_time" property="takeStartTime"/>
+        <result column="take_end_time" property="takeEndTime"/>
+        <result column="status" property="status"/>
+        <result column="views" property="views"/>
+        <result column="audit_status" property="auditStatus"/>
+        <result column="audit_time" property="auditTime"/>
+        <result column="source" property="source"/>
+        <result column="is_perfect" property="isPerfect"/>
+    </resultMap>
+
+
+    <select id="selectGrouponPage" resultMap="grouponResultMap">
+        select * from t_groupon where is_delete = 0
+    </select>
+    <select id="selectGroupon" resultType="org.springblade.modules.groupon.vo.GrouponVO">
+        SELECT
+            g.*
+        FROM
+            t_groupon_self_take gst
+            JOIN t_self_take st ON gst.self_take_id = st.id
+            JOIN t_groupon g on gst.groupon_id = g.id
+        WHERE
+            st.address LIKE concat(#{address}, '%') and  g.`status` = 1 and g.audit_status = 1
+            <if test="type == 1">
+                and NOW() &lt;= g.groupon_end_time
+            </if>
+            <if test="type == 2">
+                and NOW() > g.groupon_end_time
+            </if>
+        GROUP BY g.id
+        ORDER BY g.create_time desc
+    </select>
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponSelfTakeMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.vo.GrouponSelfTakeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 团购自提点关联表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface GrouponSelfTakeMapper extends BaseMapper<GrouponSelfTake> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponSelfTake
+	 * @return
+	 */
+	List<GrouponSelfTakeVO> selectGrouponSelfTakePage(IPage page, GrouponSelfTakeVO grouponSelfTake);
+
+}

+ 22 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponSelfTakeMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.GrouponSelfTakeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="grouponSelfTakeResultMap" type="org.springblade.modules.groupon.entity.GrouponSelfTake">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="groupon_id" property="grouponId"/>
+        <result column="self_take_id" property="selfTakeId"/>
+    </resultMap>
+
+
+    <select id="selectGrouponSelfTakePage" resultMap="grouponSelfTakeResultMap">
+        select * from t_groupon_self_take where is_delete = 0
+    </select>
+
+</mapper>

+ 42 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponUserMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.vo.GrouponUserVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 参团用户表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface GrouponUserMapper extends BaseMapper<GrouponUser> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponUser
+	 * @return
+	 */
+	List<GrouponUserVO> selectGrouponUserPage(IPage page, GrouponUserVO grouponUser);
+
+}

+ 23 - 0
src/main/java/org/springblade/modules/groupon/mapper/GrouponUserMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.GrouponUserMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="grouponUserResultMap" type="org.springblade.modules.groupon.entity.GrouponUser">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="groupon_id" property="grouponId"/>
+        <result column="user_id" property="userId"/>
+        <result column="user_avatar" property="userAvatar"/>
+    </resultMap>
+
+
+    <select id="selectGrouponUserPage" resultMap="grouponUserResultMap">
+        select * from t_groupon_user where is_delete = 0
+    </select>
+
+</mapper>

+ 45 - 0
src/main/java/org/springblade/modules/groupon/mapper/SelfTakeMapper.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.mapper;
+
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 自提点表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface SelfTakeMapper extends BaseMapper<SelfTake> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param selfTake
+	 * @return
+	 */
+	List<SelfTakeVO> selectSelfTakePage(IPage page, SelfTakeVO selfTake);
+
+	List<SelfTakeVO> getByGroupIds(List<Long> ids);
+
+    List<SelfTakeVO> selectGrouponAllSelfTake(String address, Double longitude, Double latitude, Long grouponId);
+}

+ 61 - 0
src/main/java/org/springblade/modules/groupon/mapper/SelfTakeMapper.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.SelfTakeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="selfTakeResultMap" type="org.springblade.modules.groupon.entity.SelfTake">
+        <result column="id" property="id"/>
+        <result column="is_delete" property="isDelete"/>
+        <result column="create_user_id" property="createUserId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user_id" property="updateUserId"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="name" property="name"/>
+        <result column="address" property="address"/>
+        <result column="longitude" property="longitude"/>
+        <result column="latitude" property="latitude"/>
+        <result column="bus_start_time" property="busStartTime"/>
+        <result column="bus_end_time" property="busEndTime"/>
+        <result column="source" property="source"/>
+        <result column="status" property="status"/>
+    </resultMap>
+
+
+    <select id="selectSelfTakePage" resultMap="selfTakeResultMap">
+        select * from t_self_take where is_delete = 0
+        <if test="@cn.hutool.core.util.StrUtil@isNotBlank(selfTake.name)">
+            and instr(`name`, #{selfTake.name}) > 0
+        </if>
+    </select>
+
+    <select id="getByGroupIds" resultType="org.springblade.modules.groupon.vo.SelfTakeVO">
+        SELECT st.id, gst.groupon_id grouponId, st.address, st.`name`, st.latitude, st.longitude FROM t_groupon_self_take gst JOIN t_self_take st on gst.self_take_id = st.id
+        where gst.groupon_id in
+        <foreach item="item" index="index" collection="ids"
+                 open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
+    <select id="selectGrouponAllSelfTake" resultType="org.springblade.modules.groupon.vo.SelfTakeVO">
+        SELECT
+            st.*,
+            (
+                6371 * ACOS(
+                    COS(
+                        RADIANS( #{latitude} )) * COS(
+                        RADIANS( st.latitude )) * COS(
+                        RADIANS( st.longitude ) - RADIANS( #{longitude} )) + SIN(
+                        RADIANS( #{latitude} )) * SIN(
+                    RADIANS( st.latitude ))
+                )
+            ) AS distance
+        FROM
+            t_groupon_self_take gst
+            JOIN t_self_take st ON gst.self_take_id = st.id
+        WHERE
+            st.address LIKE concat(#{address}, '%') and gst.groupon_id = #{grouponId}
+        ORDER BY
+            distance
+    </select>
+
+</mapper>

+ 8 - 0
src/main/java/org/springblade/modules/groupon/mapper/UserSelfTakeMapper.java

@@ -0,0 +1,8 @@
+package org.springblade.modules.groupon.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.entity.UserSelfTake;
+
+public interface UserSelfTakeMapper extends BaseMapper<UserSelfTake> {
+}

+ 6 - 0
src/main/java/org/springblade/modules/groupon/mapper/UserSelfTakeMapper.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.groupon.mapper.UserSelfTakeMapper">
+
+
+</mapper>

+ 18 - 0
src/main/java/org/springblade/modules/groupon/param/AddUserSelfTakeParam.java

@@ -0,0 +1,18 @@
+package org.springblade.modules.groupon.param;
+
+import lombok.Data;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import org.springblade.modules.system.vo.UserAppVO;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class AddUserSelfTakeParam implements Serializable {
+
+    private Long userId;
+
+    private List<Long> selfTakeList;
+
+}

+ 44 - 0
src/main/java/org/springblade/modules/groupon/service/IEmbersService.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.Embers;
+import org.springblade.modules.groupon.vo.EmbersVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+
+/**
+ * 团员列表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+public interface IEmbersService extends IService<Embers> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param embers
+	 * @return
+	 */
+	IPage<EmbersVO> selectEmbersPage(IPage<EmbersVO> page, EmbersVO embers);
+
+    void unbundleUser(Date time);
+}

+ 41 - 0
src/main/java/org/springblade/modules/groupon/service/IFileContentService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.FileContent;
+import org.springblade.modules.groupon.vo.FileContentVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 图文表,存储意见,投诉等信息 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+public interface IFileContentService extends IService<FileContent> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param fileContent
+	 * @return
+	 */
+	IPage<FileContentVO> selectFileContentPage(IPage<FileContentVO> page, FileContentVO fileContent);
+
+}

+ 66 - 0
src/main/java/org/springblade/modules/groupon/service/IGrouponGoodsService.java

@@ -0,0 +1,66 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.mall.entity.GoodsInfo;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 团购商品表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface IGrouponGoodsService extends IService<GrouponGoods> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponGoods
+	 * @return
+	 */
+	IPage<GrouponGoodsVO> selectGrouponGoodsPage(IPage<GrouponGoodsVO> page, GrouponGoodsVO grouponGoods);
+
+	/**
+	 * 获取商品图片
+	 * @param grouponId
+	 * @return
+	 */
+	Map<Long, List<GrouponGoodsVO>> getGoodsCover(List<Long> grouponId);
+
+	/**
+	 * 查询团购商品列表
+	 * @param grouponId
+	 * @return
+	 */
+	List<GoodsInfoVO> getGoodsByGrouponId(Long grouponId);
+
+	/**
+	 * 添加团购商品
+	 * @param id
+	 * @param goodsIds
+	 */
+	void addGoods(Long id, List<GrouponGoods> goodsIds);
+}

+ 48 - 0
src/main/java/org/springblade/modules/groupon/service/IGrouponImageService.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.vo.GrouponImageVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 团购图片表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface IGrouponImageService extends IService<GrouponImage> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponImage
+	 * @return
+	 */
+	IPage<GrouponImageVO> selectGrouponImagePage(IPage<GrouponImageVO> page, GrouponImageVO grouponImage);
+
+	Map<Long, List<String>> getByGroupIds(List<Long> grouponIds, int type);
+
+	void deleteByGrouponId(Long grouponId);
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/service/IGrouponSelfTakeService.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.vo.GrouponSelfTakeVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 团购自提点关联表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface IGrouponSelfTakeService extends IService<GrouponSelfTake> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponSelfTake
+	 * @return
+	 */
+	IPage<GrouponSelfTakeVO> selectGrouponSelfTakePage(IPage<GrouponSelfTakeVO> page, GrouponSelfTakeVO grouponSelfTake);
+
+	/**
+	 * 添加自提点
+	 */
+	void addSelfTake(Long grouponId, List<Long> selfTakeIds);
+
+}

+ 95 - 0
src/main/java/org/springblade/modules/groupon/service/IGrouponService.java

@@ -0,0 +1,95 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.api.response.GroupStatisResponse;
+import org.springblade.modules.groupon.entity.Groupon;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 团购表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface IGrouponService extends IService<Groupon> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param groupon
+	 * @return
+	 */
+	IPage<GrouponVO> selectGrouponPage(IPage<GrouponVO> page, GrouponVO groupon);
+
+	/**
+	 * 最新团购
+	 *
+	 * @param longitude
+	 * @param latitude
+	 * @param page
+	 * @return
+	 */
+	IPage<GrouponVO> latestGroupon(String address, Double longitude, Double latitude, IPage<GrouponVO> page);
+
+	/**
+	 * 团购历史
+	 * @param page
+	 * @return
+	 */
+	IPage<GrouponVO> historyGroupon(String address, Double longitude, Double latitude, IPage<GrouponVO> page);
+
+	/**
+	 * 团购详情
+	 * @param grouponId
+	 * @return
+	 */
+	GrouponVO detail(Long grouponId);
+
+	/**
+	 * 发布团购
+	 * @param groupon
+	 */
+	void publishGroupon(GrouponVO groupon);
+
+	void check(GrouponVO groupon);
+
+
+	/**
+	 * 审核
+	 */
+    void audit(String id, Integer auditStatus, String remark);
+
+	void perfect(GrouponVO grouponVO);
+
+    GroupStatisResponse groupStatistics(Long userId);
+
+	IPage<GrouponVO> grouponMngList(IPage page, Long userId, Integer state);
+
+	GrouponVO grouponMngDetail(Long groupId);
+
+	/**
+	 * 获取团购详情路径
+	 * @return
+	 */
+	String getGrouponPath(Long grouponId);
+
+    void gen(GrouponVO grouponVO);
+}

+ 45 - 0
src/main/java/org/springblade/modules/groupon/service/IGrouponUserService.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.vo.GrouponUserVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 参团用户表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface IGrouponUserService extends IService<GrouponUser> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param grouponUser
+	 * @return
+	 */
+	IPage<GrouponUserVO> selectGrouponUserPage(IPage<GrouponUserVO> page, GrouponUserVO grouponUser);
+
+	Map<Long, List<GrouponUser>> getByGroupIds(List<Long> grouponIds);
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/service/ISelfTakeService.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service;
+
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 自提点表 服务类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public interface ISelfTakeService extends IService<SelfTake> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param selfTake
+	 * @return
+	 */
+	IPage<SelfTakeVO> selectSelfTakePage(IPage<SelfTakeVO> page, SelfTakeVO selfTake);
+
+	Map<Long, List<SelfTakeVO>> getByGroupIds(List<Long> grouponIds);
+
+    List<SelfTakeVO> getByGrouponId(Double longitude, Double latitude, Long grouponId);
+
+	List<SelfTakeVO> getSelfTakeByGrouponId(String address, Double longitude, Double latitude, Long grouponId);
+}

+ 11 - 0
src/main/java/org/springblade/modules/groupon/service/IUserSelfTakeService.java

@@ -0,0 +1,11 @@
+package org.springblade.modules.groupon.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.groupon.entity.UserSelfTake;
+
+public interface IUserSelfTakeService extends IService<UserSelfTake> {
+
+
+
+
+}

+ 48 - 0
src/main/java/org/springblade/modules/groupon/service/impl/EmbersServiceImpl.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import org.springblade.modules.groupon.entity.Embers;
+import org.springblade.modules.groupon.vo.EmbersVO;
+import org.springblade.modules.groupon.mapper.EmbersMapper;
+import org.springblade.modules.groupon.service.IEmbersService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+
+/**
+ * 团员列表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+@Service
+public class EmbersServiceImpl extends ServiceImpl<EmbersMapper, Embers> implements IEmbersService {
+
+	@Override
+	public IPage<EmbersVO> selectEmbersPage(IPage<EmbersVO> page, EmbersVO embers) {
+		return page.setRecords(baseMapper.selectEmbersPage(page, embers));
+	}
+
+	@Override
+	public void unbundleUser(Date time) {
+		this.getBaseMapper().unbundleUser(time);
+	}
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/groupon/service/impl/FileContentServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import org.springblade.modules.groupon.entity.FileContent;
+import org.springblade.modules.groupon.vo.FileContentVO;
+import org.springblade.modules.groupon.mapper.FileContentMapper;
+import org.springblade.modules.groupon.service.IFileContentService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 图文表,存储意见,投诉等信息 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+@Service
+public class FileContentServiceImpl extends ServiceImpl<FileContentMapper, FileContent> implements IFileContentService {
+
+	@Override
+	public IPage<FileContentVO> selectFileContentPage(IPage<FileContentVO> page, FileContentVO fileContent) {
+		return page.setRecords(baseMapper.selectFileContentPage(page, fileContent));
+	}
+
+}

+ 93 - 0
src/main/java/org/springblade/modules/groupon/service/impl/GrouponGoodsServiceImpl.java

@@ -0,0 +1,93 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springblade.common.enums.AuditStatusEnum;
+import org.springblade.common.enums.YesOrNoEnum;
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import org.springblade.modules.groupon.mapper.GrouponGoodsMapper;
+import org.springblade.modules.groupon.service.IGrouponGoodsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.mall.entity.GoodsInfo;
+import org.springblade.modules.mall.service.IGoodsInfoService;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+import org.springblade.modules.mall.wrapper.GoodsInfoWrapper;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * 团购商品表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class GrouponGoodsServiceImpl extends ServiceImpl<GrouponGoodsMapper, GrouponGoods> implements IGrouponGoodsService {
+
+	@Resource
+	private IGoodsInfoService goodsInfoService;
+
+	@Override
+	public IPage<GrouponGoodsVO> selectGrouponGoodsPage(IPage<GrouponGoodsVO> page, GrouponGoodsVO grouponGoods) {
+		return page.setRecords(baseMapper.selectGrouponGoodsPage(page, grouponGoods));
+	}
+
+	@Override
+	public Map<Long, List<GrouponGoodsVO>> getGoodsCover(List<Long> grouponIds) {
+		Map<Long, List<GrouponGoodsVO>> collect = new HashMap<>();
+		List<GrouponGoodsVO> goodsCover = baseMapper.getGoodsCover(grouponIds);
+		if (CollUtil.isNotEmpty(goodsCover)) {
+			collect = goodsCover.stream().collect(Collectors.groupingBy(GrouponGoodsVO::getGrouponId));
+		}
+		return collect;
+	}
+
+	@Override
+	public List<GoodsInfoVO> getGoodsByGrouponId(Long grouponId) {
+		List<GoodsInfoVO> list = this.baseMapper.getGoodsByGrouponId(grouponId);
+		for (GoodsInfoVO goodsInfo : list) {
+			goodsInfo.setDiscountPrice(goodsInfo.getGrouponPrice());
+			goodsInfo.setTotalStock(goodsInfoService.getGodsStock(goodsInfo.getId()));
+		}
+		return list;
+	}
+
+
+	@Override
+	public void addGoods(Long grouponId, List<GrouponGoods> goodsList) {
+		if (CollUtil.isNotEmpty(goodsList)) {
+			for (int i = 0; i < goodsList.size(); i++) {
+				GrouponGoods goods = goodsList.get(i);
+				goods.setId(null);
+				goods.setGrouponId(grouponId);
+				goods.setSort(i + 1);
+			}
+			saveBatch(goodsList);
+		}
+	}
+}

+ 62 - 0
src/main/java/org/springblade/modules/groupon/service/impl/GrouponImageServiceImpl.java

@@ -0,0 +1,62 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.vo.GrouponImageVO;
+import org.springblade.modules.groupon.mapper.GrouponImageMapper;
+import org.springblade.modules.groupon.service.IGrouponImageService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 团购图片表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class GrouponImageServiceImpl extends ServiceImpl<GrouponImageMapper, GrouponImage> implements IGrouponImageService {
+
+	@Override
+	public void deleteByGrouponId(Long grouponId) {
+		this.baseMapper.deleteByGrouponId(grouponId);
+	}
+
+	@Override
+	public IPage<GrouponImageVO> selectGrouponImagePage(IPage<GrouponImageVO> page, GrouponImageVO grouponImage) {
+		return page.setRecords(baseMapper.selectGrouponImagePage(page, grouponImage));
+	}
+
+	@Override
+	public Map<Long, List<String>> getByGroupIds(List<Long> grouponIds, int type) {
+		List<GrouponImage> images = this.lambdaQuery().eq(GrouponImage::getType, type).in(GrouponImage::getGrouponId, grouponIds).list();
+		Map<Long, List<String>> imageMaps = new HashMap<>();
+		if (CollUtil.isNotEmpty(images)) {
+			imageMaps = images.stream().collect(Collectors.groupingBy(GrouponImage::getGrouponId, Collectors.mapping(GrouponImage::getUrl, Collectors.toList())));
+		}
+		return imageMaps;
+	}
+
+}

+ 58 - 0
src/main/java/org/springblade/modules/groupon/service/impl/GrouponSelfTakeServiceImpl.java

@@ -0,0 +1,58 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.vo.GrouponSelfTakeVO;
+import org.springblade.modules.groupon.mapper.GrouponSelfTakeMapper;
+import org.springblade.modules.groupon.service.IGrouponSelfTakeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 团购自提点关联表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class GrouponSelfTakeServiceImpl extends ServiceImpl<GrouponSelfTakeMapper, GrouponSelfTake> implements IGrouponSelfTakeService {
+
+	@Override
+	public IPage<GrouponSelfTakeVO> selectGrouponSelfTakePage(IPage<GrouponSelfTakeVO> page, GrouponSelfTakeVO grouponSelfTake) {
+		return page.setRecords(baseMapper.selectGrouponSelfTakePage(page, grouponSelfTake));
+	}
+
+	@Override
+	public void addSelfTake(Long grouponId, List<Long> selfTakeIds) {
+		List<GrouponSelfTake> selfTakes = new ArrayList<>();
+
+		// 保存自提点信息
+		for (Long selfTakeId : selfTakeIds) {
+			GrouponSelfTake selfTake = new GrouponSelfTake();
+			selfTake.setGrouponId(grouponId);
+			selfTake.setSelfTakeId(selfTakeId);
+			selfTakes.add(selfTake);
+		}
+		saveBatch(selfTakes);
+	}
+
+}

+ 452 - 0
src/main/java/org/springblade/modules/groupon/service/impl/GrouponServiceImpl.java

@@ -0,0 +1,452 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.LocalDateTimeUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springblade.common.base.BaseEntity;
+import org.springblade.common.enums.AuditStatusEnum;
+import org.springblade.common.enums.StatusEnum;
+import org.springblade.common.enums.YesOrNoEnum;
+import org.springblade.common.utils.DistanceUtils;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.tool.api.R;
+import org.springblade.modules.api.response.GroupStatisResponse;
+import org.springblade.modules.finance.entity.Order;
+import org.springblade.modules.finance.entity.OrderGroupon;
+import org.springblade.modules.finance.service.IOrderGrouponService;
+import org.springblade.modules.finance.service.IOrderService;
+import org.springblade.modules.groupon.entity.*;
+import org.springblade.modules.groupon.service.*;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import org.springblade.modules.groupon.mapper.GrouponMapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import org.springblade.modules.groupon.wrapper.GrouponWrapper;
+import org.springblade.modules.mall.entity.GoodsInfo;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+import org.springblade.modules.mall.wrapper.GoodsInfoWrapper;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.time.Duration;
+import java.time.LocalDateTime;
+import java.time.temporal.TemporalField;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * 团购表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class GrouponServiceImpl extends ServiceImpl<GrouponMapper, Groupon> implements IGrouponService {
+
+	@Resource
+	private IGrouponImageService grouponImageService;
+	@Resource
+	private IGrouponGoodsService grouponGoodsService;
+	@Resource
+	private IGrouponUserService grouponUserService;
+	@Resource
+	private ISelfTakeService selfTakeService;
+	@Resource
+	private IGrouponSelfTakeService grouponSelfTakeService;
+	@Resource
+	private IOrderGrouponService orderGrouponService;
+	@Resource
+	private IOrderService orderService;
+
+	@Override
+	public IPage<GrouponVO> selectGrouponPage(IPage<GrouponVO> page, GrouponVO groupon) {
+		return page.setRecords(baseMapper.selectGrouponPage(page, groupon));
+	}
+
+	@Override
+	public IPage<GrouponVO> latestGroupon(String address, Double longitude, Double latitude, IPage<GrouponVO> page) {
+		LocalDateTime now = LocalDateTime.now();
+		IPage<GrouponVO> iPage = page.setRecords(baseMapper.selectGroupon(page, 1, address));
+		return this.convert(longitude, latitude, iPage, now);
+	}
+
+	/**
+	 * 获取发布时间描述
+	 * @param start
+	 * @param end
+	 * @return
+	 */
+	private String getPublishTimeDesc(LocalDateTime start, LocalDateTime end) {
+		Duration between = LocalDateTimeUtil.between(start, end);
+		long days = between.toDays();
+		long hour = (between.toHours() - (days * 24));
+		long minutes = between.toMinutes() - (between.toHours() * 60);
+		return String.format("%s天%s小时%s分钟前", days, hour, minutes);
+	}
+
+	/**
+	 * 获取最近自提点
+	 * @param longitude 经度
+	 * @param latitude 纬度
+	 * @param selfTakes 自提点集合
+	 * @return
+	 */
+	private SelfTakeVO getRecentlySelfTake(Double longitude, Double latitude, List<SelfTakeVO> selfTakes) {
+		for (SelfTakeVO selfTake : selfTakes) {
+			if (longitude == null || latitude == null) {
+				selfTake.setDistance(0);
+			} else {
+				double distance = DistanceUtils.getDistance(longitude, latitude, selfTake.getLongitude(), selfTake.getLatitude());
+				selfTake.setDistance(distance);
+			}
+		}
+		selfTakes.sort((o1, o2) -> (int) (o1.getDistance() - o2.getDistance()));
+		return selfTakes.get(0);
+	}
+
+	@Override
+	public IPage<GrouponVO> historyGroupon(String address, Double longitude, Double latitude, IPage<GrouponVO> page) {
+		LocalDateTime now = LocalDateTime.now();
+		IPage<GrouponVO> iPage = page.setRecords(baseMapper.selectGroupon(page, 2, address));
+		return this.convert(longitude, latitude, iPage, now);
+	}
+
+
+	private IPage<GrouponVO> convert(Double longitude, Double latitude, IPage<GrouponVO> pages, LocalDateTime now ) {
+		if (CollUtil.isNotEmpty(pages.getRecords())) {
+			List<GrouponVO> grouponVOS = pages.getRecords();
+			List<Long> groupIds = grouponVOS.stream().map(Groupon::getId).collect(Collectors.toList());
+			// 查询团购轮播图
+			Map<Long, List<String>> imageMaps = grouponImageService.getByGroupIds(groupIds, 1);
+			// 查询商品图片
+			Map<Long, List<GrouponGoodsVO>> goodsMap = grouponGoodsService.getGoodsCover(groupIds);
+			// 查询参团人员
+			Map<Long, List<GrouponUser>> userMaps = grouponUserService.getByGroupIds(groupIds);
+			// 查询自提点
+			Map<Long, List<SelfTakeVO>> selfTakeMaps = selfTakeService.getByGroupIds(groupIds);
+			for (GrouponVO g : grouponVOS) {
+				g.setIsStart(now.isAfter(g.getGrouponStartTime()));
+				List<GrouponGoodsVO> goodsVOS = goodsMap.get(g.getId());
+				if (CollUtil.isNotEmpty(goodsVOS)) {
+					g.setMaxPrice(goodsVOS.get(goodsVOS.size() - 1).getPrice());
+					g.setMinPrice(goodsVOS.get(0).getPrice());
+					g.setGoodsImage(goodsVOS.stream().map(GrouponGoodsVO::getGoodsCover).collect(Collectors.toList()));
+					g.setGoodsTotal(g.getGoodsImage().size());
+				}
+				g.setGrouponUsers(userMaps.get(g.getId()));
+				g.setSlideshow(imageMaps.get(g.getId()));
+				g.setSelfTake(this.getRecentlySelfTake(longitude, latitude, selfTakeMaps.get(g.getId())));
+				long seconds = LocalDateTimeUtil.between(now, g.getGrouponEndTime()).getSeconds();
+				g.setSeconds(seconds);
+				g.setPublishTimeDesc(this.getPublishTimeDesc(g.getGrouponStartTime(), now));
+				if (!g.getIsStart()) {
+					g.setSecondsStart(LocalDateTimeUtil.between(now, g.getGrouponStartTime()).getSeconds());
+				}
+			}
+		}
+		return pages;
+	}
+
+
+	@Override
+	public GrouponVO detail(Long grouponId) {
+		LocalDateTime now = LocalDateTime.now();
+		Groupon groupon = getById(grouponId);
+		Assert.notNull(groupon, "数据不存在");
+		GrouponVO grouponVO = GrouponWrapper.build().entityVO(groupon);
+		List<Long> ids = Collections.singletonList(grouponId);
+		// 查询团购详情图片
+		List<GrouponImage> grouponImages = grouponImageService.lambdaQuery().eq(GrouponImage::getGrouponId, grouponId).list();
+		if (CollUtil.isNotEmpty(grouponImages)) {
+			List<String> slideshow = grouponImages.stream().filter(e -> e.getType().equals(1)).map(GrouponImage::getUrl).collect(Collectors.toList());
+			List<String> detailImage = grouponImages.stream().filter(e -> e.getType().equals(2)).map(GrouponImage::getUrl).collect(Collectors.toList());
+			grouponVO.setSlideshow(slideshow);
+			grouponVO.setDetailImage(detailImage);
+		}
+		// 查询商品
+		List<GoodsInfoVO> goodsList = grouponGoodsService.getGoodsByGrouponId(grouponId);
+		grouponVO.setGoodsList(goodsList);
+		grouponVO.setGoodsTotal(goodsList.size());
+		grouponVO.setMinPrice(goodsList.get(0).getDiscountPrice());
+		grouponVO.setMaxPrice(goodsList.get(goodsList.size() - 1).getDiscountPrice());
+		// 查询参团人员
+		Map<Long, List<GrouponUser>> userMaps = grouponUserService.getByGroupIds(ids);
+		grouponVO.setGrouponUsers(userMaps.get(grouponId));
+		long seconds = LocalDateTimeUtil.between(now, grouponVO.getGrouponEndTime()).getSeconds();
+		grouponVO.setSeconds(seconds);
+		grouponVO.setPublishTimeDesc(this.getPublishTimeDesc(groupon.getGrouponStartTime(), now));
+		grouponVO.setIsStart(now.isAfter(grouponVO.getGrouponStartTime()));
+		grouponVO.setIsEnd(now.isAfter(grouponVO.getGrouponEndTime()));
+		if (!grouponVO.getIsStart()) {
+			grouponVO.setSecondsStart(LocalDateTimeUtil.between(now, grouponVO.getGrouponStartTime()).getSeconds());
+		}
+		// 更新浏览量
+		groupon.setViews(groupon.getViews() + 1);
+		updateById(groupon);
+		return grouponVO;
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	@Override
+	public void publishGroupon(GrouponVO groupon) {
+		Assert.notEmpty(groupon.getGrouponGoodsList(), "请添加商品");
+//		for (GrouponGoods goods : groupon.getGrouponGoodsList()) {
+//			if (goods.getGrouponPrice().doubleValue() <= 0.0) {
+//				throw new ServiceException("团购价格设置错误");
+//			}
+//		}
+		this.check(groupon);
+		groupon.setAuditStatus(AuditStatusEnum.WAIT.getValue());
+		groupon.setStatus(StatusEnum.ENABLE.getValue());
+		groupon.setIsPerfect(YesOrNoEnum.NO.getValue());
+		save(groupon);
+		// 添加自提点
+		grouponSelfTakeService.addSelfTake(groupon.getId(), groupon.getSelfTakeIds());
+		grouponGoodsService.addGoods(groupon.getId(), groupon.getGrouponGoodsList());
+	}
+
+	/**
+	 * 校验参数
+	 * @param groupon
+	 */
+	@Override
+	public void check(GrouponVO groupon) {
+		if (groupon.getGrouponStartTime().isAfter(groupon.getGrouponEndTime())) {
+			throw new ServiceException("开团开始时间不能早于结束时间");
+		}
+		if (groupon.getTakeStartTime().isAfter(groupon.getTakeEndTime())) {
+			throw new ServiceException("提货开始时间不能早于结束时间");
+		}
+		if (groupon.getGrouponEndTime().isAfter(groupon.getTakeStartTime())) {
+			throw new ServiceException("提货开始时间不能早于开团结束时间");
+		}
+
+	}
+
+	@Override
+	public void audit(String id, Integer auditStatus, String remark) {
+		Groupon groupon = getById(id);
+		Assert.notNull(groupon, "数据不存在");
+		if (YesOrNoEnum.NO.getValue().equals(groupon.getIsPerfect())) {
+			throw new ServiceException("请先完善信息");
+		}
+		groupon.setAuditStatus(auditStatus);
+		groupon.setAuditTime(LocalDateTime.now());
+		groupon.setAuditMessage(remark);
+		updateById(groupon);
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	@Override
+	public void perfect(GrouponVO grouponVO) {
+		Assert.notNull(grouponVO.getId(), "id不能为空");
+		Assert.notNull(grouponVO.getShareImage(), "请上传团购分享图");
+		Assert.notEmpty(grouponVO.getDetailImage(), "请上传详情图");
+		Assert.notEmpty(grouponVO.getSlideshow(), "请上传轮播图");
+		Assert.notEmpty(grouponVO.getGoodsList(), "goodsList不能为空");
+
+		Groupon groupon = getById(grouponVO.getId());
+		Assert.notNull(groupon, "团购数据不存在");
+
+		List<GrouponGoods> list = grouponGoodsService.lambdaQuery().eq(GrouponGoods::getGrouponId, groupon.getId()).list();
+		Map<Long, GoodsInfoVO> collect = grouponVO.getGoodsList().stream().collect(Collectors.toMap(BaseEntity::getId, Function.identity()));
+
+		for (GrouponGoods grouponGoods : list) {
+			GoodsInfoVO goodsInfoVO = collect.get(grouponGoods.getGoodsId());
+			if (goodsInfoVO != null) {
+				grouponGoods.setSort(goodsInfoVO.getSort());
+				grouponGoods.setGrouponPrice(goodsInfoVO.getGrouponPrice());
+			}
+		}
+
+		grouponGoodsService.updateBatchById(list);
+
+		grouponImageService.deleteByGrouponId(grouponVO.getId());
+
+		List<GrouponImage> imageList = new ArrayList<>();
+		for (String s : grouponVO.getDetailImage()) {
+			GrouponImage image = new GrouponImage();
+			image.setGrouponId(grouponVO.getId());
+			image.setUrl(s);
+			image.setType(2);
+			imageList.add(image);
+		}
+
+		for (String s : grouponVO.getSlideshow()) {
+			GrouponImage image = new GrouponImage();
+			image.setGrouponId(grouponVO.getId());
+			image.setUrl(s);
+			image.setType(1);
+			imageList.add(image);
+		}
+		grouponImageService.saveBatch(imageList);
+
+		groupon.setIsPerfect(YesOrNoEnum.YES.getValue());
+
+		// 完善信息后将审核状态改为未审核
+		groupon.setAuditStatus(AuditStatusEnum.WAIT.getValue());
+		groupon.setShareImage(grouponVO.getShareImage());
+		updateById(groupon);
+	}
+
+	@Override
+	public GroupStatisResponse groupStatistics(Long userId) {
+		GroupStatisResponse response = new GroupStatisResponse();
+		// 查询最新团购数据
+		List<Groupon> grouponList = this.lambdaQuery().eq(Groupon::getOrganizerUserId, userId).ge(Groupon::getGrouponEndTime, LocalDateTime.now()).list();
+		if (CollUtil.isNotEmpty(grouponList)) {
+			int sum = grouponList.stream().mapToInt(Groupon::getViews).sum();
+			response.setLastNewViewTotal(sum);
+			List<Long> grouponIds = grouponList.stream().map(Groupon::getId).collect(Collectors.toList());
+			List<OrderGroupon> list = orderGrouponService.getByGrouponIds(grouponIds);
+			if (CollUtil.isNotEmpty(list)) {
+				List<Long> orderIds = list.stream().map(OrderGroupon::getOrderId).collect(Collectors.toList());
+				List<Order> orders = orderService.lambdaQuery().in(Order::getId, orderIds).list();
+				if (CollUtil.isNotEmpty(orders)) {
+					BigDecimal total = BigDecimal.valueOf(0.00);
+					for (Order order : orders) {
+						total = total.add(order.getPaymentAmount());
+					}
+					response.setLastNewMake(total);
+				}
+			}
+		}
+		return response;
+	}
+
+	@Override
+	public IPage<GrouponVO> grouponMngList(IPage page, Long userId, Integer state) {
+		LocalDateTime now = LocalDateTime.now();
+		LambdaQueryWrapper<Groupon> wrapper = new LambdaQueryWrapper<>();
+		wrapper.eq(Groupon::getOrganizerUserId, userId);
+		if (state == 1) {//申请中
+			wrapper.eq(Groupon::getAuditStatus, AuditStatusEnum.WAIT.getValue());
+		} else if (state == 2) {// 发布中
+			wrapper.eq(Groupon::getAuditStatus, AuditStatusEnum.PASS.getValue())
+					.ge(Groupon::getGrouponEndTime, now).le(Groupon::getGrouponStartTime, now);
+		} else if (state == 3) {// 已拒绝
+			wrapper.eq(Groupon::getAuditStatus, AuditStatusEnum.NOT_PASS.getValue());
+		} else if (state == 4) {// 已结束
+			wrapper.eq(Groupon::getAuditStatus, AuditStatusEnum.PASS.getValue())
+					.le(Groupon::getGrouponEndTime, now);
+		}
+		wrapper.orderByDesc(BaseEntity::getCreateTime);
+		IPage<Groupon> iPage = page(page, wrapper);
+		List<GrouponVO> grouponVOS = GrouponWrapper.build().listVO(iPage.getRecords());
+		for (GrouponVO record : grouponVOS) {
+			record.setGrouponStateDesc(this.getGrouponStateDesc(record));
+		}
+		return page.setRecords(grouponVOS);
+	}
+
+	@Override
+	public GrouponVO grouponMngDetail(Long grouponId) {
+		Groupon groupon = getById(grouponId);
+		Assert.notNull(groupon, "数据不存咋");
+		GrouponVO grouponVO = GrouponWrapper.build().entityVO(groupon);
+		// 查询商品
+		List<GoodsInfoVO> goodsList = grouponGoodsService.getGoodsByGrouponId(grouponId);
+		grouponVO.setGoodsList(goodsList);
+		grouponVO.setGoodsTotal(goodsList.size());
+		// 查询自提点列表
+		List<SelfTakeVO> selfTakeVOS = selfTakeService.getByGrouponId(null, null, grouponId);
+		grouponVO.setSelfTakeList(selfTakeVOS);
+		grouponVO.setGrouponStateDesc(this.getGrouponStateDesc(grouponVO));
+		return grouponVO;
+	}
+
+	@Override
+	public String getGrouponPath(Long grouponId) {
+		Groupon groupon = getById(grouponId);
+		Assert.notNull(groupon, "团购数据不存在");
+		List<GrouponSelfTake> list = grouponSelfTakeService.lambdaQuery().eq(GrouponSelfTake::getGrouponId, grouponId).list();
+		Assert.notEmpty(list, "未查询团购自提点数据");
+		return String.format("/pages/groupbuying_details/index?id=%s&selfTakeId=%s&organizerUserId=%s",
+				groupon.getId(), list.get(0).getSelfTakeId(), groupon.getOrganizerUserId());
+	}
+
+	@Transactional(rollbackFor = Exception.class)
+	@Override
+	public void gen(GrouponVO groupon) {
+		groupon.setAuditStatus(AuditStatusEnum.PASS.getValue());
+		groupon.setStatus(StatusEnum.ENABLE.getValue());
+		groupon.setIsPerfect(YesOrNoEnum.YES.getValue());
+		groupon.setOrganizerUserId(1674455459210252289L);
+		save(groupon);
+
+		List<Long> selfTakeIds = new ArrayList<>();
+		selfTakeIds.add(1678390374327545858L);
+
+		List<GrouponGoods> grouponGoodsList = new ArrayList<>();
+		GrouponGoods grouponGoods1 = new GrouponGoods();
+		grouponGoods1.setGrouponId(groupon.getId());
+		grouponGoods1.setGoodsId(1674456327253495810L);
+		grouponGoods1.setGrouponPrice(BigDecimal.valueOf(0.01));
+		GrouponGoods grouponGoods2 = new GrouponGoods();
+		grouponGoods2.setGrouponId(groupon.getId());
+		grouponGoods2.setGoodsId(1674459606215147522L);
+		grouponGoods2.setGrouponPrice(BigDecimal.valueOf(0.01));
+		grouponGoodsList.add(grouponGoods1);
+		grouponGoodsList.add(grouponGoods2);
+
+		// 添加自提点
+		grouponSelfTakeService.addSelfTake(groupon.getId(), selfTakeIds);
+		grouponGoodsService.addGoods(groupon.getId(), grouponGoodsList);
+
+		List<GrouponImage> imageList = new ArrayList<>();
+		GrouponImage image1 = new GrouponImage();
+		image1.setGrouponId(groupon.getId());
+		image1.setUrl("http://www.gzzzyd.com:9000/bladex-test/upload/20230801/192ba6e071a9873d7dc03a37d412f4a1.png");
+		image1.setType(2);
+		imageList.add(image1);
+		GrouponImage image2 = new GrouponImage();
+		image2.setGrouponId(groupon.getId());
+		image2.setUrl("http://www.gzzzyd.com:9000/bladex-test/upload/20230801/c58eec89fe5e149455f6e12117778bce.png");
+		image2.setType(1);
+		imageList.add(image2);
+		grouponImageService.saveBatch(imageList);
+	}
+
+	/**
+	 * 获取
+	 * @return
+	 */
+	private String getGrouponStateDesc(GrouponVO grouponVO) {
+		LocalDateTime now = LocalDateTime.now();
+		if (AuditStatusEnum.WAIT.getValue().equals(grouponVO.getAuditStatus())) {
+			return "申请中";
+		} else if (AuditStatusEnum.PASS.getValue().equals(grouponVO.getAuditStatus())) {
+			if (grouponVO.getGrouponEndTime().isBefore(now)) {
+				return "已结束";
+			}
+			return "发布中";
+		} else {
+			return "已拒绝";
+		}
+	}
+
+}

+ 58 - 0
src/main/java/org/springblade/modules/groupon/service/impl/GrouponUserServiceImpl.java

@@ -0,0 +1,58 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springblade.common.base.BaseEntity;
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.vo.GrouponUserVO;
+import org.springblade.modules.groupon.mapper.GrouponUserMapper;
+import org.springblade.modules.groupon.service.IGrouponUserService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 参团用户表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class GrouponUserServiceImpl extends ServiceImpl<GrouponUserMapper, GrouponUser> implements IGrouponUserService {
+
+	@Override
+	public IPage<GrouponUserVO> selectGrouponUserPage(IPage<GrouponUserVO> page, GrouponUserVO grouponUser) {
+		return page.setRecords(baseMapper.selectGrouponUserPage(page, grouponUser));
+	}
+
+	@Override
+	public Map<Long, List<GrouponUser>> getByGroupIds(List<Long> grouponIds) {
+		Map<Long, List<GrouponUser>> map = new HashMap<>();
+		List<GrouponUser> list = this.lambdaQuery().in(GrouponUser::getGrouponId, grouponIds).orderByAsc(BaseEntity::getCreateTime).list();
+		if (CollUtil.isNotEmpty(list)) {
+			map = list.stream().collect(Collectors.groupingBy(GrouponUser::getGrouponId));
+		}
+		return map;
+	}
+
+}

+ 89 - 0
src/main/java/org/springblade/modules/groupon/service/impl/SelfTakeServiceImpl.java

@@ -0,0 +1,89 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springblade.common.utils.DistanceUtils;
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.service.IGrouponSelfTakeService;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import org.springblade.modules.groupon.mapper.SelfTakeMapper;
+import org.springblade.modules.groupon.service.ISelfTakeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.groupon.wrapper.SelfTakeWrapper;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 自提点表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Service
+public class SelfTakeServiceImpl extends ServiceImpl<SelfTakeMapper, SelfTake> implements ISelfTakeService {
+
+	@Resource
+	private IGrouponSelfTakeService grouponSelfTakeService;
+
+	@Override
+	public IPage<SelfTakeVO> selectSelfTakePage(IPage<SelfTakeVO> page, SelfTakeVO selfTake) {
+		return page.setRecords(baseMapper.selectSelfTakePage(page, selfTake));
+	}
+
+	@Override
+	public Map<Long, List<SelfTakeVO>> getByGroupIds(List<Long> grouponIds) {
+		Map<Long, List<SelfTakeVO>> map = new HashMap<>();
+		List<SelfTakeVO> vos = baseMapper.getByGroupIds(grouponIds);
+		if (CollUtil.isNotEmpty(vos)) {
+			map = vos.stream().collect(Collectors.groupingBy(SelfTakeVO::getGrouponId));
+		}
+		return map;
+	}
+
+	@Override
+	public List<SelfTakeVO> getSelfTakeByGrouponId(String address, Double longitude, Double latitude, Long grouponId) {
+		return baseMapper.selectGrouponAllSelfTake(address, longitude, latitude, grouponId);
+	}
+
+	@Override
+	public List<SelfTakeVO> getByGrouponId(Double longitude, Double latitude, Long grouponId) {
+		List<GrouponSelfTake> list = grouponSelfTakeService.lambdaQuery().eq(GrouponSelfTake::getGrouponId, grouponId).list();
+		if (CollUtil.isNotEmpty(list)) {
+			List<Long> collect = list.stream().map(GrouponSelfTake::getSelfTakeId).collect(Collectors.toList());
+			List<SelfTake> selfTakes = lambdaQuery().in(SelfTake::getId, collect).list();
+			List<SelfTakeVO> selfTakeVOS = SelfTakeWrapper.build().listVO(selfTakes);
+			if (longitude != null) {
+				for (SelfTakeVO selfTakeVO : selfTakeVOS) {
+					double distance = DistanceUtils.getDistance(longitude, latitude, selfTakeVO.getLongitude(), selfTakeVO.getLatitude());
+					selfTakeVO.setDistance(distance);
+				}
+			}
+			return selfTakeVOS;
+		}
+		return new ArrayList<>();
+	}
+
+}

+ 18 - 0
src/main/java/org/springblade/modules/groupon/service/impl/UserSelfTakeServiceImpl.java

@@ -0,0 +1,18 @@
+package org.springblade.modules.groupon.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.entity.UserSelfTake;
+import org.springblade.modules.groupon.mapper.SelfTakeMapper;
+import org.springblade.modules.groupon.mapper.UserSelfTakeMapper;
+import org.springblade.modules.groupon.service.ISelfTakeService;
+import org.springblade.modules.groupon.service.IUserSelfTakeService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class UserSelfTakeServiceImpl extends ServiceImpl<UserSelfTakeMapper, UserSelfTake> implements IUserSelfTakeService {
+
+
+
+}

+ 27 - 0
src/main/java/org/springblade/modules/groupon/vo/AppointmentVO.java

@@ -0,0 +1,27 @@
+package org.springblade.modules.groupon.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * Author pangqijun
+ * Date 2023/6/29
+ * Description
+ */
+@Data
+public class AppointmentVO {
+    private Long grouponId;
+
+    @ApiModelProperty(value = "主标题")
+    private String mainTitle;
+
+    @ApiModelProperty(value = "团购开始时间")
+    private LocalDateTime grouponStartTime;
+
+    @ApiModelProperty(value = "团购结束时间")
+    private LocalDateTime grouponEndTime;
+
+    private Integer state;
+}

+ 36 - 0
src/main/java/org/springblade/modules/groupon/vo/EmbersVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import org.springblade.modules.groupon.entity.Embers;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 团员列表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "EmbersVO对象", description = "团员列表")
+public class EmbersVO extends Embers {
+	private static final long serialVersionUID = 1L;
+
+}

+ 124 - 0
src/main/java/org/springblade/modules/groupon/vo/ExportAppointmentVO.java

@@ -0,0 +1,124 @@
+package org.springblade.modules.groupon.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ColumnWidth(20)
+@HeadRowHeight(20)
+@ContentRowHeight(20)
+public class ExportAppointmentVO {
+
+    @ExcelProperty(value = "团购标题")
+    private String mainTitle;
+
+    @ExcelProperty(value = "团购开始时间")
+    private String grouponStartTime;
+
+    @ExcelProperty(value = "履约单状态")
+    private String state;
+
+    @ColumnWidth(30)
+    @ExcelProperty(value = "自提点名称")
+    private String selfTakeName;
+
+    @ColumnWidth(50)
+    @ExcelProperty(value = "自提点地址")
+    private String selfTakeAddress;
+
+    @ExcelProperty(value = "自提点联系人")
+    private String selfTakePerson;
+
+    @ExcelProperty(value = "自提点联系电话")
+    private String selfTakePhone;
+
+    @ExcelProperty(value = "配送方式")
+    private String distributionMode;
+
+    @ExcelProperty(value = "下单人")
+    private String orderUser;
+
+    @ExcelProperty(value = "下单人手机号")
+    private String orderUserPhone;
+
+    @ExcelProperty(value = "团长")
+    private String commander;
+
+    @ExcelProperty(value = "收货人")
+    private String consignee = "";
+
+    
+    @ExcelProperty(value = "收货地址")
+    private String deliveryAddress = "";
+
+    
+    @ExcelProperty(value = "联系电话")
+    private String consigneePhone = "";
+
+    
+    @ExcelProperty(value = "取货码")
+    private String pickUpCode;
+
+    
+    @ExcelProperty(value = "订单号")
+    private String orderNo;
+
+    
+    @ExcelProperty(value = "供应商名称")
+    private String storeName;
+
+    
+    @ExcelProperty(value = "商品名称")
+    private String goodsName;
+
+    
+    @ExcelProperty(value = "商品规格")
+    private String goodsSpec;
+
+    
+    @ExcelProperty(value = "商品编码")
+    private String goodsNo;
+
+    @ExcelProperty(value = "商品数量")
+    private Integer goodsNum;
+
+    @ExcelProperty(value = "供货价")
+    private BigDecimal costPrice;
+
+    @ExcelProperty(value = "团购价")
+    private BigDecimal grouponPrice;
+
+    @ExcelProperty(value = "退货数量")
+    private Integer refundGoodsNum;
+
+    @ExcelProperty(value = "退款金额")
+    private BigDecimal refundAmount;
+
+    /**
+     * (商品数量-退货数量)* 供货价
+     */
+    @ExcelProperty(value = "供货金额")
+    private BigDecimal supplyGoodsAmount;
+
+    /**
+     * (商品数量-退货数量)*团购价
+     */
+    @ExcelProperty(value = "团购金额")
+    private BigDecimal grouponAmount;
+
+    @ExcelProperty(value = "订单状态")
+    private String orderStateDesc;
+
+    @ExcelIgnore
+    private Long orderId;
+    @ExcelIgnore
+    private Long userId;
+    @ExcelIgnore
+    private Integer orderState;
+}

+ 63 - 0
src/main/java/org/springblade/modules/groupon/vo/ExportPickUpAppointmentVO.java

@@ -0,0 +1,63 @@
+package org.springblade.modules.groupon.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
+@Data
+@HeadRowHeight(20)
+@ColumnWidth(20)
+@ContentRowHeight(20)
+public class ExportPickUpAppointmentVO {
+
+    @ExcelProperty(value = "团购标题")
+    private String mainTitle;
+
+    @ExcelProperty(value = "团购开始时间")
+    private String grouponStartTime;
+
+    @ExcelProperty(value = "履约单状态")
+    private String state;
+
+    @ExcelProperty(value = "下单人")
+    private String username;
+
+    @ExcelProperty(value = "下单人电话")
+    private String phone;
+
+    @ExcelProperty(value = "收货人")
+    private String consignee = "";
+
+    @ExcelProperty(value = "收货地址")
+    private String deliveryAddress = "";
+
+    @ExcelProperty(value = "联系电话")
+    private String consigneePhone = "";
+
+    @ExcelProperty(value = "取货码")
+    private String pickUpCode;
+
+    @ColumnWidth(60)
+    @ExcelProperty(value = "商品")
+    private String goods;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "是否到货")
+    private String arrivedDesc;
+
+    @ColumnWidth(15)
+    @ExcelProperty(value = "是否取货")
+    private String chargeOffDesc;
+
+    @ColumnWidth(30)
+    @ExcelProperty(value = "订单号")
+    private String orderNo;
+
+    @ExcelIgnore
+    private Long orderId;
+    @ExcelIgnore
+    private Long userId;
+}

+ 47 - 0
src/main/java/org/springblade/modules/groupon/vo/FileContentVO.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.modules.groupon.entity.FileContent;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 图文表,存储意见,投诉等信息视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "FileContentVO对象", description = "图文表,存储意见,投诉等信息")
+public class FileContentVO extends FileContent {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 处理人ID
+	 */
+	@ApiModelProperty(value = "处理人名称")
+	private String replyUserName;
+
+	private String feedbackPerson;
+
+	private String feedbackPersonPhone;
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/groupon/vo/GrouponGoodsVO.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+import java.math.BigDecimal;
+
+/**
+ * 团购商品表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponGoodsVO对象", description = "团购商品表")
+public class GrouponGoodsVO extends GrouponGoods {
+	private static final long serialVersionUID = 1L;
+
+	private String goodsCover;
+
+	private BigDecimal price;
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/groupon/vo/GrouponImageVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import org.springblade.modules.groupon.entity.GrouponImage;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 团购图片表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponImageVO对象", description = "团购图片表")
+public class GrouponImageVO extends GrouponImage {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/groupon/vo/GrouponSelfTakeVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 团购自提点关联表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponSelfTakeVO对象", description = "团购自提点关联表")
+public class GrouponSelfTakeVO extends GrouponSelfTake {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
src/main/java/org/springblade/modules/groupon/vo/GrouponUserVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import org.springblade.modules.groupon.entity.GrouponUser;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 参团用户表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponUserVO对象", description = "参团用户表")
+public class GrouponUserVO extends GrouponUser {
+	private static final long serialVersionUID = 1L;
+
+}

+ 179 - 0
src/main/java/org/springblade/modules/groupon/vo/GrouponVO.java

@@ -0,0 +1,179 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.LocalDateTimeUtil;
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.modules.api.response.GrouponOrderResponse;
+import org.springblade.modules.groupon.entity.Groupon;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.mall.entity.GoodsInfo;
+import org.springblade.modules.mall.vo.GoodsInfoVO;
+
+import javax.validation.constraints.NotEmpty;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 团购表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GrouponVO对象", description = "团购表")
+public class GrouponVO extends Groupon {
+	private static final long serialVersionUID = 1L;
+
+	@ApiModelProperty("轮播图")
+	private List<String> slideshow;
+
+	private int slideshowTotal;
+
+	@ApiModelProperty("团购详情图")
+	private List<String> detailImage;
+
+	@ApiModelProperty("商品图片")
+	private List<String> goodsImage;
+
+	@ApiModelProperty("商品列表")
+	private List<GoodsInfoVO> goodsList;
+
+	@ApiModelProperty("拼团商品列表")
+	private List<GrouponGoods> grouponGoodsList;
+
+	@ApiModelProperty("商品总数")
+	private Integer goodsTotal;
+
+	@ApiModelProperty("拼团用户")
+	private List<GrouponUser> grouponUsers;
+
+	@ApiModelProperty("拼团用户总数")
+	private Integer grouponUserTotal;
+
+	@ApiModelProperty("发布时间描述")
+	private String publishTimeDesc;
+
+	@ApiModelProperty("团购状态描述")
+	private String grouponStateDesc;
+
+	@ApiModelProperty("自提点地址")
+	private SelfTakeVO selfTake;
+
+	@ApiModelProperty("自提点集合")
+	private List<SelfTakeVO> selfTakeList;
+
+	private BigDecimal maxPrice;
+
+	private BigDecimal minPrice;
+
+	private Boolean isStart;
+
+	private Boolean isEnd;
+
+	private long seconds;
+
+	private long secondsStart;
+
+//	@NotEmpty(message = "请选择自提点")
+	@ApiModelProperty("自提点id集合")
+	private List<Long> selfTakeIds;
+
+//	@NotEmpty(message = "请选择商品")
+	@ApiModelProperty("商品id集合")
+	private List<Long> goodsIds;
+
+
+	private String grouponStartTimeStr;
+	/**
+	 * 团购结束时间
+	 */
+	private String grouponEndTimeStr;
+
+	/**
+	 * 取货开始时间
+	 */
+	private String takeStartTimeStr;
+	/**
+	 * 取货结束时间
+	 */
+	private String takeEndTimeStr;
+
+	/**
+	 * 团购业务状态描述
+	 */
+	private String grouponBizStateDesc;
+
+	/**
+	 * 全部订单数量
+	 */
+	private int allOrderNum = 0;
+
+	/**
+	 * 网点订单数量
+	 */
+	private int dotOrderNum = 0;
+
+	/**
+	 * 团购订单数据
+	 */
+	private List<GrouponOrderResponse> grouponOrderList;
+
+	public String getGrouponBizStateDesc() {
+		return grouponBizStateDesc;
+	}
+
+	public String getGrouponStartTimeStr() {
+		return getGrouponStartTime() == null ? "" : LocalDateTimeUtil.format(getGrouponStartTime(), "MM/dd HH:mm");
+	}
+
+	public String getGrouponEndTimeStr() {
+		return getGrouponEndTime() == null ? "" : LocalDateTimeUtil.format(getGrouponEndTime(), "MM/dd HH:mm");
+	}
+
+	public String getTakeStartTimeStr() {
+		return getTakeStartTime() == null ? "" : LocalDateTimeUtil.format(getTakeStartTime(), "MM/dd HH:mm");
+	}
+
+	public String getTakeEndTimeStr() {
+		return getTakeEndTime() == null ? "" : LocalDateTimeUtil.format(getTakeEndTime(), "MM/dd HH:mm");
+	}
+
+	public Integer getGrouponUserTotal() {
+		if (CollUtil.isNotEmpty(grouponUsers)) {
+			Set<Long> collect = grouponUsers.stream().map(GrouponUser::getUserId).collect(Collectors.toSet());
+			return collect.size();
+		}
+		return 0;
+	}
+
+	public int getSlideshowTotal() {
+		return slideshow == null ? 0 : slideshow.size();
+	}
+}

+ 78 - 0
src/main/java/org/springblade/modules/groupon/vo/SelfTakeVO.java

@@ -0,0 +1,78 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.modules.groupon.entity.SelfTake;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+import java.sql.Time;
+
+/**
+ * 自提点表视图实体类
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SelfTakeVO对象", description = "自提点表")
+public class SelfTakeVO extends SelfTake {
+	private static final long serialVersionUID = 1L;
+
+	private Long grouponId;
+
+	private double distance;
+
+	private String distanceDesc;
+
+	private String username;
+
+	private String qrCode;
+
+	private String phone;
+
+	@ApiModelProperty(value = "营业开始时间")
+	private String busStartTimeDesc;
+
+	@ApiModelProperty(value = "营业结束时间")
+	private String busEndTimeDesc;
+
+	public String getDistanceDesc() {
+		if (distance  < 1) {
+			return String.format("%sm", (int)(distance * 1000));
+		} else {
+			return String.format("%.2fkm", distance);
+		}
+	}
+
+	public String getBusStartTimeDesc() {
+		if (getBusStartTime() != null) {
+			return getBusStartTime().toString().substring(0, 5);
+		}
+		return busStartTimeDesc;
+	}
+
+	public String getBusEndTimeDesc() {
+		if (getBusEndTime() != null) {
+			return getBusEndTime().toString().substring(0, 5);
+		}
+		return busEndTimeDesc;
+	}
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/EmbersWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.Embers;
+import org.springblade.modules.groupon.vo.EmbersVO;
+import java.util.Objects;
+
+/**
+ * 团员列表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-20
+ */
+public class EmbersWrapper extends BaseEntityWrapper<Embers, EmbersVO>  {
+
+	public static EmbersWrapper build() {
+		return new EmbersWrapper();
+ 	}
+
+	@Override
+	public EmbersVO entityVO(Embers embers) {
+		EmbersVO embersVO = Objects.requireNonNull(BeanUtil.copy(embers, EmbersVO.class));
+
+		//User createUser = UserCache.getUser(embers.getCreateUser());
+		//User updateUser = UserCache.getUser(embers.getUpdateUser());
+		//embersVO.setCreateUserName(createUser.getName());
+		//embersVO.setUpdateUserName(updateUser.getName());
+
+		return embersVO;
+	}
+
+}

+ 57 - 0
src/main/java/org/springblade/modules/groupon/wrapper/FileContentWrapper.java

@@ -0,0 +1,57 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.modules.groupon.entity.FileContent;
+import org.springblade.modules.groupon.vo.FileContentVO;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IUserService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * 图文表,存储意见,投诉等信息包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-15
+ */
+public class FileContentWrapper extends BaseEntityWrapper<FileContent, FileContentVO>  {
+
+	public static FileContentWrapper build() {
+		return new FileContentWrapper();
+ 	}
+
+	@Override
+	public FileContentVO entityVO(FileContent fileContent) {
+		FileContentVO fileContentVO = Objects.requireNonNull(BeanUtil.copy(fileContent, FileContentVO.class));
+		IUserService userService = SpringUtil.getBean(IUserService.class);
+		if (userService != null) {
+			User user = userService.getById(fileContentVO.getCreateUserId());
+			if (user != null) {
+				fileContentVO.setFeedbackPerson(user.getName());
+				fileContentVO.setFeedbackPersonPhone(user.getPhone());
+			}
+		}
+		return fileContentVO;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/GrouponGoodsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.GrouponGoods;
+import org.springblade.modules.groupon.vo.GrouponGoodsVO;
+import java.util.Objects;
+
+/**
+ * 团购商品表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class GrouponGoodsWrapper extends BaseEntityWrapper<GrouponGoods, GrouponGoodsVO>  {
+
+	public static GrouponGoodsWrapper build() {
+		return new GrouponGoodsWrapper();
+ 	}
+
+	@Override
+	public GrouponGoodsVO entityVO(GrouponGoods grouponGoods) {
+		GrouponGoodsVO grouponGoodsVO = Objects.requireNonNull(BeanUtil.copy(grouponGoods, GrouponGoodsVO.class));
+
+		//User createUser = UserCache.getUser(grouponGoods.getCreateUser());
+		//User updateUser = UserCache.getUser(grouponGoods.getUpdateUser());
+		//grouponGoodsVO.setCreateUserName(createUser.getName());
+		//grouponGoodsVO.setUpdateUserName(updateUser.getName());
+
+		return grouponGoodsVO;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/GrouponImageWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.GrouponImage;
+import org.springblade.modules.groupon.vo.GrouponImageVO;
+import java.util.Objects;
+
+/**
+ * 团购图片表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class GrouponImageWrapper extends BaseEntityWrapper<GrouponImage, GrouponImageVO>  {
+
+	public static GrouponImageWrapper build() {
+		return new GrouponImageWrapper();
+ 	}
+
+	@Override
+	public GrouponImageVO entityVO(GrouponImage grouponImage) {
+		GrouponImageVO grouponImageVO = Objects.requireNonNull(BeanUtil.copy(grouponImage, GrouponImageVO.class));
+
+		//User createUser = UserCache.getUser(grouponImage.getCreateUser());
+		//User updateUser = UserCache.getUser(grouponImage.getUpdateUser());
+		//grouponImageVO.setCreateUserName(createUser.getName());
+		//grouponImageVO.setUpdateUserName(updateUser.getName());
+
+		return grouponImageVO;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/GrouponSelfTakeWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.GrouponSelfTake;
+import org.springblade.modules.groupon.vo.GrouponSelfTakeVO;
+import java.util.Objects;
+
+/**
+ * 团购自提点关联表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class GrouponSelfTakeWrapper extends BaseEntityWrapper<GrouponSelfTake, GrouponSelfTakeVO>  {
+
+	public static GrouponSelfTakeWrapper build() {
+		return new GrouponSelfTakeWrapper();
+ 	}
+
+	@Override
+	public GrouponSelfTakeVO entityVO(GrouponSelfTake grouponSelfTake) {
+		GrouponSelfTakeVO grouponSelfTakeVO = Objects.requireNonNull(BeanUtil.copy(grouponSelfTake, GrouponSelfTakeVO.class));
+
+		//User createUser = UserCache.getUser(grouponSelfTake.getCreateUser());
+		//User updateUser = UserCache.getUser(grouponSelfTake.getUpdateUser());
+		//grouponSelfTakeVO.setCreateUserName(createUser.getName());
+		//grouponSelfTakeVO.setUpdateUserName(updateUser.getName());
+
+		return grouponSelfTakeVO;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/GrouponUserWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.GrouponUser;
+import org.springblade.modules.groupon.vo.GrouponUserVO;
+import java.util.Objects;
+
+/**
+ * 参团用户表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class GrouponUserWrapper extends BaseEntityWrapper<GrouponUser, GrouponUserVO>  {
+
+	public static GrouponUserWrapper build() {
+		return new GrouponUserWrapper();
+ 	}
+
+	@Override
+	public GrouponUserVO entityVO(GrouponUser grouponUser) {
+		GrouponUserVO grouponUserVO = Objects.requireNonNull(BeanUtil.copy(grouponUser, GrouponUserVO.class));
+
+		//User createUser = UserCache.getUser(grouponUser.getCreateUser());
+		//User updateUser = UserCache.getUser(grouponUser.getUpdateUser());
+		//grouponUserVO.setCreateUserName(createUser.getName());
+		//grouponUserVO.setUpdateUserName(updateUser.getName());
+
+		return grouponUserVO;
+	}
+
+}

+ 46 - 0
src/main/java/org/springblade/modules/groupon/wrapper/GrouponWrapper.java

@@ -0,0 +1,46 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.Groupon;
+import org.springblade.modules.groupon.vo.GrouponVO;
+import java.util.Objects;
+
+/**
+ * 团购表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class GrouponWrapper extends BaseEntityWrapper<Groupon, GrouponVO>  {
+
+	public static GrouponWrapper build() {
+		return new GrouponWrapper();
+ 	}
+
+	@Override
+	public GrouponVO entityVO(Groupon groupon) {
+		GrouponVO grouponVO = Objects.requireNonNull(BeanUtil.copy(groupon, GrouponVO.class));
+
+
+
+		return grouponVO;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/groupon/wrapper/SelfTakeWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.groupon.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.groupon.entity.SelfTake;
+import org.springblade.modules.groupon.vo.SelfTakeVO;
+import java.util.Objects;
+
+/**
+ * 自提点表包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2023-06-02
+ */
+public class SelfTakeWrapper extends BaseEntityWrapper<SelfTake, SelfTakeVO>  {
+
+	public static SelfTakeWrapper build() {
+		return new SelfTakeWrapper();
+ 	}
+
+	@Override
+	public SelfTakeVO entityVO(SelfTake selfTake) {
+		SelfTakeVO selfTakeVO = Objects.requireNonNull(BeanUtil.copy(selfTake, SelfTakeVO.class));
+
+		//User createUser = UserCache.getUser(selfTake.getCreateUser());
+		//User updateUser = UserCache.getUser(selfTake.getUpdateUser());
+		//selfTakeVO.setCreateUserName(createUser.getName());
+		//selfTakeVO.setUpdateUserName(updateUser.getName());
+
+		return selfTakeVO;
+	}
+
+}

+ 1 - 13
src/main/java/org/springblade/modules/platform/controller/AdsController.java

@@ -51,7 +51,6 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class AdsController extends BladeController {
 
 	private final IAdsService adsService;
-	private final IGrouponService grouponService;
 
 	/**
 	 * 详情
@@ -103,12 +102,7 @@ public class AdsController extends BladeController {
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入ads")
 	public R update(@Valid @RequestBody Ads ads) {
-		if (SkipTypeEnum.GROUPON.getValue().equals(ads.getSkipType())) {
-			if (StrUtil.isBlank(ads.getDataId())) {
-				return R.fail("数据Id不能为空");
-			}
-			ads.setTargetUrl(grouponService.getGrouponPath(Long.parseLong(ads.getDataId())));
-		}
+
 		return R.status(adsService.updateById(ads));
 	}
 
@@ -119,12 +113,6 @@ public class AdsController extends BladeController {
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入ads")
 	public R submit(@Valid @RequestBody Ads ads) {
-		if (SkipTypeEnum.GROUPON.getValue().equals(ads.getSkipType())) {
-			if (StrUtil.isBlank(ads.getDataId())) {
-				return R.fail("数据Id不能为空");
-			}
-			ads.setTargetUrl(grouponService.getGrouponPath(Long.parseLong(ads.getDataId())));
-		}
 		return R.status(adsService.saveOrUpdate(ads));
 	}
 

+ 0 - 68
src/main/java/org/springblade/modules/platform/controller/UserAppController.java

@@ -30,10 +30,6 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.groupon.entity.SelfTake;
-import org.springblade.modules.groupon.entity.UserSelfTake;
-import org.springblade.modules.groupon.service.ISelfTakeService;
-import org.springblade.modules.groupon.service.IUserSelfTakeService;
 import org.springblade.modules.platform.service.UserAppService;
 import org.springblade.modules.system.entity.User;
 import org.springblade.modules.system.entity.UserApp;
@@ -65,10 +61,6 @@ public class UserAppController extends BladeController {
 	@Resource
 	private IUserService userService;
 
-	@Resource
-	private IUserSelfTakeService userSelfTakeService;
-	@Resource
-	private ISelfTakeService selfTakeService;
 
 	/**
 	 * 详情
@@ -142,66 +134,6 @@ public class UserAppController extends BladeController {
 		return R.status(true);
 	}
 
-	@Transactional(rollbackFor = Exception.class)
-	@PostMapping("/set-up-commander")
-	@ApiOperationSupport(order = 9)
-	@ApiOperation(value = "设为团长", notes = "传入userApp")
-	public R setUpCommander(@RequestBody UserAppVO userApp) {
-		Assert.notNull(userApp.getSelfTakeId(), "自提点ID不能为空");
-		// 修改用户团长标识
-		UserApp user = userAppService.getByUserId(userApp.getUserId());
-		Assert.notNull(user, "数据不存在");
-		if (YesOrNoEnum.YES.getValue().equals(user.getLivingHall())) {
-			return fail("该用户已成为团长");
-		}
-		user.setLivingHall(YesOrNoEnum.YES.getValue());
-		userAppService.updateById(user);
-
-		// 添加用户自提点信息
-		SelfTake selfTake = selfTakeService.getById(userApp.getSelfTakeId());
-		Assert.notNull(selfTake, "自提点数据不存在");
-		UserSelfTake userSelfTake = new UserSelfTake();
-		userSelfTake.setSelfTakeId(userApp.getSelfTakeId());
-		userSelfTake.setUserId(user.getUserId());
-		userSelfTakeService.save(userSelfTake);
-
-
-		User user1 = userService.getById(user.getUserId());
-		if (StrUtil.isBlank(user1.getPassword())) {
-			// 设置团长后台账号(重置密码)
-			userService.resetPassword(userApp.getUserId().toString());
-		}
-		// 设置团长角色
-		userService.setRoleByRoleName(user.getUserId(), "团长");
-		// 设置自提点电话
-		if (StrUtil.isBlank(selfTake.getContactNumber())) {
-			selfTake.setContactNumber(user1.getPhone());
-			selfTake.setContactPerson(user1.getRealName());
-			selfTakeService.updateById(selfTake);
-		}
-		return success("ok");
-	}
-
-	@PostMapping("/remove-commander")
-	@ApiOperationSupport(order = 10)
-	@ApiOperation(value = "移除团长", notes = "传入userApp")
-	public R removeCommander(@RequestBody UserAppVO userApp) {
-		// 修改用户团长标识
-		UserApp user = userAppService.getByUserId(userApp.getUserId());
-		Assert.notNull(user, "数据不存在");
-		user.setLivingHall(YesOrNoEnum.NO.getValue());
-		userAppService.updateById(user);
-
-		// 移除绑定的自提点数据
-		List<UserSelfTake> list = userSelfTakeService.lambdaQuery().eq(UserSelfTake::getUserId, user.getUserId()).list();
-		List<Long> collect = list.stream().map(BaseEntity::getId).collect(Collectors.toList());
-		userSelfTakeService.removeByIds(collect);
-
-		// 解绑团长角色
-		userService.removeRoleByRoleName(user.getUserId(), "团长");
-
-		return R.status(true);
-	}
 
 
 }

+ 0 - 4
src/main/java/org/springblade/modules/quartz/task/TimedTask.java

@@ -6,13 +6,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.springblade.common.cache.ParamCache;
 import org.springblade.common.constant.CacheBizConstant;
 import org.springblade.common.enums.OrderStateEnum;
-import org.springblade.core.log.logger.BladeLogger;
 import org.springblade.modules.finance.entity.Order;
 import org.springblade.modules.finance.service.impl.OrderServiceImpl;
-import org.springblade.modules.groupon.service.impl.GrouponServiceImpl;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;