Browse Source

1、图片直播模块

2、成长档案模块
3、优惠券模块
4、成员关联模块
master
Aug 1 month ago
parent
commit
4692368583
64 changed files with 1997 additions and 403 deletions
  1. +2
    -2
      han-hai-module-pay/src/main/java/org/jeecg/modules/pay/MpWxPayService.java
  2. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/controller/StudytourCouponController.java
  3. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/entity/StudytourCoupon.java
  4. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/mapper/StudytourCouponMapper.java
  5. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/service/IStudytourCouponService.java
  6. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/service/impl/StudytourCouponServiceImpl.java
  7. +6
    -6
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue/StudytourCouponList.vue
  8. +6
    -6
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue/modules/StudytourCouponForm.vue
  9. +6
    -6
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue3/StudytourCoupon.data.ts
  10. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/controller/StudytourCouponUserController.java
  11. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/entity/StudytourCouponUser.java
  12. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/mapper/StudytourCouponUserMapper.java
  13. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/service/IStudytourCouponUserService.java
  14. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/service/impl/StudytourCouponUserServiceImpl.java
  15. +3
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue/StudytourCouponUserList.vue
  16. +3
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue/modules/StudytourCouponUserForm.vue
  17. +3
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue3/StudytourCouponUser.data.ts
  18. +119
    -29
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/controller/StudytourImageController.java
  19. +11
    -11
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/entity/StudytourImage.java
  20. +14
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/entity/StudytourImageContent.java
  21. +7
    -5
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/StudytourImageContentMapper.java
  22. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/StudytourImageMapper.java
  23. +16
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/xml/StudytourImageContentMapper.xml
  24. +5
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/service/IStudytourImageContentService.java
  25. +27
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/service/IStudytourImageService.java
  26. +27
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/service/impl/StudytourImageContentServiceImpl.java
  27. +60
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/service/impl/StudytourImageServiceImpl.java
  28. +65
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vo/StudytourImagePage.java
  29. +20
    -15
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue/StudytourImageList.vue
  30. +133
    -54
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue/modules/StudytourImageForm.vue
  31. +12
    -8
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue/modules/StudytourImageModal.vue
  32. +7
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue3/StudytourImage.api.ts
  33. +55
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue3/StudytourImage.data.ts
  34. +15
    -15
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue3/StudytourImageList.vue
  35. +54
    -9
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue3/components/StudytourImageModal.vue
  36. +0
    -19
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/service/impl/StudytourImageContentServiceImpl.java
  37. +0
    -52
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue3/StudytourImageContent.data.ts
  38. +42
    -42
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/controller/StudytourRecordController.java
  39. +80
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/entity/StudytourRecord.java
  40. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/mapper/StudytourRecordMapper.java
  41. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/mapper/xml/StudytourRecordMapper.xml
  42. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/service/IStudytourRecordService.java
  43. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/service/impl/StudytourRecordServiceImpl.java
  44. +42
    -18
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/StudytourRecordList.vue
  45. +29
    -9
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordForm.vue
  46. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordModal.Style#Drawer.vue
  47. +4
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordModal.vue
  48. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecord.api.ts
  49. +92
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecord.data.ts
  50. +7
    -7
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecordList.vue
  51. +2
    -2
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/components/StudytourRecordModal.vue
  52. +25
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/BindService.java
  53. +25
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/CouponService.java
  54. +19
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ExperienceService.java
  55. +23
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/ImageService.java
  56. +177
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/BindServiceImpl.java
  57. +210
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/CouponServiceImpl.java
  58. +134
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ExperienceServiceImpl.java
  59. +173
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ImageServiceImpl.java
  60. +2
    -2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java
  61. +54
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/BindController.java
  62. +57
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/CouponController.java
  63. +24
    -5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/ExperienceController.java
  64. +21
    -10
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/ImageController.java

+ 2
- 2
han-hai-module-pay/src/main/java/org/jeecg/modules/pay/MpWxPayService.java View File

