Browse Source

1、基础模块提交

master
Aug 6 months ago
parent
commit
05b78ffef3
125 changed files with 3900 additions and 1761 deletions
  1. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java
  2. +11
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java
  3. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java
  4. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java
  5. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java
  6. +119
    -29
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/controller/StudytourActivityDateController.java
  7. +12
    -9
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/entity/StudytourActivityDate.java
  8. +13
    -13
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/entity/StudytourDatePrice.java
  9. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/StudytourActivityDateMapper.java
  10. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/StudytourDatePriceMapper.java
  11. +16
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/xml/StudytourDatePriceMapper.xml
  12. +27
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/IStudytourActivityDateService.java
  13. +16
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/IStudytourDatePriceService.java
  14. +60
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/impl/StudytourActivityDateServiceImpl.java
  15. +27
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/impl/StudytourDatePriceServiceImpl.java
  16. +77
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vo/StudytourActivityDatePage.java
  17. +10
    -11
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/StudytourActivityDateList.vue
  18. +132
    -57
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/modules/StudytourActivityDateForm.vue
  19. +12
    -8
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/modules/StudytourActivityDateModal.vue
  20. +7
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDate.api.ts
  21. +32
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDate.data.ts
  22. +15
    -15
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDateList.vue
  23. +54
    -9
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/components/StudytourActivityDateModal.vue
  24. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/controller/StudytourCategoryController.java
  25. +3
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/entity/StudytourCategory.java
  26. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/mapper/StudytourCategoryMapper.java
  27. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/service/IStudytourCategoryService.java
  28. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/service/impl/StudytourCategoryServiceImpl.java
  29. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue/StudytourCategoryList.vue
  30. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue/modules/StudytourCategoryModal.vue
  31. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue3/StudytourCategory.data.ts
  32. +42
    -42
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/controller/StudytourCollectionController.java
  33. +66
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/entity/StudytourCollection.java
  34. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/mapper/StudytourCollectionMapper.java
  35. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/mapper/xml/StudytourCollectionMapper.xml
  36. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/service/IStudytourCollectionService.java
  37. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/service/impl/StudytourCollectionServiceImpl.java
  38. +17
    -17
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/StudytourCollectionList.vue
  39. +8
    -8
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionForm.vue
  40. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionModal.Style#Drawer.vue
  41. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionModal.vue
  42. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollection.api.ts
  43. +15
    -12
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollection.data.ts
  44. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollectionList.vue
  45. +2
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/components/StudytourCollectionModal.vue
  46. +42
    -42
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/controller/StudytourConfigController.java
  47. +26
    -15
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/entity/StudytourConfig.java
  48. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/mapper/StudytourConfigMapper.java
  49. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/mapper/xml/StudytourConfigMapper.xml
  50. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/service/IStudytourConfigService.java
  51. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/service/impl/StudytourConfigServiceImpl.java
  52. +34
    -20
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/StudytourConfigList.vue
  53. +20
    -10
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigForm.vue
  54. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigModal.Style#Drawer.vue
  55. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigModal.vue
  56. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfig.api.ts
  57. +67
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfig.data.ts
  58. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfigList.vue
  59. +2
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/components/StudytourConfigModal.vue
  60. +0
    -17
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/mapper/StudytourDatePriceMapper.java
  61. +0
    -14
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/service/IStudytourDatePriceService.java
  62. +0
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/service/impl/StudytourDatePriceServiceImpl.java
  63. +0
    -43
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue3/StudytourDatePrice.data.ts
  64. +119
    -29
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/controller/StudytourOrderController.java
  65. +27
    -13
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/entity/StudytourOrder.java
  66. +5
    -14
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/entity/StudytourOrderPerson.java
  67. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/StudytourOrderMapper.java
  68. +7
    -5
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/StudytourOrderPersonMapper.java
  69. +16
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/xml/StudytourOrderPersonMapper.xml
  70. +5
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/IStudytourOrderPersonService.java
  71. +27
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/IStudytourOrderService.java
  72. +27
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/impl/StudytourOrderPersonServiceImpl.java
  73. +60
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/impl/StudytourOrderServiceImpl.java
  74. +127
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vo/StudytourOrderPage.java
  75. +44
    -27
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/StudytourOrderList.vue
  76. +180
    -73
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/modules/StudytourOrderForm.vue
  77. +12
    -8
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/modules/StudytourOrderModal.vue
  78. +38
    -5
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue3/StudytourOrder.data.ts
  79. +0
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/service/impl/StudytourOrderPersonServiceImpl.java
  80. +0
    -208
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/StudytourOrderPersonList.vue
  81. +0
    -134
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/modules/StudytourOrderPersonForm.vue
  82. +0
    -89
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue3/StudytourOrderPerson.data.ts
  83. +0
    -171
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/controller/StudytourOrderReceiptController.java
  84. +0
    -17
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/mapper/StudytourOrderReceiptMapper.java
  85. +0
    -5
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/mapper/xml/StudytourOrderReceiptMapper.xml
  86. +0
    -14
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/service/IStudytourOrderReceiptService.java
  87. +0
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/service/impl/StudytourOrderReceiptServiceImpl.java
  88. +0
    -84
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/modules/StudytourOrderReceiptModal.Style#Drawer.vue
  89. +0
    -60
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/modules/StudytourOrderReceiptModal.vue
  90. +0
    -61
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/StudytourOrderReceipt.api.ts
  91. +0
    -162
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/StudytourOrderReceiptList.vue
  92. +0
    -58
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/components/StudytourOrderReceiptModal.vue
  93. +19
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/PageBean.java
  94. +21
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ActivityService.java
  95. +4
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/CommentService.java
  96. +21
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java
  97. +4
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ExperienceService.java
  98. +4
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ImageService.java
  99. +302
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java
  100. +6
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/CommentServiceImpl.java

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 活动信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Api(tags="活动信息表")


+ 11
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java View File

