fix:分页查询排队列表:只有已领取状态(status=3)才显示领取时间,其他状态传空

This commit is contained in:
不睡觉的月亮 2025-12-08 15:47:25 +08:00
parent 4a305916b8
commit 29880678d2

View File

@ -217,7 +217,12 @@ public class StorePinkServiceImpl extends ServiceImpl<StorePinkMapper, StorePink
Integer countPeople = getCountByKidAndCid(pink.getCid(), pink.getId()); Integer countPeople = getCountByKidAndCid(pink.getCid(), pink.getId());
storePinkResponse.setCountPeople(countPeople); storePinkResponse.setCountPeople(countPeople);
storePinkResponse.setAddTime(YztDateUtil.timestamp2DateStr(pink.getAddTime()*1000L, Constants.DATE_FORMAT)); storePinkResponse.setAddTime(YztDateUtil.timestamp2DateStr(pink.getAddTime()*1000L, Constants.DATE_FORMAT));
// 只有已领取状态(status=3)才显示领取时间,其他状态传空
if (pink.getStatus() != null && pink.getStatus() == 3) {
storePinkResponse.setStopTime(YztDateUtil.timestamp2DateStr(pink.getStopTime()*1000L, Constants.DATE_FORMAT)); storePinkResponse.setStopTime(YztDateUtil.timestamp2DateStr(pink.getStopTime()*1000L, Constants.DATE_FORMAT));
} else {
storePinkResponse.setStopTime(null);
}
StoreCombination combination = storeCombinationService.getById(pink.getCid()); StoreCombination combination = storeCombinationService.getById(pink.getCid());
if(Objects.nonNull(combination)){ if(Objects.nonNull(combination)){
storePinkResponse.setTitle(combination.getTitle()); storePinkResponse.setTitle(combination.getTitle());