瀏覽代碼

feat(app): 添加订单使用记录查询功能并优化订单状态更新逻辑- 新增 AppOrderUseRecordsVO 和 AppGmtInfoVO 类用于订单使用记录查询
- 实现 queryOrderUseRecords 方法查询订单使用记录
- 优化订单状态更新逻辑,确保订单状态正确更新- 修复部分家庭成员入场记录未正确更新的问题

wzq 5 天之前
父節點
當前提交
b27945428d
共有 11 個文件被更改,包括 192 次插入29 次删除
  1. 19 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/OrderController.java
  2. 2 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IAppIsinService.java
  3. 87 9
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/AppIsinServiceImpl.java
  4. 8 5
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/OrderServiceImpl.java
  5. 32 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/AppGmtInfoVO.java
  6. 18 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/AppOrderUseRecordsVO.java
  7. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/redission/RedissonDelayQueue.java
  8. 6 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/SchoolPlaceAddDTO.java
  9. 4 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoursesVerificationRecordServiceImpl.java
  10. 13 11
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppOrderServiceImpl.java
  11. 2 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSitePlaceServiceImpl.java

+ 19 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/OrderController.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.app.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -12,11 +13,14 @@ import org.jeecg.modules.app.dto.AppOrderInfoDTO;
 import org.jeecg.modules.app.form.CreateOrderForm;
 import org.jeecg.modules.app.form.PageOrdersForm;
 import org.jeecg.modules.app.form.UserPayForm;
+import org.jeecg.modules.app.service.IAppIsinService;
 import org.jeecg.modules.app.service.IOrderService;
 import org.jeecg.modules.app.service.WeChatPayService;
+import org.jeecg.modules.app.vo.AppOrderUseRecordsVO;
 import org.jeecg.modules.app.vo.OrderVO;
 import org.jeecg.modules.app.vo.PageOrdersVO;
 import org.jeecg.modules.app.vo.QueryOrderVerifyRecordsVO;
