This commit is contained in:
cun-nan 2024-09-04 17:32:58 +08:00
parent b4e9ad4c37
commit d6dbf9aec7
7 changed files with 197 additions and 86 deletions

View File

@ -64,7 +64,7 @@
</div>
</el-form-item>
<el-form-item label="适用会员等级" prop="levelId">
<el-select v-model="ruleForm.levelId" multiple clearable placeholder="请选择会员等级(多选)">
<el-select v-model="ruleForm.levelId" clearable placeholder="请选择会员等级">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
@ -73,7 +73,7 @@
</el-select>
</el-form-item>
<el-form-item label="会员标签" prop="babelIds">
<el-select v-model="ruleForm.babelIds" multiple clearable placeholder="请选择会员标签(多选)">
<el-select v-model="ruleForm.babelIds" clearable placeholder="请选择会员标签">
<el-option
v-for="item in userLabelList"
:key="item.id+''"
@ -167,17 +167,17 @@
<el-checkbox label="0" name="type">按订单金额</el-checkbox>
<img src="@/assets/images/tjb.png"
style="width: 20px;height: 20px;cursor: pointer;margin-top: 7px;margin-left: 10px"
@click="addPoints()">
@click="addPoints(0)">
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 0">
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>订单金额满</span>
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.full">
<template slot="append"></template>
</el-input>
<span>固定优惠</span>
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.sub">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -185,17 +185,17 @@
</div>
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 1">
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>订单金额满</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
<template slot="append"></template>
</el-input>
<span>随机优惠</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.randomFront">
<template slot="append"></template>
</el-input>
<span></span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.randomAfter">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -203,17 +203,17 @@
</div>
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 2">
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>订单金额每满</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.full">
<template slot="append"></template>
</el-input>
<span>固定优惠</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.sub">
<template slot="append"></template>
</el-input>
<span>最大优惠</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.maxPreferential">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -221,17 +221,17 @@
</div>
</div>
<div v-if="ruleForm.offerType == 1 && ruleForm.activeType == 0">
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in orderList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>订单金额满</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
<template slot="append"></template>
</el-input>
<span>享受折扣</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.enjoyDiscount">
<template slot="append"></template>
</el-input>
<span>最大优惠</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.givePoints">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.maxPreferential">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -243,18 +243,18 @@
<el-checkbox label="1" name="type">按加油升数</el-checkbox>
<img src="@/assets/images/tjb.png"
style="width: 20px;height: 20px;cursor: pointer;margin-top: 7px;margin-left: 10px"
@click="addGrowthValues()">
@click="addGrowthValues(1)">
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 0">
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>加油升数满</span>
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.full">
<template slot="append">L</template>
</el-input>
<span>固定优惠</span>
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.sub">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -262,19 +262,19 @@
</div>
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 1">
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>加油升数满</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
<template slot="append">L</template>
</el-input>
<span>随机优惠</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.randomFront">
<template slot="append"></template>
</el-input>
<span></span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.randomAfter">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -282,19 +282,19 @@
</div>
</div>
<div v-if="ruleForm.offerType == 0 && ruleForm.activeType == 2">
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>加油升数每满</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px" v-model="item.full">
<template slot="append">L</template>
</el-input>
<span>固定优惠</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.sub">
<template slot="append"></template>
</el-input>
<span>最大优惠</span>
<el-input placeholder="请输入" style="width: 19%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.maxPreferential">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -302,19 +302,19 @@
</div>
</div>
<div v-if="ruleForm.offerType == 1 && ruleForm.activeType == 0">
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
<div v-for="(item,index) in refuelList" :key="index" style="font-size: 14px;margin: 15px 0">
<span>加油升数满</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.consumeAmount">
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px" v-model="item.full">
<template slot="append">L</template>
</el-input>
<span>享受折扣</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.enjoyDiscount">
<template slot="append"></template>
</el-input>
<span>最大优惠</span>
<el-input placeholder="请输入" style="width: 20%;margin: 0 10px"
v-model="item.giveGrowthValue">
v-model="item.maxPreferential">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -338,6 +338,7 @@
import {listUserLabel} from "@/api/staff/user/userlabel";
import {listUserGrade} from "@/api/staff/user/usergrade";
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
import {addActiveSubPrice, editActiveSubPrice, getActiveSubPrice} from "@/api/EventMarketing/activeSubPrice";
export default {
name: "LiJianMarketing",
@ -345,10 +346,13 @@ export default {
data() {
return {
ruleForm: {
activeTimeType: 0,
paymentType: [],
activeManner: [],
offerType:0,
activeType:0,
offerType: 0,
activeType: 0,
timeType: 0,
applyOilType: 0,
},
userGradeList: [],
userLabelList: [],
@ -370,39 +374,39 @@ export default {
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
weekDay: [],
monthDay: [],
pointList: [],
growthValueList: [],
orderList: [],
refuelList: [],
//
rules: {
name: [
activeName: [
{required: true, message: '活动名称不能为空', trigger: 'blur'},
],
activityTimeType: [
activeTimeType: [
{required: true, message: '活动时间不能为空', trigger: 'blur'},
],
suitTimeSlotFront: [
{required: true, message: '时间段不能为空', trigger: 'blur'},
offerType: [
{required: true, message: '优惠类型不能为空', trigger: 'blur'},
],
dieselUserLevel: [
levelId: [
{required: true, message: '适用会员等级不能为空', trigger: 'blur'},
],
dayLimitNum: [
{required: true, message: '每人每天参与上限不能为空', trigger: 'blur'},
],
monthLimitNum: [
{required: true, message: '每人每月参与上限不能为空', trigger: 'blur'},
],
limitNum: [
{required: true, message: '每人累计参与上限不能为空', trigger: 'blur'},
],
applyOilType: [
{required: true, message: '适用油品油号不能为空', trigger: 'blur'},
],
paymentType: [
{required: true, message: '可使用支付方式不能为空', trigger: 'blur'},
],
everyDayCeiling: [
{required: true, message: '每人每天参与上限不能为空', trigger: 'blur'},
],
monthlyCeiling: [
{required: true, message: '每人每月参与上限不能为空', trigger: 'blur'},
],
accumulateCeiling: [
{required: true, message: '每人累计参与上限不能为空', trigger: 'blur'},
],
noticeContent: [
{required: true, message: '通知内容不能为空', trigger: 'blur'},
],
activityDetails: [
{required: true, message: '活动详情不能为空', trigger: 'blur'},
activeManner: [
{required: true, message: '活动方式不能为空', trigger: 'blur'},
],
}
}
@ -449,27 +453,68 @@ export default {
})
},
getInfo() {
getActiveSubPrice().then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.timeSlots) {
if (res.data.timeType == 0) {
this.weekDay = this.ruleForm.timeSlots.split(",")
} else if (res.data.timeType == 1) {
this.monthDay = this.ruleForm.timeSlots.split(",")
}
}
if (res.data.applyOil) this.ruleForm.applyOil = res.data.applyOil.split(",")
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
if (res.data.activeManner) this.ruleForm.activeManner = res.data.activeManner.split(",")
if (res.data.orderList) this.orderList = this.ruleForm.orderList
if (res.data.refuelList) this.refuelList = this.ruleForm.refuelList
} else {
this.ruleForm = {
activeTimeType: 0,
paymentType: [],
activeManner: [],
offerType: 0,
activeType: 0,
timeType: 0,
applyOilType: 0,
}
this.tindex1 = 0
this.tindex2 = 0
this.tindex3 = 0
this.tindex4 = 0
this.tindex5 = 0
}
})
},
addPoints() {
addPoints(activeManner) {
let data = {
consumeAmount: "",
givePoints: "",
activeManner: activeManner,
full: "",
sub: "",
randomFront: "",
randomAfter: "",
maxPreferential: "",
enjoyDiscount: "",
}
this.pointList.push(data)
this.orderList.push(data)
},
deletePoints(index) {
this.pointList.splice(index, 1);
this.orderList.splice(index, 1);
},
addGrowthValues() {
addGrowthValues(activeManner) {
let data = {
consumeAmount: "",
giveGrowthValue: "",
activeManner: activeManner,
full: "",
sub: "",
randomFront: "",
randomAfter: "",
maxPreferential: "",
enjoyDiscount: "",
}
this.growthValueList.push(data)
this.refuelList.push(data)
},
deleteGrowthValues(index) {
this.growthValueList.splice(index, 1);
this.refuelList.splice(index, 1);
},
Typeindex1(index) {
this.tindex1 = index
@ -484,8 +529,8 @@ export default {
this.activityTypeList = ['固定满减']
}
this.tindex5 = 0
this.pointList = []
this.growthValueList = []
this.orderList = []
this.refuelList = []
},
Typeindex3(index) {
this.tindex3 = index
@ -508,11 +553,33 @@ export default {
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.timeType == 0) {
this.ruleForm.timeSlots = this.weekDay.toString()
} else if (this.ruleForm.timeType == 1) {
this.ruleForm.timeSlots = this.monthDay.toString()
}
if (this.ruleForm.applyOil) this.ruleForm.applyOil = this.ruleForm.applyOil.toString()
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
if (this.ruleForm.activeManner) this.ruleForm.activeManner = this.ruleForm.activeManner.toString()
if (this.orderList) this.ruleForm.orderList = this.orderList
if (this.refuelList) this.ruleForm.refuelList = this.refuelList
if (this.ruleForm.id) {
//
editActiveSubPrice(this.ruleForm).then(res => {
this.$message.success("修改成功")
this.getInfo()
})
} else {
//
addActiveSubPrice(this.ruleForm).then(res => {
if (res.data) {
this.$message.success("添加成功")
this.getInfo()
} else {
this.$message.error("添加失败")
}
})
}
}
});

View File

@ -41,12 +41,13 @@ public class ActiveSubPriceController extends BaseController {
**/
@PostMapping("/add")
public ResponseObject add(@RequestBody ActiveSubPriceSaveVO saveVO) {
boolean row = false;
try {
activeSubPriceService.saveActiveSubPrice(true, saveVO);
row = activeSubPriceService.saveActiveSubPrice(true, saveVO);
} catch (BusinessCheckException businessCheckException) {
return getFailureResult(businessCheckException.getMessage());
}
return getSuccessResult("保存成功", null);
return getSuccessResult("保存成功", row);
}
/**
@ -56,14 +57,15 @@ public class ActiveSubPriceController extends BaseController {
* @param saveVO ActiveSubPriceSaveVO实体
* @return com.fuint.framework.web.ResponseObject
**/
@PostMapping("/update")
@PutMapping("/update")
public ResponseObject update(@RequestBody ActiveSubPriceSaveVO saveVO) {
boolean row = false;
try {
activeSubPriceService.saveActiveSubPrice(true, saveVO);
row = activeSubPriceService.saveActiveSubPrice(false, saveVO);
} catch (BusinessCheckException businessCheckException) {
return getFailureResult(businessCheckException.getMessage());
}
return getSuccessResult("保存成功", null);
return getSuccessResult("保存成功", row);
}

View File

@ -1,13 +1,16 @@
package com.fuint.business.marketingActivity.activePrice.entity;
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 com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* 立减营销活动规则;
@ -32,8 +35,10 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
/** 适用时间段(1、2、3、4..31代表周一、周二、周三或者1号、2号、3号)数字之间英文逗号隔开 */
private String timeSlots ;
/** 适用开始时间 */
@JsonFormat(pattern = "HH:mm" , timezone = "GMT+8")
private Date timeApplyStart ;
/** 适用结束时间 */
@JsonFormat(pattern = "HH:mm" , timezone = "GMT+8")
private Date timeApplyEnd ;
/** 可使用支付方式 0微信支付 1支付宝 2云闪付 3会员卡 4现金 5POS刷卡 以数据字典为准 */
private String paymentType ;
@ -71,4 +76,11 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
private String updateBy ;
/** 更新时间 */
private Date updateTime ;
/**订单金额列表*/
@TableField(exist = false)
private List<ActiveSubPriceRule> orderList;
/**加油升数列表*/
@TableField(exist = false)
private List<ActiveSubPriceRule> refuelList;
}

View File

@ -37,5 +37,13 @@ public interface ActiveSubPriceRuleService extends IService<ActiveSubPriceRule>
* @return java.util.List<com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule>
**/
List<ActiveSubPriceRule> listByActId(Integer actId);
/**
* 根据活动id和查询活动规则
* @param actId
* @param activeManner
* @return
*/
List<ActiveSubPriceRule> listByActSubId(Integer actId,String activeManner);
}

View File

@ -31,13 +31,13 @@ public interface ActiveSubPriceService extends IService<ActiveSubPrice> {
* @author PQZ
* @date 17:16 2024/9/2
**/
void saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) throws BusinessCheckException;
boolean saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) throws BusinessCheckException;
/**
* 根据店铺id查询立减营销信息
* @return
*/
ActiveSubPriceRespVO selectByStoreId();
ActiveSubPrice selectByStoreId();
}

