批量审核

master
guochaojie 3 months ago
parent a8483ee3aa
commit c82880164a

@ -10,6 +10,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@Component
@ -32,9 +33,14 @@ public class OrderReviewTask {
List<String> ids = Lists.newArrayList();
List<String> fails = Lists.newArrayList();
for (RecycleDeliveryOrderEntity entity : list) {
if (Objects.isNull(entity.getAdjustSet()) || entity.getAdjustSet() == 0 || Objects.isNull(entity.getCreatorTime())) {
if (Objects.isNull(entity.getAdjustSet())
|| entity.getAdjustSet() == 0
|| Objects.isNull(entity.getCreatorTime())
|| Objects.isNull(entity.getReportWeight())
|| entity.getReportWeight().compareTo(BigDecimal.ZERO) <= 0
|| Objects.isNull(entity.getPrice())
|| entity.getPrice().compareTo(BigDecimal.ZERO) <= 0) {
fails.add(entity.getId());
continue;
} else if (entity.getAdjustSet() == 1) {
//判断创建时间跟当前时间比对 是否超过24小时
if (isTimeExceededInMinutes(entity.getCreatorTime(), 1)) {

@ -595,7 +595,7 @@ public class RecycleDeliveryOrderServiceImpl extends ServiceImpl<RecycleDelivery
@Transactional
public int batchAudit(DeliveryAuditBatch batch) {
UserInfo userInfo = userProvider.get();
batch.setLastModifyUserId(userInfo.getUserId());
batch.setLastModifyUserId(null == userInfo.getUserId() ? "" : userInfo.getUserId());
batch.setLastModifyTime(LocalDateTime.now());
int update = deliveryOrderMapper.auditBatch(batch);
batch.getIds().forEach(id -> {

Loading…
Cancel
Save