This commit is contained in:
cun-nan 2024-03-11 14:37:09 +08:00
parent 7ee7e5100f
commit 446cab6fb5
2 changed files with 15 additions and 9 deletions

View File

@ -120,10 +120,11 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
List<CardValue> records = list(queryWrapper); List<CardValue> records = list(queryWrapper);
//IPage page1 = page(page, queryWrapper); //IPage page1 = page(page, queryWrapper);
//List<CardValue> records = page1.getRecords(); //List<CardValue> records = page1.getRecords();
CardValueVOs cardValueVO = new CardValueVOs();
ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>(); ArrayList<CardValueVOs> cardValueVOs = new ArrayList<>();
//返回储值卡活动进度状态 //返回储值卡活动进度状态
for (CardValue record : records) { for (CardValue record : records) {
CardValueVOs cardValueVO = new CardValueVOs();
BeanUtils.copyProperties(record,cardValueVO);
if (ObjectUtils.isNotEmpty(record)){ if (ObjectUtils.isNotEmpty(record)){
LambdaQueryWrapper<CardValueChild> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CardValueChild> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(CardValueChild::getCardValueId,record.getId()); lambdaQueryWrapper.eq(CardValueChild::getCardValueId,record.getId());
@ -143,7 +144,6 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
record.setActivityProgress(record.getEndTime().getTime() > new Date().getTime() ? "1" : "2"); record.setActivityProgress(record.getEndTime().getTime() > new Date().getTime() ? "1" : "2");
} }
} }
BeanUtils.copyProperties(record,cardValueVO);
Date startTime = cardValueVO.getStartTime(); Date startTime = cardValueVO.getStartTime();
Date endTime = cardValueVO.getEndTime(); Date endTime = cardValueVO.getEndTime();
Date date = new Date(); Date date = new Date();

View File

@ -276,7 +276,7 @@
activen() { activen() {
request({ request({
url: '/business/marketingActivity/cardValue/appletList?storeId='+uni.getStorageSync("storeId"), url: 'business/marketingActivity/cardValue/appletList?storeId='+uni.getStorageSync("storeId")+"&&activeStatus=1",
method: 'get', method: 'get',
}).then(res => { }).then(res => {
@ -592,12 +592,18 @@
}).then(res => { }).then(res => {
this.cardValueList = [] this.cardValueList = []
if (res.code == 200) { if (res.code == 200) {
this.cardValueList = res.data.records // this.cardValueList = res.data.records
console.log(res.data.records,22); // console.log(res.data.records,22);
this.xzindex(0, res.data.records[0].rechargeBalance, res.data.records[0].fringeBenefit, // this.xzindex(0, res.data.records[0].rechargeBalance, res.data.records[0].fringeBenefit,
res.data.records[0].giftBalance, res.data.records[0].points, res.data.records[0] // res.data.records[0].giftBalance, res.data.records[0].points, res.data.records[0]
.growthValue, res.data.records[0] // .growthValue, res.data.records[0]
.count, res.data.records[0].id) // .count, res.data.records[0].id)
this.cardValueList = res.data
console.log(res.data,22);
this.xzindex(0, res.data[0].rechargeBalance, res.data[0].fringeBenefit,
res.data[0].giftBalance, res.data[0].points, res.data[0]
.growthValue, res.data[0]
.count, res.data[0].id)
} }
}) })
}, },