diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java index 8ef12e6..9b4caa2 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/controller/StudytourActivityController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 活动信息表 * @Author: jeecg-boot - * @Date: 2025-09-01 + * @Date: 2025-09-20 * @Version: V1.0 */ @Api(tags="活动信息表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java index 9ffc719..ae7a5fd 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/entity/StudytourActivity.java @@ -13,7 +13,6 @@ import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; import org.jeecg.modules.studytourActivityDate.entity.StudytourActivityDate; -import org.jeecg.modules.studytourComment.entity.StudytourComment; import org.springframework.format.annotation.DateTimeFormat; import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecg.common.aspect.annotation.Dict; @@ -25,7 +24,7 @@ import lombok.experimental.Accessors; /** * @Description: 活动信息表 * @Author: jeecg-boot - * @Date: 2025-09-01 + * @Date: 2025-09-20 * @Version: V1.0 */ @Data @@ -135,18 +134,51 @@ public class StudytourActivity implements Serializable { @Dict(dictTable = "studytour_category", dicText = "title", dicCode = "id") @ApiModelProperty(value = "活动分类") private java.lang.String categoryId; + /**开营通知*/ + @Excel(name = "开营通知", width = 15) + @ApiModelProperty(value = "开营通知") + private java.lang.String notice; + /**提前n天通知*/ + @Excel(name = "提前n天通知", width = 15) + @ApiModelProperty(value = "提前n天通知") + private java.lang.Integer noticeDay; /**是否下架*/ @Excel(name = "是否下架", width = 15, dicCode = "is_true") @Dict(dicCode = "is_true") @ApiModelProperty(value = "是否下架") private java.lang.String isDel; + /**一级分佣方式*/ + @Excel(name = "一级分佣方式", width = 15, dicCode = "commission_type") + @Dict(dicCode = "commission_type") + @ApiModelProperty(value = "一级分佣方式") + private java.lang.String commissionType1; + /**一级分佣比例*/ + @Excel(name = "一级分佣比例", width = 15) + @ApiModelProperty(value = "一级分佣比例") + private java.math.BigDecimal commissionRatio1; + /**一级分佣金额*/ + @Excel(name = "一级分佣金额", width = 15) + @ApiModelProperty(value = "一级分佣金额") + private java.math.BigDecimal commissionAmount1; + /**二级分佣方式*/ + @Excel(name = "二级分佣方式", width = 15, dicCode = "commission_type") + @Dict(dicCode = "commission_type") + @ApiModelProperty(value = "二级分佣方式") + private java.lang.String commissionType2; + /**二级分佣比例*/ + @Excel(name = "二级分佣比例", width = 15) + @ApiModelProperty(value = "二级分佣比例") + private java.math.BigDecimal commissionRatio2; + /**二级分佣金额*/ + @Excel(name = "二级分佣金额", width = 15) + @ApiModelProperty(value = "二级分佣金额") + private java.math.BigDecimal commissionAmount2; //活动团期 @TableField(exist = false) @ApiModelProperty(value = "活动团期") List dateList; - //是否被收藏 @TableField(exist = false) @ApiModelProperty(value = "是否被收藏:0-否 1是") @@ -186,5 +218,4 @@ public class StudytourActivity implements Serializable { // @TableField(exist = false) // @ApiModelProperty(value = "活动评论") // List commentList; - } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java index 78b5968..f27ad7e 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/mapper/StudytourActivityMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 活动信息表 * @Author: jeecg-boot - * @Date: 2025-09-01 + * @Date: 2025-09-20 * @Version: V1.0 */ public interface StudytourActivityMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java index 54fed1c..68ea543 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/IStudytourActivityService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 活动信息表 * @Author: jeecg-boot - * @Date: 2025-09-01 + * @Date: 2025-09-20 * @Version: V1.0 */ public interface IStudytourActivityService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java index e63aff0..a7d06d0 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/service/impl/StudytourActivityServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 活动信息表 * @Author: jeecg-boot - * @Date: 2025-09-01 + * @Date: 2025-09-20 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/StudytourActivityList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/StudytourActivityList.vue index a1d035c..ffa8063 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/StudytourActivityList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/StudytourActivityList.vue @@ -221,11 +221,52 @@ align:"center", dataIndex: 'categoryId_dictText' }, + { + title:'开营通知', + align:"center", + dataIndex: 'notice', + scopedSlots: {customRender: 'htmlSlot'} + }, + { + title:'提前n天通知', + align:"center", + dataIndex: 'noticeDay' + }, { title:'是否下架', align:"center", dataIndex: 'isDel_dictText' }, + { + title:'一级分佣方式', + align:"center", + dataIndex: 'commissionType1_dictText' + }, + { + title:'一级分佣比例', + align:"center", + dataIndex: 'commissionRatio1' + }, + { + title:'一级分佣金额', + align:"center", + dataIndex: 'commissionAmount1' + }, + { + title:'二级分佣方式', + align:"center", + dataIndex: 'commissionType2_dictText' + }, + { + title:'二级分佣比例', + align:"center", + dataIndex: 'commissionRatio2' + }, + { + title:'二级分佣金额', + align:"center", + dataIndex: 'commissionAmount2' + }, { title: '操作', dataIndex: 'action', @@ -275,11 +316,19 @@ fieldList.push({type:'string',value:'isDiscount',text:'是否限时优惠',dictCode:'is_true'}) fieldList.push({type:'string',value:'isHot',text:'是否口碑爆款',dictCode:'is_true'}) fieldList.push({type:'string',value:'isNew',text:'是否新上线路',dictCode:'is_true'}) - fieldList.push({type:'string',value:'addressId',text:'地点',dictCode:"studytour_address,title,id"}) + fieldList.push({type:'string',value:'addressId',text:'地点'}) fieldList.push({type:'string',value:'ageId',text:'适合年龄',dictCode:"studytour_age,title,id"}) fieldList.push({type:'string',value:'timeId',text:'活动时长',dictCode:"studytour_time,title,id"}) - fieldList.push({type:'string',value:'categoryId',text:'活动分类',dictCode:"studytour_category,title,id"}) + fieldList.push({type:'string',value:'categoryId',text:'活动分类'}) + fieldList.push({type:'Text',value:'notice',text:'开营通知',dictCode:''}) + fieldList.push({type:'int',value:'noticeDay',text:'提前n天通知',dictCode:''}) fieldList.push({type:'string',value:'isDel',text:'是否下架',dictCode:'is_true'}) + fieldList.push({type:'string',value:'commissionType1',text:'一级分佣方式',dictCode:'commission_type'}) + fieldList.push({type:'BigDecimal',value:'commissionRatio1',text:'一级分佣比例',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'commissionAmount1',text:'一级分佣金额',dictCode:''}) + fieldList.push({type:'string',value:'commissionType2',text:'二级分佣方式',dictCode:'commission_type'}) + fieldList.push({type:'BigDecimal',value:'commissionRatio2',text:'二级分佣比例',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'commissionAmount2',text:'二级分佣金额',dictCode:''}) this.superFieldList = fieldList } } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/modules/StudytourActivityForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/modules/StudytourActivityForm.vue index a977115..cfe371d 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/modules/StudytourActivityForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue/modules/StudytourActivityForm.vue @@ -80,7 +80,14 @@ - + + @@ -95,7 +102,24 @@ - + + + + + + + + + + + + @@ -103,6 +127,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue3/StudytourActivity.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue3/StudytourActivity.data.ts index 008c3ae..004e4b6 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue3/StudytourActivity.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourActivity/vue3/StudytourActivity.data.ts @@ -103,11 +103,52 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'categoryId_dictText' }, + { + title: '开营通知', + align:"center", + dataIndex: 'notice', + slots: { customRender: 'htmlSlot' }, + }, + { + title: '提前n天通知', + align:"center", + dataIndex: 'noticeDay' + }, { title: '是否下架', align:"center", dataIndex: 'isDel_dictText' }, + { + title: '一级分佣方式', + align:"center", + dataIndex: 'commissionType1_dictText' + }, + { + title: '一级分佣比例', + align:"center", + dataIndex: 'commissionRatio1' + }, + { + title: '一级分佣金额', + align:"center", + dataIndex: 'commissionAmount1' + }, + { + title: '二级分佣方式', + align:"center", + dataIndex: 'commissionType2_dictText' + }, + { + title: '二级分佣比例', + align:"center", + dataIndex: 'commissionRatio2' + }, + { + title: '二级分佣金额', + align:"center", + dataIndex: 'commissionAmount2' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -209,10 +250,11 @@ export const formSchema: FormSchema[] = [ { label: '地点', field: 'addressId', - component: 'JDictSelectTag', + component: 'JTreeSelect', componentProps:{ - dictCode:"studytour_address,title,id" - }, + dict:"studytour_address,title,id", + pidValue:"0", + }, }, { label: '适合年龄', @@ -233,10 +275,21 @@ export const formSchema: FormSchema[] = [ { label: '活动分类', field: 'categoryId', - component: 'JDictSelectTag', + component: 'JTreeSelect', componentProps:{ - dictCode:"studytour_category,title,id" - }, + dict:"studytour_category,title,id", + pidValue:"0", + }, + }, + { + label: '开营通知', + field: 'notice', + component: 'JCodeEditor', //TODO String后缀暂未添加 + }, + { + label: '提前n天通知', + field: 'noticeDay', + component: 'InputNumber', }, { label: '是否下架', @@ -246,4 +299,40 @@ export const formSchema: FormSchema[] = [ dictCode:"is_true" }, }, + { + label: '一级分佣方式', + field: 'commissionType1', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"commission_type" + }, + }, + { + label: '一级分佣比例', + field: 'commissionRatio1', + component: 'InputNumber', + }, + { + label: '一级分佣金额', + field: 'commissionAmount1', + component: 'InputNumber', + }, + { + label: '二级分佣方式', + field: 'commissionType2', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"commission_type" + }, + }, + { + label: '二级分佣比例', + field: 'commissionRatio2', + component: 'InputNumber', + }, + { + label: '二级分佣金额', + field: 'commissionAmount2', + component: 'InputNumber', + }, ]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourBindperson/entity/StudytourBindperson.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourBindperson/entity/StudytourBindperson.java index 0df5c73..5bd3e3d 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourBindperson/entity/StudytourBindperson.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourBindperson/entity/StudytourBindperson.java @@ -5,10 +5,12 @@ import java.io.UnsupportedEncodingException; import java.util.Date; import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.springframework.format.annotation.DateTimeFormat; import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecg.common.aspect.annotation.Dict; @@ -62,4 +64,9 @@ public class StudytourBindperson implements Serializable { @Dict(dicCode = "bind_status") @ApiModelProperty(value = "绑定状态") private java.lang.String status; + + //用户信息 + @TableField(exist = false) + @ApiModelProperty(value = "用户信息") + HanHaiMember user; } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/controller/StudytourJournalController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/controller/StudytourJournalController.java index 0d5a2e8..7edbd37 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/controller/StudytourJournalController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/controller/StudytourJournalController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 研学日记表 * @Author: jeecg-boot - * @Date: 2025-09-19 + * @Date: 2025-09-20 * @Version: V1.0 */ @Api(tags="研学日记表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/entity/StudytourJournal.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/entity/StudytourJournal.java index 18ce311..8fbdb85 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/entity/StudytourJournal.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/entity/StudytourJournal.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 研学日记表 * @Author: jeecg-boot - * @Date: 2025-09-19 + * @Date: 2025-09-20 * @Version: V1.0 */ @Data @@ -51,6 +51,10 @@ public class StudytourJournal implements Serializable { @Excel(name = "标题", width = 15) @ApiModelProperty(value = "标题") private java.lang.String title; + /**封面*/ + @Excel(name = "封面", width = 15) + @ApiModelProperty(value = "封面") + private java.lang.String image; /**详情*/ @Excel(name = "详情", width = 15) @ApiModelProperty(value = "详情") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/mapper/StudytourJournalMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/mapper/StudytourJournalMapper.java index a784aca..5a5b9aa 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/mapper/StudytourJournalMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/mapper/StudytourJournalMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 研学日记表 * @Author: jeecg-boot - * @Date: 2025-09-19 + * @Date: 2025-09-20 * @Version: V1.0 */ public interface StudytourJournalMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/IStudytourJournalService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/IStudytourJournalService.java index acb2677..0b8cbea 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/IStudytourJournalService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/IStudytourJournalService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 研学日记表 * @Author: jeecg-boot - * @Date: 2025-09-19 + * @Date: 2025-09-20 * @Version: V1.0 */ public interface IStudytourJournalService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/impl/StudytourJournalServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/impl/StudytourJournalServiceImpl.java index 2363ee1..e0c20f9 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/impl/StudytourJournalServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/service/impl/StudytourJournalServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 研学日记表 * @Author: jeecg-boot - * @Date: 2025-09-19 + * @Date: 2025-09-20 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/StudytourJournalList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/StudytourJournalList.vue index 84c923f..e66c9a0 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/StudytourJournalList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/StudytourJournalList.vue @@ -126,6 +126,12 @@ align:"center", dataIndex: 'title' }, + { + title:'封面', + align:"center", + dataIndex: 'image', + scopedSlots: {customRender: 'imgSlot'} + }, { title:'详情', align:"center", @@ -167,6 +173,7 @@ getSuperFieldList(){ let fieldList=[]; fieldList.push({type:'Text',value:'title',text:'标题',dictCode:''}) + fieldList.push({type:'Text',value:'image',text:'封面',dictCode:''}) fieldList.push({type:'Text',value:'content',text:'详情',dictCode:''}) this.superFieldList = fieldList } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/modules/StudytourJournalForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/modules/StudytourJournalForm.vue index e1499bf..6079960 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/modules/StudytourJournalForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue/modules/StudytourJournalForm.vue @@ -8,6 +8,11 @@ + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue3/StudytourJournal.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue3/StudytourJournal.data.ts index bff60e9..53596c8 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue3/StudytourJournal.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/studytourJournal/vue3/StudytourJournal.data.ts @@ -9,6 +9,12 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'title' }, + { + title: '封面', + align:"center", + dataIndex: 'image', + customRender:render.renderAvatar, + }, { title: '详情', align:"center", @@ -26,6 +32,13 @@ export const formSchema: FormSchema[] = [ field: 'title', component: 'Input', }, + { + label: '封面', + field: 'image', + component: 'JImageUpload', + componentProps:{ + }, + }, { label: '详情', field: 'content', diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java index d784128..5607e9a 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/ActivityServiceImpl.java @@ -148,10 +148,10 @@ public class ActivityServiceImpl implements ActivityService { //价格区间 query.between(StudytourActivity::getPriceOrigin, studytourActivity.getPriceLow(), studytourActivity.getPriceHigh()); } - if(StringUtils.isNotEmpty(studytourActivity.getDateLow()) && StringUtils.isNotEmpty(studytourActivity.getDateHigh())){ - //出发时间区间 - //query.between(StudytourActivity::s, studytourActivity.getDateLow(), studytourActivity.getDateHigh()); - } +// if(StringUtils.isNotEmpty(studytourActivity.getDateLow()) && StringUtils.isNotEmpty(studytourActivity.getDateHigh())){ +// //出发时间区间 +// query.between(StudytourActivity::s, studytourActivity.getDateLow(), studytourActivity.getDateHigh()); +// } //是否下架 query.eq(StudytourActivity::getIsDel, "0"); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/BindServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/BindServiceImpl.java index 1a074c3..e73f4c4 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/BindServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/BindServiceImpl.java @@ -89,8 +89,12 @@ public class BindServiceImpl implements BindService { //按照创建时间降序排列 query.orderByDesc(StudytourBindperson::getCreateTime); - //获取图片直播信息列表 + //获取绑定成员列表 pageList = query.page(page); + for (StudytourBindperson record : pageList.getRecords()) { + HanHaiMember member = hanHaiMemberService.getById(record.getUserId()); + record.setUser(member); + } log.info("绑定成员列表查询结束"); return Result.OK("绑定成员列表", pageList); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/NoticeServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/NoticeServiceImpl.java index 793a9b1..0a11209 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/NoticeServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/NoticeServiceImpl.java @@ -71,6 +71,7 @@ public class NoticeServiceImpl implements NoticeService { .or( q -> q .eq(StudytourNotice::getIsRead, "1") + .eq(StudytourNotice::getUserId, hanHaiMember.getId()) ); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java index b8f4373..b7d9c2e 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/OrderServiceImpl.java @@ -16,12 +16,24 @@ import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; import org.jeecg.modules.pay.MpWxPayService; import org.jeecg.modules.studytourActivity.entity.StudytourActivity; import org.jeecg.modules.studytourActivity.service.IStudytourActivityService; +import org.jeecg.modules.studytourCommissionLog.entity.StudytourCommissionLog; +import org.jeecg.modules.studytourCommissionLog.service.IStudytourCommissionLogService; +import org.jeecg.modules.studytourMedal.entity.StudytourMedal; +import org.jeecg.modules.studytourMedal.service.IStudytourMedalService; +import org.jeecg.modules.studytourMedalActivity.entity.StudytourMedalActivity; +import org.jeecg.modules.studytourMedalActivity.service.IStudytourMedalActivityService; +import org.jeecg.modules.studytourMedalUser.entity.StudytourMedalUser; +import org.jeecg.modules.studytourMedalUser.service.IStudytourMedalUserService; +import org.jeecg.modules.studytourNotice.entity.StudytourNotice; +import org.jeecg.modules.studytourNotice.service.IStudytourNoticeService; import org.jeecg.modules.studytourOrder.entity.StudytourOrder; import org.jeecg.modules.studytourOrder.entity.StudytourOrderPerson; import org.jeecg.modules.studytourOrder.service.IStudytourOrderPersonService; import org.jeecg.modules.studytourOrder.service.IStudytourOrderService; import org.jeecg.modules.studytourPerson.entity.StudytourPerson; import org.jeecg.modules.studytourPerson.service.IStudytourPersonService; +import org.jeecg.modules.studytourRecord.entity.StudytourRecord; +import org.jeecg.modules.studytourRecord.service.IStudytourRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -58,6 +70,24 @@ public class OrderServiceImpl implements OrderService { //订单出行人信息 @Resource private IStudytourOrderPersonService studytourOrderPersonService; + //勋章信息 + @Resource + private IStudytourMedalService studytourMedalService; + //活动勋章信息 + @Resource + private IStudytourMedalActivityService studytourMedalActivityService; + //用户勋章信息 + @Resource + private IStudytourMedalUserService studytourMedalUserService; + //用户成长档案信息 + @Resource + private IStudytourRecordService studytourRecordService; + //开营通知信息 + @Resource + private IStudytourNoticeService studytourNoticeService; + //佣金记录信息 + @Resource + private IStudytourCommissionLogService studytourCommissionLogService; /******************************************************************************************************************/ @@ -245,7 +275,8 @@ public class OrderServiceImpl implements OrderService { public Result updateOrder(String token, StudytourOrder studytourOrder) { log.info("开始修改订单"); //权限验证 - HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);//小程序权限验证 + //HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);//小程序权限验证 + HanHaiMember hanHaiMember = hanHaiMemberService.getById(token); try{ //查询订单是否存在 @@ -260,6 +291,16 @@ public class OrderServiceImpl implements OrderService { //修改订单信息 studytourOrderService.updateById(studytourOrder); + + if("2".equals(studytourOrder.getStatus())){ + + //1、添加用户勋章 + getMedal(order); + + //2、添加成长档案 + addExperience(order); + } + return Result.OK("操作成功"); }catch (Exception e){ e.printStackTrace(); @@ -406,10 +447,16 @@ public class OrderServiceImpl implements OrderService { //如果订单存在则修改订单状态 if (null != studytourOrder){ if("0".equals(studytourOrder.getStatus())){ - + //1、修改订单状态 studytourOrder.setStatus("1");//订单状态 studytourOrder.setPayTime(CommonUtils.getCurrentTime());//订单支付时间 studytourOrderService.updateById(studytourOrder); + + //2、添加开营通知 + addNotice(studytourOrder); + + //3、添加分佣信息 + addCommission(studytourOrder); } } @@ -420,5 +467,210 @@ public class OrderServiceImpl implements OrderService { return null; } + //获取勋章 + public void getMedal(StudytourOrder studytourOrder){ + log.info("给用户添加勋章信息"); + try{ + //查询关联活动信息 + StudytourActivity activity = studytourActivityService.getById(studytourOrder.getActivityId()); + if(null != activity){ + //查询活动勋章信息 + List medalActivityList = studytourMedalActivityService.lambdaQuery().eq(StudytourMedalActivity::getActivityId, activity.getId()).list(); + + //查询用户持有的勋章信息 + List studytourMedalUserList = studytourMedalUserService.lambdaQuery().eq(StudytourMedalUser::getUserId, studytourOrder.getUserId()).list(); + + //需要添加的勋章列表 + List medalUserList = new ArrayList<>(); + + //判断用户是否已经持有该勋章,如果已经持有,则不再添加 + for (StudytourMedalActivity studytourMedalActivity : medalActivityList) { + boolean flag = true; + for (StudytourMedalUser medalUser : studytourMedalUserList) { + if(studytourMedalActivity.getMedalId().equals(medalUser.getMedalId())){ + flag = false; + continue; + } + } + if(flag){ + StudytourMedalUser medalUser = new StudytourMedalUser(); + medalUser.setActivityId(studytourMedalActivity.getActivityId());//关联活动 + medalUser.setMedalId(studytourMedalActivity.getMedalId());//关联勋章 + medalUser.setUserId(studytourOrder.getUserId());//关联用户 + medalUser.setIsLight("0");//未点亮 + medalUserList.add(medalUser); + } + } + + if(medalUserList.size() > 0){ + boolean result = studytourMedalUserService.saveBatch(medalUserList); + if(!result){ + log.error("用户勋章添加失败"); + } + }else { + log.info("用户已领取完该活动的所有勋章"); + } + + }else { + log.error("活动不存在"); + } + }catch (Exception e){ + e.printStackTrace(); + log.error("用户勋章添加失败"); + } + } + + //添加成长档案 + public void addExperience(StudytourOrder studytourOrder){ + try{ + //0、校验是否已经有了该活动的成长档案 + List recordList = studytourRecordService + .lambdaQuery() + .eq(StudytourRecord::getActivityId, studytourOrder.getActivityId()) + .eq(StudytourRecord::getUserId, studytourOrder.getUserId()) + .list(); + if(recordList.size() < 1){ + //没有该活动的成长档案,进行添加 + StudytourRecord studytourRecord = new StudytourRecord(); + studytourRecord.setActivityId(studytourOrder.getActivityId());//关联活动 + studytourRecord.setUserId(studytourOrder.getUserId());//关联用户 + boolean result = studytourRecordService.save(studytourRecord); + if(!result){ + log.error("用户成长档案添加失败"); + } + } + + }catch (Exception e){ + e.printStackTrace(); + log.error("用户成长档案添加失败"); + } + } + + //添加开营通知 + public void addNotice(StudytourOrder studytourOrder){ + try{ + //1、查询活动信息 + StudytourActivity activity = studytourActivityService.getById(studytourOrder.getActivityId()); + if(null != activity){ + StudytourNotice notice = new StudytourNotice(); + notice.setTitle(activity.getTitle());//通知标题 + notice.setNoticeDate(CommonUtils.getValidDate(studytourOrder.getStartDate(), activity.getNoticeDay()));//通知时间 + notice.setTeacherPhone(activity.getPhone());//导师电话 + notice.setIsRead("0");//0-未读 1-已读 + notice.setContent(activity.getNotice());//通知内容 + notice.setUserId(studytourOrder.getUserId());//关联用户 + boolean result = studytourNoticeService.save(notice); + if(!result){ + log.error("开营通知添加失败"); + } + }else { + log.error("活动不存在"); + } + + }catch (Exception e){ + e.printStackTrace(); + log.error("开营通知添加失败"); + } + } + + //分销佣金 + public void addCommission(StudytourOrder studytourOrder){ + try{ + //订单用户信息 + HanHaiMember hanHaiMember = hanHaiMemberService.getById(studytourOrder.getUserId()); + + //判断用户是否有一级分佣人 + if(null != hanHaiMember && StringUtils.isNotEmpty(hanHaiMember.getVid())){ + log.info("一级分佣开始"); + //0、查询一级分佣人信息 + HanHaiMember member1 = hanHaiMemberService.getById(hanHaiMember.getVid()); + + if(null != member1){ + //1、查询活动一级分佣信息 + log.info("查询一级分佣信息"); + StudytourActivity activity = studytourActivityService.getById(studytourOrder.getActivityId()); + String commissionType1 = activity.getCommissionType1();//一级分佣类型 + BigDecimal commissionRatio1 = activity.getCommissionRatio1();//一级分佣比例 + BigDecimal commissionAmount1 = activity.getCommissionAmount1();//一级分佣金额 + + //2、获取分佣金额 + log.info("获取一级分佣金额"); + BigDecimal commission1 = new BigDecimal(0); + if("0".equals(commissionType1)){ + //按比例进行分佣 + commission1 = studytourOrder.getPayAmount().multiply(commissionRatio1); + }else{ + //按照固定金额进行分佣 + commission1 = commissionAmount1; + } + + //3、一级分佣人用户余额增加、佣金记录增加 + log.info("一级分佣人用户余额增加、佣金记录增加"); + commission1 = commission1.setScale(2, BigDecimal.ROUND_DOWN);//直接删除多余的小数位,如2.35会变成2.3 + BigDecimal newPrice1 = member1.getPrice().add(commission1);//余额 + BigDecimal newCommission1 = member1.getCommission().add(commission1);//总佣金 + member1.setPrice(newPrice1); + member1.setCommission(newCommission1); + hanHaiMemberService.updateById(member1); + + //4、增加一级分佣人佣金记录信息 + log.info("一级分佣人佣金记录信息增加"); + StudytourCommissionLog commissionLog1 = new StudytourCommissionLog(); + commissionLog1.setAmount(commission1);//佣金金额 + commissionLog1.setCommissionId(hanHaiMember.getId());//佣金来源用户 + commissionLog1.setUserId(member1.getId());//佣金获得用户 + studytourCommissionLogService.save(commissionLog1); + + //判断用户是否有二级分佣人 + if(StringUtils.isNotEmpty(member1.getVid())){ + log.info("二级分佣开始"); + //0、查询二级分佣人信息 + HanHaiMember member2 = hanHaiMemberService.getById(member1.getVid()); + + if(null != member2){ + //1、活动二级分佣信息 + log.info("查询二级分佣信息"); + String commissionType2 = activity.getCommissionType2();//二级级分佣类型 + BigDecimal commissionRatio2 = activity.getCommissionRatio2();//二级分佣比例 + BigDecimal commissionAmount2 = activity.getCommissionAmount2();//二级分佣金额 + + //2、获取分佣金额 + log.info("获取二级分佣金额"); + BigDecimal commission2 = new BigDecimal(0); + if("0".equals(commissionType2)){ + //按比例进行分佣 + commission2 = studytourOrder.getPayAmount().multiply(commissionRatio2); + }else{ + //按照固定金额进行分佣 + commission2 = commissionAmount2; + } + + //3、二级分佣人用户余额增加、佣金记录增加 + log.info("二级分佣人用户余额增加、佣金记录增加"); + commission2 = commission2.setScale(2, BigDecimal.ROUND_DOWN);//直接删除多余的小数位,如2.35会变成2.3 + BigDecimal newPrice2 = member2.getPrice().add(commission2);//余额 + BigDecimal newCommission2 = member2.getCommission().add(commission2);//总佣金 + member2.setPrice(newPrice2); + member2.setCommission(newCommission2); + hanHaiMemberService.updateById(member2); + + //4、增加一级分佣人佣金记录信息 + log.info("二级分佣人佣金记录信息增加"); + StudytourCommissionLog commissionLog2 = new StudytourCommissionLog(); + commissionLog2.setAmount(commission2);//佣金金额 + commissionLog2.setCommissionId(hanHaiMember.getId());//佣金来源用户 + commissionLog2.setUserId(member2.getId());//佣金获得用户 + studytourCommissionLogService.save(commissionLog2); + } + } + } + + } + }catch (Exception e){ + e.printStackTrace(); + } + + } + } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/PartnerServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/PartnerServiceImpl.java index 4840980..4764c47 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/PartnerServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/Impl/PartnerServiceImpl.java @@ -193,6 +193,7 @@ public class PartnerServiceImpl implements PartnerService { .lambdaQuery(); //组装查询条件 + query.eq(StudytourCommissionLog::getUserId, hanHaiMember.getId()); //按照创建时间降序排列 query.orderByDesc(StudytourCommissionLog::getCreateTime); diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/utils/CommonUtils.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/utils/CommonUtils.java index caa2e1a..41733b4 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/utils/CommonUtils.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/utils/CommonUtils.java @@ -38,6 +38,19 @@ public class CommonUtils { return newTime; } + //获取延长日期 + public static Date getValidDate(Date oldTime, int day){ + day = day - day*2; + // 创建Calendar实例 + Calendar cal = Calendar.getInstance(); + cal.setTime(oldTime); // 设置当前时间 + + // 在当前时间基础上加n个月 + cal.add(Calendar.DAY_OF_MONTH, day); + Date newTime = cal.getTime(); + return newTime; + } + public static void main(String[] args) { System.out.println(getValidTime(getCurrentTime(), 3)); }