Commit 316826e3 by 章家宝

fixbug(changlog):修复查到历史生效的门店永远找到的是他自己的问题

1 parent 915a9442
...@@ -131,6 +131,7 @@ public class StoreApprovalServiceImpl implements StoreApprovalService { ...@@ -131,6 +131,7 @@ public class StoreApprovalServiceImpl implements StoreApprovalService {
log.info("门店上架审批升级:listingId={}, 第{}级→第{}级", log.info("门店上架审批升级:listingId={}, 第{}级→第{}级",
listing.getListingId(), currentLevel, nextLevel); listing.getListingId(), currentLevel, nextLevel);
} else { } else {
StoreListing oldEffective = findEffective(listing.getMerchantNo(), listing.getBusinessScene());
StoreListing update = new StoreListing(); StoreListing update = new StoreListing();
update.setListingId(listing.getListingId()); update.setListingId(listing.getListingId());
update.setVersion(listing.getVersion()); update.setVersion(listing.getVersion());
...@@ -144,7 +145,6 @@ public class StoreApprovalServiceImpl implements StoreApprovalService { ...@@ -144,7 +145,6 @@ public class StoreApprovalServiceImpl implements StoreApprovalService {
if (storeListingMapper.updateById(update) != 1) { if (storeListingMapper.updateById(update) != 1) {
throw new BusinessException(ResultCode.OPERATION_NOT_ALLOWED, "记录已被他人处置,请刷新后重试"); throw new BusinessException(ResultCode.OPERATION_NOT_ALLOWED, "记录已被他人处置,请刷新后重试");
} }
StoreListing oldEffective = findEffective(listing.getMerchantNo(), listing.getBusinessScene());
deactivateOldEffective(listing.getMerchantNo(), listing.getBusinessScene(), listing.getListingId()); deactivateOldEffective(listing.getMerchantNo(), listing.getBusinessScene(), listing.getListingId());
writeChangeLogForApproval(listing, oldEffective, now); writeChangeLogForApproval(listing, oldEffective, now);
writeApprovalLog(listing.getListingId(), ApprovalActionEnum.PASS, writeApprovalLog(listing.getListingId(), ApprovalActionEnum.PASS,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!