bug
This commit is contained in:
parent
1de8243319
commit
9e1da10fc5
@ -27,10 +27,9 @@
|
||||
align="center"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="sort"
|
||||
label="排序"
|
||||
align="center"
|
||||
width="110">
|
||||
label="序号"
|
||||
type="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="groupOriented"
|
||||
@ -422,9 +421,8 @@
|
||||
label="券类型"
|
||||
width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
<span v-if="scope.row.giftCardType == 2" >通用券</span>
|
||||
<span v-if="scope.row.giftCardType == 0" >商品兑换券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >洗车券</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -62,18 +62,10 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="exchangeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="是否在线" align="center" prop="isonline">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isonline == 0">在线</span>
|
||||
<span v-if="scope.row.isonline == 1">下线</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="兑换券状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 0"> <el-tag>启用</el-tag> </span>
|
||||
<span v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
||||
|
||||
</template>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="兑换券名称" align="center" prop="name"/>
|
||||
<el-table-column label="兑换券类型 " align="center" prop="type">
|
||||
@ -103,6 +95,19 @@
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否在线" align="center" prop="isonline">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isonline == 0">在线</span>
|
||||
<span v-if="scope.row.isonline == 1">下线</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="兑换券状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == 0"> <el-tag>启用</el-tag> </span>
|
||||
<span v-if="scope.row.status == 1"> <el-tag type="danger">禁用</el-tag> </span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
@ -48,6 +48,11 @@
|
||||
|
||||
<el-table v-loading="loading" :data="favorableList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column label="是否在线 0:在线 1: 下线" align="center" prop="isonline" />-->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="优惠券名称" align="center" prop="name" />
|
||||
<el-table-column label="卡券类型 " align="center" prop="type" >
|
||||
<template slot-scope="scope">
|
||||
|
@ -174,6 +174,11 @@
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="number"
|
||||
label="电子礼品卡号"
|
||||
|
@ -181,7 +181,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
||||
@Override
|
||||
public ActiveOneCouponVO getOneById(Serializable id) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
ActiveOneCouponVO activeOneCouponVO = new ActiveOneCouponVO();
|
||||
ActiveOneCoupon oneCoupon = getById(id);
|
||||
BeanUtils.copyProperties(oneCoupon, activeOneCouponVO);
|
||||
@ -191,18 +191,29 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
||||
List<ActiveOneCouponChild> activeOneCouponChildren = activeOneCouponChildService.list(queryWrapper);
|
||||
ArrayList<CardFavorable> cardFavorableArrayList = new ArrayList<>();
|
||||
ArrayList<CardExchange> cardExchangeArrayList = new ArrayList<>();
|
||||
ArrayList<Integer> cardFavorableIds = new ArrayList<>();
|
||||
ArrayList<Integer> cardExchangeIds = new ArrayList<>();
|
||||
for (ActiveOneCouponChild activeOneCouponChild : activeOneCouponChildren) {
|
||||
//优惠券
|
||||
if (activeOneCouponChild.getActiveGift().equals("1")){
|
||||
CardFavorable byId = cardFavorableService.getById(activeOneCouponChild.getVouchersId());
|
||||
cardFavorableArrayList.add(byId);
|
||||
cardFavorableIds.add(byId.getId());
|
||||
}
|
||||
//兑换券
|
||||
if (activeOneCouponChild.getActiveGift().equals("2")){
|
||||
CardExchange byId = exchangeService.getById(activeOneCouponChild.getVouchersId());
|
||||
cardExchangeArrayList.add(byId);
|
||||
cardExchangeIds.add(byId.getId());
|
||||
}
|
||||
}
|
||||
String[] split = oneCoupon.getGradeId().split(",");
|
||||
for (String s : split) {
|
||||
ids.add(s);
|
||||
}
|
||||
activeOneCouponVO.setGradeIds(ids);
|
||||
activeOneCouponVO.setCardExchangeIds(cardExchangeIds);
|
||||
activeOneCouponVO.setCardFavorableIds(cardFavorableIds);
|
||||
activeOneCouponVO.setCardFavorableList(cardFavorableArrayList);
|
||||
activeOneCouponVO.setCardExchangeList(cardExchangeArrayList);
|
||||
return activeOneCouponVO;
|
||||
@ -214,6 +225,21 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl<ActiveOneCouponMappe
|
||||
boolean flag = false;
|
||||
ActiveOneCoupon activeOneCoupon = new ActiveOneCoupon();
|
||||
BeanUtils.copyProperties(activeOneCouponDTO,activeOneCoupon);
|
||||
activeOneCoupon.setConditions(activeOneCouponDTO.getCondition());
|
||||
|
||||
//会员等级
|
||||
String gradeIdStr = "";
|
||||
String gradeIdName = "";
|
||||
Integer[] gradeIds = activeOneCouponDTO.getGradeIds();
|
||||
for (Integer gradeId : gradeIds) {
|
||||
gradeIdStr+=gradeId + ",";
|
||||
MtUserGradeVO mtUserGrade = mtUserGradeMapper.selectByGradeId(gradeId);
|
||||
gradeIdName += mtUserGrade.getName() + ",";
|
||||
}
|
||||
activeOneCoupon.setGradeId(gradeIdStr);
|
||||
activeOneCoupon.setGradeName(gradeIdName);
|
||||
|
||||
|
||||
flag= updateById(activeOneCoupon);
|
||||
|
||||
//更新子表数据
|
||||
|
@ -13,6 +13,8 @@ import java.util.List;
|
||||
@Data
|
||||
public class ActiveOneCouponVO extends ActiveOneCoupon implements Serializable {
|
||||
private List<LJUserVos> vosList;
|
||||
//会员等级ids
|
||||
private List<String> gradeIds;
|
||||
//优惠券领取数量
|
||||
private Integer couponReceiveCount;
|
||||
//优惠券使用数量
|
||||
@ -35,4 +37,7 @@ public class ActiveOneCouponVO extends ActiveOneCoupon implements Serializable {
|
||||
private List<CardFavorable> cardFavorableList;
|
||||
private List<CardExchange> cardExchangeList;
|
||||
private List<LJUserVos> userVos;
|
||||
private List<Integer> cardFavorableIds;
|
||||
//兑换券ids
|
||||
private List<Integer> cardExchangeIds;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public class CardExchange extends Model<CardExchange> {
|
||||
private Integer storeId;
|
||||
//是否在线 0:在线 1: 下线
|
||||
private String isonline;
|
||||
private String cardDetail;
|
||||
//兑换券状态 0:启用 1: 禁用
|
||||
private String status;
|
||||
//兑换券名称
|
||||
|
@ -55,8 +55,15 @@ public class CardExchangeServiceImpl extends ServiceImpl<CardExchangeMapper, Car
|
||||
String secretKey = "sQPoC/1do9BZMkg8I5c09A==";
|
||||
CryptoUtils.encryptSymmetrically(secretKey, null,cardExchange.getQrCodeLink(), CryptoUtils.Algorithm.Encryption.AES_ECB_PKCS5);
|
||||
Integer giftId = cardExchange.getGiftId();
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(giftId);
|
||||
cardExchange.setGiftName(ljGoods.getName());
|
||||
if (ObjectUtils.isNotEmpty(giftId)){
|
||||
LJGoods ljGoods = goodsService.selectLJGoodsById(giftId);
|
||||
cardExchange.setGiftName(ljGoods.getName());
|
||||
}
|
||||
if (cardExchange.getType().equals("0")){
|
||||
cardExchange.setCardDetail("可兑换-"+cardExchange.getGiftName());
|
||||
}else {
|
||||
cardExchange.setCardDetail("可兑换-"+"洗车券");
|
||||
}
|
||||
return save(cardExchange);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ public class CardFavorable extends Model<CardFavorable> {
|
||||
private Integer storeId;
|
||||
//是否在线 0:在线 1: 下线
|
||||
private String isonline;
|
||||
private String cardDetail;
|
||||
//优惠券名称
|
||||
private String name;
|
||||
//卡券类型 0:油品券 1:商品券 2:通用券
|
||||
|
@ -70,6 +70,11 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
oil += s + ",";
|
||||
}
|
||||
cardFavorable.setOilType(oil);
|
||||
if (cardFavorableDTO.getType().equals("0")){
|
||||
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"减"+cardFavorableDTO.getDiscountAmount());
|
||||
}else {
|
||||
cardFavorable.setCardDetail("满"+cardFavorableDTO.getSatisfiedAmount()+"打"+cardFavorableDTO.getSpecialDiscount()+"折");
|
||||
}
|
||||
return save(cardFavorable);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user