@ -4,11 +4,15 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
@ -20,7 +24,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 活动信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Data
@ -135,4 +139,10 @@ public class StudytourActivity implements Serializable {
@Dict(dicCode = "is_true")
@ApiModelProperty(value = "是否下架")
private java.lang.String isDel;
//活动团期
@TableField(exist = false)
@ApiModelProperty(value = "活动团期")
List<StudytourActivityDate> dateList;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 活动信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface StudytourActivityMapper extends BaseMapper<StudytourActivity> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 活动信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface IStudytourActivityService extends IService<StudytourActivity> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 活动信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Service


+ 119
- 29
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/controller/StudytourActivityDateController.java View File

@ -1,36 +1,42 @@
package org.jeecg.modules.studytourActivityDate.controller;
import java.io.UnsupportedEncodingException;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.jeecg.modules.studytourActivityDate.service.IStudytourActivityDateService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.jeecg.modules.studytourActivityDate.vo.StudytourActivityDatePage;
import org.jeecg.modules.studytourActivityDate.service.IStudytourActivityDateService;
import org.jeecg.modules.studytourActivityDate.service.IStudytourDatePriceService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -39,16 +45,18 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@Api(tags="团期信息表")
@RestController
@RequestMapping("/studytourActivityDate/studytourActivityDate")
@Slf4j
public class StudytourActivityDateController extends JeecgController<StudytourActivityDate, IStudytourActivityDateService> {
public class StudytourActivityDateController {
@Autowired
private IStudytourActivityDateService studytourActivityDateService;
@Autowired
private IStudytourDatePriceService studytourDatePriceService;
/**
* 分页列表查询
@ -75,28 +83,36 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
/**
* 添加
*
* @param studytourActivityDate
* @param studytourActivityDatePage
* @return
*/
@AutoLog(value = "团期信息表-添加")
@ApiOperation(value="团期信息表-添加", notes="团期信息表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourActivityDate studytourActivityDate) {
studytourActivityDateService.save(studytourActivityDate);
public Result<String> add(@RequestBody StudytourActivityDatePage studytourActivityDatePage) {
StudytourActivityDate studytourActivityDate = new StudytourActivityDate();
BeanUtils.copyProperties(studytourActivityDatePage, studytourActivityDate);
studytourActivityDateService.saveMain(studytourActivityDate, studytourActivityDatePage.getStudytourDatePriceList());
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourActivityDate
* @param studytourActivityDatePage
* @return
*/
@AutoLog(value = "团期信息表-编辑")
@ApiOperation(value="团期信息表-编辑", notes="团期信息表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourActivityDate studytourActivityDate) {
studytourActivityDateService.updateById(studytourActivityDate);
public Result<String> edit(@RequestBody StudytourActivityDatePage studytourActivityDatePage) {
StudytourActivityDate studytourActivityDate = new StudytourActivityDate();
BeanUtils.copyProperties(studytourActivityDatePage, studytourActivityDate);
StudytourActivityDate studytourActivityDateEntity = studytourActivityDateService.getById(studytourActivityDate.getId());
if(studytourActivityDateEntity==null) {
return Result.error("未找到对应数据");
}
studytourActivityDateService.updateMain(studytourActivityDate, studytourActivityDatePage.getStudytourDatePriceList());
return Result.OK("编辑成功!");
}
@ -110,7 +126,7 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
@ApiOperation(value="团期信息表-通过id删除", notes="团期信息表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourActivityDateService.removeById(id);
studytourActivityDateService.delMain(id);
return Result.OK("删除成功!");
}
@ -124,8 +140,8 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
@ApiOperation(value="团期信息表-批量删除", notes="团期信息表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourActivityDateService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
this.studytourActivityDateService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功");
}
/**
@ -143,6 +159,21 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
return Result.error("未找到对应数据");
}
return Result.OK(studytourActivityDate);
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "年龄段价格表通过主表ID查询")
@ApiOperation(value="年龄段价格表主表ID查询", notes="年龄段价格表-通主表ID查询")
@GetMapping(value = "/queryStudytourDatePriceByMainId")
public Result<List<StudytourDatePrice>> queryStudytourDatePriceListByMainId(@RequestParam(name="id",required=true) String id) {
List<StudytourDatePrice> studytourDatePriceList = studytourDatePriceService.selectByMainId(id);
return Result.OK(studytourDatePriceList);
}
/**
@ -153,11 +184,43 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourActivityDate studytourActivityDate) {
return super.exportXls(request, studytourActivityDate, StudytourActivityDate.class, "团期信息表");
// Step.1 组装查询条件查询数据
QueryWrapper<StudytourActivityDate> queryWrapper = QueryGenerator.initQueryWrapper(studytourActivityDate, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//Step.2 获取导出数据
List<StudytourActivityDate> queryList = studytourActivityDateService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
List<StudytourActivityDate> studytourActivityDateList = new ArrayList<StudytourActivityDate>();
if(oConvertUtils.isEmpty(selections)) {
studytourActivityDateList = queryList;
}else {
List<String> selectionList = Arrays.asList(selections.split(","));
studytourActivityDateList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
// Step.3 组装pageList
List<StudytourActivityDatePage> pageList = new ArrayList<StudytourActivityDatePage>();
for (StudytourActivityDate main : studytourActivityDateList) {
StudytourActivityDatePage vo = new StudytourActivityDatePage();
BeanUtils.copyProperties(main, vo);
List<StudytourDatePrice> studytourDatePriceList = studytourDatePriceService.selectByMainId(main.getId());
vo.setStudytourDatePriceList(studytourDatePriceList);
pageList.add(vo);
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "团期信息表列表");
mv.addObject(NormalExcelConstants.CLASS, StudytourActivityDatePage.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("团期信息表数据", "导出人:"+sysUser.getRealname(), "团期信息表"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
/**
* 通过excel导入数据
* 通过excel导入数据
*
* @param request
* @param response
@ -165,7 +228,34 @@ public class StudytourActivityDateController extends JeecgController<StudytourAc
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourActivityDate.class);
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<StudytourActivityDatePage> list = ExcelImportUtil.importExcel(file.getInputStream(), StudytourActivityDatePage.class, params);
for (StudytourActivityDatePage page : list) {
StudytourActivityDate po = new StudytourActivityDate();
BeanUtils.copyProperties(page, po);
studytourActivityDateService.saveMain(po, page.getStudytourDatePriceList());
}
return Result.OK("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
log.error(e.getMessage(),e);
return Result.error("文件导入失败:"+e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.OK("文件导入失败!");
}
}

+ 12
- 9
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/entity/StudytourActivityDate.java View File

@ -3,8 +3,10 @@ package org.jeecg.modules.studytourActivityDate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -14,20 +16,16 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@ApiModel(value="studytour_activity_date对象", description="团期信息表")
@Data
@TableName("studytour_activity_date")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_activity_date对象", description="团期信息表")
public class StudytourActivityDate implements Serializable {
private static final long serialVersionUID = 1L;
@ -69,12 +67,17 @@ public class StudytourActivityDate implements Serializable {
private java.math.BigDecimal priceDiscount;
/**是否下架*/
@Excel(name = "是否下架", width = 15, dicCode = "is_true")
@Dict(dicCode = "is_true")
@Dict(dicCode = "is_true")
@ApiModelProperty(value = "是否下架")
private java.lang.String isDel;
/**关联活动id*/
@Excel(name = "关联活动id", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动id")
private java.lang.String activityId;
//团期价格
@TableField(exist = false)
@ApiModelProperty(value = "团期价格")
List<StudytourDatePrice> priceList;
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/entity/StudytourDatePrice.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/entity/StudytourDatePrice.java View File

@ -1,33 +1,29 @@
package org.jeecg.modules.studytourDatePrice.entity;
package org.jeecg.modules.studytourActivityDate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.UnsupportedEncodingException;
import java.util.List;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@ApiModel(value="studytour_date_price对象", description="年龄段价格表")
@Data
@TableName("studytour_date_price")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_date_price对象", description="年龄段价格表")
public class StudytourDatePrice implements Serializable {
private static final long serialVersionUID = 1L;
@ -48,7 +44,7 @@ public class StudytourDatePrice implements Serializable {
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**年龄段id*/
@Excel(name = "年龄段id", width = 15)
@Excel(name = "年龄段id", width = 15, dictTable = "studytour_period", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "年龄段id")
private java.lang.String periodId;
/**单人价格*/
@ -56,7 +52,11 @@ public class StudytourDatePrice implements Serializable {
@ApiModelProperty(value = "单人价格")
private java.math.BigDecimal price;
/**关联团期id*/
@Excel(name = "关联团期id", width = 15)
@ApiModelProperty(value = "关联团期id")
private java.lang.String dateId;
//年龄段
@TableField(exist = false)
@ApiModelProperty(value = "年龄段")
String period_dictText;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/StudytourActivityDateMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface StudytourActivityDateMapper extends BaseMapper<StudytourActivityDate> {


+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/StudytourDatePriceMapper.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.studytourActivityDate.mapper;
import java.util.List;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface StudytourDatePriceMapper extends BaseMapper<StudytourDatePrice> {
public boolean deleteByMainId(@Param("mainId") String mainId);
public List<StudytourDatePrice> selectByMainId(@Param("mainId") String mainId);
}

+ 16
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/mapper/xml/StudytourDatePriceMapper.xml View File

@ -0,0 +1,16 @@
<?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.jeecg.modules.studytourActivityDate.mapper.StudytourDatePriceMapper">
<delete id="deleteByMainId" parameterType="java.lang.String">
DELETE
FROM studytour_date_price
WHERE
date_id = #{mainId} </delete>
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice">
SELECT *
FROM studytour_date_price
WHERE
date_id = #{mainId} </select>
</mapper>

+ 27
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/IStudytourActivityDateService.java View File

@ -1,14 +1,40 @@
package org.jeecg.modules.studytourActivityDate.service;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface IStudytourActivityDateService extends IService<StudytourActivityDate> {
/**
* 添加一对多
*
*/
public void saveMain(StudytourActivityDate studytourActivityDate,List<StudytourDatePrice> studytourDatePriceList) ;
/**
* 修改一对多
*
*/
public void updateMain(StudytourActivityDate studytourActivityDate,List<StudytourDatePrice> studytourDatePriceList);
/**
* 删除一对多
*/
public void delMain (String id);
/**
* 批量删除一对多
*/
public void delBatchMain (Collection<? extends Serializable> idList);
}

+ 16
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/IStudytourDatePriceService.java View File

@ -0,0 +1,16 @@
package org.jeecg.modules.studytourActivityDate.service;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface IStudytourDatePriceService extends IService<StudytourDatePrice> {
public List<StudytourDatePrice> selectByMainId(String mainId);
}

+ 60
- 2
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/impl/StudytourActivityDateServiceImpl.java View File

@ -1,19 +1,77 @@
package org.jeecg.modules.studytourActivityDate.service.impl;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import org.jeecg.modules.studytourActivityDate.mapper.StudytourDatePriceMapper;
import org.jeecg.modules.studytourActivityDate.mapper.StudytourActivityDateMapper;
import org.jeecg.modules.studytourActivityDate.service.IStudytourActivityDateService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.util.List;
import java.util.Collection;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@Service
public class StudytourActivityDateServiceImpl extends ServiceImpl<StudytourActivityDateMapper, StudytourActivityDate> implements IStudytourActivityDateService {
@Autowired
private StudytourActivityDateMapper studytourActivityDateMapper;
@Autowired
private StudytourDatePriceMapper studytourDatePriceMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public void saveMain(StudytourActivityDate studytourActivityDate, List<StudytourDatePrice> studytourDatePriceList) {
studytourActivityDateMapper.insert(studytourActivityDate);
if(studytourDatePriceList!=null && studytourDatePriceList.size()>0) {
for(StudytourDatePrice entity:studytourDatePriceList) {
//外键设置
entity.setDateId(studytourActivityDate.getId());
studytourDatePriceMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateMain(StudytourActivityDate studytourActivityDate,List<StudytourDatePrice> studytourDatePriceList) {
studytourActivityDateMapper.updateById(studytourActivityDate);
//1.先删除子表数据
studytourDatePriceMapper.deleteByMainId(studytourActivityDate.getId());
//2.子表数据重新插入
if(studytourDatePriceList!=null && studytourDatePriceList.size()>0) {
for(StudytourDatePrice entity:studytourDatePriceList) {
//外键设置
entity.setDateId(studytourActivityDate.getId());
studytourDatePriceMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delMain(String id) {
studytourDatePriceMapper.deleteByMainId(id);
studytourActivityDateMapper.deleteById(id);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delBatchMain(Collection<? extends Serializable> idList) {
for(Serializable id:idList) {
studytourDatePriceMapper.deleteByMainId(id.toString());
studytourActivityDateMapper.deleteById(id);
}
}
}

+ 27
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/service/impl/StudytourDatePriceServiceImpl.java View File

@ -0,0 +1,27 @@
package org.jeecg.modules.studytourActivityDate.service.impl;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import org.jeecg.modules.studytourActivityDate.mapper.StudytourDatePriceMapper;
import org.jeecg.modules.studytourActivityDate.service.IStudytourDatePriceService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
@Service
public class StudytourDatePriceServiceImpl extends ServiceImpl<StudytourDatePriceMapper, StudytourDatePrice> implements IStudytourDatePriceService {
@Autowired
private StudytourDatePriceMapper studytourDatePriceMapper;
@Override
public List<StudytourDatePrice> selectByMainId(String mainId) {
return studytourDatePriceMapper.selectByMainId(mainId);
}
}

+ 77
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vo/StudytourActivityDatePage.java View File

@ -0,0 +1,77 @@
package org.jeecg.modules.studytourActivityDate.vo;
import java.util.List;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description: 团期信息表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
@Data
@ApiModel(value="studytour_activity_datePage对象", description="团期信息表")
public class StudytourActivityDatePage {
/**主键*/
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**开始日期*/
@Excel(name = "开始日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始日期")
private java.util.Date startDate;
/**结束日期*/
@Excel(name = "结束日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "结束日期")
private java.util.Date endDate;
/**原价*/
@Excel(name = "原价", width = 15)
@ApiModelProperty(value = "原价")
private java.math.BigDecimal priceOrigin;
/**优惠价*/
@Excel(name = "优惠价", width = 15)
@ApiModelProperty(value = "优惠价")
private java.math.BigDecimal priceDiscount;
/**是否下架*/
@Excel(name = "是否下架", width = 15, dicCode = "is_true")
@Dict(dicCode = "is_true")
@ApiModelProperty(value = "是否下架")
private java.lang.String isDel;
/**关联活动id*/
@Excel(name = "关联活动id", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动id")
private java.lang.String activityId;
@ExcelCollection(name="年龄段价格表")
@ApiModelProperty(value = "年龄段价格表")
private List<StudytourDatePrice> studytourDatePriceList;
}

+ 10
- 11
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/StudytourActivityDateList.vue View File

@ -8,7 +8,7 @@
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@ -36,15 +36,15 @@
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
@ -89,21 +89,20 @@
</a-table>
</div>
<studytour-activity-date-modal ref="modalForm" @ok="modalFormOk"></studytour-activity-date-modal>
<studytour-activity-date-modal ref="modalForm" @ok="modalFormOk"/>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourActivityDateModal from './modules/StudytourActivityDateModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
export default {
name: 'StudytourActivityDateList',
mixins:[JeecgListMixin, mixinDevice],
name: "StudytourActivityDateList",
mixins:[JeecgListMixin],
components: {
StudytourActivityDateModal
},
@ -164,7 +163,7 @@
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
scopedSlots: { customRender: 'action' },
}
],
url: {
@ -180,12 +179,12 @@
}
},
created() {
this.getSuperFieldList();
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
}
},
methods: {
initDictConfig(){


+ 132
- 57
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/modules/StudytourActivityDateForm.vue View File

@ -1,34 +1,35 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<!-- 主表单区域 -->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="开始日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startDate">
<j-date placeholder="请选择开始日期" v-model="model.startDate" style="width: 100%" />
<j-date placeholder="请选择开始日期" v-model="model.startDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endDate">
<j-date placeholder="请选择结束日期" v-model="model.endDate" style="width: 100%" />
<j-date placeholder="请选择结束日期" v-model="model.endDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priceOrigin">
<a-input-number v-model="model.priceOrigin" placeholder="请输入原价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="优惠价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priceDiscount">
<a-input-number v-model="model.priceDiscount" placeholder="请输入优惠价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="是否下架" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isDel">
<j-dict-select-tag type="list" v-model="model.isDel" dictCode="is_true" placeholder="请选择是否下架" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="关联活动id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-dict-select-tag type="list" v-model="model.activityId" dictCode="studytour_activity,title,id" placeholder="请选择关联活动id" />
</a-form-model-item>
@ -36,30 +37,43 @@
</a-row>
</a-form-model>
</j-form-container>
<!-- 子表单区域 -->
<a-tabs v-model="activeKey" @change="handleChangeTabs">
<a-tab-pane tab="年龄段价格表" :key="refKeys[0]" :forceRender="true">
<j-vxe-table
keep-source
:ref="refKeys[0]"
:loading="studytourDatePriceTable.loading"
:columns="studytourDatePriceTable.columns"
:dataSource="studytourDatePriceTable.dataSource"
:maxHeight="300"
:disabled="formDisabled"
:rowNumber="true"
:rowSelection="true"
:toolbar="true"
/>
</a-tab-pane>
</a-tabs>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { getAction } from '@/api/manage'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
name: 'StudytourActivityDateForm',
mixins: [JVxeTableModelMixin],
components: {
JFormContainer,
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
data() {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -68,62 +82,123 @@
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
model:{
},
//
addDefaultRowNum: 1,
validatorRules: {
},
refKeys: ['studytourDatePrice', ],
tableKeys:['studytourDatePrice', ],
activeKey: 'studytourDatePrice',
//
studytourDatePriceTable: {
loading: false,
dataSource: [],
columns: [
{
title: '年龄段id',
key: 'periodId',
type: JVXETypes.select,
options:[],
dictCode:"studytour_period,title,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '单人价格',
key: 'price',
type: JVXETypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '关联团期id',
key: 'dateId',
type: JVXETypes.selectSearch,
dictCode:"studytour_activity_date,id,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]
},
url: {
add: "/studytourActivityDate/studytourActivityDate/add",
edit: "/studytourActivityDate/studytourActivityDate/edit",
queryById: "/studytourActivityDate/studytourActivityDate/queryById"
queryById: "/studytourActivityDate/studytourActivityDate/queryById",
studytourDatePrice: {
list: '/studytourActivityDate/studytourActivityDate/queryStudytourDatePriceByMainId'
},
}
}
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
addBefore(){
this.studytourDatePriceTable.dataSource=[]
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
getAllTable() {
let values = this.tableKeys.map(key => getRefPromise(this, key))
return Promise.all(values)
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
/** 调用完edit()方法之后会自动调用此方法 */
editAfter() {
this.$nextTick(() => {
})
//
if (this.model.id) {
let params = { id: this.model.id }
this.requestSubTableData(this.url.studytourDatePrice.list, params, this.studytourDatePriceTable)
}
},
//
validateSubForm(allValues){
return new Promise((resolve,reject)=>{
Promise.all([
]).then(() => {
resolve(allValues)
}).catch(e => {
if (e.error === VALIDATE_FAILED) {
// tab
this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index]
} else {
console.error(e)
}
})
})
},
/** 整理成formData */
classifyIntoFormData(allValues) {
let main = Object.assign(this.model, allValues.formValue)
return {
...main, //
studytourDatePriceList: allValues.tablesValue[0].tableData,
}
},
validateError(msg){
this.$message.error(msg)
},
}
}
</script>
</script>
<style scoped>
</style>

+ 12
- 8
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue/modules/StudytourActivityDateModal.vue View File

@ -1,26 +1,27 @@
<template>
<j-modal
:title="title"
:width="width"
:width="1200"
:visible="visible"
:maskClosable="false"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-activity-date-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-activity-date-form>
@cancel="handleCancel">
<studytour-activity-date-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
</j-modal>
</template>
<script>
import StudytourActivityDateForm from './StudytourActivityDateForm'
export default {
name: 'StudytourActivityDateModal',
components: {
StudytourActivityDateForm
},
data () {
data() {
return {
title:'',
width:800,
@ -28,7 +29,7 @@
disableSubmit: false
}
},
methods: {
methods:{
add () {
this.visible=true
this.$nextTick(()=>{
@ -46,7 +47,7 @@
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
this.$refs.realForm.handleOk();
},
submitCallback(){
this.$emit('ok');
@ -57,4 +58,7 @@
}
}
}
</script>
</script>
<style scoped>
</style>

+ 7
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDate.api.ts View File

@ -9,16 +9,23 @@ enum Api {
deleteBatch = '/studytourActivityDate/studytourActivityDate/deleteBatch',
importExcel = '/studytourActivityDate/studytourActivityDate/importExcel',
exportXls = '/studytourActivityDate/studytourActivityDate/exportXls',
studytourDatePriceList = '/studytourActivityDate/studytourActivityDate/queryStudytourDatePriceByMainId',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const studytourDatePriceList = Api.studytourDatePriceList;
/**
*
* @param params


+ 32
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDate.data.ts View File

@ -2,6 +2,7 @@ import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
//列表数据
export const columns: BasicColumn[] = [
{
@ -83,3 +84,34 @@ export const formSchema: FormSchema[] = [
},
},
];
//子表单数据
//子表表格配置
export const studytourDatePriceColumns: JVxeColumn[] = [
{
title: '年龄段id',
key: 'periodId',
type: JVxeTypes.select,
options:[],
dictCode:"studytour_period,title,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '单人价格',
key: 'price',
type: JVxeTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '关联团期id',
key: 'dateId',
type: JVxeTypes.selectSearch,
dictCode:"studytour_activity_date,id,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]

+ 15
- 15
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/StudytourActivityDateList.vue View File

@ -42,15 +42,15 @@
<script lang="ts" name="studytourActivityDate-studytourActivityDate" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import StudytourActivityDateModal from './components/StudytourActivityDateModal.vue'
import {columns, searchFormSchema} from './studytourActivityDate.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourActivityDate.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '团期信息表',
@ -58,25 +58,25 @@
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
actionColumn: {
width: 120,
},
},
exportConfig: {
},
exportConfig: {
name:"团期信息表",
url: getExportUrl,
},
importConfig: {
},
importConfig: {
url: getImportUrl
},
})
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext


+ 54
- 9
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivityDate/vue3/components/StudytourActivityDateModal.vue View File

@ -1,45 +1,90 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
<BasicForm @register="registerForm" ref="formRef"/>
<!-- 子表单区域 -->
<a-tabs v-model:activeKey="activeKey" @change="handleChangeTabs">
<a-tab-pane tab="年龄段价格表" :key="refKeys[0]" :forceRender="true">
<JVxeTable
keep-source
resizable
:ref="refKeys[0]"
:loading="studytourDatePriceTable.loading"
:columns="studytourDatePriceTable.columns"
:dataSource="studytourDatePriceTable.dataSource"
:maxHeight="300"
:rowNumber="true"
:rowSelection="true"
:toolbar="true"
/>
</a-tab-pane>
</a-tabs>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {ref, computed, unref,reactive} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../studytourActivityDate.data';
import {saveOrUpdate} from '../studytourActivityDate.api';
import { JVxeTable } from '/@/components/jeecg/JVxeTable'
import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
import {formSchema,studytourDatePriceColumns} from '../studytourActivityDate.data';
import {saveOrUpdate,studytourDatePriceList} from '../studytourActivityDate.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
const refKeys = ref(['studytourDatePrice', ]);
const activeKey = ref('studytourDatePrice');
const studytourDatePrice = ref();
const tableRefs = {studytourDatePrice, };
const studytourDatePriceTable = reactive({
loading: false,
dataSource: [],
columns:studytourDatePriceColumns
})
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
await reset();
setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
requestSubTableData(studytourDatePriceList, {id:data?.record?.id}, studytourDatePriceTable)
}
//
setProps({ disabled: !data?.showFooter })
});
//
const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys);
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
async function reset(){
await resetFields();
activeKey.value = 'studytourDatePrice';
studytourDatePriceTable.dataSource = [];
}
function classifyIntoFormData(allValues) {
let main = Object.assign({}, allValues.formValue)
return {
...main, //
studytourDatePriceList: allValues.tablesValue[0].tableData,
}
}
//
async function handleSubmit(v) {
async function requestAddOrEdit(values) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/controller/StudytourCategoryController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 活动分类表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Api(tags="活动分类表")


+ 3
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/entity/StudytourCategory.java View File

@ -18,7 +18,7 @@ import java.io.UnsupportedEncodingException;
/**
* @Description: 活动分类表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Data
@ -52,8 +52,8 @@ public class StudytourCategory implements Serializable {
@ApiModelProperty(value = "图标")
private java.lang.String icon;
/**是否首页展示*/
@Excel(name = "是否首页展示", width = 15, dicCode = "is_show")
@Dict(dicCode = "is_show")
@Excel(name = "是否首页展示", width = 15, dicCode = "is_true")
@Dict(dicCode = "is_true")
@ApiModelProperty(value = "是否首页展示")
private java.lang.String isShow;
/**父级节点*/


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/mapper/StudytourCategoryMapper.java View File

@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 活动分类表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface StudytourCategoryMapper extends BaseMapper<StudytourCategory> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/service/IStudytourCategoryService.java View File

@ -9,7 +9,7 @@ import java.util.List;
/**
* @Description: 活动分类表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface IStudytourCategoryService extends IService<StudytourCategory> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/service/impl/StudytourCategoryServiceImpl.java View File

@ -17,7 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 活动分类表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Service


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue/StudytourCategoryList.vue View File

@ -348,7 +348,7 @@
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'分类名称',dictCode:''})
fieldList.push({type:'Text',value:'icon',text:'图标',dictCode:''})
fieldList.push({type:'string',value:'isShow',text:'是否首页展示',dictCode:'is_show'})
fieldList.push({type:'string',value:'isShow',text:'是否首页展示',dictCode:'is_true'})
fieldList.push({type:'string',value:'pid',text:'父级节点',dictCode:''})
this.superFieldList = fieldList
}


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue/modules/StudytourCategoryModal.vue View File

@ -17,7 +17,7 @@
<j-image-upload isMultiple v-model="model.icon" ></j-image-upload>
</a-form-model-item>
<a-form-model-item label="是否首页展示" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShow">
<j-dict-select-tag type="list" v-model="model.isShow" dictCode="is_show" placeholder="请选择是否首页展示" />
<j-dict-select-tag type="list" v-model="model.isShow" dictCode="is_true" placeholder="请选择是否首页展示" />
</a-form-model-item>
<a-form-model-item label="父级节点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<j-tree-select


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCategory/vue3/StudytourCategory.data.ts View File

@ -43,7 +43,7 @@ export const formSchema: FormSchema[] = [
field: 'isShow',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_show"
dictCode:"is_true"
},
},
{


jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/controller/StudytourDatePriceController.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/controller/StudytourCollectionController.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.studytourDatePrice.controller;
package org.jeecg.modules.studytourCollection.controller;
import java.util.Arrays;
import java.util.List;
@ -12,8 +12,8 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourDatePrice.entity.StudytourDatePrice;
import org.jeecg.modules.studytourDatePrice.service.IStudytourDatePriceService;
import org.jeecg.modules.studytourCollection.entity.StudytourCollection;
import org.jeecg.modules.studytourCollection.service.IStudytourCollectionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -37,66 +37,66 @@ import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 年龄段价格
* @Description: 活动收藏
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-01
* @Version: V1.0
*/
@Api(tags="年龄段价格表")
@Api(tags="活动收藏表")
@RestController
@RequestMapping("/studytourDatePrice/studytourDatePrice")
@RequestMapping("/studytourCollection/studytourCollection")
@Slf4j
public class StudytourDatePriceController extends JeecgController<StudytourDatePrice, IStudytourDatePriceService> {
public class StudytourCollectionController extends JeecgController<StudytourCollection, IStudytourCollectionService> {
@Autowired
private IStudytourDatePriceService studytourDatePriceService;
private IStudytourCollectionService studytourCollectionService;
/**
* 分页列表查询
*
* @param studytourDatePrice
* @param studytourCollection
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "年龄段价格表-分页列表查询")
@ApiOperation(value="年龄段价格表-分页列表查询", notes="年龄段价格表-分页列表查询")
//@AutoLog(value = "活动收藏表-分页列表查询")
@ApiOperation(value="活动收藏表-分页列表查询", notes="活动收藏表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<StudytourDatePrice>> queryPageList(StudytourDatePrice studytourDatePrice,
public Result<IPage<StudytourCollection>> queryPageList(StudytourCollection studytourCollection,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StudytourDatePrice> queryWrapper = QueryGenerator.initQueryWrapper(studytourDatePrice, req.getParameterMap());
Page<StudytourDatePrice> page = new Page<StudytourDatePrice>(pageNo, pageSize);
IPage<StudytourDatePrice> pageList = studytourDatePriceService.page(page, queryWrapper);
QueryWrapper<StudytourCollection> queryWrapper = QueryGenerator.initQueryWrapper(studytourCollection, req.getParameterMap());
Page<StudytourCollection> page = new Page<StudytourCollection>(pageNo, pageSize);
IPage<StudytourCollection> pageList = studytourCollectionService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param studytourDatePrice
* @param studytourCollection
* @return
*/
@AutoLog(value = "年龄段价格表-添加")
@ApiOperation(value="年龄段价格表-添加", notes="年龄段价格表-添加")
@AutoLog(value = "活动收藏表-添加")
@ApiOperation(value="活动收藏表-添加", notes="活动收藏表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourDatePrice studytourDatePrice) {
studytourDatePriceService.save(studytourDatePrice);
public Result<String> add(@RequestBody StudytourCollection studytourCollection) {
studytourCollectionService.save(studytourCollection);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourDatePrice
* @param studytourCollection
* @return
*/
@AutoLog(value = "年龄段价格表-编辑")
@ApiOperation(value="年龄段价格表-编辑", notes="年龄段价格表-编辑")
@AutoLog(value = "活动收藏表-编辑")
@ApiOperation(value="活动收藏表-编辑", notes="活动收藏表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourDatePrice studytourDatePrice) {
studytourDatePriceService.updateById(studytourDatePrice);
public Result<String> edit(@RequestBody StudytourCollection studytourCollection) {
studytourCollectionService.updateById(studytourCollection);
return Result.OK("编辑成功!");
}
@ -106,11 +106,11 @@ public class StudytourDatePriceController extends JeecgController<StudytourDateP
* @param id
* @return
*/
@AutoLog(value = "年龄段价格表-通过id删除")
@ApiOperation(value="年龄段价格表-通过id删除", notes="年龄段价格表-通过id删除")
@AutoLog(value = "活动收藏表-通过id删除")
@ApiOperation(value="活动收藏表-通过id删除", notes="活动收藏表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourDatePriceService.removeById(id);
studytourCollectionService.removeById(id);
return Result.OK("删除成功!");
}
@ -120,11 +120,11 @@ public class StudytourDatePriceController extends JeecgController<StudytourDateP
* @param ids
* @return
*/
@AutoLog(value = "年龄段价格表-批量删除")
@ApiOperation(value="年龄段价格表-批量删除", notes="年龄段价格表-批量删除")
@AutoLog(value = "活动收藏表-批量删除")
@ApiOperation(value="活动收藏表-批量删除", notes="活动收藏表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourDatePriceService.removeByIds(Arrays.asList(ids.split(",")));
this.studytourCollectionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@ -134,26 +134,26 @@ public class StudytourDatePriceController extends JeecgController<StudytourDateP
* @param id
* @return
*/
//@AutoLog(value = "年龄段价格表-通过id查询")
@ApiOperation(value="年龄段价格表-通过id查询", notes="年龄段价格表-通过id查询")
//@AutoLog(value = "活动收藏表-通过id查询")
@ApiOperation(value="活动收藏表-通过id查询", notes="活动收藏表-通过id查询")
@GetMapping(value = "/queryById")
public Result<StudytourDatePrice> queryById(@RequestParam(name="id",required=true) String id) {
StudytourDatePrice studytourDatePrice = studytourDatePriceService.getById(id);
if(studytourDatePrice==null) {
public Result<StudytourCollection> queryById(@RequestParam(name="id",required=true) String id) {
StudytourCollection studytourCollection = studytourCollectionService.getById(id);
if(studytourCollection==null) {
return Result.error("未找到对应数据");
}
return Result.OK(studytourDatePrice);
return Result.OK(studytourCollection);
}
/**
* 导出excel
*
* @param request
* @param studytourDatePrice
* @param studytourCollection
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourDatePrice studytourDatePrice) {
return super.exportXls(request, studytourDatePrice, StudytourDatePrice.class, "年龄段价格表");
public ModelAndView exportXls(HttpServletRequest request, StudytourCollection studytourCollection) {
return super.exportXls(request, studytourCollection, StudytourCollection.class, "活动收藏表");
}
/**
@ -165,7 +165,7 @@ public class StudytourDatePriceController extends JeecgController<StudytourDateP
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourDatePrice.class);
return super.importExcel(request, response, StudytourCollection.class);
}
}

+ 66
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/entity/StudytourCollection.java View File

@ -0,0 +1,66 @@
package org.jeecg.modules.studytourCollection.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.studytourActivity.entity.StudytourActivity;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 活动收藏表
* @Author: jeecg-boot
* @Date: 2025-09-01
* @Version: V1.0
*/
@Data
@TableName("studytour_collection")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_collection对象", description="活动收藏表")
public class StudytourCollection implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**关联活动id*/
@Excel(name = "关联活动id", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动id")
private java.lang.String activityId;
/**关联用户id*/
@Excel(name = "关联用户id", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "关联用户id")
private java.lang.String userId;
//活动信息
@TableField(exist = false)
StudytourActivity activity;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/mapper/StudytourCollectionMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.studytourCollection.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourCollection.entity.StudytourCollection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 活动收藏表
* @Author: jeecg-boot
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface StudytourCollectionMapper extends BaseMapper<StudytourCollection> {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/mapper/xml/StudytourOrderPersonMapper.xml → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/mapper/xml/StudytourCollectionMapper.xml View File

@ -1,5 +1,5 @@
<?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.jeecg.modules.studytourOrderPerson.mapper.StudytourOrderPersonMapper">
<mapper namespace="org.jeecg.modules.studytourCollection.mapper.StudytourCollectionMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/service/IStudytourCollectionService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.studytourCollection.service;
import org.jeecg.modules.studytourCollection.entity.StudytourCollection;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 活动收藏表
* @Author: jeecg-boot
* @Date: 2025-09-01
* @Version: V1.0
*/
public interface IStudytourCollectionService extends IService<StudytourCollection> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/service/impl/StudytourCollectionServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.studytourCollection.service.impl;
import org.jeecg.modules.studytourCollection.entity.StudytourCollection;
import org.jeecg.modules.studytourCollection.mapper.StudytourCollectionMapper;
import org.jeecg.modules.studytourCollection.service.IStudytourCollectionService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 活动收藏表
* @Author: jeecg-boot
* @Date: 2025-09-01
* @Version: V1.0
*/
@Service
public class StudytourCollectionServiceImpl extends ServiceImpl<StudytourCollectionMapper, StudytourCollection> implements IStudytourCollectionService {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/StudytourOrderReceiptList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/StudytourCollectionList.vue View File

@ -12,7 +12,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单发票信息表')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('活动收藏表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
@ -89,7 +89,7 @@
</a-table>
</div>
<studytour-order-receipt-modal ref="modalForm" @ok="modalFormOk"></studytour-order-receipt-modal>
<studytour-collection-modal ref="modalForm" @ok="modalFormOk"></studytour-collection-modal>
</a-card>
</template>
@ -98,18 +98,18 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourOrderReceiptModal from './modules/StudytourOrderReceiptModal'
import StudytourCollectionModal from './modules/StudytourCollectionModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'StudytourOrderReceiptList',
name: 'StudytourCollectionList',
mixins:[JeecgListMixin, mixinDevice],
components: {
StudytourOrderReceiptModal
StudytourCollectionModal
},
data () {
return {
description: '订单发票信息表管理页面',
description: '活动收藏表管理页面',
//
columns: [
{
@ -123,14 +123,14 @@
}
},
{
title:'发票类型名称',
title:'关联活动id',
align:"center",
dataIndex: 'title'
dataIndex: 'activityId_dictText'
},
{
title:'关联订单id',
title:'关联用户id',
align:"center",
dataIndex: 'orderId_dictText'
dataIndex: 'userId_dictText'
},
{
title: '操作',
@ -142,11 +142,11 @@
}
],
url: {
list: "/studytourOrderReceipt/studytourOrderReceipt/list",
delete: "/studytourOrderReceipt/studytourOrderReceipt/delete",
deleteBatch: "/studytourOrderReceipt/studytourOrderReceipt/deleteBatch",
exportXlsUrl: "/studytourOrderReceipt/studytourOrderReceipt/exportXls",
importExcelUrl: "studytourOrderReceipt/studytourOrderReceipt/importExcel",
list: "/studytourCollection/studytourCollection/list",
delete: "/studytourCollection/studytourCollection/delete",
deleteBatch: "/studytourCollection/studytourCollection/deleteBatch",
exportXlsUrl: "/studytourCollection/studytourCollection/exportXls",
importExcelUrl: "studytourCollection/studytourCollection/importExcel",
},
dictOptions:{},
@ -166,8 +166,8 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'发票类型名称',dictCode:''})
fieldList.push({type:'string',value:'orderId',text:'关联订单id',dictCode:"studytour_order,id,id"})
fieldList.push({type:'sel_search',value:'activityId',text:'关联活动id',dictTable:"studytour_activity", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'userId',text:'关联用户id',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
this.superFieldList = fieldList
}
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/modules/StudytourOrderReceiptForm.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionForm.vue View File

@ -4,13 +4,13 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="发票类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title">
<a-input v-model="model.title" placeholder="请输入发票类型名称" ></a-input>
<a-form-model-item label="关联活动id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-search-select-tag v-model="model.activityId" dict="studytour_activity,title,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联订单id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<j-dict-select-tag type="list" v-model="model.orderId" dictCode="studytour_order,id,id" placeholder="请选择关联订单id" />
<a-form-model-item label="关联用户id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
</a-row>
@ -25,7 +25,7 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'StudytourOrderReceiptForm',
name: 'StudytourCollectionForm',
components: {
},
props: {
@ -52,9 +52,9 @@
validatorRules: {
},
url: {
add: "/studytourOrderReceipt/studytourOrderReceipt/add",
edit: "/studytourOrderReceipt/studytourOrderReceipt/edit",
queryById: "/studytourOrderReceipt/studytourOrderReceipt/queryById"
add: "/studytourCollection/studytourCollection/add",
edit: "/studytourCollection/studytourCollection/edit",
queryById: "/studytourCollection/studytourCollection/queryById"
}
}
},

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/modules/StudytourOrderPersonModal.Style#Drawer.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionModal.Style#Drawer.vue View File

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<studytour-order-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-order-person-form>
<studytour-collection-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-collection-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@ -17,12 +17,12 @@
<script>
import StudytourOrderPersonForm from './StudytourOrderPersonForm'
import StudytourCollectionForm from './StudytourCollectionForm'
export default {
name: 'StudytourOrderPersonModal',
name: 'StudytourCollectionModal',
components: {
StudytourOrderPersonForm
StudytourCollectionForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/modules/StudytourOrderPersonModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue/modules/StudytourCollectionModal.vue View File

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-order-person-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-order-person-form>
<studytour-collection-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-collection-form>
</j-modal>
</template>
<script>
import StudytourOrderPersonForm from './StudytourOrderPersonForm'
import StudytourCollectionForm from './StudytourCollectionForm'
export default {
name: 'StudytourOrderPersonModal',
name: 'StudytourCollectionModal',
components: {
StudytourOrderPersonForm
StudytourCollectionForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue3/StudytourOrderPerson.api.ts → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollection.api.ts View File

@ -2,13 +2,13 @@ import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/studytourOrderPerson/studytourOrderPerson/list',
save='/studytourOrderPerson/studytourOrderPerson/add',
edit='/studytourOrderPerson/studytourOrderPerson/edit',
deleteOne = '/studytourOrderPerson/studytourOrderPerson/delete',
deleteBatch = '/studytourOrderPerson/studytourOrderPerson/deleteBatch',
importExcel = '/studytourOrderPerson/studytourOrderPerson/importExcel',
exportXls = '/studytourOrderPerson/studytourOrderPerson/exportXls',
list = '/studytourCollection/studytourCollection/list',
save='/studytourCollection/studytourCollection/add',
edit='/studytourCollection/studytourCollection/edit',
deleteOne = '/studytourCollection/studytourCollection/delete',
deleteBatch = '/studytourCollection/studytourCollection/deleteBatch',
importExcel = '/studytourCollection/studytourCollection/importExcel',
exportXls = '/studytourCollection/studytourCollection/exportXls',
}
/**
* api

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/StudytourOrderReceipt.data.ts → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollection.data.ts View File

@ -5,14 +5,14 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '发票类型名称',
title: '关联活动id',
align:"center",
dataIndex: 'title'
dataIndex: 'activityId_dictText'
},
{
title: '关联订单id',
title: '关联用户id',
align:"center",
dataIndex: 'orderId_dictText'
dataIndex: 'userId_dictText'
},
];
//查询数据
@ -21,16 +21,19 @@ export const searchFormSchema: FormSchema[] = [
//表单数据
export const formSchema: FormSchema[] = [
{
label: '发票类型名称',
field: 'title',
component: 'Input',
label: '关联活动id',
field: 'activityId',
component: 'JSearchSelect',
componentProps:{
dict:"studytour_activity,title,id"
},
},
{
label: '关联订单id',
field: 'orderId',
component: 'JDictSelectTag',
label: '关联用户id',
field: 'userId',
component: 'JSearchSelect',
componentProps:{
dictCode:"studytour_order,id,id"
},
dict:"han_hai_member,nick_name,id"
},
},
];

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue3/StudytourOrderPersonList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/StudytourCollectionList.vue View File

@ -35,25 +35,25 @@
</template>
</BasicTable>
<!-- 表单区域 -->
<StudytourOrderPersonModal @register="registerModal" @success="handleSuccess"></StudytourOrderPersonModal>
<StudytourCollectionModal @register="registerModal" @success="handleSuccess"></StudytourCollectionModal>
</div>
</template>
<script lang="ts" name="studytourOrderPerson-studytourOrderPerson" setup>
<script lang="ts" name="studytourCollection-studytourCollection" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import StudytourOrderPersonModal from './components/StudytourOrderPersonModal.vue'
import {columns, searchFormSchema} from './studytourOrderPerson.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourOrderPerson.api';
import StudytourCollectionModal from './components/StudytourCollectionModal.vue'
import {columns, searchFormSchema} from './studytourCollection.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourCollection.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '订单人员表',
title: '活动收藏表',
api: list,
columns,
canResize:false,
@ -70,7 +70,7 @@
},
},
exportConfig: {
name:"订单人员表",
name:"活动收藏表",
url: getExportUrl,
},
importConfig: {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue3/components/StudytourOrderPersonModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCollection/vue3/components/StudytourCollectionModal.vue View File

@ -8,8 +8,8 @@
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../studytourOrderPerson.data';
import {saveOrUpdate} from '../studytourOrderPerson.api';
import {formSchema} from '../studytourCollection.data';
import {saveOrUpdate} from '../studytourCollection.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/controller/StudytourOrderPersonController.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/controller/StudytourConfigController.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.studytourOrderPerson.controller;
package org.jeecg.modules.studytourConfig.controller;
import java.util.Arrays;
import java.util.List;
@ -12,8 +12,8 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourOrderPerson.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrderPerson.service.IStudytourOrderPersonService;
import org.jeecg.modules.studytourConfig.entity.StudytourConfig;
import org.jeecg.modules.studytourConfig.service.IStudytourConfigService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -37,66 +37,66 @@ import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 订单人员
* @Description: 配置信息
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@Api(tags="订单人员表")
@Api(tags="配置信息表")
@RestController
@RequestMapping("/studytourOrderPerson/studytourOrderPerson")
@RequestMapping("/studytourConfig/studytourConfig")
@Slf4j
public class StudytourOrderPersonController extends JeecgController<StudytourOrderPerson, IStudytourOrderPersonService> {
public class StudytourConfigController extends JeecgController<StudytourConfig, IStudytourConfigService> {
@Autowired
private IStudytourOrderPersonService studytourOrderPersonService;
private IStudytourConfigService studytourConfigService;
/**
* 分页列表查询
*
* @param studytourOrderPerson
* @param studytourConfig
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "订单人员表-分页列表查询")
@ApiOperation(value="订单人员表-分页列表查询", notes="订单人员表-分页列表查询")
//@AutoLog(value = "配置信息表-分页列表查询")
@ApiOperation(value="配置信息表-分页列表查询", notes="配置信息表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<StudytourOrderPerson>> queryPageList(StudytourOrderPerson studytourOrderPerson,
public Result<IPage<StudytourConfig>> queryPageList(StudytourConfig studytourConfig,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StudytourOrderPerson> queryWrapper = QueryGenerator.initQueryWrapper(studytourOrderPerson, req.getParameterMap());
Page<StudytourOrderPerson> page = new Page<StudytourOrderPerson>(pageNo, pageSize);
IPage<StudytourOrderPerson> pageList = studytourOrderPersonService.page(page, queryWrapper);
QueryWrapper<StudytourConfig> queryWrapper = QueryGenerator.initQueryWrapper(studytourConfig, req.getParameterMap());
Page<StudytourConfig> page = new Page<StudytourConfig>(pageNo, pageSize);
IPage<StudytourConfig> pageList = studytourConfigService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param studytourOrderPerson
* @param studytourConfig
* @return
*/
@AutoLog(value = "订单人员表-添加")
@ApiOperation(value="订单人员表-添加", notes="订单人员表-添加")
@AutoLog(value = "配置信息表-添加")
@ApiOperation(value="配置信息表-添加", notes="配置信息表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourOrderPerson studytourOrderPerson) {
studytourOrderPersonService.save(studytourOrderPerson);
public Result<String> add(@RequestBody StudytourConfig studytourConfig) {
studytourConfigService.save(studytourConfig);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourOrderPerson
* @param studytourConfig
* @return
*/
@AutoLog(value = "订单人员表-编辑")
@ApiOperation(value="订单人员表-编辑", notes="订单人员表-编辑")
@AutoLog(value = "配置信息表-编辑")
@ApiOperation(value="配置信息表-编辑", notes="配置信息表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourOrderPerson studytourOrderPerson) {
studytourOrderPersonService.updateById(studytourOrderPerson);
public Result<String> edit(@RequestBody StudytourConfig studytourConfig) {
studytourConfigService.updateById(studytourConfig);
return Result.OK("编辑成功!");
}
@ -106,11 +106,11 @@ public class StudytourOrderPersonController extends JeecgController<StudytourOrd
* @param id
* @return
*/
@AutoLog(value = "订单人员表-通过id删除")
@ApiOperation(value="订单人员表-通过id删除", notes="订单人员表-通过id删除")
@AutoLog(value = "配置信息表-通过id删除")
@ApiOperation(value="配置信息表-通过id删除", notes="配置信息表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourOrderPersonService.removeById(id);
studytourConfigService.removeById(id);
return Result.OK("删除成功!");
}
@ -120,11 +120,11 @@ public class StudytourOrderPersonController extends JeecgController<StudytourOrd
* @param ids
* @return
*/
@AutoLog(value = "订单人员表-批量删除")
@ApiOperation(value="订单人员表-批量删除", notes="订单人员表-批量删除")
@AutoLog(value = "配置信息表-批量删除")
@ApiOperation(value="配置信息表-批量删除", notes="配置信息表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourOrderPersonService.removeByIds(Arrays.asList(ids.split(",")));
this.studytourConfigService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@ -134,26 +134,26 @@ public class StudytourOrderPersonController extends JeecgController<StudytourOrd
* @param id
* @return
*/
//@AutoLog(value = "订单人员表-通过id查询")
@ApiOperation(value="订单人员表-通过id查询", notes="订单人员表-通过id查询")
//@AutoLog(value = "配置信息表-通过id查询")
@ApiOperation(value="配置信息表-通过id查询", notes="配置信息表-通过id查询")
@GetMapping(value = "/queryById")
public Result<StudytourOrderPerson> queryById(@RequestParam(name="id",required=true) String id) {
StudytourOrderPerson studytourOrderPerson = studytourOrderPersonService.getById(id);
if(studytourOrderPerson==null) {
public Result<StudytourConfig> queryById(@RequestParam(name="id",required=true) String id) {
StudytourConfig studytourConfig = studytourConfigService.getById(id);
if(studytourConfig==null) {
return Result.error("未找到对应数据");
}
return Result.OK(studytourOrderPerson);
return Result.OK(studytourConfig);
}
/**
* 导出excel
*
* @param request
* @param studytourOrderPerson
* @param studytourConfig
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourOrderPerson studytourOrderPerson) {
return super.exportXls(request, studytourOrderPerson, StudytourOrderPerson.class, "订单人员表");
public ModelAndView exportXls(HttpServletRequest request, StudytourConfig studytourConfig) {
return super.exportXls(request, studytourConfig, StudytourConfig.class, "配置信息表");
}
/**
@ -165,7 +165,7 @@ public class StudytourOrderPersonController extends JeecgController<StudytourOrd
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourOrderPerson.class);
return super.importExcel(request, response, StudytourConfig.class);
}
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/entity/StudytourOrderReceipt.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/entity/StudytourConfig.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.studytourOrderReceipt.entity;
package org.jeecg.modules.studytourConfig.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
@ -18,17 +18,17 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 订单发票信息表
* @Description: 配置信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-08
* @Version: V1.0
*/
@Data
@TableName("studytour_order_receipt")
@TableName("studytour_config")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_order_receipt对象", description="订单发票信息表")
public class StudytourOrderReceipt implements Serializable {
@ApiModel(value="studytour_config对象", description="配置信息表")
public class StudytourConfig implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@ -47,13 +47,24 @@ public class StudytourOrderReceipt implements Serializable {
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**发票类型名称*/
@Excel(name = "发票类型名称", width = 15)
@ApiModelProperty(value = "发票类型名称")
private java.lang.String title;
/**关联订单id*/
@Excel(name = "关联订单id", width = 15, dictTable = "studytour_order", dicText = "id", dicCode = "id")
@Dict(dictTable = "studytour_order", dicText = "id", dicCode = "id")
@ApiModelProperty(value = "关联订单id")
private java.lang.String orderId;
/**参数编码*/
@Excel(name = "参数编码", width = 15)
@ApiModelProperty(value = "参数编码")
private java.lang.String paramCode;
/**参数值_普通文本*/
@Excel(name = "参数值_普通文本", width = 15)
@ApiModelProperty(value = "参数值_普通文本")
private java.lang.String paramText;
/**参数值_图片*/
@Excel(name = "参数值_图片", width = 15)
@ApiModelProperty(value = "参数值_图片")
private java.lang.String paramImage;
/**参数值_富文本*/
@Excel(name = "参数值_富文本", width = 15)
@ApiModelProperty(value = "参数值_富文本")
private java.lang.String paramTextarea;
/**参数描述*/
@Excel(name = "参数描述", width = 15)
@ApiModelProperty(value = "参数描述")
private java.lang.String paramDesc;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/mapper/StudytourConfigMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.studytourConfig.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourConfig.entity.StudytourConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 配置信息表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface StudytourConfigMapper extends BaseMapper<StudytourConfig> {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/mapper/xml/StudytourDatePriceMapper.xml → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/mapper/xml/StudytourConfigMapper.xml View File

@ -1,5 +1,5 @@
<?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.jeecg.modules.studytourDatePrice.mapper.StudytourDatePriceMapper">
<mapper namespace="org.jeecg.modules.studytourConfig.mapper.StudytourConfigMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/service/IStudytourConfigService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.studytourConfig.service;
import org.jeecg.modules.studytourConfig.entity.StudytourConfig;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 配置信息表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
public interface IStudytourConfigService extends IService<StudytourConfig> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/service/impl/StudytourConfigServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.studytourConfig.service.impl;
import org.jeecg.modules.studytourConfig.entity.StudytourConfig;
import org.jeecg.modules.studytourConfig.mapper.StudytourConfigMapper;
import org.jeecg.modules.studytourConfig.service.IStudytourConfigService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 配置信息表
* @Author: jeecg-boot
* @Date: 2025-09-08
* @Version: V1.0
*/
@Service
public class StudytourConfigServiceImpl extends ServiceImpl<StudytourConfigMapper, StudytourConfig> implements IStudytourConfigService {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue/StudytourDatePriceList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/StudytourConfigList.vue View File

@ -12,7 +12,7 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('年龄段价格表')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('配置信息表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
@ -89,7 +89,7 @@
</a-table>
</div>
<studytour-date-price-modal ref="modalForm" @ok="modalFormOk"></studytour-date-price-modal>
<studytour-config-modal ref="modalForm" @ok="modalFormOk"></studytour-config-modal>
</a-card>
</template>
@ -98,17 +98,17 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourDatePriceModal from './modules/StudytourDatePriceModal'
import StudytourConfigModal from './modules/StudytourConfigModal'
export default {
name: 'StudytourDatePriceList',
name: 'StudytourConfigList',
mixins:[JeecgListMixin, mixinDevice],
components: {
StudytourDatePriceModal
StudytourConfigModal
},
data () {
return {
description: '年龄段价格表管理页面',
description: '配置信息表管理页面',
//
columns: [
{
@ -122,19 +122,31 @@
}
},
{
title:'年龄段id',
title:'参数编码',
align:"center",
dataIndex: 'periodId'
dataIndex: 'paramCode'
},
{
title:'单人价格',
title:'参数值_普通文本',
align:"center",
dataIndex: 'price'
dataIndex: 'paramText'
},
{
title:'关联团期id',
title:'参数值_图片',
align:"center",
dataIndex: 'dateId'
dataIndex: 'paramImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'参数值_富文本',
align:"center",
dataIndex: 'paramTextarea',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title:'参数描述',
align:"center",
dataIndex: 'paramDesc'
},
{
title: '操作',
@ -146,11 +158,11 @@
}
],
url: {
list: "/studytourDatePrice/studytourDatePrice/list",
delete: "/studytourDatePrice/studytourDatePrice/delete",
deleteBatch: "/studytourDatePrice/studytourDatePrice/deleteBatch",
exportXlsUrl: "/studytourDatePrice/studytourDatePrice/exportXls",
importExcelUrl: "studytourDatePrice/studytourDatePrice/importExcel",
list: "/studytourConfig/studytourConfig/list",
delete: "/studytourConfig/studytourConfig/delete",
deleteBatch: "/studytourConfig/studytourConfig/deleteBatch",
exportXlsUrl: "/studytourConfig/studytourConfig/exportXls",
importExcelUrl: "studytourConfig/studytourConfig/importExcel",
},
dictOptions:{},
@ -170,9 +182,11 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'periodId',text:'年龄段id',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'单人价格',dictCode:''})
fieldList.push({type:'string',value:'dateId',text:'关联团期id',dictCode:''})
fieldList.push({type:'string',value:'paramCode',text:'参数编码',dictCode:''})
fieldList.push({type:'Text',value:'paramText',text:'参数值_普通文本',dictCode:''})
fieldList.push({type:'Text',value:'paramImage',text:'参数值_图片',dictCode:''})
fieldList.push({type:'Text',value:'paramTextarea',text:'参数值_富文本',dictCode:''})
fieldList.push({type:'Text',value:'paramDesc',text:'参数描述',dictCode:''})
this.superFieldList = fieldList
}
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue/modules/StudytourDatePriceForm.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigForm.vue View File

@ -4,18 +4,28 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="年龄段id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="periodId">
<a-input v-model="model.periodId" placeholder="请输入年龄段id" ></a-input>
<a-form-model-item label="参数编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paramCode">
<a-input v-model="model.paramCode" placeholder="请输入参数编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单人价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入单人价格" style="width: 100%" />
<a-form-model-item label="参数值_普通文本" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paramText">
<a-input v-model="model.paramText" placeholder="请输入参数值_普通文本" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联团期id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dateId">
<a-input v-model="model.dateId" placeholder="请输入关联团期id" ></a-input>
<a-form-model-item label="参数值_图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paramImage">
<j-image-upload isMultiple v-model="model.paramImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="参数值_富文本" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paramTextarea">
<j-editor v-model="model.paramTextarea" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="参数描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paramDesc">
<a-input v-model="model.paramDesc" placeholder="请输入参数描述" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
@ -30,7 +40,7 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'StudytourDatePriceForm',
name: 'StudytourConfigForm',
components: {
},
props: {
@ -57,9 +67,9 @@
validatorRules: {
},
url: {
add: "/studytourDatePrice/studytourDatePrice/add",
edit: "/studytourDatePrice/studytourDatePrice/edit",
queryById: "/studytourDatePrice/studytourDatePrice/queryById"
add: "/studytourConfig/studytourConfig/add",
edit: "/studytourConfig/studytourConfig/edit",
queryById: "/studytourConfig/studytourConfig/queryById"
}
}
},

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue/modules/StudytourDatePriceModal.Style#Drawer.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigModal.Style#Drawer.vue View File

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<studytour-date-price-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-date-price-form>
<studytour-config-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-config-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@ -17,12 +17,12 @@
<script>
import StudytourDatePriceForm from './StudytourDatePriceForm'
import StudytourConfigForm from './StudytourConfigForm'
export default {
name: 'StudytourDatePriceModal',
name: 'StudytourConfigModal',
components: {
StudytourDatePriceForm
StudytourConfigForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue/modules/StudytourDatePriceModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue/modules/StudytourConfigModal.vue View File

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-date-price-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-date-price-form>
<studytour-config-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-config-form>
</j-modal>
</template>
<script>
import StudytourDatePriceForm from './StudytourDatePriceForm'
import StudytourConfigForm from './StudytourConfigForm'
export default {
name: 'StudytourDatePriceModal',
name: 'StudytourConfigModal',
components: {
StudytourDatePriceForm
StudytourConfigForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue3/StudytourDatePrice.api.ts → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfig.api.ts View File

@ -2,13 +2,13 @@ import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/studytourDatePrice/studytourDatePrice/list',
save='/studytourDatePrice/studytourDatePrice/add',
edit='/studytourDatePrice/studytourDatePrice/edit',
deleteOne = '/studytourDatePrice/studytourDatePrice/delete',
deleteBatch = '/studytourDatePrice/studytourDatePrice/deleteBatch',
importExcel = '/studytourDatePrice/studytourDatePrice/importExcel',
exportXls = '/studytourDatePrice/studytourDatePrice/exportXls',
list = '/studytourConfig/studytourConfig/list',
save='/studytourConfig/studytourConfig/add',
edit='/studytourConfig/studytourConfig/edit',
deleteOne = '/studytourConfig/studytourConfig/delete',
deleteBatch = '/studytourConfig/studytourConfig/deleteBatch',
importExcel = '/studytourConfig/studytourConfig/importExcel',
exportXls = '/studytourConfig/studytourConfig/exportXls',
}
/**
* api

+ 67
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfig.data.ts View File

@ -0,0 +1,67 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '参数编码',
align:"center",
dataIndex: 'paramCode'
},
{
title: '参数值_普通文本',
align:"center",
dataIndex: 'paramText'
},
{
title: '参数值_图片',
align:"center",
dataIndex: 'paramImage',
customRender:render.renderAvatar,
},
{
title: '参数值_富文本',
align:"center",
dataIndex: 'paramTextarea',
slots: { customRender: 'htmlSlot' },
},
{
title: '参数描述',
align:"center",
dataIndex: 'paramDesc'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '参数编码',
field: 'paramCode',
component: 'Input',
},
{
label: '参数值_普通文本',
field: 'paramText',
component: 'Input',
},
{
label: '参数值_图片',
field: 'paramImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '参数值_富文本',
field: 'paramTextarea',
component: 'JCodeEditor', //TODO String后缀暂未添加
},
{
label: '参数描述',
field: 'paramDesc',
component: 'Input',
},
];

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue3/StudytourDatePriceList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/StudytourConfigList.vue View File

@ -35,25 +35,25 @@
</template>
</BasicTable>
<!-- 表单区域 -->
<StudytourDatePriceModal @register="registerModal" @success="handleSuccess"></StudytourDatePriceModal>
<StudytourConfigModal @register="registerModal" @success="handleSuccess"></StudytourConfigModal>
</div>
</template>
<script lang="ts" name="studytourDatePrice-studytourDatePrice" setup>
<script lang="ts" name="studytourConfig-studytourConfig" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import StudytourDatePriceModal from './components/StudytourDatePriceModal.vue'
import {columns, searchFormSchema} from './studytourDatePrice.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourDatePrice.api';
import StudytourConfigModal from './components/StudytourConfigModal.vue'
import {columns, searchFormSchema} from './studytourConfig.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourConfig.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '年龄段价格表',
title: '配置信息表',
api: list,
columns,
canResize:false,
@ -70,7 +70,7 @@
},
},
exportConfig: {
name:"年龄段价格表",
name:"配置信息表",
url: getExportUrl,
},
importConfig: {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue3/components/StudytourDatePriceModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourConfig/vue3/components/StudytourConfigModal.vue View File

@ -8,8 +8,8 @@
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../studytourDatePrice.data';
import {saveOrUpdate} from '../studytourDatePrice.api';
import {formSchema} from '../studytourConfig.data';
import {saveOrUpdate} from '../studytourConfig.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);

+ 0
- 17
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/mapper/StudytourDatePriceMapper.java View File

@ -1,17 +0,0 @@
package org.jeecg.modules.studytourDatePrice.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourDatePrice.entity.StudytourDatePrice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
public interface StudytourDatePriceMapper extends BaseMapper<StudytourDatePrice> {
}

+ 0
- 14
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/service/IStudytourDatePriceService.java View File

@ -1,14 +0,0 @@
package org.jeecg.modules.studytourDatePrice.service;
import org.jeecg.modules.studytourDatePrice.entity.StudytourDatePrice;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
public interface IStudytourDatePriceService extends IService<StudytourDatePrice> {
}

+ 0
- 19
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/service/impl/StudytourDatePriceServiceImpl.java View File

@ -1,19 +0,0 @@
package org.jeecg.modules.studytourDatePrice.service.impl;
import org.jeecg.modules.studytourDatePrice.entity.StudytourDatePrice;
import org.jeecg.modules.studytourDatePrice.mapper.StudytourDatePriceMapper;
import org.jeecg.modules.studytourDatePrice.service.IStudytourDatePriceService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 年龄段价格表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
@Service
public class StudytourDatePriceServiceImpl extends ServiceImpl<StudytourDatePriceMapper, StudytourDatePrice> implements IStudytourDatePriceService {
}

+ 0
- 43
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourDatePrice/vue3/StudytourDatePrice.data.ts View File

@ -1,43 +0,0 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '年龄段id',
align:"center",
dataIndex: 'periodId'
},
{
title: '单人价格',
align:"center",
dataIndex: 'price'
},
{
title: '关联团期id',
align:"center",
dataIndex: 'dateId'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '年龄段id',
field: 'periodId',
component: 'Input',
},
{
label: '单人价格',
field: 'price',
component: 'InputNumber',
},
{
label: '关联团期id',
field: 'dateId',
component: 'Input',
},
];

+ 119
- 29
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/controller/StudytourOrderController.java View File

@ -1,36 +1,42 @@
package org.jeecg.modules.studytourOrder.controller;
import java.io.UnsupportedEncodingException;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourOrder.entity.StudytourOrder;
import org.jeecg.modules.studytourOrder.service.IStudytourOrderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.entity.StudytourOrder;
import org.jeecg.modules.studytourOrder.vo.StudytourOrderPage;
import org.jeecg.modules.studytourOrder.service.IStudytourOrderService;
import org.jeecg.modules.studytourOrder.service.IStudytourOrderPersonService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -39,16 +45,18 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
@Api(tags="订单信息表")
@RestController
@RequestMapping("/studytourOrder/studytourOrder")
@Slf4j
public class StudytourOrderController extends JeecgController<StudytourOrder, IStudytourOrderService> {
public class StudytourOrderController {
@Autowired
private IStudytourOrderService studytourOrderService;
@Autowired
private IStudytourOrderPersonService studytourOrderPersonService;
/**
* 分页列表查询
@ -75,28 +83,36 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
/**
* 添加
*
* @param studytourOrder
* @param studytourOrderPage
* @return
*/
@AutoLog(value = "订单信息表-添加")
@ApiOperation(value="订单信息表-添加", notes="订单信息表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourOrder studytourOrder) {
studytourOrderService.save(studytourOrder);
public Result<String> add(@RequestBody StudytourOrderPage studytourOrderPage) {
StudytourOrder studytourOrder = new StudytourOrder();
BeanUtils.copyProperties(studytourOrderPage, studytourOrder);
studytourOrderService.saveMain(studytourOrder, studytourOrderPage.getStudytourOrderPersonList());
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourOrder
* @param studytourOrderPage
* @return
*/
@AutoLog(value = "订单信息表-编辑")
@ApiOperation(value="订单信息表-编辑", notes="订单信息表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourOrder studytourOrder) {
studytourOrderService.updateById(studytourOrder);
public Result<String> edit(@RequestBody StudytourOrderPage studytourOrderPage) {
StudytourOrder studytourOrder = new StudytourOrder();
BeanUtils.copyProperties(studytourOrderPage, studytourOrder);
StudytourOrder studytourOrderEntity = studytourOrderService.getById(studytourOrder.getId());
if(studytourOrderEntity==null) {
return Result.error("未找到对应数据");
}
studytourOrderService.updateMain(studytourOrder, studytourOrderPage.getStudytourOrderPersonList());
return Result.OK("编辑成功!");
}
@ -110,7 +126,7 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
@ApiOperation(value="订单信息表-通过id删除", notes="订单信息表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourOrderService.removeById(id);
studytourOrderService.delMain(id);
return Result.OK("删除成功!");
}
@ -124,8 +140,8 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
@ApiOperation(value="订单信息表-批量删除", notes="订单信息表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourOrderService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
this.studytourOrderService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功");
}
/**
@ -143,6 +159,21 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
return Result.error("未找到对应数据");
}
return Result.OK(studytourOrder);
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "订单人员表通过主表ID查询")
@ApiOperation(value="订单人员表主表ID查询", notes="订单人员表-通主表ID查询")
@GetMapping(value = "/queryStudytourOrderPersonByMainId")
public Result<List<StudytourOrderPerson>> queryStudytourOrderPersonListByMainId(@RequestParam(name="id",required=true) String id) {
List<StudytourOrderPerson> studytourOrderPersonList = studytourOrderPersonService.selectByMainId(id);
return Result.OK(studytourOrderPersonList);
}
/**
@ -153,11 +184,43 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourOrder studytourOrder) {
return super.exportXls(request, studytourOrder, StudytourOrder.class, "订单信息表");
// Step.1 组装查询条件查询数据
QueryWrapper<StudytourOrder> queryWrapper = QueryGenerator.initQueryWrapper(studytourOrder, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//Step.2 获取导出数据
List<StudytourOrder> queryList = studytourOrderService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
List<StudytourOrder> studytourOrderList = new ArrayList<StudytourOrder>();
if(oConvertUtils.isEmpty(selections)) {
studytourOrderList = queryList;
}else {
List<String> selectionList = Arrays.asList(selections.split(","));
studytourOrderList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
// Step.3 组装pageList
List<StudytourOrderPage> pageList = new ArrayList<StudytourOrderPage>();
for (StudytourOrder main : studytourOrderList) {
StudytourOrderPage vo = new StudytourOrderPage();
BeanUtils.copyProperties(main, vo);
List<StudytourOrderPerson> studytourOrderPersonList = studytourOrderPersonService.selectByMainId(main.getId());
vo.setStudytourOrderPersonList(studytourOrderPersonList);
pageList.add(vo);
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "订单信息表列表");
mv.addObject(NormalExcelConstants.CLASS, StudytourOrderPage.class);
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("订单信息表数据", "导出人:"+sysUser.getRealname(), "订单信息表"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
/**
* 通过excel导入数据
* 通过excel导入数据
*
* @param request
* @param response
@ -165,7 +228,34 @@ public class StudytourOrderController extends JeecgController<StudytourOrder, IS
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourOrder.class);
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile file = entity.getValue();// 获取上传文件对象
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<StudytourOrderPage> list = ExcelImportUtil.importExcel(file.getInputStream(), StudytourOrderPage.class, params);
for (StudytourOrderPage page : list) {
StudytourOrder po = new StudytourOrder();
BeanUtils.copyProperties(page, po);
studytourOrderService.saveMain(po, page.getStudytourOrderPersonList());
}
return Result.OK("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
log.error(e.getMessage(),e);
return Result.error("文件导入失败:"+e.getMessage());
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.OK("文件导入失败!");
}
}

+ 27
- 13
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/entity/StudytourOrder.java View File

@ -3,8 +3,8 @@ package org.jeecg.modules.studytourOrder.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -14,20 +14,16 @@ import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
@ApiModel(value="studytour_order对象", description="订单信息表")
@Data
@TableName("studytour_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_order对象", description="订单信息表")
public class StudytourOrder implements Serializable {
private static final long serialVersionUID = 1L;
@ -83,18 +79,26 @@ public class StudytourOrder implements Serializable {
@Excel(name = "优惠券优惠金额", width = 15)
@ApiModelProperty(value = "优惠券优惠金额")
private java.math.BigDecimal discount;
/**支付金额*/
@Excel(name = "支付金额", width = 15)
@ApiModelProperty(value = "支付金额")
private java.math.BigDecimal payAmount;
/**支付时间*/
@Excel(name = "支付时间", width = 15)
@ApiModelProperty(value = "支付时间")
private java.util.Date payTime;
/**关联优惠券id*/
@Excel(name = "关联优惠券id", width = 15)
@ApiModelProperty(value = "关联优惠券id")
private java.lang.String couponId;
/**发票类型*/
@Excel(name = "发票类型", width = 15, dicCode = "receipt_type")
@Dict(dicCode = "receipt_type")
@Dict(dicCode = "receipt_type")
@ApiModelProperty(value = "发票类型")
private java.lang.String receiptId;
/**订单状态*/
@Excel(name = "订单状态", width = 15, dicCode = "order_status")
@Dict(dicCode = "order_status")
@Dict(dicCode = "order_status")
@ApiModelProperty(value = "订单状态")
private java.lang.String status;
/**活动标题*/
@ -109,9 +113,19 @@ public class StudytourOrder implements Serializable {
@Excel(name = "活动标签", width = 15)
@ApiModelProperty(value = "活动标签")
private java.lang.String activityTag;
/**关联活动id*/
@Excel(name = "关联活动id", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动id")
/**关联活动*/
@Excel(name = "关联活动", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动")
private java.lang.String activityId;
/**关联用户*/
@Excel(name = "关联用户", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "关联用户")
private java.lang.String userId;
//出行人列表
@TableField(exist = false)
@ApiModelProperty(value = "出行人id(以;分隔)")
String tourisIds;
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/entity/StudytourOrderPerson.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/entity/StudytourOrderPerson.java View File

@ -1,9 +1,6 @@
package org.jeecg.modules.studytourOrderPerson.entity;
package org.jeecg.modules.studytourOrder.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@ -11,23 +8,20 @@ import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.UnsupportedEncodingException;
/**
* @Description: 订单人员表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
@ApiModel(value="studytour_order_person对象", description="订单人员表")
@Data
@TableName("studytour_order_person")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_order_person对象", description="订单人员表")
public class StudytourOrderPerson implements Serializable {
private static final long serialVersionUID = 1L;
@ -69,12 +63,9 @@ public class StudytourOrderPerson implements Serializable {
private java.math.BigDecimal price;
/**关联人员id*/
@Excel(name = "关联人员id", width = 15, dictTable = "studytour_person", dicText = "name", dicCode = "id")
@Dict(dictTable = "studytour_person", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "关联人员id")
private java.lang.String personId;
/**关联订单id*/
@Excel(name = "关联订单id", width = 15, dictTable = "studytour_order", dicText = "id", dicCode = "id")
@Dict(dictTable = "studytour_order", dicText = "id", dicCode = "id")
@ApiModelProperty(value = "关联订单id")
private java.lang.String orderId;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/StudytourOrderMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
public interface StudytourOrderMapper extends BaseMapper<StudytourOrder> {


jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/mapper/StudytourOrderPersonMapper.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/StudytourOrderPersonMapper.java View File

@ -1,17 +1,19 @@
package org.jeecg.modules.studytourOrderPerson.mapper;
package org.jeecg.modules.studytourOrder.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourOrderPerson.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* @Description: 订单人员表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
public interface StudytourOrderPersonMapper extends BaseMapper<StudytourOrderPerson> {
public boolean deleteByMainId(@Param("mainId") String mainId);
public List<StudytourOrderPerson> selectByMainId(@Param("mainId") String mainId);
}

+ 16
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/mapper/xml/StudytourOrderPersonMapper.xml View File

@ -0,0 +1,16 @@
<?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.jeecg.modules.studytourOrder.mapper.StudytourOrderPersonMapper">
<delete id="deleteByMainId" parameterType="java.lang.String">
DELETE
FROM studytour_order_person
WHERE
order_id = #{mainId} </delete>
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson">
SELECT *
FROM studytour_order_person
WHERE
order_id = #{mainId} </select>
</mapper>

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/service/IStudytourOrderPersonService.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/IStudytourOrderPersonService.java View File

@ -1,14 +1,16 @@
package org.jeecg.modules.studytourOrderPerson.service;
package org.jeecg.modules.studytourOrder.service;
import org.jeecg.modules.studytourOrderPerson.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 订单人员表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
public interface IStudytourOrderPersonService extends IService<StudytourOrderPerson> {
public List<StudytourOrderPerson> selectByMainId(String mainId);
}

+ 27
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/IStudytourOrderService.java View File

@ -1,14 +1,40 @@
package org.jeecg.modules.studytourOrder.service;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.entity.StudytourOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
public interface IStudytourOrderService extends IService<StudytourOrder> {
/**
* 添加一对多
*
*/
public void saveMain(StudytourOrder studytourOrder,List<StudytourOrderPerson> studytourOrderPersonList) ;
/**
* 修改一对多
*
*/
public void updateMain(StudytourOrder studytourOrder,List<StudytourOrderPerson> studytourOrderPersonList);
/**
* 删除一对多
*/
public void delMain (String id);
/**
* 批量删除一对多
*/
public void delBatchMain (Collection<? extends Serializable> idList);
}

+ 27
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/impl/StudytourOrderPersonServiceImpl.java View File

@ -0,0 +1,27 @@
package org.jeecg.modules.studytourOrder.service.impl;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.mapper.StudytourOrderPersonMapper;
import org.jeecg.modules.studytourOrder.service.IStudytourOrderPersonService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description: 订单人员表
* @Author: jeecg-boot
* @Date: 2025-09-10
* @Version: V1.0
*/
@Service
public class StudytourOrderPersonServiceImpl extends ServiceImpl<StudytourOrderPersonMapper, StudytourOrderPerson> implements IStudytourOrderPersonService {
@Autowired
private StudytourOrderPersonMapper studytourOrderPersonMapper;
@Override
public List<StudytourOrderPerson> selectByMainId(String mainId) {
return studytourOrderPersonMapper.selectByMainId(mainId);
}
}

+ 60
- 2
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/service/impl/StudytourOrderServiceImpl.java View File

@ -1,19 +1,77 @@
package org.jeecg.modules.studytourOrder.service.impl;
import org.jeecg.modules.studytourOrder.entity.StudytourOrder;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrder.mapper.StudytourOrderPersonMapper;
import org.jeecg.modules.studytourOrder.mapper.StudytourOrderMapper;
import org.jeecg.modules.studytourOrder.service.IStudytourOrderService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.io.Serializable;
import java.util.List;
import java.util.Collection;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-10
* @Version: V1.0
*/
@Service
public class StudytourOrderServiceImpl extends ServiceImpl<StudytourOrderMapper, StudytourOrder> implements IStudytourOrderService {
@Autowired
private StudytourOrderMapper studytourOrderMapper;
@Autowired
private StudytourOrderPersonMapper studytourOrderPersonMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public void saveMain(StudytourOrder studytourOrder, List<StudytourOrderPerson> studytourOrderPersonList) {
studytourOrderMapper.insert(studytourOrder);
if(studytourOrderPersonList!=null && studytourOrderPersonList.size()>0) {
for(StudytourOrderPerson entity:studytourOrderPersonList) {
//外键设置
entity.setOrderId(studytourOrder.getId());
studytourOrderPersonMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateMain(StudytourOrder studytourOrder,List<StudytourOrderPerson> studytourOrderPersonList) {
studytourOrderMapper.updateById(studytourOrder);
//1.先删除子表数据
studytourOrderPersonMapper.deleteByMainId(studytourOrder.getId());
//2.子表数据重新插入
if(studytourOrderPersonList!=null && studytourOrderPersonList.size()>0) {
for(StudytourOrderPerson entity:studytourOrderPersonList) {
//外键设置
entity.setOrderId(studytourOrder.getId());
studytourOrderPersonMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delMain(String id) {
studytourOrderPersonMapper.deleteByMainId(id);
studytourOrderMapper.deleteById(id);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delBatchMain(Collection<? extends Serializable> idList) {
for(Serializable id:idList) {
studytourOrderPersonMapper.deleteByMainId(id.toString());
studytourOrderMapper.deleteById(id);
}
}
}

+ 127
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vo/StudytourOrderPage.java View File

@ -0,0 +1,127 @@
package org.jeecg.modules.studytourOrder.vo;
import java.util.List;
import org.jeecg.modules.studytourOrder.entity.StudytourOrder;
import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-09-10
* @Version: V1.0
*/
@Data
@ApiModel(value="studytour_orderPage对象", description="订单信息表")
public class StudytourOrderPage {
/**主键*/
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**真实姓名*/
@Excel(name = "真实姓名", width = 15)
@ApiModelProperty(value = "真实姓名")
private java.lang.String name;
/**手机号码*/
@Excel(name = "手机号码", width = 15)
@ApiModelProperty(value = "手机号码")
private java.lang.String phone;
/**开始日期*/
@Excel(name = "开始日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始日期")
private java.util.Date startDate;
/**结束日期*/
@Excel(name = "结束日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "结束日期")
private java.util.Date endDate;
/**活动天数*/
@Excel(name = "活动天数", width = 15)
@ApiModelProperty(value = "活动天数")
private java.lang.Integer dayNum;
/**原价*/
@Excel(name = "原价", width = 15)
@ApiModelProperty(value = "原价")
private java.math.BigDecimal priceOrigin;
/**优惠价*/
@Excel(name = "优惠价", width = 15)
@ApiModelProperty(value = "优惠价")
private java.math.BigDecimal priceDiscount;
/**优惠券优惠金额*/
@Excel(name = "优惠券优惠金额", width = 15)
@ApiModelProperty(value = "优惠券优惠金额")
private java.math.BigDecimal discount;
/**支付金额*/
@Excel(name = "支付金额", width = 15)
@ApiModelProperty(value = "支付金额")
private java.math.BigDecimal payAmount;
/**支付时间*/
@Excel(name = "支付时间", width = 15)
@ApiModelProperty(value = "支付时间")
private java.util.Date payTime;
/**关联优惠券id*/
@Excel(name = "关联优惠券id", width = 15)
@ApiModelProperty(value = "关联优惠券id")
private java.lang.String couponId;
/**发票类型*/
@Excel(name = "发票类型", width = 15, dicCode = "receipt_type")
@Dict(dicCode = "receipt_type")
@ApiModelProperty(value = "发票类型")
private java.lang.String receiptId;
/**订单状态*/
@Excel(name = "订单状态", width = 15, dicCode = "order_status")
@Dict(dicCode = "order_status")
@ApiModelProperty(value = "订单状态")
private java.lang.String status;
/**活动标题*/
@Excel(name = "活动标题", width = 15)
@ApiModelProperty(value = "活动标题")
private java.lang.String activityTitle;
/**活动简介*/
@Excel(name = "活动简介", width = 15)
@ApiModelProperty(value = "活动简介")
private java.lang.String activityBrief;
/**活动标签*/
@Excel(name = "活动标签", width = 15)
@ApiModelProperty(value = "活动标签")
private java.lang.String activityTag;
/**关联活动*/
@Excel(name = "关联活动", width = 15, dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_activity", dicText = "title", dicCode = "id")
@ApiModelProperty(value = "关联活动")
private java.lang.String activityId;
/**关联用户*/
@Excel(name = "关联用户", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "关联用户")
private java.lang.String userId;
@ExcelCollection(name="订单人员表")
@ApiModelProperty(value = "订单人员表")
private List<StudytourOrderPerson> studytourOrderPersonList;
}

+ 44
- 27
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/StudytourOrderList.vue View File

@ -8,7 +8,7 @@
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@ -36,15 +36,15 @@
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
@ -89,21 +89,20 @@
</a-table>
</div>
<studytour-order-modal ref="modalForm" @ok="modalFormOk"></studytour-order-modal>
<studytour-order-modal ref="modalForm" @ok="modalFormOk"/>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourOrderModal from './modules/StudytourOrderModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
export default {
name: 'StudytourOrderList',
mixins:[JeecgListMixin, mixinDevice],
name: "StudytourOrderList",
mixins:[JeecgListMixin],
components: {
StudytourOrderModal
},
@ -168,6 +167,16 @@
align:"center",
dataIndex: 'discount'
},
{
title:'支付金额',
align:"center",
dataIndex: 'payAmount'
},
{
title:'支付时间',
align:"center",
dataIndex: 'payTime'
},
{
title:'关联优惠券id',
align:"center",
@ -199,17 +208,22 @@
dataIndex: 'activityTag'
},
{
title:'关联活动id',
title:'关联活动',
align:"center",
dataIndex: 'activityId_dictText'
},
{
title:'关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
scopedSlots: { customRender: 'action' },
}
],
url: {
@ -225,33 +239,36 @@
}
},
created() {
this.getSuperFieldList();
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
}
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'真实姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'手机号码',dictCode:''})
fieldList.push({type:'date',value:'startDate',text:'开始日期'})
fieldList.push({type:'date',value:'endDate',text:'结束日期'})
fieldList.push({type:'int',value:'dayNum',text:'活动天数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'priceOrigin',text:'原价',dictCode:''})
fieldList.push({type:'BigDecimal',value:'priceDiscount',text:'优惠价',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discount',text:'优惠券优惠金额',dictCode:''})
fieldList.push({type:'string',value:'couponId',text:'关联优惠券id',dictCode:''})
fieldList.push({type:'string',value:'receiptId',text:'发票类型',dictCode:'receipt_type'})
fieldList.push({type:'string',value:'status',text:'订单状态',dictCode:'order_status'})
fieldList.push({type:'Text',value:'activityTitle',text:'活动标题',dictCode:''})
fieldList.push({type:'Text',value:'activityBrief',text:'活动简介',dictCode:''})
fieldList.push({type:'Text',value:'activityTag',text:'活动标签',dictCode:''})
fieldList.push({type:'string',value:'activityId',text:'关联活动id',dictCode:"studytour_activity,title,id"})
fieldList.push({type:'string',value:'name',text:'真实姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'手机号码',dictCode:''})
fieldList.push({type:'date',value:'startDate',text:'开始日期'})
fieldList.push({type:'date',value:'endDate',text:'结束日期'})
fieldList.push({type:'int',value:'dayNum',text:'活动天数',dictCode:''})
fieldList.push({type:'BigDecimal',value:'priceOrigin',text:'原价',dictCode:''})
fieldList.push({type:'BigDecimal',value:'priceDiscount',text:'优惠价',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discount',text:'优惠券优惠金额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'payAmount',text:'支付金额',dictCode:''})
fieldList.push({type:'datetime',value:'payTime',text:'支付时间'})
fieldList.push({type:'string',value:'couponId',text:'关联优惠券id',dictCode:''})
fieldList.push({type:'string',value:'receiptId',text:'发票类型',dictCode:'receipt_type'})
fieldList.push({type:'string',value:'status',text:'订单状态',dictCode:'order_status'})
fieldList.push({type:'Text',value:'activityTitle',text:'活动标题',dictCode:''})
fieldList.push({type:'Text',value:'activityBrief',text:'活动简介',dictCode:''})
fieldList.push({type:'Text',value:'activityTag',text:'活动标签',dictCode:''})
fieldList.push({type:'sel_search',value:'activityId',text:'关联活动',dictTable:"studytour_activity", dictText:'title', dictCode:'id'})
fieldList.push({type:'sel_search',value:'userId',text:'关联用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
this.superFieldList = fieldList
}
}


+ 180
- 73
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/modules/StudytourOrderForm.vue View File

@ -1,110 +1,134 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<!-- 主表单区域 -->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="真实姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入真实姓名" ></a-input>
<a-input v-model="model.name" placeholder="请输入真实姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入手机号码" ></a-input>
<a-input v-model="model.phone" placeholder="请输入手机号码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="开始日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startDate">
<j-date placeholder="请选择开始日期" v-model="model.startDate" style="width: 100%" />
<j-date placeholder="请选择开始日期" v-model="model.startDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="结束日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endDate">
<j-date placeholder="请选择结束日期" v-model="model.endDate" style="width: 100%" />
<j-date placeholder="请选择结束日期" v-model="model.endDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="活动天数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayNum">
<a-input-number v-model="model.dayNum" placeholder="请输入活动天数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priceOrigin">
<a-input-number v-model="model.priceOrigin" placeholder="请输入原价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="优惠价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="priceDiscount">
<a-input-number v-model="model.priceDiscount" placeholder="请输入优惠价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="优惠券优惠金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discount">
<a-input-number v-model="model.discount" placeholder="请输入优惠券优惠金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="支付金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payAmount">
<a-input-number v-model="model.payAmount" placeholder="请输入支付金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="支付时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payTime">
<j-date placeholder="请选择支付时间" v-model="model.payTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="关联优惠券id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="couponId">
<a-input v-model="model.couponId" placeholder="请输入关联优惠券id" ></a-input>
<a-input v-model="model.couponId" placeholder="请输入关联优惠券id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="发票类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiptId">
<j-dict-select-tag type="list" v-model="model.receiptId" dictCode="receipt_type" placeholder="请选择发票类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="订单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="list" v-model="model.status" dictCode="order_status" placeholder="请选择订单状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="活动标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityTitle">
<a-input v-model="model.activityTitle" placeholder="请输入活动标题" ></a-input>
<a-input v-model="model.activityTitle" placeholder="请输入活动标题" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="活动简介" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityBrief">
<a-input v-model="model.activityBrief" placeholder="请输入活动简介" ></a-input>
<a-input v-model="model.activityBrief" placeholder="请输入活动简介" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="活动标签" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityTag">
<a-input v-model="model.activityTag" placeholder="请输入活动标签" ></a-input>
<a-input v-model="model.activityTag" placeholder="请输入活动标签" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联活动id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-dict-select-tag type="list" v-model="model.activityId" dictCode="studytour_activity,title,id" placeholder="请选择关联活动id" />
<a-col :span="24" >
<a-form-model-item label="关联活动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-search-select-tag v-model="model.activityId" dict="studytour_activity,title,id" />
</a-form-model-item>
</a-col>
<a-col :span="24" >
<a-form-model-item label="关联用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
<!-- 子表单区域 -->
<a-tabs v-model="activeKey" @change="handleChangeTabs">
<a-tab-pane tab="订单人员表" :key="refKeys[0]" :forceRender="true">
<j-editable-table
:ref="refKeys[0]"
:loading="studytourOrderPersonTable.loading"
:columns="studytourOrderPersonTable.columns"
:dataSource="studytourOrderPersonTable.dataSource"
:maxHeight="300"
:disabled="formDisabled"
:rowNumber="true"
:rowSelection="true"
:actionButton="true"/>
</a-tab-pane>
</a-tabs>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { getAction } from '@/api/manage'
import { FormTypes,getRefPromise,VALIDATE_NO_PASSED } from '@/utils/JEditableTableUtil'
import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'StudytourOrderForm',
mixins: [JEditableTableModelMixin],
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
data() {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -113,62 +137,145 @@
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
model:{
},
//
addDefaultRowNum: 1,
validatorRules: {
},
refKeys: ['studytourOrderPerson', ],
tableKeys:['studytourOrderPerson', ],
activeKey: 'studytourOrderPerson',
//
studytourOrderPersonTable: {
loading: false,
dataSource: [],
columns: [
{
title: '姓名',
key: 'name',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '年龄段',
key: 'period',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '年龄段描述',
key: 'periodDesc',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '身份证号',
key: 'cerNo',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '价格',
key: 'price',
type: FormTypes.inputNumber,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '关联人员id',
key: 'personId',
type: FormTypes.select,
dictCode:"studytour_person,name,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]
},
url: {
add: "/studytourOrder/studytourOrder/add",
edit: "/studytourOrder/studytourOrder/edit",
queryById: "/studytourOrder/studytourOrder/queryById"
queryById: "/studytourOrder/studytourOrder/queryById",
studytourOrderPerson: {
list: '/studytourOrder/studytourOrder/queryStudytourOrderPersonByMainId'
},
}
}
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
addBefore(){
this.studytourOrderPersonTable.dataSource=[]
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
getAllTable() {
let values = this.tableKeys.map(key => getRefPromise(this, key))
return Promise.all(values)
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
/** 调用完edit()方法之后会自动调用此方法 */
editAfter() {
this.$nextTick(() => {
})
//
if (this.model.id) {
let params = { id: this.model.id }
this.requestSubTableData(this.url.studytourOrderPerson.list, params, this.studytourOrderPersonTable)
}
},
//
validateSubForm(allValues){
return new Promise((resolve,reject)=>{
Promise.all([
]).then(() => {
resolve(allValues)
}).catch(e => {
if (e.error === VALIDATE_NO_PASSED) {
// tab
this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index]
} else {
console.error(e)
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
})
},
/** 整理成formData */
classifyIntoFormData(allValues) {
let main = Object.assign(this.model, allValues.formValue)
return {
...main, //
studytourOrderPersonList: allValues.tablesValue[0].values,
}
},
validateError(msg){
this.$message.error(msg)
},
}
}
</script>
</script>
<style scoped>
</style>

+ 12
- 8
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue/modules/StudytourOrderModal.vue View File

@ -1,26 +1,27 @@
<template>
<j-modal
:title="title"
:width="width"
:width="1200"
:visible="visible"
:maskClosable="false"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-order-form>
@cancel="handleCancel">
<studytour-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
</j-modal>
</template>
<script>
import StudytourOrderForm from './StudytourOrderForm'
export default {
name: 'StudytourOrderModal',
components: {
StudytourOrderForm
},
data () {
data() {
return {
title:'',
width:800,
@ -28,7 +29,7 @@
disableSubmit: false
}
},
methods: {
methods:{
add () {
this.visible=true
this.$nextTick(()=>{
@ -46,7 +47,7 @@
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
this.$refs.realForm.handleOk();
},
submitCallback(){
this.$emit('ok');
@ -57,4 +58,7 @@
}
}
}
</script>
</script>
<style scoped>
</style>

+ 38
- 5
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrder/vue3/StudytourOrder.data.ts View File

@ -50,6 +50,16 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'discount'
},
{
title: '支付金额',
align:"center",
dataIndex: 'payAmount'
},
{
title: '支付时间',
align:"center",
dataIndex: 'payTime'
},
{
title: '关联优惠券id',
align:"center",
@ -81,10 +91,15 @@ export const columns: BasicColumn[] = [
dataIndex: 'activityTag'
},
{
title: '关联活动id',
title: '关联活动',
align:"center",
dataIndex: 'activityId_dictText'
},
{
title: '关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -131,6 +146,16 @@ export const formSchema: FormSchema[] = [
field: 'discount',
component: 'InputNumber',
},
{
label: '支付金额',
field: 'payAmount',
component: 'InputNumber',
},
{
label: '支付时间',
field: 'payTime',
component: 'Input',
},
{
label: '关联优惠券id',
field: 'couponId',
@ -168,11 +193,19 @@ export const formSchema: FormSchema[] = [
component: 'Input',
},
{
label: '关联活动id',
label: '关联活动',
field: 'activityId',
component: 'JDictSelectTag',
component: 'JSearchSelect',
componentProps:{
dictCode:"studytour_activity,title,id"
},
dict:"studytour_activity,title,id"
},
},
{
label: '关联用户',
field: 'userId',
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
},
];

+ 0
- 19
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/service/impl/StudytourOrderPersonServiceImpl.java View File

@ -1,19 +0,0 @@
package org.jeecg.modules.studytourOrderPerson.service.impl;
import org.jeecg.modules.studytourOrderPerson.entity.StudytourOrderPerson;
import org.jeecg.modules.studytourOrderPerson.mapper.StudytourOrderPersonMapper;
import org.jeecg.modules.studytourOrderPerson.service.IStudytourOrderPersonService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单人员表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
@Service
public class StudytourOrderPersonServiceImpl extends ServiceImpl<StudytourOrderPersonMapper, StudytourOrderPerson> implements IStudytourOrderPersonService {
}

+ 0
- 208
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/StudytourOrderPersonList.vue View File

@ -1,208 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单人员表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<studytour-order-person-modal ref="modalForm" @ok="modalFormOk"></studytour-order-person-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourOrderPersonModal from './modules/StudytourOrderPersonModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'StudytourOrderPersonList',
mixins:[JeecgListMixin, mixinDevice],
components: {
StudytourOrderPersonModal
},
data () {
return {
description: '订单人员表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'姓名',
align:"center",
dataIndex: 'name'
},
{
title:'年龄段',
align:"center",
dataIndex: 'period'
},
{
title:'年龄段描述',
align:"center",
dataIndex: 'periodDesc'
},
{
title:'身份证号',
align:"center",
dataIndex: 'cerNo'
},
{
title:'价格',
align:"center",
dataIndex: 'price'
},
{
title:'关联人员id',
align:"center",
dataIndex: 'personId_dictText'
},
{
title:'关联订单id',
align:"center",
dataIndex: 'orderId_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/studytourOrderPerson/studytourOrderPerson/list",
delete: "/studytourOrderPerson/studytourOrderPerson/delete",
deleteBatch: "/studytourOrderPerson/studytourOrderPerson/deleteBatch",
exportXlsUrl: "/studytourOrderPerson/studytourOrderPerson/exportXls",
importExcelUrl: "studytourOrderPerson/studytourOrderPerson/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''})
fieldList.push({type:'string',value:'period',text:'年龄段',dictCode:''})
fieldList.push({type:'string',value:'periodDesc',text:'年龄段描述',dictCode:''})
fieldList.push({type:'string',value:'cerNo',text:'身份证号',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'价格',dictCode:''})
fieldList.push({type:'string',value:'personId',text:'关联人员id',dictCode:"studytour_person,name,id"})
fieldList.push({type:'string',value:'orderId',text:'关联订单id',dictCode:"studytour_order,id,id"})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 0
- 134
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue/modules/StudytourOrderPersonForm.vue View File

@ -1,134 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="年龄段" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="period">
<a-input v-model="model.period" placeholder="请输入年龄段" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="年龄段描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="periodDesc">
<a-input v-model="model.periodDesc" placeholder="请输入年龄段描述" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cerNo">
<a-input v-model="model.cerNo" placeholder="请输入身份证号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入价格" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联人员id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="personId">
<j-dict-select-tag type="list" v-model="model.personId" dictCode="studytour_person,name,id" placeholder="请选择关联人员id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联订单id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<j-dict-select-tag type="list" v-model="model.orderId" dictCode="studytour_order,id,id" placeholder="请选择关联订单id" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'StudytourOrderPersonForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/studytourOrderPerson/studytourOrderPerson/add",
edit: "/studytourOrderPerson/studytourOrderPerson/edit",
queryById: "/studytourOrderPerson/studytourOrderPerson/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 0
- 89
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderPerson/vue3/StudytourOrderPerson.data.ts View File

@ -1,89 +0,0 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '姓名',
align:"center",
dataIndex: 'name'
},
{
title: '年龄段',
align:"center",
dataIndex: 'period'
},
{
title: '年龄段描述',
align:"center",
dataIndex: 'periodDesc'
},
{
title: '身份证号',
align:"center",
dataIndex: 'cerNo'
},
{
title: '价格',
align:"center",
dataIndex: 'price'
},
{
title: '关联人员id',
align:"center",
dataIndex: 'personId_dictText'
},
{
title: '关联订单id',
align:"center",
dataIndex: 'orderId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '姓名',
field: 'name',
component: 'Input',
},
{
label: '年龄段',
field: 'period',
component: 'Input',
},
{
label: '年龄段描述',
field: 'periodDesc',
component: 'Input',
},
{
label: '身份证号',
field: 'cerNo',
component: 'Input',
},
{
label: '价格',
field: 'price',
component: 'InputNumber',
},
{
label: '关联人员id',
field: 'personId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"studytour_person,name,id"
},
},
{
label: '关联订单id',
field: 'orderId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"studytour_order,id,id"
},
},
];

+ 0
- 171
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/controller/StudytourOrderReceiptController.java View File

@ -1,171 +0,0 @@
package org.jeecg.modules.studytourOrderReceipt.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.studytourOrderReceipt.entity.StudytourOrderReceipt;
import org.jeecg.modules.studytourOrderReceipt.service.IStudytourOrderReceiptService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 订单发票信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
@Api(tags="订单发票信息表")
@RestController
@RequestMapping("/studytourOrderReceipt/studytourOrderReceipt")
@Slf4j
public class StudytourOrderReceiptController extends JeecgController<StudytourOrderReceipt, IStudytourOrderReceiptService> {
@Autowired
private IStudytourOrderReceiptService studytourOrderReceiptService;
/**
* 分页列表查询
*
* @param studytourOrderReceipt
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "订单发票信息表-分页列表查询")
@ApiOperation(value="订单发票信息表-分页列表查询", notes="订单发票信息表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<StudytourOrderReceipt>> queryPageList(StudytourOrderReceipt studytourOrderReceipt,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StudytourOrderReceipt> queryWrapper = QueryGenerator.initQueryWrapper(studytourOrderReceipt, req.getParameterMap());
Page<StudytourOrderReceipt> page = new Page<StudytourOrderReceipt>(pageNo, pageSize);
IPage<StudytourOrderReceipt> pageList = studytourOrderReceiptService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param studytourOrderReceipt
* @return
*/
@AutoLog(value = "订单发票信息表-添加")
@ApiOperation(value="订单发票信息表-添加", notes="订单发票信息表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourOrderReceipt studytourOrderReceipt) {
studytourOrderReceiptService.save(studytourOrderReceipt);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourOrderReceipt
* @return
*/
@AutoLog(value = "订单发票信息表-编辑")
@ApiOperation(value="订单发票信息表-编辑", notes="订单发票信息表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourOrderReceipt studytourOrderReceipt) {
studytourOrderReceiptService.updateById(studytourOrderReceipt);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "订单发票信息表-通过id删除")
@ApiOperation(value="订单发票信息表-通过id删除", notes="订单发票信息表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourOrderReceiptService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "订单发票信息表-批量删除")
@ApiOperation(value="订单发票信息表-批量删除", notes="订单发票信息表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourOrderReceiptService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "订单发票信息表-通过id查询")
@ApiOperation(value="订单发票信息表-通过id查询", notes="订单发票信息表-通过id查询")
@GetMapping(value = "/queryById")
public Result<StudytourOrderReceipt> queryById(@RequestParam(name="id",required=true) String id) {
StudytourOrderReceipt studytourOrderReceipt = studytourOrderReceiptService.getById(id);
if(studytourOrderReceipt==null) {
return Result.error("未找到对应数据");
}
return Result.OK(studytourOrderReceipt);
}
/**
* 导出excel
*
* @param request
* @param studytourOrderReceipt
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourOrderReceipt studytourOrderReceipt) {
return super.exportXls(request, studytourOrderReceipt, StudytourOrderReceipt.class, "订单发票信息表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourOrderReceipt.class);
}
}

+ 0
- 17
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/mapper/StudytourOrderReceiptMapper.java View File

@ -1,17 +0,0 @@
package org.jeecg.modules.studytourOrderReceipt.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourOrderReceipt.entity.StudytourOrderReceipt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单发票信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
public interface StudytourOrderReceiptMapper extends BaseMapper<StudytourOrderReceipt> {
}

+ 0
- 5
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/mapper/xml/StudytourOrderReceiptMapper.xml View File

@ -1,5 +0,0 @@
<?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.jeecg.modules.studytourOrderReceipt.mapper.StudytourOrderReceiptMapper">
</mapper>

+ 0
- 14
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/service/IStudytourOrderReceiptService.java View File

@ -1,14 +0,0 @@
package org.jeecg.modules.studytourOrderReceipt.service;
import org.jeecg.modules.studytourOrderReceipt.entity.StudytourOrderReceipt;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 订单发票信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
public interface IStudytourOrderReceiptService extends IService<StudytourOrderReceipt> {
}

+ 0
- 19
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/service/impl/StudytourOrderReceiptServiceImpl.java View File

@ -1,19 +0,0 @@
package org.jeecg.modules.studytourOrderReceipt.service.impl;
import org.jeecg.modules.studytourOrderReceipt.entity.StudytourOrderReceipt;
import org.jeecg.modules.studytourOrderReceipt.mapper.StudytourOrderReceiptMapper;
import org.jeecg.modules.studytourOrderReceipt.service.IStudytourOrderReceiptService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单发票信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Version: V1.0
*/
@Service
public class StudytourOrderReceiptServiceImpl extends ServiceImpl<StudytourOrderReceiptMapper, StudytourOrderReceipt> implements IStudytourOrderReceiptService {
}

+ 0
- 84
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/modules/StudytourOrderReceiptModal.Style#Drawer.vue View File

@ -1,84 +0,0 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<studytour-order-receipt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-order-receipt-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import StudytourOrderReceiptForm from './StudytourOrderReceiptForm'
export default {
name: 'StudytourOrderReceiptModal',
components: {
StudytourOrderReceiptForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 0
- 60
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue/modules/StudytourOrderReceiptModal.vue View File

@ -1,60 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-order-receipt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-order-receipt-form>
</j-modal>
</template>
<script>
import StudytourOrderReceiptForm from './StudytourOrderReceiptForm'
export default {
name: 'StudytourOrderReceiptModal',
components: {
StudytourOrderReceiptForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 0
- 61
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/StudytourOrderReceipt.api.ts View File

@ -1,61 +0,0 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/studytourOrderReceipt/studytourOrderReceipt/list',
save='/studytourOrderReceipt/studytourOrderReceipt/add',
edit='/studytourOrderReceipt/studytourOrderReceipt/edit',
deleteOne = '/studytourOrderReceipt/studytourOrderReceipt/delete',
deleteBatch = '/studytourOrderReceipt/studytourOrderReceipt/deleteBatch',
importExcel = '/studytourOrderReceipt/studytourOrderReceipt/importExcel',
exportXls = '/studytourOrderReceipt/studytourOrderReceipt/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 0
- 162
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/StudytourOrderReceiptList.vue View File

@ -1,162 +0,0 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<StudytourOrderReceiptModal @register="registerModal" @success="handleSuccess"></StudytourOrderReceiptModal>
</div>
</template>
<script lang="ts" name="studytourOrderReceipt-studytourOrderReceipt" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import StudytourOrderReceiptModal from './components/StudytourOrderReceiptModal.vue'
import {columns, searchFormSchema} from './studytourOrderReceipt.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourOrderReceipt.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '订单发票信息表',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"订单发票信息表",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 0
- 58
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourOrderReceipt/vue3/components/StudytourOrderReceiptModal.vue View File

@ -1,58 +0,0 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../studytourOrderReceipt.data';
import {saveOrUpdate} from '../studytourOrderReceipt.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 19
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/PageBean.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.api.bean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PageBean {
/**显示条数*/
@ApiModelProperty(value = "显示条数" )
private Integer pageSize;
/**当前页*/
@ApiModelProperty(value = "当前页" )
private Integer pageNo;
public PageBean() {
this.pageNo = 1;
this.pageSize = 1000;
}
}

+ 21
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ActivityService.java View File

@ -0,0 +1,21 @@
package org.jeecg.modules.api.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.studytourActivity.entity.StudytourActivity;
public interface ActivityService {
//首页&分类-查询研学活动列表
public Result<?> queryActivityList(StudytourActivity studytourActivity, PageBean pageBean);
//首页&分类-查询研学活动详情
public Result<?> queryActivityById(String activityId);
//首页&分类-查询我收藏的研学活动列表
public Result<?> queryCollectionActivityList(String token, PageBean pageBean);
//首页&分类-收藏研学活动
public Result<?> collectionActivity(String token, String activityId);
}

+ 4
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/CommentService.java View File

@ -0,0 +1,4 @@
package org.jeecg.modules.api.service;
public interface CommentService {
}

+ 21
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ConfigService.java View File

@ -0,0 +1,21 @@
package org.jeecg.modules.api.service;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.studytourCategory.entity.StudytourCategory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
public interface ConfigService {
//查询系统配置列表
public Result<?> queryConfigList(PageBean pageBean);
//查询系统配置详情
public Result<?> queryConfigByParamCode(String paramCode);
//系统配置-查询研学活动分类列表
public Result<?> queryCategoryList(StudytourCategory studytourCategory, PageBean pageBean);
}

+ 4
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ExperienceService.java View File

@ -0,0 +1,4 @@
package org.jeecg.modules.api.service;
public interface ExperienceService {
}

+ 4
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ImageService.java View File

@ -0,0 +1,4 @@
package org.jeecg.modules.api.service;
public interface ImageService {
}

+ 302
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java View File

@ -0,0 +1,302 @@
package org.jeecg.modules.api.service.Impl;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.ActivityService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.studytourActivity.entity.StudytourActivity;
import org.jeecg.modules.studytourActivity.service.IStudytourActivityService;
import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate;
import org.jeecg.modules.studytourActivityDate.entity.StudytourDatePrice;
import org.jeecg.modules.studytourActivityDate.service.IStudytourActivityDateService;
import org.jeecg.modules.studytourActivityDate.service.IStudytourDatePriceService;
import org.jeecg.modules.studytourBanner.entity.StudytourBanner;
import org.jeecg.modules.studytourBanner.service.IStudytourBannerService;
import org.jeecg.modules.studytourCollection.entity.StudytourCollection;
import org.jeecg.modules.studytourCollection.service.IStudytourCollectionService;
import org.jeecg.modules.studytourPeriod.entity.StudytourPeriod;
import org.jeecg.modules.studytourPeriod.service.IStudytourPeriodService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class ActivityServiceImpl implements ActivityService {
/******************************************************************************************************************/
//权限验证
@Resource
private ShiroRealm shiroRealm;
//用户信息
@Resource
private IHanHaiMemberService hanHaiMemberService;
//年龄段信息
@Resource
private IStudytourPeriodService studytourPeriodService;
//研学活动信息
@Resource
private IStudytourActivityService studytourActivityService;
//研学活动团期信息
@Resource
private IStudytourActivityDateService studytourActivityDateService;
//研学活动团期价格
@Resource
private IStudytourDatePriceService studytourDatePriceService;
//研学活动收藏信息
@Resource
private IStudytourCollectionService studytourCollectionService;
/******************************************************************************************************************/
//首页&分类-查询研学活动列表
@Override
public Result<?> queryActivityList(StudytourActivity studytourActivity, PageBean pageBean) {
log.info("开始查询研学活动列表");
//返回信息
String massege = "";
//分页信息
Page<StudytourActivity> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourActivity> query = null;
//返回信息
Page<StudytourActivity> pageList = null;
try{
//分页
page = new Page<StudytourActivity>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourActivityService
.lambdaQuery();
//组装查询条件
if(StringUtils.isNotBlank(studytourActivity.getIsDiscount())){
//限时优惠
query.eq(StudytourActivity::getIsDiscount, studytourActivity.getIsDiscount());
}
if(StringUtils.isNotBlank(studytourActivity.getIsHot())){
//口碑爆款
query.eq(StudytourActivity::getIsHot, studytourActivity.getIsHot());
}
if(StringUtils.isNotBlank(studytourActivity.getIsNew())){
//新上线路
query.eq(StudytourActivity::getIsNew, studytourActivity.getIsNew());
}
if(StringUtils.isNotBlank(studytourActivity.getAddressId())){
//地点
query.eq(StudytourActivity::getAddressId, studytourActivity.getAddressId());
}
if(StringUtils.isNotBlank(studytourActivity.getAgeId())){
//适合年龄
query.eq(StudytourActivity::getAgeId, studytourActivity.getAgeId());
}
if(StringUtils.isNotBlank(studytourActivity.getTimeId())){
//活动时长
query.eq(StudytourActivity::getTimeId, studytourActivity.getTimeId());
}
if(StringUtils.isNotBlank(studytourActivity.getCategoryId())){
//活动分类
query.eq(StudytourActivity::getCategoryId, studytourActivity.getCategoryId());
}
if(StringUtils.isNotBlank(studytourActivity.getTitle())){
//标题
query.like(StudytourActivity::getTitle, studytourActivity.getTitle());
}
//是否下架
query.eq(StudytourActivity::getIsDel, "0");
//按照排序编号升序排列
query.orderByDesc(StudytourActivity::getCreateTime);
//获取研学活动列表
pageList = query.page(page);
log.info("研学活动列表查询结束");
return Result.OK("研学活动列表", pageList);
}catch (Exception e){
log.info("研学活动列表查询失败");
e.printStackTrace();
return Result.error("研学活动列表查询失败");
}
}
//首页&分类-查询研学活动详情
@Override
public Result<?> queryActivityById(String activityId) {
log.info("开始查询研学活动详情");
//返回信息
String massege = "";
try{
StudytourActivity one = studytourActivityService
.lambdaQuery()
.eq(StudytourActivity::getId, activityId)
.one();
if(null == one){
log.info("研学活动不存在,请检查活动id:{}", activityId);
return Result.error("研学活动不存在,请检查活动id:"+activityId, one);
}
List<StudytourActivityDate> dateList = studytourActivityDateService
.lambdaQuery()
.eq(StudytourActivityDate::getActivityId, activityId)
.list();
List<StudytourPeriod> periodList = studytourPeriodService.list();
if(null != dateList){
//填充活动团期
one.setDateList(dateList);
for (StudytourActivityDate studytourActivityDate : dateList) {
//填充团期价格
List<StudytourDatePrice> priceList = studytourDatePriceService
.lambdaQuery()
.eq(StudytourDatePrice::getDateId,studytourActivityDate.getId())
.list();
if(null != priceList){
//填充团期价格
studytourActivityDate.setPriceList(priceList);
//填充价格年龄段名称
for (StudytourDatePrice studytourDatePrice : priceList) {
for (StudytourPeriod studytourPeriod : periodList) {
if(studytourDatePrice.getPeriodId().equals(studytourPeriod.getId())){
studytourDatePrice.setPeriod_dictText(studytourPeriod.getTitle());
break;
}
}
}
}
}
}
log.info("研学活动详情查询结束");
return Result.OK("研学活动详情", one);
}catch (Exception e){
log.info("研学活动详情查询失败");
e.printStackTrace();
return Result.error("研学活动详情查询失败");
}
}
//首页&分类-查询我收藏的研学活动列表
@Override
public Result<?> queryCollectionActivityList(String token, PageBean pageBean) {
log.info("开始查询活动信息");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
//分页信息
Page<StudytourCollection> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourCollection> query = null;
//返回信息
Page<StudytourCollection> pageList = null;
try{
//1获取活动列表
//分页
page = new Page<StudytourCollection>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourCollectionService
.lambdaQuery()
.eq(StudytourCollection::getUserId, hanHaiMember.getId());
//组装查询条件
//按照创建时间降序排列
query.orderByDesc(StudytourCollection::getCreateTime);
//获取活动信息
pageList = query.page(page);
//2添加活动信息至收藏内
for (StudytourCollection record : pageList.getRecords()) {
StudytourActivity one = studytourActivityService
.lambdaQuery()
.eq(StudytourActivity::getId, record.getActivityId())
.one();
record.setActivity(one);
}
log.info("活动信息查询结束");
return Result.OK("活动列表", pageList);
}catch (Exception e){
log.info("活动信息查询失败");
e.printStackTrace();
return Result.error("活动列表查询失败");
}
}
//首页&分类-收藏研学活动
@Override
public Result<?> collectionActivity(String token, String activityId) {
log.info("收藏活动开始");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//1校验活动是否存在
StudytourActivity activity = studytourActivityService.getById(activityId);
if(null == activity){
log.info("活动不存在,请检查活动id:{}", activityId);
return Result.error("活动不存在,请检查活动id:" + activityId);
}
//2校验活动是否已被用户收藏
StudytourCollection collection = studytourCollectionService
.lambdaQuery()
.eq(StudytourCollection::getActivityId, activityId)
.eq(StudytourCollection::getUserId, hanHaiMember.getId())
.one();
//3添加/取消收藏
if(null == collection){
//3.1添加收藏
log.info("执行添加收藏");
StudytourCollection studytourCollection = new StudytourCollection();
studytourCollection.setActivityId(activityId);
studytourCollection.setUserId(hanHaiMember.getId());
boolean result = studytourCollectionService.save(studytourCollection);
//判断是否新增成功
if(result){
log.info("收藏成功");
return Result.OK("收藏成功");
}else {
log.info("收藏失败");
return Result.error("收藏失败");
}
}else {
//3.2取消收藏
log.info("执行取消收藏");
boolean result = studytourCollectionService.removeById(collection.getId());
//判断是否新增成功
if(result){
log.info("取消收藏成功");
return Result.OK("取消收藏成功");
}else {
log.info("取消收藏失败");
return Result.error("取消收藏失败");
}
}
}catch (Exception e){
log.error("操作失败");
e.printStackTrace();
return Result.error("操作失败");
}
}
}

+ 6
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/CommentServiceImpl.java View File

@ -0,0 +1,6 @@
package org.jeecg.modules.api.service.Impl;
import org.jeecg.modules.api.service.CommentService;
public class CommentServiceImpl implements CommentService {
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save