@ -99,13 +99,13 @@ public class MpWxPayService {
request.setTotalFee(price); //总金额|分计
request.setSpbillCreateIp(clientIp); //终端IP
// request.setNotifyUrl(wxPay.notifyUrl);//设置回调路径
request.setNotifyUrl("https://tai-testapi.sanhemovie.com/massage-api/post/notify");//设置回调路径
request.setNotifyUrl("https:///www.hongyujiaoyu.com/studytour-admin/studytour/order/createOrder");//设置回调路径
request.setProductId(productId); //商品id
request.setOpenid(openId); //JSAPI OPENID
if (dev){
request.setTotalFee(price);
// request.setNotifyUrl(wxPay.notifyUrlDev);
request.setNotifyUrl("https://tai-testapi.sanhemovie.com/massage-api/post/notify");//设置回调路径
request.setNotifyUrl("https:///www.hongyujiaoyu.com/studytour-admin/studytour/order/createOrder");//设置回调路径
}
try {
Object order = wxPayService.createOrder(request);


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/controller/StudytourCouponController.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-12
* @Version: V1.0
*/
@Api(tags="优惠券表")


+ 4
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/entity/StudytourCoupon.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 优惠券表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-12
* @Version: V1.0
*/
@Data
@ -54,14 +54,14 @@ public class StudytourCoupon implements Serializable {
/**优惠金额*/
@Excel(name = "优惠金额", width = 15)
@ApiModelProperty(value = "优惠金额")
private java.math.BigDecimal discount;
private java.math.BigDecimal amount;
/**有效期限*/
@Excel(name = "有效期限", width = 15)
@ApiModelProperty(value = "有效期限")
private java.util.Date validDate;
private java.util.Date validTime;
/**是否可被领取*/
@Excel(name = "是否可被领取", width = 15, dicCode = "is_true")
@Dict(dicCode = "is_true")
@ApiModelProperty(value = "是否可被领取")
private java.lang.String isReceive;
private java.lang.String isFetch;
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/mapper/StudytourCouponMapper.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-12
* @Version: V1.0
*/
public interface StudytourCouponMapper extends BaseMapper<StudytourCoupon> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/service/IStudytourCouponService.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-12
* @Version: V1.0
*/
public interface IStudytourCouponService extends IService<StudytourCoupon> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/service/impl/StudytourCouponServiceImpl.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-12
* @Version: V1.0
*/
@Service


+ 6
- 6
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue/StudytourCouponList.vue View File

@ -130,17 +130,17 @@
{
title:'优惠金额',
align:"center",
dataIndex: 'discount'
dataIndex: 'amount'
},
{
title:'有效期限',
align:"center",
dataIndex: 'validDate'
dataIndex: 'validTime'
},
{
title:'是否可被领取',
align:"center",
dataIndex: 'isReceive_dictText'
dataIndex: 'isFetch_dictText'
},
{
title: '操作',
@ -177,9 +177,9 @@
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'名称',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discount',text:'优惠金额',dictCode:''})
fieldList.push({type:'datetime',value:'validDate',text:'有效期限'})
fieldList.push({type:'string',value:'isReceive',text:'是否可被领取',dictCode:'is_true'})
fieldList.push({type:'BigDecimal',value:'amount',text:'优惠金额',dictCode:''})
fieldList.push({type:'datetime',value:'validTime',text:'有效期限'})
fieldList.push({type:'string',value:'isFetch',text:'是否可被领取',dictCode:'is_true'})
this.superFieldList = fieldList
}
}


+ 6
- 6
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue/modules/StudytourCouponForm.vue View File

@ -9,18 +9,18 @@
</a-form-model-item>
</a-col>
<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 label="优惠金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input-number v-model="model.amount" placeholder="请输入优惠金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="有效期限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validDate">
<j-date placeholder="请选择有效期限" v-model="model.validDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
<a-form-model-item label="有效期限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validTime">
<j-date placeholder="请选择有效期限" v-model="model.validTime" :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="是否可被领取" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isReceive">
<j-dict-select-tag type="list" v-model="model.isReceive" dictCode="is_true" placeholder="请选择是否可被领取" />
<a-form-model-item label="是否可被领取" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isFetch">
<j-dict-select-tag type="list" v-model="model.isFetch" dictCode="is_true" placeholder="请选择是否可被领取" />
</a-form-model-item>
</a-col>
</a-row>


+ 6
- 6
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCoupon/vue3/StudytourCoupon.data.ts View File

@ -12,17 +12,17 @@ export const columns: BasicColumn[] = [
{
title: '优惠金额',
align:"center",
dataIndex: 'discount'
dataIndex: 'amount'
},
{
title: '有效期限',
align:"center",
dataIndex: 'validDate'
dataIndex: 'validTime'
},
{
title: '是否可被领取',
align:"center",
dataIndex: 'isReceive_dictText'
dataIndex: 'isFetch_dictText'
},
];
//查询数据
@ -37,17 +37,17 @@ export const formSchema: FormSchema[] = [
},
{
label: '优惠金额',
field: 'discount',
field: 'amount',
component: 'InputNumber',
},
{
label: '有效期限',
field: 'validDate',
field: 'validTime',
component: 'Input',
},
{
label: '是否可被领取',
field: 'isReceive',
field: 'isFetch',
component: 'JDictSelectTag',
componentProps:{
dictCode:"is_true"


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/controller/StudytourCouponUserController.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-12
* @Version: V1.0
*/
@Api(tags="用户所持有的优惠券信息表")


+ 4
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/entity/StudytourCouponUser.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 用户所持有的优惠券信息表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-12
* @Version: V1.0
*/
@Data
@ -54,7 +54,7 @@ public class StudytourCouponUser implements Serializable {
/**优惠金额*/
@Excel(name = "优惠金额", width = 15)
@ApiModelProperty(value = "优惠金额")
private java.math.BigDecimal discount;
private java.math.BigDecimal discountAmount;
/**有效期*/
@Excel(name = "有效期", width = 15)
@ApiModelProperty(value = "有效期")
@ -70,8 +70,8 @@ public class StudytourCouponUser implements Serializable {
@ApiModelProperty(value = "关联优惠券id")
private java.lang.String couponId;
/**关联订单id*/
@Excel(name = "关联订单id", width = 15, dictTable = "studytour_order", dicText = "title", dicCode = "id")
@Dict(dictTable = "studytour_order", dicText = "title", dicCode = "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;
/**关联用户id*/


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/mapper/StudytourCouponUserMapper.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-12
* @Version: V1.0
*/
public interface StudytourCouponUserMapper extends BaseMapper<StudytourCouponUser> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/service/IStudytourCouponUserService.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-12
* @Version: V1.0
*/
public interface IStudytourCouponUserService extends IService<StudytourCouponUser> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/service/impl/StudytourCouponUserServiceImpl.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-12
* @Version: V1.0
*/
@Service


+ 3
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue/StudytourCouponUserList.vue View File

@ -130,7 +130,7 @@
{
title:'优惠金额',
align:"center",
dataIndex: 'discount'
dataIndex: 'discountAmount'
},
{
title:'有效期',
@ -192,11 +192,11 @@
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'title',text:'优惠券名称',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discount',text:'优惠金额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'discountAmount',text:'优惠金额',dictCode:''})
fieldList.push({type:'datetime',value:'validDate',text:'有效期'})
fieldList.push({type:'string',value:'status',text:'使用状态',dictCode:'coupon_status'})
fieldList.push({type:'string',value:'couponId',text:'关联优惠券id',dictCode:"studytour_coupon,title,id"})
fieldList.push({type:'string',value:'orderId',text:'关联订单id',dictCode:"studytour_order,title,id"})
fieldList.push({type:'string',value:'orderId',text:'关联订单id',dictCode:"studytour_order,id,id"})
fieldList.push({type:'string',value:'userId',text:'关联用户id',dictCode:"han_hai_member,nick_name,id"})
this.superFieldList = fieldList
}


+ 3
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue/modules/StudytourCouponUserForm.vue View File

@ -9,8 +9,8 @@
</a-form-model-item>
</a-col>
<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 label="优惠金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discountAmount">
<a-input-number v-model="model.discountAmount" placeholder="请输入优惠金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -30,7 +30,7 @@
</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,title,id" placeholder="请选择关联订单id" />
<j-dict-select-tag type="list" v-model="model.orderId" dictCode="studytour_order,id,id" placeholder="请选择关联订单id" />
</a-form-model-item>
</a-col>
<a-col :span="24">


+ 3
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourCouponUser/vue3/StudytourCouponUser.data.ts View File

@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [
{
title: '优惠金额',
align:"center",
dataIndex: 'discount'
dataIndex: 'discountAmount'
},
{
title: '有效期',
@ -52,7 +52,7 @@ export const formSchema: FormSchema[] = [
},
{
label: '优惠金额',
field: 'discount',
field: 'discountAmount',
component: 'InputNumber',
},
{
@ -81,7 +81,7 @@ export const formSchema: FormSchema[] = [
field: 'orderId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"studytour_order,title,id"
dictCode:"studytour_order,id,id"
},
},
{


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

@ -1,36 +1,42 @@
package org.jeecg.modules.studytourImage.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.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.service.IStudytourImageService;
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.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.vo.StudytourImagePage;
import org.jeecg.modules.studytourImage.service.IStudytourImageService;
import org.jeecg.modules.studytourImage.service.IStudytourImageContentService;
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-12
* @Version: V1.0
*/
@Api(tags="图片直播表")
@RestController
@RequestMapping("/studytourImage/studytourImage")
@Slf4j
public class StudytourImageController extends JeecgController<StudytourImage, IStudytourImageService> {
public class StudytourImageController {
@Autowired
private IStudytourImageService studytourImageService;
@Autowired
private IStudytourImageContentService studytourImageContentService;
/**
* 分页列表查询
@ -75,28 +83,36 @@ public class StudytourImageController extends JeecgController<StudytourImage, IS
/**
* 添加
*
* @param studytourImage
* @param studytourImagePage
* @return
*/
@AutoLog(value = "图片直播表-添加")
@ApiOperation(value="图片直播表-添加", notes="图片直播表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourImage studytourImage) {
studytourImageService.save(studytourImage);
public Result<String> add(@RequestBody StudytourImagePage studytourImagePage) {
StudytourImage studytourImage = new StudytourImage();
BeanUtils.copyProperties(studytourImagePage, studytourImage);
studytourImageService.saveMain(studytourImage, studytourImagePage.getStudytourImageContentList());
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourImage
* @param studytourImagePage
* @return
*/
@AutoLog(value = "图片直播表-编辑")
@ApiOperation(value="图片直播表-编辑", notes="图片直播表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourImage studytourImage) {
studytourImageService.updateById(studytourImage);
public Result<String> edit(@RequestBody StudytourImagePage studytourImagePage) {
StudytourImage studytourImage = new StudytourImage();
BeanUtils.copyProperties(studytourImagePage, studytourImage);
StudytourImage studytourImageEntity = studytourImageService.getById(studytourImage.getId());
if(studytourImageEntity==null) {
return Result.error("未找到对应数据");
}
studytourImageService.updateMain(studytourImage, studytourImagePage.getStudytourImageContentList());
return Result.OK("编辑成功!");
}
@ -110,7 +126,7 @@ public class StudytourImageController extends JeecgController<StudytourImage, IS
@ApiOperation(value="图片直播表-通过id删除", notes="图片直播表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
studytourImageService.removeById(id);
studytourImageService.delMain(id);
return Result.OK("删除成功!");
}
@ -124,8 +140,8 @@ public class StudytourImageController extends JeecgController<StudytourImage, IS
@ApiOperation(value="图片直播表-批量删除", notes="图片直播表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.studytourImageService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
this.studytourImageService.delBatchMain(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功");
}
/**
@ -143,6 +159,21 @@ public class StudytourImageController extends JeecgController<StudytourImage, IS
return Result.error("未找到对应数据");
}
return Result.OK(studytourImage);
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "用户图片直播表通过主表ID查询")
@ApiOperation(value="用户图片直播表主表ID查询", notes="用户图片直播表-通主表ID查询")
@GetMapping(value = "/queryStudytourImageContentByMainId")
public Result<List<StudytourImageContent>> queryStudytourImageContentListByMainId(@RequestParam(name="id",required=true) String id) {
List<StudytourImageContent> studytourImageContentList = studytourImageContentService.selectByMainId(id);
return Result.OK(studytourImageContentList);
}
/**
@ -153,11 +184,43 @@ public class StudytourImageController extends JeecgController<StudytourImage, IS
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourImage studytourImage) {
return super.exportXls(request, studytourImage, StudytourImage.class, "图片直播表");
// Step.1 组装查询条件查询数据
QueryWrapper<StudytourImage> queryWrapper = QueryGenerator.initQueryWrapper(studytourImage, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//Step.2 获取导出数据
List<StudytourImage> queryList = studytourImageService.list(queryWrapper);
// 过滤选中数据
String selections = request.getParameter("selections");
List<StudytourImage> studytourImageList = new ArrayList<StudytourImage>();
if(oConvertUtils.isEmpty(selections)) {
studytourImageList = queryList;
}else {
List<String> selectionList = Arrays.asList(selections.split(","));
studytourImageList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList());
}
// Step.3 组装pageList
List<StudytourImagePage> pageList = new ArrayList<StudytourImagePage>();
for (StudytourImage main : studytourImageList) {
StudytourImagePage vo = new StudytourImagePage();
BeanUtils.copyProperties(main, vo);
List<StudytourImageContent> studytourImageContentList = studytourImageContentService.selectByMainId(main.getId());
vo.setStudytourImageContentList(studytourImageContentList);
pageList.add(vo);
}
// Step.4 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
mv.addObject(NormalExcelConstants.FILE_NAME, "图片直播表列表");
mv.addObject(NormalExcelConstants.CLASS, StudytourImagePage.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 StudytourImageController extends JeecgController<StudytourImage, IS
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourImage.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<StudytourImagePage> list = ExcelImportUtil.importExcel(file.getInputStream(), StudytourImagePage.class, params);
for (StudytourImagePage page : list) {
StudytourImage po = new StudytourImage();
BeanUtils.copyProperties(page, po);
studytourImageService.saveMain(po, page.getStudytourImageContentList());
}
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("文件导入失败!");
}
}

+ 11
- 11
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/entity/StudytourImage.java View File

@ -3,7 +3,6 @@ package org.jeecg.modules.studytourImage.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;
@ -14,20 +13,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-12
* @Version: V1.0
*/
@ApiModel(value="studytour_image对象", description="图片直播表")
@Data
@TableName("studytour_image")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_image对象", description="图片直播表")
public class StudytourImage implements Serializable {
private static final long serialVersionUID = 1L;
@ -55,9 +50,14 @@ public class StudytourImage implements Serializable {
@Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址")
private java.lang.String address;
/**关联活动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;
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/entity/StudytourImageContent.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/entity/StudytourImageContent.java View File

@ -1,9 +1,6 @@
package org.jeecg.modules.studytourImageContent.entity;
package org.jeecg.modules.studytourImage.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-12
* @Version: V1.0
*/
@ApiModel(value="studytour_image_content对象", description="用户图片直播表")
@Data
@TableName("studytour_image_content")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_image_content对象", description="用户图片直播表")
public class StudytourImageContent implements Serializable {
private static final long serialVersionUID = 1L;
@ -51,14 +45,15 @@ public class StudytourImageContent implements Serializable {
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private java.lang.String image;
/**关联图片直播id*/
@Excel(name = "关联图片直播id", width = 15, dictTable = "studytour_image", dicText = "id", dicCode = "id")
@Dict(dictTable = "studytour_image", dicText = "id", dicCode = "id")
@ApiModelProperty(value = "关联图片直播id")
/**地址*/
@Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址")
private java.lang.String address;
/**关联图片直播*/
@ApiModelProperty(value = "关联图片直播")
private java.lang.String imageId;
/**关联用户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")
/**关联用户*/
@Excel(name = "关联用户", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "关联用户")
private java.lang.String userId;
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/mapper/StudytourImageContentMapper.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/StudytourImageContentMapper.java View File

@ -1,17 +1,19 @@
package org.jeecg.modules.studytourImageContent.mapper;
package org.jeecg.modules.studytourImage.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourImageContent.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* @Description: 用户图片直播表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-12
* @Version: V1.0
*/
public interface StudytourImageContentMapper extends BaseMapper<StudytourImageContent> {
public boolean deleteByMainId(@Param("mainId") String mainId);
public List<StudytourImageContent> selectByMainId(@Param("mainId") String mainId);
}

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/StudytourImageMapper.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-12
* @Version: V1.0
*/
public interface StudytourImageMapper extends BaseMapper<StudytourImage> {


+ 16
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/mapper/xml/StudytourImageContentMapper.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.studytourImage.mapper.StudytourImageContentMapper">
<delete id="deleteByMainId" parameterType="java.lang.String">
DELETE
FROM studytour_image_content
WHERE
image_id = #{mainId} </delete>
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.studytourImage.entity.StudytourImageContent">
SELECT *
FROM studytour_image_content
WHERE
image_id = #{mainId} </select>
</mapper>

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/service/IStudytourImageContentService.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/service/IStudytourImageContentService.java View File

@ -1,14 +1,16 @@
package org.jeecg.modules.studytourImageContent.service;
package org.jeecg.modules.studytourImage.service;
import org.jeecg.modules.studytourImageContent.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 用户图片直播表
* @Author: jeecg-boot
* @Date: 2025-08-25
* @Date: 2025-09-12
* @Version: V1.0
*/
public interface IStudytourImageContentService extends IService<StudytourImageContent> {
public List<StudytourImageContent> selectByMainId(String mainId);
}

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

@ -1,14 +1,40 @@
package org.jeecg.modules.studytourImage.service;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
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-12
* @Version: V1.0
*/
public interface IStudytourImageService extends IService<StudytourImage> {
/**
* 添加一对多
*
*/
public void saveMain(StudytourImage studytourImage,List<StudytourImageContent> studytourImageContentList) ;
/**
* 修改一对多
*
*/
public void updateMain(StudytourImage studytourImage,List<StudytourImageContent> studytourImageContentList);
/**
* 删除一对多
*/
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/studytourImage/service/impl/StudytourImageContentServiceImpl.java View File

@ -0,0 +1,27 @@
package org.jeecg.modules.studytourImage.service.impl;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.mapper.StudytourImageContentMapper;
import org.jeecg.modules.studytourImage.service.IStudytourImageContentService;
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-12
* @Version: V1.0
*/
@Service
public class StudytourImageContentServiceImpl extends ServiceImpl<StudytourImageContentMapper, StudytourImageContent> implements IStudytourImageContentService {
@Autowired
private StudytourImageContentMapper studytourImageContentMapper;
@Override
public List<StudytourImageContent> selectByMainId(String mainId) {
return studytourImageContentMapper.selectByMainId(mainId);
}
}

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

@ -1,19 +1,77 @@
package org.jeecg.modules.studytourImage.service.impl;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.mapper.StudytourImageContentMapper;
import org.jeecg.modules.studytourImage.mapper.StudytourImageMapper;
import org.jeecg.modules.studytourImage.service.IStudytourImageService;
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-12
* @Version: V1.0
*/
@Service
public class StudytourImageServiceImpl extends ServiceImpl<StudytourImageMapper, StudytourImage> implements IStudytourImageService {
@Autowired
private StudytourImageMapper studytourImageMapper;
@Autowired
private StudytourImageContentMapper studytourImageContentMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public void saveMain(StudytourImage studytourImage, List<StudytourImageContent> studytourImageContentList) {
studytourImageMapper.insert(studytourImage);
if(studytourImageContentList!=null && studytourImageContentList.size()>0) {
for(StudytourImageContent entity:studytourImageContentList) {
//外键设置
entity.setImageId(studytourImage.getId());
studytourImageContentMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateMain(StudytourImage studytourImage,List<StudytourImageContent> studytourImageContentList) {
studytourImageMapper.updateById(studytourImage);
//1.先删除子表数据
studytourImageContentMapper.deleteByMainId(studytourImage.getId());
//2.子表数据重新插入
if(studytourImageContentList!=null && studytourImageContentList.size()>0) {
for(StudytourImageContent entity:studytourImageContentList) {
//外键设置
entity.setImageId(studytourImage.getId());
studytourImageContentMapper.insert(entity);
}
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delMain(String id) {
studytourImageContentMapper.deleteByMainId(id);
studytourImageMapper.deleteById(id);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delBatchMain(Collection<? extends Serializable> idList) {
for(Serializable id:idList) {
studytourImageContentMapper.deleteByMainId(id.toString());
studytourImageMapper.deleteById(id);
}
}
}

+ 65
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vo/StudytourImagePage.java View File

@ -0,0 +1,65 @@
package org.jeecg.modules.studytourImage.vo;
import java.util.List;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
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-12
* @Version: V1.0
*/
@Data
@ApiModel(value="studytour_imagePage对象", description="图片直播表")
public class StudytourImagePage {
/**主键*/
@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 image;
/**地址*/
@Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址")
private java.lang.String address;
/**关联活动*/
@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<StudytourImageContent> studytourImageContentList;
}

+ 20
- 15
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue/StudytourImageList.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-image-modal ref="modalForm" @ok="modalFormOk"></studytour-image-modal>
<studytour-image-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 StudytourImageModal from './modules/StudytourImageModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
export default {
name: 'StudytourImageList',
mixins:[JeecgListMixin, mixinDevice],
name: "StudytourImageList",
mixins:[JeecgListMixin],
components: {
StudytourImageModal
},
@ -134,17 +133,22 @@
dataIndex: 'address'
},
{
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: {
@ -160,21 +164,22 @@
}
},
created() {
this.getSuperFieldList();
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
}
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'Text',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'Text',value:'address',text:'地址',dictCode:''})
fieldList.push({type:'string',value:'activityId',text:'关联活动id',dictCode:"studytour_activity,title,id"})
fieldList.push({type:'Text',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'Text',value:'address',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
}
}


+ 133
- 54
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue/modules/StudytourImageForm.vue View File

@ -1,50 +1,64 @@
<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="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="24" >
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入地址" ></a-input>
<a-input v-model="model.address" 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="studytourImageContentTable.loading"
:columns="studytourImageContentTable.columns"
:dataSource="studytourImageContentTable.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: 'StudytourImageForm',
mixins: [JEditableTableModelMixin],
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
data() {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -53,62 +67,127 @@
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
model:{
},
//
addDefaultRowNum: 1,
validatorRules: {
activityId: [
{ required: false},
{ validator: (rule, value, callback) => validateDuplicateValue('studytour_image', 'activity_id', value, this.model.id, callback)},
],
},
refKeys: ['studytourImageContent', ],
tableKeys:['studytourImageContent', ],
activeKey: 'studytourImageContent',
//
studytourImageContentTable: {
loading: false,
dataSource: [],
columns: [
{
title: '图片',
key: 'image',
type: FormTypes.image,
token:true,
responseName:"message",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '地址',
key: 'address',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '关联用户',
key: 'userId',
type: FormTypes.sel_search,
dictCode:"han_hai_member,nick_name,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]
},
url: {
add: "/studytourImage/studytourImage/add",
edit: "/studytourImage/studytourImage/edit",
queryById: "/studytourImage/studytourImage/queryById"
queryById: "/studytourImage/studytourImage/queryById",
studytourImageContent: {
list: '/studytourImage/studytourImage/queryStudytourImageContentByMainId'
},
}
}
},
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.studytourImageContentTable.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.studytourImageContent.list, params, this.studytourImageContentTable)
}
},
//
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, //
studytourImageContentList: 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/studytourImage/vue/modules/StudytourImageModal.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-image-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-image-form>
@cancel="handleCancel">
<studytour-image-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
</j-modal>
</template>
<script>
import StudytourImageForm from './StudytourImageForm'
export default {
name: 'StudytourImageModal',
components: {
StudytourImageForm
},
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/studytourImage/vue3/StudytourImage.api.ts View File

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


+ 55
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImage/vue3/StudytourImage.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[] = [
{
@ -16,10 +17,15 @@ export const columns: BasicColumn[] = [
dataIndex: 'address'
},
{
title: '关联活动id',
title: '关联活动',
align:"center",
dataIndex: 'activityId_dictText'
},
{
title: '关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -39,11 +45,56 @@ 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"
},
dynamicRules: ({model,schema}) => {
return [
{ required: false},
{...rules.duplicateCheckRule('studytour_image', 'activity_id',model,schema,true)[0]},
];
},
},
{
label: '关联用户',
field: 'userId',
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
},
];
//子表单数据
//子表表格配置
export const studytourImageContentColumns: JVxeColumn[] = [
{
title: '图片',
key: 'image',
type: JVxeTypes.image,
token:true,
responseName:"message",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '地址',
key: 'address',
type: JVxeTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '关联用户',
key: 'userId',
type: JVxeTypes.selectSearch,
dictCode:"han_hai_member,nick_name,id",
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
]

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

@ -42,15 +42,15 @@
<script lang="ts" name="studytourImage-studytourImage" 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 StudytourImageModal from './components/StudytourImageModal.vue'
import {columns, searchFormSchema} from './studytourImage.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourImage.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/studytourImage/vue3/components/StudytourImageModal.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="studytourImageContentTable.loading"
:columns="studytourImageContentTable.columns"
:dataSource="studytourImageContentTable.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 '../studytourImage.data';
import {saveOrUpdate} from '../studytourImage.api';
import { JVxeTable } from '/@/components/jeecg/JVxeTable'
import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts'
import {formSchema,studytourImageContentColumns} from '../studytourImage.data';
import {saveOrUpdate,studytourImageContentList} from '../studytourImage.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
const refKeys = ref(['studytourImageContent', ]);
const activeKey = ref('studytourImageContent');
const studytourImageContent = ref();
const tableRefs = {studytourImageContent, };
const studytourImageContentTable = reactive({
loading: false,
dataSource: [],
columns:studytourImageContentColumns
})
//
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(studytourImageContentList, {id:data?.record?.id}, studytourImageContentTable)
}
//
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 = 'studytourImageContent';
studytourImageContentTable.dataSource = [];
}
function classifyIntoFormData(allValues) {
let main = Object.assign({}, allValues.formValue)
return {
...main, //
studytourImageContentList: 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);


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

@ -1,19 +0,0 @@
package org.jeecg.modules.studytourImageContent.service.impl;
import org.jeecg.modules.studytourImageContent.entity.StudytourImageContent;
import org.jeecg.modules.studytourImageContent.mapper.StudytourImageContentMapper;
import org.jeecg.modules.studytourImageContent.service.IStudytourImageContentService;
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 StudytourImageContentServiceImpl extends ServiceImpl<StudytourImageContentMapper, StudytourImageContent> implements IStudytourImageContentService {
}

+ 0
- 52
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue3/StudytourImageContent.data.ts View File

@ -1,52 +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: 'image',
customRender:render.renderAvatar,
},
{
title: '关联图片直播id',
align:"center",
dataIndex: 'imageId_dictText'
},
{
title: '关联用户id',
align:"center",
dataIndex: 'userId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '图片',
field: 'image',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '关联图片直播id',
field: 'imageId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"studytour_image,id,id"
},
},
{
label: '关联用户id',
field: 'userId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"han_hai_member,nick_name,id"
},
},
];

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/controller/StudytourImageContentController.java → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/controller/StudytourRecordController.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.studytourImageContent.controller;
package org.jeecg.modules.studytourRecord.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.studytourImageContent.entity.StudytourImageContent;
import org.jeecg.modules.studytourImageContent.service.IStudytourImageContentService;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.jeecg.modules.studytourRecord.service.IStudytourRecordService;
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-12
* @Version: V1.0
*/
@Api(tags="用户图片直播表")
@Api(tags="成长档案表")
@RestController
@RequestMapping("/studytourImageContent/studytourImageContent")
@RequestMapping("/studytourRecord/studytourRecord")
@Slf4j
public class StudytourImageContentController extends JeecgController<StudytourImageContent, IStudytourImageContentService> {
public class StudytourRecordController extends JeecgController<StudytourRecord, IStudytourRecordService> {
@Autowired
private IStudytourImageContentService studytourImageContentService;
private IStudytourRecordService studytourRecordService;
/**
* 分页列表查询
*
* @param studytourImageContent
* @param studytourRecord
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "用户图片直播表-分页列表查询")
@ApiOperation(value="用户图片直播表-分页列表查询", notes="用户图片直播表-分页列表查询")
//@AutoLog(value = "成长档案表-分页列表查询")
@ApiOperation(value="成长档案表-分页列表查询", notes="成长档案表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<StudytourImageContent>> queryPageList(StudytourImageContent studytourImageContent,
public Result<IPage<StudytourRecord>> queryPageList(StudytourRecord studytourRecord,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StudytourImageContent> queryWrapper = QueryGenerator.initQueryWrapper(studytourImageContent, req.getParameterMap());
Page<StudytourImageContent> page = new Page<StudytourImageContent>(pageNo, pageSize);
IPage<StudytourImageContent> pageList = studytourImageContentService.page(page, queryWrapper);
QueryWrapper<StudytourRecord> queryWrapper = QueryGenerator.initQueryWrapper(studytourRecord, req.getParameterMap());
Page<StudytourRecord> page = new Page<StudytourRecord>(pageNo, pageSize);
IPage<StudytourRecord> pageList = studytourRecordService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param studytourImageContent
* @param studytourRecord
* @return
*/
@AutoLog(value = "用户图片直播表-添加")
@ApiOperation(value="用户图片直播表-添加", notes="用户图片直播表-添加")
@AutoLog(value = "成长档案表-添加")
@ApiOperation(value="成长档案表-添加", notes="成长档案表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody StudytourImageContent studytourImageContent) {
studytourImageContentService.save(studytourImageContent);
public Result<String> add(@RequestBody StudytourRecord studytourRecord) {
studytourRecordService.save(studytourRecord);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param studytourImageContent
* @param studytourRecord
* @return
*/
@AutoLog(value = "用户图片直播表-编辑")
@ApiOperation(value="用户图片直播表-编辑", notes="用户图片直播表-编辑")
@AutoLog(value = "成长档案表-编辑")
@ApiOperation(value="成长档案表-编辑", notes="成长档案表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody StudytourImageContent studytourImageContent) {
studytourImageContentService.updateById(studytourImageContent);
public Result<String> edit(@RequestBody StudytourRecord studytourRecord) {
studytourRecordService.updateById(studytourRecord);
return Result.OK("编辑成功!");
}
@ -106,11 +106,11 @@ public class StudytourImageContentController extends JeecgController<StudytourIm
* @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) {
studytourImageContentService.removeById(id);
studytourRecordService.removeById(id);
return Result.OK("删除成功!");
}
@ -120,11 +120,11 @@ public class StudytourImageContentController extends JeecgController<StudytourIm
* @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.studytourImageContentService.removeByIds(Arrays.asList(ids.split(",")));
this.studytourRecordService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
@ -134,26 +134,26 @@ public class StudytourImageContentController extends JeecgController<StudytourIm
* @param id
* @return
*/
//@AutoLog(value = "用户图片直播表-通过id查询")
@ApiOperation(value="用户图片直播表-通过id查询", notes="用户图片直播表-通过id查询")
//@AutoLog(value = "成长档案表-通过id查询")
@ApiOperation(value="成长档案表-通过id查询", notes="成长档案表-通过id查询")
@GetMapping(value = "/queryById")
public Result<StudytourImageContent> queryById(@RequestParam(name="id",required=true) String id) {
StudytourImageContent studytourImageContent = studytourImageContentService.getById(id);
if(studytourImageContent==null) {
public Result<StudytourRecord> queryById(@RequestParam(name="id",required=true) String id) {
StudytourRecord studytourRecord = studytourRecordService.getById(id);
if(studytourRecord==null) {
return Result.error("未找到对应数据");
}
return Result.OK(studytourImageContent);
return Result.OK(studytourRecord);
}
/**
* 导出excel
*
* @param request
* @param studytourImageContent
* @param studytourRecord
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StudytourImageContent studytourImageContent) {
return super.exportXls(request, studytourImageContent, StudytourImageContent.class, "用户图片直播表");
public ModelAndView exportXls(HttpServletRequest request, StudytourRecord studytourRecord) {
return super.exportXls(request, studytourRecord, StudytourRecord.class, "成长档案表");
}
/**
@ -165,7 +165,7 @@ public class StudytourImageContentController extends JeecgController<StudytourIm
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StudytourImageContent.class);
return super.importExcel(request, response, StudytourRecord.class);
}
}

+ 80
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/entity/StudytourRecord.java View File

@ -0,0 +1,80 @@
package org.jeecg.modules.studytourRecord.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;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 成长档案表
* @Author: jeecg-boot
* @Date: 2025-09-12
* @Version: V1.0
*/
@Data
@TableName("studytour_record")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="studytour_record对象", description="成长档案表")
public class StudytourRecord 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;
/**行程分数*/
@Excel(name = "行程分数", width = 15)
@ApiModelProperty(value = "行程分数")
private java.lang.Integer processScore;
/**景点分数*/
@Excel(name = "景点分数", width = 15)
@ApiModelProperty(value = "景点分数")
private java.lang.Integer spotScore;
/**导师分数*/
@Excel(name = "导师分数", width = 15)
@ApiModelProperty(value = "导师分数")
private java.lang.Integer teacherScore;
/**活动掠影*/
@Excel(name = "活动掠影", width = 15)
@ApiModelProperty(value = "活动掠影")
private java.lang.String image;
/**学员心得*/
@Excel(name = "学员心得", width = 15)
@ApiModelProperty(value = "学员心得")
private java.lang.String content;
/**关联活动*/
@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;
}

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

@ -0,0 +1,17 @@
package org.jeecg.modules.studytourRecord.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 成长档案表
* @Author: jeecg-boot
* @Date: 2025-09-12
* @Version: V1.0
*/
public interface StudytourRecordMapper extends BaseMapper<StudytourRecord> {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/mapper/xml/StudytourImageContentMapper.xml → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/mapper/xml/StudytourRecordMapper.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.studytourImageContent.mapper.StudytourImageContentMapper">
<mapper namespace="org.jeecg.modules.studytourRecord.mapper.StudytourRecordMapper">
</mapper>

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

@ -0,0 +1,14 @@
package org.jeecg.modules.studytourRecord.service;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 成长档案表
* @Author: jeecg-boot
* @Date: 2025-09-12
* @Version: V1.0
*/
public interface IStudytourRecordService extends IService<StudytourRecord> {
}

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

@ -0,0 +1,19 @@
package org.jeecg.modules.studytourRecord.service.impl;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.jeecg.modules.studytourRecord.mapper.StudytourRecordMapper;
import org.jeecg.modules.studytourRecord.service.IStudytourRecordService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 成长档案表
* @Author: jeecg-boot
* @Date: 2025-09-12
* @Version: V1.0
*/
@Service
public class StudytourRecordServiceImpl extends ServiceImpl<StudytourRecordMapper, StudytourRecord> implements IStudytourRecordService {
}

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue/StudytourImageContentList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/StudytourRecordList.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-image-content-modal ref="modalForm" @ok="modalFormOk"></studytour-image-content-modal>
<studytour-record-modal ref="modalForm" @ok="modalFormOk"></studytour-record-modal>
</a-card>
</template>
@ -98,18 +98,18 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StudytourImageContentModal from './modules/StudytourImageContentModal'
import StudytourRecordModal from './modules/StudytourRecordModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'StudytourImageContentList',
name: 'StudytourRecordList',
mixins:[JeecgListMixin, mixinDevice],
components: {
StudytourImageContentModal
StudytourRecordModal
},
data () {
return {
description: '用户图片直播表管理页面',
description: '成长档案表管理页面',
//
columns: [
{
@ -123,18 +123,38 @@
}
},
{
title:'图片',
title:'行程分数',
align:"center",
dataIndex: 'processScore'
},
{
title:'景点分数',
align:"center",
dataIndex: 'spotScore'
},
{
title:'导师分数',
align:"center",
dataIndex: 'teacherScore'
},
{
title:'活动掠影',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'关联图片直播id',
title:'学员心得',
align:"center",
dataIndex: 'content'
},
{
title:'关联活动',
align:"center",
dataIndex: 'imageId_dictText'
dataIndex: 'activityId_dictText'
},
{
title:'关联用户id',
title:'关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
@ -148,11 +168,11 @@
}
],
url: {
list: "/studytourImageContent/studytourImageContent/list",
delete: "/studytourImageContent/studytourImageContent/delete",
deleteBatch: "/studytourImageContent/studytourImageContent/deleteBatch",
exportXlsUrl: "/studytourImageContent/studytourImageContent/exportXls",
importExcelUrl: "studytourImageContent/studytourImageContent/importExcel",
list: "/studytourRecord/studytourRecord/list",
delete: "/studytourRecord/studytourRecord/delete",
deleteBatch: "/studytourRecord/studytourRecord/deleteBatch",
exportXlsUrl: "/studytourRecord/studytourRecord/exportXls",
importExcelUrl: "studytourRecord/studytourRecord/importExcel",
},
dictOptions:{},
@ -172,9 +192,13 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'Text',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'imageId',text:'关联图片直播id',dictCode:"studytour_image,id,id"})
fieldList.push({type:'string',value:'userId',text:'关联用户id',dictCode:"han_hai_member,nick_name,id"})
fieldList.push({type:'int',value:'processScore',text:'行程分数',dictCode:''})
fieldList.push({type:'int',value:'spotScore',text:'景点分数',dictCode:''})
fieldList.push({type:'int',value:'teacherScore',text:'导师分数',dictCode:''})
fieldList.push({type:'Text',value:'image',text:'活动掠影',dictCode:''})
fieldList.push({type:'Text',value:'content',text:'学员心得',dictCode:''})
fieldList.push({type:'string',value:'activityId',text:'关联活动',dictCode:"studytour_activity,title,id"})
fieldList.push({type:'sel_search',value:'userId',text:'关联用户',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/studytourImageContent/vue/modules/StudytourImageContentForm.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordForm.vue View File

@ -4,18 +4,38 @@
<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="image">
<a-form-model-item label="行程分数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processScore">
<a-input-number v-model="model.processScore" placeholder="请输入行程分数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="景点分数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spotScore">
<a-input-number v-model="model.spotScore" placeholder="请输入景点分数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="导师分数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teacherScore">
<a-input-number v-model="model.teacherScore" placeholder="请输入导师分数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="活动掠影" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联图片直播id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageId">
<j-dict-select-tag type="list" v-model="model.imageId" dictCode="studytour_image,id,id" placeholder="请选择关联图片直播id" />
<a-form-model-item label="学员心得" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content">
<a-textarea v-model="model.content" rows="4" placeholder="请输入学员心得" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联活动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activityId">
<j-dict-select-tag type="list" v-model="model.activityId" dictCode="studytour_activity,title,id" placeholder="请选择关联活动" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联用户id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-dict-select-tag type="list" v-model="model.userId" dictCode="han_hai_member,nick_name,id" placeholder="请选择关联用户id" />
<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>
@ -30,7 +50,7 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'StudytourImageContentForm',
name: 'StudytourRecordForm',
components: {
},
props: {
@ -57,9 +77,9 @@
validatorRules: {
},
url: {
add: "/studytourImageContent/studytourImageContent/add",
edit: "/studytourImageContent/studytourImageContent/edit",
queryById: "/studytourImageContent/studytourImageContent/queryById"
add: "/studytourRecord/studytourRecord/add",
edit: "/studytourRecord/studytourRecord/edit",
queryById: "/studytourRecord/studytourRecord/queryById"
}
}
},

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue/modules/StudytourImageContentModal.Style#Drawer.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordModal.Style#Drawer.vue View File

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<studytour-image-content-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-image-content-form>
<studytour-record-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></studytour-record-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 StudytourImageContentForm from './StudytourImageContentForm'
import StudytourRecordForm from './StudytourRecordForm'
export default {
name: 'StudytourImageContentModal',
name: 'StudytourRecordModal',
components: {
StudytourImageContentForm
StudytourRecordForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue/modules/StudytourImageContentModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue/modules/StudytourRecordModal.vue View File

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<studytour-image-content-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-image-content-form>
<studytour-record-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></studytour-record-form>
</j-modal>
</template>
<script>
import StudytourImageContentForm from './StudytourImageContentForm'
import StudytourRecordForm from './StudytourRecordForm'
export default {
name: 'StudytourImageContentModal',
name: 'StudytourRecordModal',
components: {
StudytourImageContentForm
StudytourRecordForm
},
data () {
return {

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue3/StudytourImageContent.api.ts → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecord.api.ts View File

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

+ 92
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecord.data.ts View File

@ -0,0 +1,92 @@
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: 'processScore'
},
{
title: '景点分数',
align:"center",
dataIndex: 'spotScore'
},
{
title: '导师分数',
align:"center",
dataIndex: 'teacherScore'
},
{
title: '活动掠影',
align:"center",
dataIndex: 'image',
customRender:render.renderAvatar,
},
{
title: '学员心得',
align:"center",
dataIndex: 'content'
},
{
title: '关联活动',
align:"center",
dataIndex: 'activityId_dictText'
},
{
title: '关联用户',
align:"center",
dataIndex: 'userId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '行程分数',
field: 'processScore',
component: 'InputNumber',
},
{
label: '景点分数',
field: 'spotScore',
component: 'InputNumber',
},
{
label: '导师分数',
field: 'teacherScore',
component: 'InputNumber',
},
{
label: '活动掠影',
field: 'image',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '学员心得',
field: 'content',
component: 'InputTextArea',//TODO 注意string转换问题
},
{
label: '关联活动',
field: 'activityId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"studytour_activity,title,id"
},
},
{
label: '关联用户',
field: 'userId',
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
},
];

jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourImageContent/vue3/StudytourImageContentList.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/StudytourRecordList.vue View File

@ -35,25 +35,25 @@
</template>
</BasicTable>
<!-- 表单区域 -->
<StudytourImageContentModal @register="registerModal" @success="handleSuccess"></StudytourImageContentModal>
<StudytourRecordModal @register="registerModal" @success="handleSuccess"></StudytourRecordModal>
</div>
</template>
<script lang="ts" name="studytourImageContent-studytourImageContent" setup>
<script lang="ts" name="studytourRecord-studytourRecord" 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 StudytourImageContentModal from './components/StudytourImageContentModal.vue'
import {columns, searchFormSchema} from './studytourImageContent.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourImageContent.api';
import StudytourRecordModal from './components/StudytourRecordModal.vue'
import {columns, searchFormSchema} from './studytourRecord.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './studytourRecord.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/studytourImageContent/vue3/components/StudytourImageContentModal.vue → jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourRecord/vue3/components/StudytourRecordModal.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 '../studytourImageContent.data';
import {saveOrUpdate} from '../studytourImageContent.api';
import {formSchema} from '../studytourRecord.data';
import {saveOrUpdate} from '../studytourRecord.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);

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

@ -0,0 +1,25 @@
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.studytourBindperson.entity.StudytourBindperson;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
public interface BindService {
//成员管理-查询绑定人信息
public Result<?> queryBindUser(String bindUserId);
//成员管理-查询绑定成员列表
public Result<?> queryBindList(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson, PageBean pageBean);
//成员管理-绑定申请
public Result<?> addBind(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson);
//成员管理-审批绑定申请
public Result<?> updateBind(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson);
}

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

@ -0,0 +1,25 @@
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.studytourCouponUser.entity.StudytourCouponUser;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
public interface CouponService {
//优惠券-优惠券列表
public Result<?> queryCouponList(String token, StudytourCouponUser studytourCouponUser, PageBean pageBean);
//根据id查看优惠券详情
public Result<?> queryCouponById(String token, String usercouponId);
//查看可领取的优惠券
public Result<?> queryFetchCouponList(String token);
//领取优惠券
public Result<?> fetchCoupon(String token, String couponId);
}

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

@ -1,4 +1,23 @@
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.studytourBindperson.entity.StudytourBindperson;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
public interface ExperienceService {
//成长档案-查询成长档案列表
public Result<?> queryExperienceList(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord, PageBean pageBean);
//成长档案-查询成长档案详情
public Result<?> queryExperienceById(@RequestHeader("X-Access-Token") String token, String recordId);
//成长档案-新增成长档案
public Result<?> addExperience(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord);
}

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

@ -1,4 +1,27 @@
package org.jeecg.modules.api.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.springframework.web.bind.annotation.RequestHeader;
public interface ImageService {
//图片直播-查询图片直播列表
public Result<?> queryImageList(PageBean pageBean);
//图片直播-新增图片直播信息
public Result<?> addImage(@RequestHeader("X-Access-Token") String token, StudytourImage studytourImage);
//图片直播-查询图片直播内容列表
public Result<?> queryImageContentList(String imageId, PageBean pageBean);
//图片直播-新增图片直播内容信息
public Result<?> addImageContent(@RequestHeader("X-Access-Token") String token, StudytourImageContent studytourImageContent);
//图片直播-标记有我
public Result<?> queryMarkmeList(@RequestHeader("X-Access-Token") String token, String imagePath);
}

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

@ -0,0 +1,177 @@
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.BindService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.studytourBindperson.entity.StudytourBindperson;
import org.jeecg.modules.studytourBindperson.service.IStudytourBindpersonService;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.jeecg.modules.studytourRecord.service.IStudytourRecordService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
@Slf4j
public class BindServiceImpl implements BindService {
/******************************************************************************************************************/
//权限验证
@Resource
private ShiroRealm shiroRealm;
//权限验证
@Resource
private IHanHaiMemberService hanHaiMemberService;
//权限验证
@Resource
private IStudytourBindpersonService studytourBindpersonService;
/******************************************************************************************************************/
//成员管理-查询绑定人信息
@Override
public Result<?> queryBindUser(String bindUserId) {
log.info("开始查询绑定人信息");
//返回信息
String massege = "";
try{
//查询绑定人信息
HanHaiMember userInfo = hanHaiMemberService.getById(bindUserId);
log.info("绑定人信息查询结束");
return Result.OK("绑定人信息", userInfo);
}catch (Exception e){
log.info("绑绑定人信息查询失败");
e.printStackTrace();
return Result.error("绑定人信息查询失败");
}
}
//成员管理-查询绑定成员列表
@Override
public Result<?> queryBindList(String token, StudytourBindperson studytourBindperson, PageBean pageBean) {
log.info("开始查询绑定成员列表");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
//分页信息
Page<StudytourBindperson> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourBindperson> query = null;
//返回信息
Page<StudytourBindperson> pageList = null;
try{
//分页
page = new Page<StudytourBindperson>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourBindpersonService
.lambdaQuery();
//组装查询条件
//主绑定人
query.eq(StudytourBindperson::getBindId, hanHaiMember.getId());
//绑定状态
if(StringUtils.isNotEmpty(studytourBindperson.getStatus())){
query.eq(StudytourBindperson::getStatus, studytourBindperson.getStatus());
}
//按照创建时间降序排列
query.orderByDesc(StudytourBindperson::getCreateTime);
//获取图片直播信息列表
pageList = query.page(page);
log.info("绑定成员列表查询结束");
return Result.OK("绑定成员列表", pageList);
}catch (Exception e){
log.info("绑定成员列表查询失败");
e.printStackTrace();
return Result.error("绑定成员列表查询失败");
}
}
//成员管理-绑定申请
@Override
public Result<?> addBind(String token, StudytourBindperson studytourBindperson) {
log.info("开始新增绑定申请");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//1新增绑定申请
studytourBindperson.setUserId(hanHaiMember.getId());
boolean result = studytourBindpersonService.save(studytourBindperson);
if(result){
log.info("绑定申请新增成功");
return Result.OK("绑定申请新增成功");
}else {
log.info("绑定申请新增失败");
return Result.error("绑定申请新增失败");
}
}catch (Exception e){
log.info("绑定申请新增失败");
e.printStackTrace();
return Result.error("绑定申请新增失败");
}
}
//成员管理-审批绑定申请
@Override
public Result<?> updateBind(String token, StudytourBindperson studytourBindperson) {
log.info("开始审批绑定申请");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//0校验绑定信息
if(StringUtils.isEmpty(studytourBindperson.getId())){
return Result.error("绑定信息id为空,请传入id");
}
StudytourBindperson bindperson = studytourBindpersonService.getById(studytourBindperson.getId());
if(null == bindperson){
return Result.error("绑定信息不存在,请检查id是否正确:"+ studytourBindperson.getId());
}else if(!bindperson.getBindId().equals(hanHaiMember.getId())){
return Result.error("该绑定信息与当前用户不匹配");
}
//1新增绑定申请
studytourBindperson.setBindId(hanHaiMember.getId());
studytourBindperson.setUserId(bindperson.getUserId());
boolean result = studytourBindpersonService.updateById(studytourBindperson);
if(result){
log.info("绑定申请已审批");
return Result.OK("绑定申请已审批");
}else {
log.info("绑定申请审批失败");
return Result.error("绑定申请审批失败");
}
}catch (Exception e){
log.info("绑定申请审批失败");
e.printStackTrace();
return Result.error("绑定申请审批失败");
}
}
}

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

@ -0,0 +1,210 @@
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.CouponService;
import org.jeecg.modules.api.utils.CommonUtils;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.pay.MpWxPayService;
import org.jeecg.modules.studytourCoupon.entity.StudytourCoupon;
import org.jeecg.modules.studytourCoupon.service.IStudytourCouponService;
import org.jeecg.modules.studytourCouponUser.entity.StudytourCouponUser;
import org.jeecg.modules.studytourCouponUser.service.IStudytourCouponUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Service
@Slf4j
public class CouponServiceImpl implements CouponService {
/******************************************************************************************************************/
//权限验证
@Resource
private ShiroRealm shiroRealm;
//优惠券信息
@Resource
private IStudytourCouponService studytourCouponService;
//用户持有优惠券
@Resource
private IStudytourCouponUserService studytourCouponUserService;
/******************************************************************************************************************/
//优惠券-优惠券列表
@Override
public Result<?> queryCouponList(String token, StudytourCouponUser studytourCouponUser, PageBean pageBean) {
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//返回信息
String massege = "";
//分页信息
Page<StudytourCouponUser> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourCouponUser> query = null;
//返回信息
Page<StudytourCouponUser> pageList = null;
try{
//分页
page = new Page<StudytourCouponUser>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourCouponUserService
.lambdaQuery();
//组装查询条件
//优惠券使用状态0-未使用 1-已使用 2-已失效
if(StringUtils.isNotEmpty(studytourCouponUser.getStatus())){
if("2".equals(studytourCouponUser.getStatus())){
query.lt(StudytourCouponUser::getValidDate, CommonUtils.getCurrentTime());//已失效
query.notIn(StudytourCouponUser::getStatus, "1");
}else {
query.eq(StudytourCouponUser::getStatus, studytourCouponUser.getStatus());
if("0".equals(studytourCouponUser.getStatus())){
query.gt(StudytourCouponUser::getValidDate, CommonUtils.getCurrentTime());//未失效
}
}
}
//优惠券所属
query.eq(StudytourCouponUser::getUserId, hanHaiMember.getId());
//按照创建时间降序排列
query.orderByDesc(StudytourCouponUser::getCreateTime);
//获取优惠券信息
pageList = query.page(page);
return Result.OK("优惠券列表", pageList);
}catch (Exception e){
e.printStackTrace();
return Result.error("优惠券列表查询失败");
}
}
//根据id查看优惠券详情
@Override
public Result<?> queryCouponById(String token, String usercouponId) {
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
try{
StudytourCouponUser couponUser = studytourCouponUserService
.lambdaQuery()
.eq(StudytourCouponUser::getUserId, hanHaiMember.getId())
.eq(StudytourCouponUser::getId, usercouponId)
.one();
if(null == couponUser){
return Result.error("优惠券不存在,请检查用户优惠券id:", usercouponId);
}
return Result.OK("优惠券详情", couponUser);
}catch (Exception e){
e.printStackTrace();
return Result.error("优惠券详情获取失败");
}
}
//查看可领取的优惠券
@Override
public Result<?> queryFetchCouponList(String token) {
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//返回信息
String massege = "";
try{
//获取可领取的优惠券
List<StudytourCoupon> pageList = studytourCouponService
.lambdaQuery()
.eq(StudytourCoupon::getIsFetch, "1")
.gt(StudytourCoupon::getValidTime, CommonUtils.getCurrentTime())
.orderByDesc(StudytourCoupon::getCreateTime)
.list();
//获取已领取的优惠券
List<StudytourCouponUser> couponUserList = studytourCouponUserService
.lambdaQuery()
.eq(StudytourCouponUser::getUserId, hanHaiMember.getId())
.list();
//剔除已领取的优惠券信息
//查询已领取的优惠券信息
List<String> ids = new ArrayList<>();
for (StudytourCoupon vouchers : pageList) {
for (StudytourCouponUser massageVouchersUser : couponUserList) {
String couponUserId = massageVouchersUser.getCouponId();
if(vouchers.getId().equals(couponUserId)){
ids.add(couponUserId);
break;
}
}
}
//剔除优惠券信息
for (int i = 0; i < pageList.size(); i++) {
for (String id : ids) {
if(pageList.get(i).getId().equals(id)){
pageList.remove(i);
}
}
}
return Result.OK("优惠券列表", pageList);
}catch (Exception e){
e.printStackTrace();
return Result.error("优惠券列表查询失败");
}
}
//领取优惠券
@Override
public Result<?> fetchCoupon(String token, String couponId) {
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
try{
//查看优惠券是否存在
StudytourCoupon coupon = studytourCouponService.getById(couponId);
if(null == coupon){
return Result.error("优惠券不存在,请检查优惠券id:"+couponId);
}
//查看用户是否领取过优惠券
StudytourCouponUser studytourCouponUser = studytourCouponUserService
.lambdaQuery()
.eq(StudytourCouponUser::getCouponId, couponId)
.eq(StudytourCouponUser::getUserId, hanHaiMember.getId())
.one();
if(null != studytourCouponUser){
return Result.error("已领取过优惠券,不可重复领取");
}
//添加用户优惠券信息
StudytourCouponUser couponUser = new StudytourCouponUser();
couponUser.setUserId(hanHaiMember.getId());
couponUser.setCouponId(coupon.getId());
couponUser.setDiscountAmount(coupon.getAmount());
couponUser.setStatus("0");
couponUser.setValidDate(coupon.getValidTime());
boolean result = studytourCouponUserService.save(couponUser);
if(result){
return Result.error("优惠券领取成功");
}else {
return Result.error("优惠券领取失败");
}
}catch (Exception e){
e.printStackTrace();
return Result.error("优惠券领取失败");
}
}
}

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

@ -1,6 +1,140 @@
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.ExperienceService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.studytourBindperson.entity.StudytourBindperson;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.jeecg.modules.studytourRecord.service.IStudytourRecordService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class ExperienceServiceImpl implements ExperienceService {
/******************************************************************************************************************/
//权限验证
@Resource
private ShiroRealm shiroRealm;
//权限验证
@Resource
private IHanHaiMemberService hanHaiMemberService;
//权限验证
@Resource
private IStudytourRecordService studytourRecordService;
/******************************************************************************************************************/
//成长档案-查询成长档案列表
@Override
public Result<?> queryExperienceList(String token, StudytourRecord studytourRecord, PageBean pageBean) {
log.info("开始查询成长档案信息列表");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
//分页信息
Page<StudytourRecord> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourRecord> query = null;
//返回信息
Page<StudytourRecord> pageList = null;
try{
//分页
page = new Page<StudytourRecord>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourRecordService
.lambdaQuery();
//组装查询条件
// if(StringUtils.isNotEmpty(studytourRecord)){
// query.eq(StudytourRecord::getImageId, imageId);
// }
//所属用户
query.eq(StudytourRecord::getUserId, hanHaiMember.getId());
//按照创建时间降序排列
query.orderByDesc(StudytourRecord::getCreateTime);
//获取图片直播信息列表
pageList = query.page(page);
log.info("成长档案信息列表查询结束");
return Result.OK("成长档案信息列表", pageList);
}catch (Exception e){
log.info("成长档案信息列表查询失败");
e.printStackTrace();
return Result.error("成长档案信息列表查询失败");
}
}
//成长档案-查询成长档案详情
@Override
public Result<?> queryExperienceById(String token, String recordId) {
log.info("开始查询成长档案详情");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//成长档案详情
StudytourRecord one = studytourRecordService
.lambdaQuery()
.eq(StudytourRecord::getId, recordId)
.eq(StudytourRecord::getUserId, hanHaiMember.getId())
.one();
log.info("成长档案详情查询结束");
return Result.OK("成长档案详情", one);
}catch (Exception e){
log.info("成长档案详情查询失败");
e.printStackTrace();
return Result.error("成长档案详情查询失败");
}
}
//成长档案-新增成长档案
@Override
public Result<?> addExperience(String token, StudytourRecord studytourRecord) {
log.info("开始新增成长档案信息");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//1新增成长档案信息
studytourRecord.setUserId(hanHaiMember.getId());
boolean result = studytourRecordService.save(studytourRecord);
if(result){
log.info("成长档案信息新增成功");
return Result.OK("成长档案信息新增成功");
}else {
log.info("成长档案信息新增失败");
return Result.error("成长档案信息新增失败");
}
}catch (Exception e){
log.info("成长档案信息新增失败");
e.printStackTrace();
return Result.error("成长档案信息新增失败");
}
}
}

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

@ -1,6 +1,179 @@
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.ImageService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.service.IStudytourImageContentService;
import org.jeecg.modules.studytourImage.service.IStudytourImageService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
@Slf4j
public class ImageServiceImpl implements ImageService {
/******************************************************************************************************************/
//权限验证
@Resource
private ShiroRealm shiroRealm;
//图片直播信息
@Resource
private IStudytourImageService studytourImageService;
//图片直播内容信息
@Resource
private IStudytourImageContentService studytourImageContentService;
/******************************************************************************************************************/
//图片直播-查询图片直播列表
@Override
public Result<?> queryImageList(PageBean pageBean) {
log.info("开始查询图片直播信息列表");
//返回信息
String massege = "";
//分页信息
Page<StudytourImage> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourImage> query = null;
//返回信息
Page<StudytourImage> pageList = null;
try{
//分页
page = new Page<StudytourImage>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourImageService
.lambdaQuery();
//组装查询条件
//按照创建时间降序排列
query.orderByDesc(StudytourImage::getCreateTime);
//获取图片直播信息列表
pageList = query.page(page);
log.info("图片直播信息列表查询结束");
return Result.OK("图片直播信息列表", pageList);
}catch (Exception e){
log.info("图片直播信息列表查询失败");
e.printStackTrace();
return Result.error("图片直播信息列表查询失败");
}
}
//图片直播-新增图片直播信息
@Override
public Result<?> addImage(String token, StudytourImage studytourImage) {
log.info("开始新增图片直播信息");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//1新增图片直播信息
studytourImage.setUserId(hanHaiMember.getId());
boolean result = studytourImageService.save(studytourImage);
if(result){
log.info("图片直播信息新增成功");
return Result.OK("图片直播信息新增成功");
}else {
log.info("图片直播信息新增失败");
return Result.error("图片直播信息新增失败");
}
}catch (Exception e){
log.info("图片直播信息新增失败");
e.printStackTrace();
return Result.error("图片直播信息新增失败");
}
}
//图片直播-查询图片直播内容列表
@Override
public Result<?> queryImageContentList(String imageId, PageBean pageBean) {
log.info("开始查询图片直播内容信息列表");
//返回信息
String massege = "";
//分页信息
Page<StudytourImageContent> page = null;
//查询信息
LambdaQueryChainWrapper<StudytourImageContent> query = null;
//返回信息
Page<StudytourImageContent> pageList = null;
try{
//分页
page = new Page<StudytourImageContent>(pageBean.getPageNo(), pageBean.getPageSize());
query = studytourImageContentService
.lambdaQuery();
//组装查询条件
if(StringUtils.isNotEmpty(imageId)){
query.eq(StudytourImageContent::getImageId, imageId);
}
//按照创建时间降序排列
query.orderByDesc(StudytourImageContent::getCreateTime);
//获取图片直播信息列表
pageList = query.page(page);
log.info("图片直播内容信息列表查询结束");
return Result.OK("图片直播内容信息列表", pageList);
}catch (Exception e){
log.info("图片直播内容信息列表查询失败");
e.printStackTrace();
return Result.error("图片直播内容信息列表查询失败");
}
}
//图片直播-新增图片直播内容信息
@Override
public Result<?> addImageContent(String token, StudytourImageContent studytourImageContent) {
log.info("开始新增图片直播内容信息");
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
//返回信息
String massege = "";
try{
//1新增图片直播信息
studytourImageContent.setUserId(hanHaiMember.getId());
boolean result = studytourImageContentService.save(studytourImageContent);
if(result){
log.info("图片直播内容信息新增成功");
return Result.OK("图片直播内容信息新增成功");
}else {
log.info("图片直播内容信息新增失败");
return Result.error("图片直播内容信息新增失败");
}
}catch (Exception e){
log.info("图片直播内容信息新增失败");
e.printStackTrace();
return Result.error("图片直播内容信息新增失败");
}
}
//图片直播-标记有我
@Override
public Result<?> queryMarkmeList(String token, String imagePath) {
return null;
}
}

+ 2
- 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java View File

@ -131,8 +131,8 @@ public class OrderServiceImpl implements OrderService {
@Override
public Result<?> createOrder(String token, StudytourOrder studytourOrder) {
//权限验证
//HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById(token);
try{
//0校验活动信息


+ 54
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/BindController.java View File

@ -0,0 +1,54 @@
package org.jeecg.modules.api.studytourController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.BindService;
import org.jeecg.modules.api.service.ExperienceService;
import org.jeecg.modules.studytourBindperson.entity.StudytourBindperson;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags="学员管理-相关接口")
@RestController
@RequestMapping("/studytour/bind")
@Slf4j
public class BindController {
/******************************************************************************************************************/
//配置信息
@Resource
private BindService bindService;
/******************************************************************************************************************/
@ApiOperation(value="成员管理-查询绑定人信息", notes="成员管理-查询绑定人信息")
@RequestMapping(value = "/queryBindUser", method = {RequestMethod.GET})
public Result<?> queryBindUser(String bindUserId){
return bindService.queryBindUser(bindUserId);
}
@ApiOperation(value="成员管理-查询绑定成员列表", notes="绑定状态(status):0-确认中 1-已绑定 2-已拒绝")
@RequestMapping(value = "/queryBindList", method = {RequestMethod.GET})
public Result<?> queryBindList(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson, PageBean pageBean){
return bindService.queryBindList(token, studytourBindperson, pageBean);
}
@ApiOperation(value="成员管理-绑定申请", notes="成长档案-绑定申请")
@RequestMapping(value = "/addBind", method = {RequestMethod.POST})
public Result<?> addBind(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson){
return bindService.addBind(token, studytourBindperson);
}
@ApiOperation(value="成员管理-审批绑定申请", notes="成长档案-审批绑定申请")
@RequestMapping(value = "/updateBind", method = {RequestMethod.POST})
public Result<?> updateBind(@RequestHeader("X-Access-Token") String token, StudytourBindperson studytourBindperson){
return bindService.updateBind(token, studytourBindperson);
}
}

+ 57
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/CouponController.java View File

@ -0,0 +1,57 @@
package org.jeecg.modules.api.studytourController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.CouponService;
import org.jeecg.modules.studytourCouponUser.entity.StudytourCouponUser;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags="优惠券-相关接口")
@RestController
@RequestMapping("/studytour/coupon")
@Slf4j
public class CouponController {
/******************************************************************************************************************/
//优惠券信息
@Resource
private CouponService couponService;
/******************************************************************************************************************/
//优惠券-优惠券列表
@ApiOperation(value="优惠券-我的优惠券列表", notes="status:0-未使用 1-已使用 2-已失效")
@RequestMapping(value = "/queryCouponList", method = {RequestMethod.GET})
public Result<?> queryCouponList(@RequestHeader("X-Access-Token") String token, StudytourCouponUser studytourCouponUser, PageBean pageBean){
return couponService.queryCouponList(token, studytourCouponUser, pageBean);
}
//根据id查看优惠券详情
@ApiOperation(value="优惠券-根据id查看优惠券详情", notes="优惠券-根据id查看优惠券详情")
@RequestMapping(value = "/queryCouponById", method = {RequestMethod.GET})
public Result<?> queryCouponById(@RequestHeader("X-Access-Token") String token, String usercouponId){
return couponService.queryCouponById(token, usercouponId);
}
//查看可领取的优惠券
@ApiOperation(value="优惠券-查看可领取的优惠券", notes="优惠券-查看可领取的优惠券")
@RequestMapping(value = "/queryFetchCouponList", method = {RequestMethod.GET})
public Result<?> queryFetchCouponList(@RequestHeader("X-Access-Token") String token){
return couponService.queryFetchCouponList(token);
}
//领取优惠券
@ApiOperation(value="优惠券-领取优惠券", notes="优惠券-领取优惠券")
@RequestMapping(value = "/fetchCoupon", method = {RequestMethod.POST})
public Result<?> fetchCoupon(@RequestHeader("X-Access-Token") String token, String couponId){
return couponService.fetchCoupon(token, couponId);
}
}

+ 24
- 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/ExperienceController.java View File

@ -5,28 +5,47 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.ExperienceService;
import org.jeecg.modules.api.service.ImageService;
import org.jeecg.modules.studytourBindperson.entity.StudytourBindperson;
import org.jeecg.modules.studytourComment.entity.StudytourComment;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Api(tags="成长档案&&学员管理-相关接口")
import javax.annotation.Resource;
@Api(tags="成长档案-相关接口")
@RestController
@RequestMapping("/studytour/experience")
@Slf4j
public class ExperienceController {
/******************************************************************************************************************/
//配置信息
@Resource
private ExperienceService experienceService;
/******************************************************************************************************************/
@ApiOperation(value="成长档案-查询成长档案列表", notes="成长档案-查询成长档案列表")
@RequestMapping(value = "/queryExperienceList", method = {RequestMethod.GET})
public Result<?> queryExperienceList(@RequestHeader("X-Access-Token") String token, PageBean pageBean){
return Result.OK("接口暂未处理");
public Result<?> queryExperienceList(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord, PageBean pageBean){
return experienceService.queryExperienceList(token, studytourRecord, pageBean);
}
@ApiOperation(value="成长档案-查询成长档案详情", notes="成长档案-查询成长档案详情")
@RequestMapping(value = "/queryExperienceById", method = {RequestMethod.GET})
public Result<?> queryExperienceById(@RequestHeader("X-Access-Token") String token, PageBean pageBean){
return Result.OK("接口暂未处理");
public Result<?> queryExperienceById(@RequestHeader("X-Access-Token") String token, String recordId){
return experienceService.queryExperienceById(token, recordId);
}
@ApiOperation(value="成长档案-新增成长档案", notes="成长档案-新增成长档案")
@RequestMapping(value = "/addExperience", method = {RequestMethod.POST})
public Result<?> addExperience(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord){
return experienceService.addExperience(token, studytourRecord);
}
}

+ 21
- 10
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/studytourController/ImageController.java View File

@ -5,40 +5,51 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.ImageService;
import org.jeecg.modules.studytourImage.entity.StudytourImage;
import org.jeecg.modules.studytourImageContent.entity.StudytourImageContent;
import org.jeecg.modules.studytourImage.entity.StudytourImageContent;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags="图片直播-相关接口")
@RestController
@RequestMapping("/studytour/image")
@Slf4j
public class ImageController {
/******************************************************************************************************************/
//配置信息
@Resource
private ImageService imageService;
/******************************************************************************************************************/
@ApiOperation(value="图片直播-查询图片直播列表", notes="图片直播-查询图片直播列表")
@RequestMapping(value = "/queryImageList", method = {RequestMethod.GET})
public Result<?> queryImageList(StudytourImage studytourImage, PageBean pageBean){
return Result.OK("接口暂未处理");
public Result<?> queryImageList(PageBean pageBean){
return imageService.queryImageList(pageBean);
}
@ApiOperation(value="图片直播-查询图片直播内容列表", notes="图片直播-查询图片直播内容列表")
@RequestMapping(value = "/queryImageContentList", method = {RequestMethod.GET})
public Result<?> queryImageContentList(String imageId, PageBean pageBean){
return Result.OK("接口暂未处理");
}
@ApiOperation(value="图片直播-新增图片直播信息", notes="图片直播-新增图片直播信息")
@RequestMapping(value = "/addImage", method = {RequestMethod.GET})
public Result<?> addImage(StudytourImage studytourImage){
public Result<?> addImage(@RequestHeader("X-Access-Token") String token, StudytourImage studytourImage){
return Result.OK("接口暂未处理");
}
@ApiOperation(value="图片直播-查询图片直播内容列表", notes="图片直播-查询图片直播内容列表")
@RequestMapping(value = "/queryImageContentList", method = {RequestMethod.GET})
public Result<?> queryImageContentList(String imageId, PageBean pageBean){
return imageService.queryImageContentList(imageId, pageBean);
}
@ApiOperation(value="图片直播-新增图片直播内容信息", notes="图片直播-新增图片直播内容信息")
@RequestMapping(value = "/addImageContent", method = {RequestMethod.GET})
public Result<?> addImageContent(StudytourImageContent studytourImageContent){
public Result<?> addImageContent(@RequestHeader("X-Access-Token") String token, StudytourImageContent studytourImageContent){
return Result.OK("接口暂未处理");
}


Loading…
Cancel
Save