View File

@ -1,12 +1,14 @@
package com.fuint.business.marketingActivity.activePrice.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule;
import com.fuint.business.marketingActivity.activePrice.mapper.ActiveSubPriceRuleMapper;
import com.fuint.business.marketingActivity.activePrice.service.ActiveSubPriceRuleService;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
/**
@ -44,6 +46,9 @@ public class ActiveSubPriceRuleServiceImpl extends ServiceImpl<ActiveSubPriceRul
@Override
public void saveActiveSubPriceRule(Integer actId,List<ActiveSubPriceRule> list) {
removeByActId(actId);
for (ActiveSubPriceRule activeSubPriceRule : list) {
activeSubPriceRule.setActiveId(actId);
}
saveBatch(list);
}
@ -61,5 +66,13 @@ public class ActiveSubPriceRuleServiceImpl extends ServiceImpl<ActiveSubPriceRul
lambdaQueryWrapper.eq(ActiveSubPriceRule::getActiveId,actId);
return list(lambdaQueryWrapper);
}
@Override
public List<ActiveSubPriceRule> listByActSubId(Integer actId, String activeManner) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("active_id" ,actId);
queryWrapper.eq("active_manner" ,activeManner);
return baseMapper.selectList(queryWrapper);
}
}

View File

@ -61,7 +61,13 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
* @date 17:16 2024/9/2
**/
@Override
public void saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) {
public boolean saveActiveSubPrice(boolean isAdd, ActiveSubPriceSaveVO saveVO) {
if (isAdd){
ActiveSubPrice activeSubPrice = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeSubPrice)){
return false;
}
}
ActiveSubPrice activeSubPrice = new ActiveSubPrice();
BeanUtils.copyProperties(saveVO, activeSubPrice);
// 插入店铺id信息
@ -69,18 +75,21 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
activeSubPrice.setChainStorId(nowAccountInfo.getChainStoreId());
activeSubPrice.setStoreId(nowAccountInfo.getStoreId());
//保存主表信息
saveOrUpdate(activeSubPrice);
boolean row = saveOrUpdate(activeSubPrice);
activeSubPrice = this.selectByStoreId();
//保存子表信息
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getRuleList());
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getOrderList());
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getRefuelList());
//转换日志保存内容
String content = actPriceUtil.transActLogContent(isAdd ? LOG_OPERATE_ADD : LOG_OPERATE_UPDATE,
LOG_SYSTEM_MODULE_LJYH,
saveVO.getActiveName());
actPriceUtil.saveActLog(LOG_SYSTEM_NAME_SIGN, LOG_SYSTEM_MODULE_ACTIVE, content);
return row;
}
@Override
public ActiveSubPriceRespVO selectByStoreId() {
public ActiveSubPrice selectByStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
@ -96,13 +105,13 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
}
}
}
ActiveSubPriceRespVO result = new ActiveSubPriceRespVO();
BeanUtils.copyProperties(activeSubPrice, result);
if (ObjectUtil.isNotEmpty(activeSubPrice)){
List<ActiveSubPriceRule> activeSubPriceRules = activeSubPriceRuleService.listByActId(activeSubPrice.getId());
result.setRuleList(activeSubPriceRules);
List<ActiveSubPriceRule> activeSubPriceRules = activeSubPriceRuleService.listByActSubId(activeSubPrice.getId(),"0");
activeSubPrice.setOrderList(activeSubPriceRules);
List<ActiveSubPriceRule> activeSubPriceRules1 = activeSubPriceRuleService.listByActSubId(activeSubPrice.getId(),"1");
activeSubPrice.setRefuelList(activeSubPriceRules1);
}
return result;
return activeSubPrice;
}
}