推荐有礼

This commit is contained in:
齐天大圣 2024-02-27 13:39:14 +08:00
parent 922cfcb017
commit 3760ab43ca
7 changed files with 27 additions and 16 deletions

View File

@ -46,10 +46,10 @@
<el-table-column <el-table-column
type="index" type="index"
align="center" align="center"
label="序" label=""
> >
</el-table-column> </el-table-column>
<el-table-column label="活动编号" align="center" prop="id" /> <!-- <el-table-column label="活动编号" align="center" prop="id" />-->
<el-table-column label="活动名称" align="center" prop="name" /> <el-table-column label="活动名称" align="center" prop="name" />
<el-table-column label="会员等级" align="center" prop="dieselUserLevel" > <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -159,13 +159,13 @@
</el-form-item> </el-form-item>
<el-form-item label="参与条件" prop="participationCondition"> <!-- <el-form-item label="参与条件" prop="participationCondition">
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件"> <el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
<el-option label="不限制" value="0"></el-option> <el-option label="不限制" value="0"></el-option>
<el-option label="优惠订单不参与" value="1"></el-option> <el-option label="优惠订单不参与" value="1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="参与次数类别" prop="participationAcount"> <el-form-item label="参与次数类别" prop="participationAcount">
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别"> <el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
<el-option label="不限制" value="0"></el-option> <el-option label="不限制" value="0"></el-option>

View File

@ -46,10 +46,10 @@
<el-table-column <el-table-column
type="index" type="index"
align="center" align="center"
label="序" label=""
> >
</el-table-column> </el-table-column>
<el-table-column label="活动编号" align="center" prop="id" /> <!-- <el-table-column label="活动编号" align="center" prop="id" />-->
<el-table-column label="活动名称" align="center" prop="name" /> <el-table-column label="活动名称" align="center" prop="name" />
<el-table-column label="会员等级" align="center" prop="dieselUserLevel" > <el-table-column label="会员等级" align="center" prop="dieselUserLevel" >
<template slot-scope="scope"> <template slot-scope="scope">
@ -163,13 +163,13 @@
<el-option :label="item.name" :value="item.id.toString()" v-for="(item,index) in userGradeList" :key="index" > </el-option> <el-option :label="item.name" :value="item.id.toString()" v-for="(item,index) in userGradeList" :key="index" > </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="参与条件" prop="participationCondition"> <!-- <el-form-item label="参与条件" prop="participationCondition">
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件"> <el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
<el-option label="不限制" value="0"></el-option> <el-option label="不限制" value="0"></el-option>
<el-option label="优惠订单不参与" value="1"></el-option> <el-option label="优惠订单不参与" value="1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="参与次数类别" prop="participationAcount"> <el-form-item label="参与次数类别" prop="participationAcount">
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别"> <el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
<el-option label="不限制" value="0"></el-option> <el-option label="不限制" value="0"></el-option>

View File

@ -127,9 +127,9 @@ public class ActiveConsumptionController extends BaseController {
* @param id 主键 * @param id 主键
* @return 单条数据 * @return 单条数据
*/ */
@GetMapping("/detailRecord/{id}") @GetMapping("/detailRecord")
public ResponseObject detail(@PathVariable Serializable id) { public ResponseObject detail(@Param("activeConsumption") ActiveConsumption activeConsumption) {
return getSuccessResult(this.activeConsumptionChildService.detailRecord(id)); return getSuccessResult(this.activeConsumptionChildService.detailRecord(activeConsumption));
} }
/** /**

View File

@ -1,6 +1,7 @@
package com.fuint.business.marketingActivity.activeConsumption.service; package com.fuint.business.marketingActivity.activeConsumption.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumption;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild; import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO;
@ -19,7 +20,7 @@ public interface ActiveConsumptionChildService extends IService<ActiveConsumptio
List<ActiveConsumptionChild> selectList(Serializable id); List<ActiveConsumptionChild> selectList(Serializable id);
List<CardFavorableRecord> detailRecord(Serializable id); List<CardFavorableRecord> detailRecord(ActiveConsumption activeConsumption);
CardFavorableCountVO detailCount(Serializable id); CardFavorableCountVO detailCount(Serializable id);
} }

View File

@ -2,6 +2,7 @@ package com.fuint.business.marketingActivity.activeConsumption.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumption;
import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild; import com.fuint.business.marketingActivity.activeConsumption.entity.ActiveConsumptionChild;
import com.fuint.business.marketingActivity.activeConsumption.mapper.ActiveConsumptionChildMapper; import com.fuint.business.marketingActivity.activeConsumption.mapper.ActiveConsumptionChildMapper;
import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionChildService; import com.fuint.business.marketingActivity.activeConsumption.service.ActiveConsumptionChildService;
@ -10,6 +11,7 @@ import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableR
import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO; import com.fuint.business.marketingActivity.cardFavorable.vo.CardFavorableCountVO;
import com.fuint.common.dto.AccountInfo; import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -35,11 +37,15 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl<ActiveConsump
} }
@Override @Override
public List<CardFavorableRecord> detailRecord(Serializable id) { public List<CardFavorableRecord> detailRecord(ActiveConsumption activeConsumption) {
// 查询优惠券领取记录 // 查询优惠券领取记录
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CardFavorableRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardFavorableRecord::getActiveId, id); queryWrapper.eq(CardFavorableRecord::getActiveId, activeConsumption.getId());
queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId());
if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){
queryWrapper.between(CardFavorableRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime());
}
queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId()); queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId());
List<CardFavorableRecord> favorableRecords = cardFavorableRecordService.list(queryWrapper); List<CardFavorableRecord> favorableRecords = cardFavorableRecordService.list(queryWrapper);
return favorableRecords; return favorableRecords;

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
@ -15,6 +16,7 @@ import java.util.Date;
* @since 2023-11-11 17:13:11 * @since 2023-11-11 17:13:11
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data
public class ActiveDiscountChild extends Model<com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild> { public class ActiveDiscountChild extends Model<com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild> {
//主键id //主键id
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ -31,6 +33,8 @@ public class ActiveDiscountChild extends Model<com.fuint.business.marketingActiv
private Double deductionAmount; private Double deductionAmount;
//创建者 //创建者
private String createBy; private String createBy;
//满足金额类型 1订单金额 2实付金额
private String moneyType;
//创建时间 //创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime; private Date createTime;

View File

@ -45,10 +45,10 @@ public class CardFuelDiesel extends Model<CardFuelDiesel> {
//活动时间 1:不限时间 2自定义时间 //活动时间 1:不限时间 2自定义时间
private String activeTime; private String activeTime;
//活动开始时间 //活动开始时间
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date startTime; private Date startTime;
//活动结束时间 //活动结束时间
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date endTime; private Date endTime;
//活动进度 //活动进度
private String activityProgress; private String activityProgress;