+import org.jeecg.modules.system.app.entity.AppIsin;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -39,6 +43,8 @@ public class OrderController {
     private IOrderService appOrderService;
     @Resource
     private WeChatPayService weChatPayService;
+    @Resource
+    private IAppIsinService appIsinService;
 
     /**
      * @return Result<OrderVO.PreviewOrderPlaceSchool>
@@ -248,6 +254,19 @@ public class OrderController {
         return Result.ok(appOrderService.queryOrderVerifyRecords(orderId, ticketNo));
     }
 
+    /**
+     * 订单-查询券使用记录
+     *
+     * @param ticketNo
+     * @return
+     */
+    @Operation(summary = "订单-查询券使用记录")
+    @GetMapping("/queryOrderUseRecords")
+    public Result<AppOrderUseRecordsVO> queryOrderUseRecords(@Schema(description = "券号") @RequestParam(name = "ticketNo") String ticketNo) {
+        AppOrderUseRecordsVO appOrderUseRecordsVO = appIsinService.queryOrderUseRecords(ticketNo);
+        return Result.ok(appOrderUseRecordsVO);
+    }
+
     /**
      * @return
      * @Author SheepHy

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IAppIsinService.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.app.service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.app.vo.AppIsinVerifyVO;
+import org.jeecg.modules.app.vo.AppOrderUseRecordsVO;
 import org.jeecg.modules.system.app.entity.AppIsin;
 
 import java.text.ParseException;
@@ -15,4 +16,5 @@ public interface IAppIsinService extends IService<AppIsin> {
 
     String repealVerifyRecord(String appIsinId) throws ParseException;
 
+    AppOrderUseRecordsVO queryOrderUseRecords(String ticketNo);
 }

+ 87 - 9
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/AppIsinServiceImpl.java

@@ -8,31 +8,42 @@ import lombok.extern.log4j.Log4j2;
 import org.jeecg.common.constant.CommonConstant;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.modules.app.service.IAppIsinService;
+import org.jeecg.modules.app.vo.AppGmtInfoVO;
 import org.jeecg.modules.app.vo.AppIsinVerifyVO;
-import org.jeecg.modules.system.app.entity.AppIsin;
-import org.jeecg.modules.system.app.entity.AppOrder;
-import org.jeecg.modules.system.app.entity.AppOrderProInfo;
-import org.jeecg.modules.system.app.mapper.AppIsinMapper;
-import org.jeecg.modules.system.app.mapper.AppOrderMapper;
-import org.jeecg.modules.system.app.mapper.AppOrderProInfoMapper;
+import org.jeecg.modules.app.vo.AppOrderUseRecordsVO;
+import org.jeecg.modules.system.app.entity.*;
+import org.jeecg.modules.system.app.mapper.*;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 @Log4j2
 public class AppIsinServiceImpl extends ServiceImpl<AppIsinMapper, AppIsin> implements IAppIsinService {
 
+    @Resource
+    private AppGmtInfoMapper appGmtInfoMapper;
     @Resource
     private AppOrderProInfoMapper appOrderProInfoMapper;
     @Resource
     private AppOrderMapper appOrderMapper;
+    @Resource
+    private FamilyMembersMapper familyMembersMapper;
+    @Resource
+    private AppGameMapper appGameMapper;
+    @Resource
+    private AppSiteMapper appSiteMapper;
+    @Resource
+    private AppSitePriceRulesMapper appSitePriceRulesMapper;
+    @Resource
+    private AppSitePlaceMapper appSitePlaceMapper;
+    @Resource
+    private AppGamePriceRulesMapper appGamePriceRulesMapper;
 
     @Override
     public Page<AppIsinVerifyVO> pageAppIsinVerifyRecords(Page<AppIsinVerifyVO> page, String orgCode) {
@@ -89,6 +100,73 @@ public class AppIsinServiceImpl extends ServiceImpl<AppIsinMapper, AppIsin> impl
         return "撤销成功!";
     }
 
+    @Override
+    public AppOrderUseRecordsVO queryOrderUseRecords(String ticketNo) {
+        AppOrderUseRecordsVO appOrderUseRecordsVO = new AppOrderUseRecordsVO();
+        List<AppIsin> appIsinList = this.list(Wrappers.lambdaQuery(AppIsin.class).eq(AppIsin::getTicketNo, ticketNo));
+        appOrderUseRecordsVO.setAppIsinList(appIsinList);
+        List<AppGmtInfoVO> appGmtInfoVOList = new ArrayList<>();
+        List<AppOrderProInfo> appOrderProInfos = appOrderProInfoMapper.selectList(Wrappers.lambdaQuery(AppOrderProInfo.class).eq(AppOrderProInfo::getTicketNo, ticketNo));
+        for (AppOrderProInfo appOrderProInfo : appOrderProInfos) {
+            if (Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_4) || Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_0)){
+                if (Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_4)){
+                    String familyUserId = appOrderProInfo.getFamilyUserId();
+                    List<String> familyIds = Arrays.stream(familyUserId.split(",")).collect(Collectors.toList());
+                    AppOrder appOrder = appOrderMapper.selectById(appOrderProInfo.getOrderId());
+                    AppGamePriceRules appGamePriceRules = appGamePriceRulesMapper.selectById(appOrder.getProductIds());
+                    AppGame appGame = appGameMapper.selectById(appGamePriceRules.getGameId());
+                    for (String familyId : familyIds) {
+                        if (Objects.nonNull(appGame)){
+                            List<AppGmtInfo> appGmtInfos = appGmtInfoMapper.selectList(Wrappers.lambdaQuery(AppGmtInfo.class).eq(AppGmtInfo::getFamilyId, familyId).between(AppGmtInfo::getGmtCreate, appGame.getStartTime(), appGame.getEndTime()));
+                            for (AppGmtInfo appGmtInfo : appGmtInfos) {
+                                String familyUserName = familyMembersMapper.selectById(appGmtInfo.getFamilyId()).getFullName();
+                                String siteName = appSiteMapper.selectById(appGmtInfo.getSiteId()).getName();
+                                AppGmtInfoVO appGmtInfoVO = new AppGmtInfoVO();
+                                appGmtInfoVO
+                                        .setSiteId(appGmtInfo.getSiteId())
+                                        .setSiteName(siteName)
+                                        .setFamilyId(appGmtInfo.getFamilyId())
+                                        .setFamilyUserName(familyUserName)
+                                        .setGmtCreate(appGmtInfo.getGmtCreate())
+                                        .setPicUrl(appGmtInfo.getPicUrl());
+                                appGmtInfoVOList.add(appGmtInfoVO);
+                            }
+                        }
+                    }
+                }
+                if (Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_0)){
+                    String familyUserId = appOrderProInfo.getFamilyUserId();
+                    AppOrder appOrder = appOrderMapper.selectById(appOrderProInfo.getOrderId());
+                    String productIds = appOrder.getProductIds();
+                    AppSitePriceRules appSitePriceRules = appSitePriceRulesMapper.selectById(productIds);
+                    if (Objects.nonNull(appSitePriceRules)){
+                        String sitePlaceId = appSitePriceRules.getSitePlaceId();
+                        AppSitePlace appSitePlace = appSitePlaceMapper.selectById(sitePlaceId);
+                        AppSite appSite = appSiteMapper.selectById(appSitePlace.getSiteId());
+                        List<AppGmtInfo> appGmtInfos = appGmtInfoMapper.selectList(Wrappers.lambdaQuery(AppGmtInfo.class)
+                                        .eq(AppGmtInfo::getSiteId, appSite.getId())
+                                .eq(AppGmtInfo::getFamilyId, familyUserId).between(AppGmtInfo::getGmtCreate, appSitePriceRules.getStartTime(), appSitePriceRules.getEndTime()));
+                        for (AppGmtInfo appGmtInfo : appGmtInfos) {
+                            String familyUserName = familyMembersMapper.selectById(appGmtInfo.getFamilyId()).getFullName();
+                            String siteName = appSiteMapper.selectById(appGmtInfo.getSiteId()).getName();
+                            AppGmtInfoVO appGmtInfoVO = new AppGmtInfoVO();
+                            appGmtInfoVO
+                                    .setSiteId(appGmtInfo.getSiteId())
+                                    .setSiteName(siteName)
+                                    .setFamilyId(appGmtInfo.getFamilyId())
+                                    .setFamilyUserName(familyUserName)
+                                    .setGmtCreate(appGmtInfo.getGmtCreate())
+                                    .setPicUrl(appGmtInfo.getPicUrl());
+                            appGmtInfoVOList.add(appGmtInfoVO);
+                        }
+                    }
+                }
+            }
+        }
+        appOrderUseRecordsVO.setAppGmtInfoList(appGmtInfoVOList);
+        return appOrderUseRecordsVO;
+    }
+
     //时间加1小时
     public static Date getDate(Date date){
         Calendar cal = Calendar.getInstance();

+ 8 - 5
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/OrderServiceImpl.java

@@ -17,7 +17,6 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.extern.log4j.Log4j2;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -815,13 +814,14 @@ public class OrderServiceImpl implements IOrderService {
                     BigDecimal sumPrice = appGamePriceRules.getSellingPrice();
 
                     List<String> familyIds = Arrays.stream(createOrderForm.getFamilyIds().split(",")).collect(Collectors.toList());
-
+                    String ticketNo = RandomUtil.randomNumbers(10);
                     for (String familyId : familyIds) {
                         FamilyMembers familyMembers = familyMembersMapper.selectById(familyId);
                         AppOrderProInfo appOrderProInfo = new AppOrderProInfo();
                         appOrderProInfo.setProductId(createOrderForm.getProductIds());
                         appOrderProInfo.setProductName(appGame.getName());
                         appOrderProInfo.setAddress(appGame.getSiteAddress());
+                        appOrderProInfo.setTicketNo(ticketNo);
                         appOrderProInfo.setType(CommonConstant.ORDER_PRO_INFO_TYPE_4);
                         appOrderProInfo.setFrameTimeStr(startTime + "-" + endTime);
                         appOrderProInfo.setExpireTime(DateUtil.format(appGameSchedule.getEndTime(), "yyyy-MM-dd HH:mm:ss"));
@@ -1062,8 +1062,10 @@ public class OrderServiceImpl implements IOrderService {
         for (AppOrderProInfo appOrderProInfo : proInfoList) {
             appOrderProInfo
                     .setOrderId(appOrder.getId())
-                    .setOrderCode(appOrder.getOrderCode())
-                    .setTicketNo(RandomUtil.randomNumbers(10));
+                    .setOrderCode(appOrder.getOrderCode());
+            if (!Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_4)) {
+                appOrderProInfo.setTicketNo(RandomUtil.randomNumbers(10));
+            }
             if (appOrderProInfoMapper.insert(appOrderProInfo) > 0) {
                 if (appOrderProInfo.getType() == 5) {
                     AppSite appSite = appSiteMapper.selectById(appCoursesMapper.selectById(appOrderProInfo.getProductId()).getAddressSiteId());
@@ -1635,7 +1637,8 @@ public class OrderServiceImpl implements IOrderService {
 
         //null代表查询失败 SUCCESS-成功 USERPAYING和ACCEPT为中间态 其他为支付失败
         JSONObject res = weChatPayService.orderQueryByOutTradeNo(orderCode);
-        String s = res == null ? null : res.getString("trade_state");;
+        String s = res == null ? null : res.getString("trade_state");
+//        String s = "SUCCESS";
         if ("SUCCESS".equals(s) || appOrder.getOriginalPrice().compareTo(BigDecimal.ZERO)==0) {
 
             if (ObjectUtil.isNotEmpty(appOrder) && Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_0)) {

+ 32 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/AppGmtInfoVO.java

@@ -0,0 +1,32 @@
+package org.jeecg.modules.app.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@Accessors(chain = true)
+public class AppGmtInfoVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Schema(description = "familyId")
+    private String familyId;
+
+    @Schema(description = "familyUserName")
+    private String familyUserName;
+
+    @Schema(description = "siteId")
+    private String siteId;
+
+    @Schema(description = "siteName")
+    private String siteName;
+
+    @Schema(description = "开门时间")
+    private Date gmtCreate;
+
+    @Schema(description = "认证照片")
+    private String picUrl;
+}

+ 18 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/AppOrderUseRecordsVO.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.app.vo;
+
+import lombok.Data;
+import org.jeecg.modules.system.app.entity.AppGmtInfo;
+import org.jeecg.modules.system.app.entity.AppIsin;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class AppOrderUseRecordsVO implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private List<AppIsin> appIsinList;
+
+    private List<AppGmtInfoVO> appGmtInfoList;
+
+}

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/redission/RedissonDelayQueue.java

@@ -67,7 +67,7 @@ public class RedissonDelayQueue {
                     String orderId = Arrays.stream(task.split("_")).collect(Collectors.toList()).get(1);
                     AppOrder appOrder = appOrderService.getById(orderId);
                     if(ObjectUtil.isNotEmpty(appOrder)){
-                        if (Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_0)){
+                        if (Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_0) && appOrder.getRevision() == 0) {
                             log.info("修改订单:{},支付状态为已取消", orderId);
                             appOrder.setOrderStatus(4);
                             appOrderService.updateById(appOrder);

+ 6 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/SchoolPlaceAddDTO.java

@@ -22,6 +22,12 @@ public class SchoolPlaceAddDTO implements Serializable {
     @Schema(description = "部门ID")
     private String tenantId;
 
+    @Schema(description = "学校ID")
+    private String siteId;
+
+    @Schema(description = "学校场地信息ID")
+    private String sitePlaceId;
+
     @Schema(description = "教学日")
     private String teachingDay;
 

+ 4 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppCoursesVerificationRecordServiceImpl.java

@@ -81,9 +81,10 @@ public class AppCoursesVerificationRecordServiceImpl extends ServiceImpl<AppCour
                     String orderId = orderProInfo.getOrderId();
                     AppOrder appOrder = appOrderMapper.selectById(orderId);
                     if (ObjectUtil.isNotEmpty(appOrder)){
-                        List<AppOrderProInfo> proInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, orderId).eq(AppOrderProInfo::getType, CommonConstant.ORDER_PRO_INFO_TYPE_5));
-                        long count = proInfoList.stream().filter(info -> Objects.equals(info.getOrderStatus(), CommonConstant.ORDER_STATUS_2)).count();
-                        if(count == proInfoList.size()){
+                        List<AppOrderProInfo> proInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, orderId)
+                                        .eq(AppOrderProInfo::getOrderStatus, CommonConstant.ORDER_STATUS_2)
+                                .eq(AppOrderProInfo::getType, CommonConstant.ORDER_PRO_INFO_TYPE_5));
+                        if(proInfoList.isEmpty()){
                             appOrder.setOrderStatus(CommonConstant.ORDER_STATUS_2);
                             appOrderMapper.updateById(appOrder);
                         }

+ 13 - 11
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppOrderServiceImpl.java

@@ -313,17 +313,19 @@ public class AppOrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> i
             //修改订单状态
             String orderProInfoId = appIsin.getOrderProInfoId();
             AppOrderProInfo appOrderProInfo = appOrderProInfoMapper.selectById(orderProInfoId);
-            appOrderProInfo.setOrderStatus(CommonConstant.ORDER_STATUS_2);
-            appOrderProInfoMapper.updateById(appOrderProInfo);
-            //修改订单状态
-            String orderId = appOrderProInfo.getOrderId();
-            AppOrder appOrder = appOrderMapper.selectById(orderId);
-            if (ObjectUtil.isNotEmpty(appOrder)){
-                List<AppOrderProInfo> proInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, orderId).eq(AppOrderProInfo::getType, CommonConstant.ORDER_PRO_INFO_TYPE_5));
-                long count = proInfoList.stream().filter(info -> Objects.equals(info.getOrderStatus(), CommonConstant.ORDER_STATUS_2)).count();
-                if(count >= 1 && !Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_2)){
-                    appOrder.setOrderStatus(CommonConstant.ORDER_STATUS_2);
-                    appOrderMapper.updateById(appOrder);
+            if (!Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_5)){
+                appOrderProInfo.setOrderStatus(CommonConstant.ORDER_STATUS_2);
+                appOrderProInfoMapper.updateById(appOrderProInfo);
+                //修改订单状态
+                String orderId = appOrderProInfo.getOrderId();
+                AppOrder appOrder = appOrderMapper.selectById(orderId);
+                int x = appIsinMapper.selectList(Wrappers.<AppIsin>lambdaQuery().eq(AppIsin::getOrderId, appOrder.getId()).eq(AppIsin::getIsinStatus, 0)).size();
+                int y = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, appOrder.getId()).eq(AppOrderProInfo::getOrderStatus, 0)).size();
+                if (ObjectUtil.isNotEmpty(appOrder) && x == 0 && y == 0){
+                    if(!Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_2)){
+                        appOrder.setOrderStatus(CommonConstant.ORDER_STATUS_2);
+                        appOrderMapper.updateById(appOrder);
+                    }
                 }
             }
         }

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppSitePlaceServiceImpl.java

@@ -893,6 +893,8 @@ public class AppSitePlaceServiceImpl extends ServiceImpl<AppSitePlaceMapper, App
 
         if (ObjectUtils.isNotEmpty(appSitePlace)) {
             schoolPlaceAddDTO
+                    .setSiteId(site.getId())
+                    .setSiteId(appSitePlace.getId())
                     .setInsureIds(appSitePlace.getInsureIds())
                     .setReminder(appSitePlace.getReminder());
             if (ObjectUtil.isNotEmpty(appSitePlace.getCover())) {