From b9f4fad30fd010940a6f9f61edcb3a701509dd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 16 Nov 2023 18:31:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E5=88=B8=E6=A0=B8=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin/src/views/system/account/index.vue | 7 +- .../impl/ActiveDiscountServiceImpl.java | 1 + .../controller/ActiveExchangeController.java | 57 ++++ .../dto/ActiveExchangeRecordDTO.java | 297 ++++++++++++++++++ .../service/ActiveExchangeService.java | 26 ++ .../impl/ActiveExchangeServiceImpl.java | 122 +++++++ .../vo/ActiveExchangeRecordVO.java | 297 ++++++++++++++++++ .../impl/ActiveNewlywedsServiceImpl.java | 2 - .../entity/ActiveRecommend.java | 1 - .../impl/ActiveRecommendServiceImpl.java | 12 +- .../controller/CardExchangeController.java | 1 - 11 files changed, 812 insertions(+), 11 deletions(-) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/controller/ActiveExchangeController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/dto/ActiveExchangeRecordDTO.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ActiveExchangeRecordVO.java diff --git a/fuintAdmin/src/views/system/account/index.vue b/fuintAdmin/src/views/system/account/index.vue index f0dd0ec45..ab6f1d940 100644 --- a/fuintAdmin/src/views/system/account/index.vue +++ b/fuintAdmin/src/views/system/account/index.vue @@ -283,7 +283,7 @@ export default { // 总条数 total: 0, // 用户表格数据 - userList: null, + userList: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -355,8 +355,9 @@ export default { getList() { this.loading = true; getAccountList(this.queryParams).then(response => { - this.userList = response.data.content; - this.total = response.data.totalElements; + console.log(response); + this.userList = response.data.records; + this.total = response.data.total; this.loading = false; } ); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java index c2178bf4f..d3614193e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeDiscount/service/impl/ActiveDiscountServiceImpl.java @@ -145,6 +145,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //券id + private Integer cardExchangeId; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //券类型(0:优惠券 1:兑换券) + private String cardType; + //员工id + private Integer mtStaffId; + //员工姓名 + private String realName; + //员工手机号码 + private String staffMobile; + //会员id + private Integer mtUserId; + //会员手机号码 + private String mobile; + //会员名字 + private String name; + //会员头像 + private String photo; + //券名称 + private String exchangeName; + //券详情 + private String giftName; + //描述 + private String description; + //券码 + private String ticketCode; + //券来源 + private String exchangeFrom; + //使用状态 :0 :未使用 1:已使用 + private String status; + //创建者 + private String createBy; + //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + //到期时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date outTime; + //核销时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date cancelTime; + //开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + //结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getCardExchangeId() { + return cardExchangeId; + } + + public void setCardExchangeId(Integer cardExchangeId) { + this.cardExchangeId = cardExchangeId; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getGiftName() { + return giftName; + } + + public void setGiftName(String giftName) { + this.giftName = giftName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Integer getMtStaffId() { + return mtStaffId; + } + + public void setMtStaffId(Integer mtStaffId) { + this.mtStaffId = mtStaffId; + } + + public String getRealName() { + return realName; + } + + public void setRealName(String realName) { + this.realName = realName; + } + + public String getStaffMobile() { + return staffMobile; + } + + public void setStaffMobile(String staffMobile) { + this.staffMobile = staffMobile; + } + + public Integer getMtUserId() { + return mtUserId; + } + + public void setMtUserId(Integer mtUserId) { + this.mtUserId = mtUserId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getPhoto() { + return photo; + } + + public void setPhoto(String photo) { + this.photo = photo; + } + + public String getExchangeName() { + return exchangeName; + } + + public void setExchangeName(String exchangeName) { + this.exchangeName = exchangeName; + } + + public String getTicketCode() { + return ticketCode; + } + + public void setTicketCode(String ticketCode) { + this.ticketCode = ticketCode; + } + + public String getExchangeFrom() { + return exchangeFrom; + } + + public void setExchangeFrom(String exchangeFrom) { + this.exchangeFrom = exchangeFrom; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Date getOutTime() { + return outTime; + } + + public void setOutTime(Date outTime) { + this.outTime = outTime; + } + + public Date getCancelTime() { + return cancelTime; + } + + public void setCancelTime(Date cancelTime) { + this.cancelTime = cancelTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } + } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java new file mode 100644 index 000000000..3f378dcde --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/ActiveExchangeService.java @@ -0,0 +1,26 @@ +package com.fuint.business.marketingActivity.activeExchange.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO; +import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO; +import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; + +import java.util.List; + +public interface ActiveExchangeService { + /** + * 分页查询所有数据 + * @param page + * @param cardExchangeRecord + * @return + */ + List select(Integer pageNo, Integer pageSize, CardExchangeRecord cardExchangeRecord); + + /** + * 修改数据 + * @param activeExchangeRecordDTO + * @return + */ + boolean updateOneById(ActiveExchangeRecordDTO activeExchangeRecordDTO); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java new file mode 100644 index 000000000..7ec3791b0 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -0,0 +1,122 @@ +package com.fuint.business.marketingActivity.activeExchange.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeExchange.dto.ActiveExchangeRecordDTO; +import com.fuint.business.marketingActivity.activeExchange.service.ActiveExchangeService; +import com.fuint.business.marketingActivity.activeExchange.vo.ActiveExchangeRecordVO; +import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord; +import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService; +import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; +import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +@Service +public class ActiveExchangeServiceImpl implements ActiveExchangeService { + + @Resource + private CardExchangeRecordService cardExchangeRecordService; + @Resource + private CardFavorableRecordService cardFavorableRecordService; + /** + * 分页查询所有 + * @param page + * @param cardExchangeRecord + * @return + */ + @Override + public List select(Integer pageNo,Integer pageSize, CardExchangeRecord cardExchangeRecord) { + //兑换券 + LambdaQueryWrapper exchangeRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); + if (ObjectUtils.isNotEmpty(cardExchangeRecord.getMobile())){ + exchangeRecordLambdaQueryWrapper.eq(CardExchangeRecord::getMobile,cardExchangeRecord.getMobile()); + } + if (ObjectUtils.isNotEmpty(cardExchangeRecord.getTicketCode())){ + exchangeRecordLambdaQueryWrapper.eq(CardExchangeRecord::getTicketCode,cardExchangeRecord.getTicketCode()); + } + List cardExchangeRecordList = cardExchangeRecordService.list(exchangeRecordLambdaQueryWrapper); + //封装兑换券vo + List activeExchangeRecordVOList = cardExchangeRecordList.stream().map(s->{ + ActiveExchangeRecordVO activeExchangeRecordVO = new ActiveExchangeRecordVO(); + BeanUtils.copyProperties(s,activeExchangeRecordVO); + activeExchangeRecordVO.setCardType("1"); + return activeExchangeRecordVO; + }).collect(Collectors.toList()); + + //优惠券 + LambdaQueryWrapper cardFavorableRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); + if (ObjectUtils.isNotEmpty(cardExchangeRecord.getMobile())){ + cardFavorableRecordLambdaQueryWrapper.eq(CardFavorableRecord::getMobile,cardExchangeRecord.getMobile()); + } + if (ObjectUtils.isNotEmpty(cardExchangeRecord.getTicketCode())){ + cardFavorableRecordLambdaQueryWrapper.eq(CardFavorableRecord::getTicketCode,cardExchangeRecord.getTicketCode()); + } + List cardFavorableRecordList = cardFavorableRecordService.list(cardFavorableRecordLambdaQueryWrapper); + //封装兑换券vo + List activeExchangeRecordVOList1 = cardFavorableRecordList.stream().map(s->{ + ActiveExchangeRecordVO activeExchangeRecordVO1 = new ActiveExchangeRecordVO(); + BeanUtils.copyProperties(s,activeExchangeRecordVO1); + activeExchangeRecordVO1.setCardType("0"); + return activeExchangeRecordVO1; + }).collect(Collectors.toList()); + + //封装优惠券兑换券 + List collect = Stream.concat(activeExchangeRecordVOList.stream(), activeExchangeRecordVOList1.stream()) + .collect(Collectors.toList()); + + //自定义分页 + Integer count = collect.size(); // 记录总数 + Integer pageCount = 0; // 页数 + if (count % pageSize == 0) { + pageCount = count / pageSize; + } else { + pageCount = count / pageSize + 1; + } + int fromIndex = 0; // 开始索引 + int toIndex = 0; // 结束索引 + if (pageNo != pageCount.intValue()) { + fromIndex = (pageNo - 1) * pageSize; + toIndex = fromIndex + pageSize; + } else { + fromIndex = (pageNo - 1) * pageSize; + toIndex = count; + } + + List collect1 = collect.stream().skip(fromIndex).limit(pageSize).collect(Collectors.toList()); + return collect1; + } + + /** + * 核销卡券 + * @param activeExchangeRecordDTO + * @return + */ + @Override + @Transactional + public boolean updateOneById(ActiveExchangeRecordDTO activeExchangeRecordDTO) { + boolean update = false; + //核销优惠券 + if (ObjectUtils.isNotEmpty(activeExchangeRecordDTO) && activeExchangeRecordDTO.getCardType().equals("0")){ + CardFavorableRecord cardFavorableRecord = new CardFavorableRecord(); + BeanUtils.copyProperties(activeExchangeRecordDTO,cardFavorableRecord); + update = cardFavorableRecordService.updateById(cardFavorableRecord); + }else { + //核销兑换券 + CardExchangeRecord cardExchangeRecord = new CardExchangeRecord(); + BeanUtils.copyProperties(activeExchangeRecordDTO,cardExchangeRecord); + update = cardExchangeRecordService.updateById(cardExchangeRecord); + } + return update; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ActiveExchangeRecordVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ActiveExchangeRecordVO.java new file mode 100644 index 000000000..5fa97817a --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/vo/ActiveExchangeRecordVO.java @@ -0,0 +1,297 @@ +package com.fuint.business.marketingActivity.activeExchange.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * 兑换券领取记录表(CardExchangeRecord)表实体类 + * + * @author makejava + * @since 2023-11-06 14:15:07 + */ +@SuppressWarnings("serial") +public class ActiveExchangeRecordVO extends Model { + //主键id + @TableId(type = IdType.AUTO) + private Integer id; + //券id + private Integer cardExchangeId; + //所属连锁店id + private Integer chainStorId; + //所属店铺id + private Integer storeId; + //券类型(0:优惠券 1:兑换券) + private String cardType; + //员工id + private Integer mtStaffId; + //员工姓名 + private String realName; + //员工手机号码 + private String staffMobile; + //会员id + private Integer mtUserId; + //会员手机号码 + private String mobile; + //会员名字 + private String name; + //会员头像 + private String photo; + //券名称 + private String exchangeName; + //券详情 + private String giftName; + //描述 + private String description; + //券码 + private String ticketCode; + //券来源 + private String exchangeFrom; + //使用状态 :0 :未使用 1:已使用 + private String status; + //创建者 + private String createBy; + //创建时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者 + private String updateBy; + //更新时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + //到期时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date outTime; + //核销时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date cancelTime; + //开始时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + //结束时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getCardExchangeId() { + return cardExchangeId; + } + + public void setCardExchangeId(Integer cardExchangeId) { + this.cardExchangeId = cardExchangeId; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public String getGiftName() { + return giftName; + } + + public void setGiftName(String giftName) { + this.giftName = giftName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Integer getMtStaffId() { + return mtStaffId; + } + + public void setMtStaffId(Integer mtStaffId) { + this.mtStaffId = mtStaffId; + } + + public String getRealName() { + return realName; + } + + public void setRealName(String realName) { + this.realName = realName; + } + + public String getStaffMobile() { + return staffMobile; + } + + public void setStaffMobile(String staffMobile) { + this.staffMobile = staffMobile; + } + + public Integer getMtUserId() { + return mtUserId; + } + + public void setMtUserId(Integer mtUserId) { + this.mtUserId = mtUserId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getPhoto() { + return photo; + } + + public void setPhoto(String photo) { + this.photo = photo; + } + + public String getExchangeName() { + return exchangeName; + } + + public void setExchangeName(String exchangeName) { + this.exchangeName = exchangeName; + } + + public String getTicketCode() { + return ticketCode; + } + + public void setTicketCode(String ticketCode) { + this.ticketCode = ticketCode; + } + + public String getExchangeFrom() { + return exchangeFrom; + } + + public void setExchangeFrom(String exchangeFrom) { + this.exchangeFrom = exchangeFrom; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Date getOutTime() { + return outTime; + } + + public void setOutTime(Date outTime) { + this.outTime = outTime; + } + + public Date getCancelTime() { + return cancelTime; + } + + public void setCancelTime(Date cancelTime) { + this.cancelTime = cancelTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + /** + * 获取主键值 + * + * @return 主键值 + */ + @Override + protected Serializable pkVal() { + return this.id; + } + } + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java index ccd6b8f78..2cfe2dbca 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/impl/ActiveNewlywedsServiceImpl.java @@ -63,13 +63,11 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl list = activeNewlywedsDTO.getActiveNewlywedsChildList(); - if (CollectionUtils.isNotEmpty(list)){ list.stream().map(s ->{ s.setActiveNewlywedsId(activeNewlyweds.getId()); return s; }).collect(Collectors.toList()); save = activeNewlywedsChildService.saveBatch(list); - } return save; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java index d0a8dfd0a..77f83d982 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommend.java @@ -18,7 +18,6 @@ import java.io.Serializable; @SuppressWarnings("serial") public class ActiveRecommend extends Model { //主键id - @TableId(type = IdType.AUTO) private Integer id; //所属连锁店id private Integer chainStoreId; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java index da6de59bf..963bc9dd0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendServiceImpl.java @@ -50,8 +50,8 @@ public class ActiveRecommendServiceImpl extends ServiceImpl activeRecommendChildList = activeRecommendChildService.list(queryWrapper); //封装VO返回 - BeanUtils.copyProperties(activeRecommend,activeRecommendVO); - activeRecommendVO.setInviterGiftType(activeRecommend.getInviterGiftType().split(",")); + if (ObjectUtils.isNotEmpty(activeRecommend)){ + BeanUtils.copyProperties(activeRecommend,activeRecommendVO); + activeRecommendVO.setInviterGiftType(activeRecommend.getInviterGiftType().split(",")); + } activeRecommendVO.setActiveRecommendChildList(activeRecommendChildList); } return activeRecommendVO; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeController.java index 48af316cd..204f5ddcd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardExchange/controller/CardExchangeController.java @@ -2,7 +2,6 @@ package com.fuint.business.marketingActivity.cardExchange.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange; import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeService;