Commit 8b548f87 by 章家宝

fixbug(store):门店变更次数

1 parent c8722210
......@@ -132,6 +132,12 @@ public class StoreApprovalServiceImpl implements StoreApprovalService {
listing.getListingId(), currentLevel, nextLevel);
} else {
StoreListing oldEffective = findEffective(listing.getMerchantNo(), listing.getBusinessScene());
int changeCount = storeListingMapper.selectCount(
new LambdaQueryWrapper<StoreListing>()
.eq(StoreListing::getMerchantNo, listing.getMerchantNo())
.eq(StoreListing::getBusinessScene, listing.getBusinessScene())
.eq(StoreListing::getStatus, StoreStatusEnum.APPROVED.getCode()))
.intValue() + 1;
StoreListing update = new StoreListing();
update.setListingId(listing.getListingId());
update.setVersion(listing.getVersion());
......@@ -141,7 +147,7 @@ public class StoreApprovalServiceImpl implements StoreApprovalService {
update.setApproveTime(now);
update.setEffectiveTime(now);
update.setIsEffective(1);
update.setChangeCount((listing.getChangeCount() == null ? 0 : listing.getChangeCount()) + 1);
update.setChangeCount(changeCount);
if (storeListingMapper.updateById(update) != 1) {
throw new BusinessException(ResultCode.OPERATION_NOT_ALLOWED, "记录已被他人处置,请刷新后重试");
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!