更新10.17
This commit is contained in:
parent
37c9eb40ce
commit
4a4d53fcda
@ -264,16 +264,16 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
||||
.eq(ActiveRecommendRecords::getStoreId, storeId)
|
||||
.eq(ActiveRecommendRecords::getUserId, nowAccountInfo.getId()));
|
||||
|
||||
//通过券ids查询券信息
|
||||
for (ActiveRecommendRecords activeRecommendRecord : activeRecommendRecords) {
|
||||
String[] split = activeRecommendRecord.getActiveRecommendIds().split(",");
|
||||
List<ActiveRecommendChild> cardCoupons = activeRecommendChildMapper.selectList(new LambdaQueryWrapper<ActiveRecommendChild>()
|
||||
.in(ActiveRecommendChild::getId, split));
|
||||
if (cardCoupons != null) {
|
||||
List<String> collect = cardCoupons.stream().map(ActiveRecommendChild::getGiftCardName).collect(Collectors.toList());
|
||||
activeRecommendRecord.setCouponNames(collect);
|
||||
}
|
||||
}
|
||||
// //通过券ids查询券信息
|
||||
// for (ActiveRecommendRecords activeRecommendRecord : activeRecommendRecords) {
|
||||
// String[] split = activeRecommendRecord.getActiveRecommendIds().split(",");
|
||||
// List<ActiveRecommendChild> cardCoupons = activeRecommendChildMapper.selectList(new LambdaQueryWrapper<ActiveRecommendChild>()
|
||||
// .in(ActiveRecommendChild::getId, split));
|
||||
// if (cardCoupons != null) {
|
||||
// List<String> collect = cardCoupons.stream().map(ActiveRecommendChild::getGiftCardName).collect(Collectors.toList());
|
||||
// activeRecommendRecord.setCouponNames(collect);
|
||||
// }
|
||||
// }
|
||||
return activeRecommendRecords;
|
||||
}
|
||||
|
||||
|
@ -96,5 +96,15 @@ public class ActiveRecommendRecordsController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.activeRecommendRecordsService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询邀请记录奖励列表
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("selectRecord")
|
||||
public ResponseObject selectRecord(Integer storeId){
|
||||
return getSuccessResult(this.activeRecommendRecordsService.selectAll(storeId));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ public class ActiveRecommendRecords extends Model<ActiveRecommendRecords> {
|
||||
//更新时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
private String activeRecommendIds;
|
||||
private String vouchersIds;
|
||||
private String vouchersNames;
|
||||
private Integer points;
|
||||
private Integer growthValue;
|
||||
@TableField(exist = false)
|
||||
|
@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendRecordsDTO;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.vo.RecordsVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 邀请有礼记录表(ActiveRecommendRecords)表服务接口
|
||||
@ -42,5 +45,12 @@ public interface ActiveRecommendRecordsService extends IService<ActiveRecommendR
|
||||
* @param payType 支付方式
|
||||
*/
|
||||
void recommendMembersRechargePolite(Integer storeId,Integer inviteeUserId, String payType);
|
||||
|
||||
/**
|
||||
* 领奖记录
|
||||
* @param storeId
|
||||
* @return
|
||||
*/
|
||||
List<RecordsVo> selectAll(Integer storeId);
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecomm
|
||||
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendRecordsVO;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendVO;
|
||||
import com.fuint.business.marketingActivity.activeRecommend.vo.RecordsVo;
|
||||
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRecharge;
|
||||
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRechargeChild;
|
||||
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRechargeRecords;
|
||||
@ -58,6 +59,7 @@ 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.Date;
|
||||
import java.util.List;
|
||||
@ -470,6 +472,39 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecordsVo> selectAll(Integer storeId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<ActiveRecommendRecords> activeRecommendRecords = baseMapper.selectList(new LambdaQueryWrapper<ActiveRecommendRecords>()
|
||||
.eq(ActiveRecommendRecords::getStoreId, storeId)
|
||||
.eq(ActiveRecommendRecords::getUserId, nowAccountInfo.getId()));
|
||||
List<RecordsVo> recordsVos = new ArrayList<>();
|
||||
for (ActiveRecommendRecords activeRecommendRecord : activeRecommendRecords) {
|
||||
if (ObjectUtil.isNotEmpty(activeRecommendRecord.getPoints())) {
|
||||
RecordsVo recordsVo = new RecordsVo();
|
||||
recordsVo.setName(activeRecommendRecord.getPoints() + "积分");
|
||||
recordsVo.setTime(activeRecommendRecord.getCreateTime().toString());
|
||||
recordsVos.add(recordsVo);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(activeRecommendRecord.getGrowthValue())) {
|
||||
RecordsVo recordsVo1 = new RecordsVo();
|
||||
recordsVo1.setName(activeRecommendRecord.getGrowthValue() + "成长值");
|
||||
recordsVo1.setTime(activeRecommendRecord.getCreateTime().toString());
|
||||
recordsVos.add(recordsVo1);
|
||||
}
|
||||
String[] split = activeRecommendRecord.getVouchersNames().split(",");
|
||||
if (split.length > 0) {
|
||||
for (String s : split) {
|
||||
RecordsVo recordsVo2 = new RecordsVo();
|
||||
recordsVo2.setName(s);
|
||||
recordsVo2.setTime(activeRecommendRecord.getCreateTime().toString());
|
||||
recordsVos.add(recordsVo2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return recordsVos;
|
||||
}
|
||||
|
||||
private boolean isTimeBetween(Date activeStartTime, Date activeEndTime, DateTime now) {
|
||||
if (now.isAfterOrEquals(activeStartTime) && now.isBeforeOrEquals(activeEndTime)) {
|
||||
return true;
|
||||
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.business.marketingActivity.activeRecommend.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RecordsVo {
|
||||
private String name;
|
||||
private String time;
|
||||
}
|
Loading…
Reference in New Issue
Block a user