Commit c861af7b by 章家宝

fix:明拍新增轮询出价模式联调bug修复

1 parent b6ac2787
......@@ -98,6 +98,9 @@ public class BidController {
@PostMapping("addBid")
public BaseResp<Bid> addBid(@Valid @RequestBody BidAddVO bidAddVO, Authentication authentication) throws FieldException {
User user = (User) authentication.getPrincipal();
if (user == null || user.getUserId() <= 0) {
return BaseResp.fail("用户不存在");
}
return BaseResp.success(bidService.addBidByAdmin(user, bidAddVO));
}
......
package com.glsx.usedcar.web.api.business;
import com.glsx.usedcar.esign.ESignPartAConfig;
import com.glsx.usedcar.module.business.domain.BusinessConfig;
import com.glsx.usedcar.module.business.domain.DarkBidPriceRange;
import com.glsx.usedcar.module.business.domain.LightBidPriceRange;
import com.glsx.usedcar.module.business.domain.*;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
......
package com.glsx.usedcar.module.auction.entity.dto;
import com.alibaba.fastjson.JSON;
import lombok.*;
/**
......@@ -20,4 +21,15 @@ public class LightPollingBidConfigDTO {
private Integer resetDelayDuration;
// 车辆拍卖持续时间
private Integer aucvehDuration;
// 拍卖车辆之间间隔时间
private Integer bidAucVehDuration;
public static LightPollingBidConfigDTO fromJson(String extraJson) {
return JSON.parseObject(extraJson, LightPollingBidConfigDTO.class);
}
public boolean isValid() {
return delay != null && nearReservePriceThreshold != null && resetDelay != null && resetDelayDuration != null && aucvehDuration != null && bidAucVehDuration != null;
}
}
......@@ -382,7 +382,10 @@ public class AuctionOrderService extends AbstractAuctionService {
AuctionVehicle auctionVehicle = auctionVehicleDao.findTopByAucvehId(aucvehId);
Bid bid = bidDao.findTopByAuctionVehicleOrderByBidPriceDesc(auctionVehicle);
if (bid == null) {
return 0;
Vehicle vehicle = auctionVehicle.getVehicle();
double startingBidPrice = vehicle.getStartingBidPrice();
bid = new Bid();
bid.setBidPrice(startingBidPrice);
}
bid.setAccount(account);
return calculateCommissionPrice(LocalDateTime.now(), bid);
......
......@@ -13,6 +13,7 @@ import com.glsx.usedcar.module.auction.entity.*;
import com.glsx.usedcar.module.auction.entity.Auction.AuctionType;
import com.glsx.usedcar.module.auction.entity.AuctionVehicle.AuctionState;
import com.glsx.usedcar.module.auction.entity.dto.BidRemainSecondDTO;
import com.glsx.usedcar.module.auction.entity.dto.LightPollingBidConfigDTO;
import com.glsx.usedcar.module.auction.entity.req.BidRemainSecReq;
import com.glsx.usedcar.module.business.entity.NoticeTemplate;
import com.glsx.usedcar.module.business.service.NoticeField;
......@@ -31,6 +32,7 @@ import com.glsx.usedcar.resp.BaseResp;
import com.glsx.usedcar.util.RedisCacheUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.ObjectNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
......@@ -46,6 +48,7 @@ import org.summerframework.core.util.DateTimeUtils;
import org.summerframework.orm.paging.Pagination;
import java.math.BigDecimal;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.TimeUnit;
......@@ -141,6 +144,7 @@ public class AuctionService extends AbstractAuctionService {
String join = String.join(",", sourceNos);
throw new FieldException("sourceNos", sourceNos, "车源号:" + join + "的车辆状态不是待关联拍卖状态,请重新选择车辆");
}
checkAuctionConfig(auction, auctionVehicles);
auction.setAccessScope(CollectionUtils.isEmpty(auction.getAccountTags()) ? Auction.AccessScope.GLOBAL : Auction.AccessScope.TAGS);
if (!CollectionUtils.isEmpty(auction.getAccountTags())) {
auction.setAccountTags(new HashSet<>(accountTagDao.findByEntityIds(auction.getAccountTags())));
......@@ -164,6 +168,44 @@ public class AuctionService extends AbstractAuctionService {
}
/**
* 检查拍场配置
*/
private static void checkAuctionConfig(Auction auction, List<AuctionVehicle> auctionVehicles) throws FieldException {
if (auction.getAuctionType() == AuctionType.LIGHT && auction.getAuctionMode() == 2) {
// 明拍, 轮询出价
// 获取所有拍卖车辆的最低保留价
double minReservePrice = Double.MAX_VALUE;
for (AuctionVehicle auctionVehicle : auctionVehicles) {
Vehicle vehicle = auctionVehicle.getVehicle();
minReservePrice = Math.min(minReservePrice, vehicle.getReservePrice());
}
String extraJson = auction.getExtraJson();
if (StringUtils.isBlank(extraJson)) {
throw new FieldException("extraJson", "请填写轮询出价参数");
}
LightPollingBidConfigDTO dto = LightPollingBidConfigDTO.fromJson(extraJson);
if (!dto.isValid()) {
log.info("轮询出价配置错误{}", extraJson);
throw new FieldException("extraJson", "明拍竞价配置错误");
}
Integer nearReservePriceThreshold = dto.getNearReservePriceThreshold();
if (nearReservePriceThreshold < 0 || nearReservePriceThreshold > minReservePrice) {
log.info("nearReservePriceThreshold:{} < minReservePrice:{}", nearReservePriceThreshold, minReservePrice);
throw new FieldException("extraJson", "设定的保留价提醒阈值:最小0,最大不超过当前拍场中车辆的最低价保留价");
}
// 重置延时:最小值为0,最大值小于等于拍卖持续时间。
Integer resetDelay = dto.getResetDelay();
// 拍场持续时间
Duration duration = Duration.between(auction.getAuctionStartTime(), auction.getAuctionEndTime());
long secondsDiff = duration.getSeconds();
if (resetDelay < 0 || resetDelay > secondsDiff) {
log.info("重置延时:最小0,最大小于等于拍卖持续时间 resetDelay:{} < 0 or > secondsDiff:{}", resetDelay, secondsDiff);
throw new FieldException("extraJson", "重置延时:最小0,最大小于等于拍卖持续时间");
}
}
}
/**
* 修改拍卖场次
*
* @param auction 拍卖场次实例对象
......@@ -178,6 +220,7 @@ public class AuctionService extends AbstractAuctionService {
if (auction.getAuctionMode() != 2) {
auction.setExtraJson(null);
}
checkAuctionConfig(auction, auctionVehicles);
Auction auctionDb = auctionDao.updateById(auction, Auction_.auctionName, Auction_.user, Auction_.previewStartTime, Auction_.auctionStartTime, Auction_.auctionEndTime, Auction_.deposit, Auction_.auctionType, Auction_.beforeEndMinute, Auction_.delayMinute, Auction_.cities, Auction_.remark, Auction_.extraJson, Auction_.auctionMode);
auctionDb.setAuctionDate(auctionDb.getAuctionStartTime().toLocalDate());
......@@ -268,6 +311,9 @@ public class AuctionService extends AbstractAuctionService {
}
}
auctionVehicleDao.save(av);
if (auction.getAuctionType() == AuctionType.LIGHT && auction.getAuctionMode() == 2) {
lightAuctionPoollingBidService.addVehicle(av, auction);
}
}
auction.setVehicleCount((int) auctionVehicleDao.countByAuction(auction));
}
......
......@@ -183,7 +183,7 @@ public class BidService {
log.info("{} {} {} 该车辆已结束竞标", auctionVehicle.getAuction().getAuctionId(), aucvehId, auctionVehicle.getAuction().getAuctionName());
throw new FieldException("aucvehId", aucvehId, "该车辆已结束竞标");
}
return addBid(bidPrice, auctionVehicle, auctionVehicle.getAuction(), null, BidTypeEnum.BID_ADMIN, null);
return addBid(bidPrice, auctionVehicle, auctionVehicle.getAuction(), null, BidTypeEnum.BID_SYSTEM, null);
}
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
......
......@@ -119,10 +119,10 @@ public class LightAuctionPoollingBidService {
}
long curr = System.currentTimeMillis();
long millis = curr + d * 60 * 1000L + aucvehDuration * 1000L;
redisCacheUtil.setCacheWithExpire(String.format(END_TIME_KEY, auctionVehicle.getAucvehId()), millis, 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(END_TIME_KEY, auctionVehicle.getAucvehId()), millis, 24, TimeUnit.HOURS);
// 起拍价
double startingBidPrice = auctionVehicle.getVehicle().getStartingBidPrice();
redisCacheUtil.setCacheWithExpire(String.format(PRICE_KEY, auctionVehicle.getAucvehId()), BigDecimal.valueOf(startingBidPrice), 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(PRICE_KEY, auctionVehicle.getAucvehId()), BigDecimal.valueOf(startingBidPrice), 24, TimeUnit.HOURS);
auctionVehicle.setAuctionStartTime(LocalDateTimeUtil.milliToLocalDateTime(curr));
auctionVehicle.setAuctionEndTime(LocalDateTimeUtil.milliToLocalDateTime(millis));
auctionVehicleDao.updateById(auctionVehicle, AuctionVehicle_.auctionStartTime, AuctionVehicle_.auctionEndTime);
......@@ -132,7 +132,7 @@ public class LightAuctionPoollingBidService {
auctionDao.updateById(auction, Auction_.auctionEndTime);
}
// 明拍竞价 拍卖车辆间隔时间 秒
int lightPoolingBidAucVehDur = systemConfigRedisCache.getConfigValueAsInt("light_pooling_bid_auc_veh_dur", 5);
int lightPoolingBidAucVehDur = lightPollingBidConfig.getBidAucVehDuration();
long nextAuctionVehicleStartTimeMillis = millis + lightPoolingBidAucVehDur * 1000L;
// 更新下一辆车上场时间
redisCacheUtil.setCacheWithExpire(String.format(NEXT_AUCTION_VEHICLE_START_TIME_KEY, auction.getAuctionId()), nextAuctionVehicleStartTimeMillis, 24, TimeUnit.HOURS);
......@@ -161,11 +161,11 @@ public class LightAuctionPoollingBidService {
}
log.info("{} {} {} 该拍场使用轮询出价 {} ", auction.getAuctionId(), auction.getAuctionName(), extraJson, bid.getBidPrice());
// 出价时间缓存
redisCacheUtil.setCacheWithExpire(String.format(BID_TIME_KEY, auctionVehicle.getAucvehId()), System.currentTimeMillis(), 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(BID_TIME_KEY, auctionVehicle.getAucvehId()), System.currentTimeMillis(), 24, TimeUnit.HOURS);
processSignificantPriceIncrease(bid, auctionVehicle.getAucvehId());
LightPollingBidConfigDTO lightPollingBidConfig = JSON.parseObject(extraJson, LightPollingBidConfigDTO.class);
// 更新价格
redisCacheUtil.setCacheWithExpire(String.format(PRICE_KEY, auctionVehicle.getAucvehId()), BigDecimal.valueOf(bid.getBidPrice()), 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(PRICE_KEY, auctionVehicle.getAucvehId()), BigDecimal.valueOf(bid.getBidPrice()), 24, TimeUnit.HOURS);
// 接近保留价相关处理
nearReservePrice(bid, auctionVehicle, lightPollingBidConfig);
resetAucVehEndTime(auctionVehicle, lightPollingBidConfig);
......@@ -177,7 +177,7 @@ public class LightAuctionPoollingBidService {
private void saveAccountBidPrice(Bid bid, int aucvehId) {
int accountId = bid.getAccount() == null ? 0 : bid.getAccount().getAccountId();
String key = String.format(ACCOUNT_BID_PRICE_KEY, aucvehId, accountId);
redisCacheUtil.setCacheWithExpire(key, BigDecimal.valueOf(bid.getBidPrice()), 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(key, BigDecimal.valueOf(bid.getBidPrice()), 24, TimeUnit.HOURS);
}
private BigDecimal getAccountBidPrice(int accountId, int aucvehId) {
......@@ -212,7 +212,7 @@ public class LightAuctionPoollingBidService {
return;
}
// 重置时间
redisCacheUtil.setCacheWithExpire(String.format(END_TIME_KEY, auctionVehicle.getAucvehId()), resetEndTime, 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(END_TIME_KEY, auctionVehicle.getAucvehId()), resetEndTime, 24, TimeUnit.HOURS);
auctionVehicle.setAuctionEndTime(LocalDateTimeUtil.milliToLocalDateTime(resetEndTime));
auctionVehicleDao.updateById(auctionVehicle, AuctionVehicle_.auctionEndTime);
// 拍场延长时间
......@@ -222,7 +222,7 @@ public class LightAuctionPoollingBidService {
auctionDao.updateById(auction, Auction_.auctionEndTime);
}
// 明拍竞价 拍卖车辆间隔时间 秒
int lightPoolingBidAucVehDur = systemConfigRedisCache.getConfigValueAsInt("light_pooling_bid_auc_veh_dur", 5);
int lightPoolingBidAucVehDur = lightPollingBidConfig.getBidAucVehDuration();
long nextAuctionVehicleStartTimeMillis = resetEndTime + lightPoolingBidAucVehDur * 1000L;
// 更新下一辆车上场时间
redisCacheUtil.setCacheWithExpire(String.format(NEXT_AUCTION_VEHICLE_START_TIME_KEY, auction.getAuctionId()), nextAuctionVehicleStartTimeMillis, 24, TimeUnit.HOURS);
......@@ -235,7 +235,7 @@ public class LightAuctionPoollingBidService {
// 保留价
double reservePrice = auctionVehicle.getVehicle().getReservePrice();
if (bid.getBidPrice() > reservePrice) {
redisCacheUtil.setCacheWithExpire(String.format(NEAR_RESERVE_PRICE_KEY, auctionVehicle.getAucvehId()), 2, 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(NEAR_RESERVE_PRICE_KEY, auctionVehicle.getAucvehId()), 2, 24, TimeUnit.HOURS);
return;
}
// 保留价提醒价
......@@ -246,7 +246,7 @@ public class LightAuctionPoollingBidService {
}
if (bid.getBidPrice() >= reservePrice - nearReservePriceThreshold) {
// 接近保留价
redisCacheUtil.setCacheWithExpire(String.format(NEAR_RESERVE_PRICE_KEY, auctionVehicle.getAucvehId()), 1, 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(NEAR_RESERVE_PRICE_KEY, auctionVehicle.getAucvehId()), 1, 24, TimeUnit.HOURS);
}
}
......@@ -265,7 +265,7 @@ public class LightAuctionPoollingBidService {
return;
}
log.info("{} {} {} {} 大幅加价", bid, bidPrice, auctionVehiclePrice, price);
redisCacheUtil.setCacheWithExpire(String.format(SIGNIFICANT_PRICE_INCREASE_STRING_REDIS_KEY, aucvehId), 1, 3, TimeUnit.HOURS);
redisCacheUtil.setCacheWithExpire(String.format(SIGNIFICANT_PRICE_INCREASE_STRING_REDIS_KEY, aucvehId), 1, 24, TimeUnit.HOURS);
redisCacheUtil.deleteCache(String.format(SIGNIFICANT_PRICE_INCREASE_ACCOUNT_REMINDER_LIST_REDIS_KEY, aucvehId));
}
......@@ -424,7 +424,11 @@ public class LightAuctionPoollingBidService {
// 判断是否达到了保留价,如果达到了保留价则不再加价
double reservePrice = auctionVehicle.getVehicle().getReservePrice();
BigDecimal auctionVehiclePrice = getAuctionVehiclePrice(aucvehId);
if (auctionVehiclePrice.doubleValue() >= reservePrice) {
if (autoBidRange == null || autoBidRange <= 0) {
log.info("自动出价幅度异常:拍卖车辆{} {}", aucvehId, autoBidRange);
return;
}
if (auctionVehiclePrice.doubleValue() + autoBidRange >= reservePrice) {
log.info("拍卖车辆{}已达到保留价,不再加价", aucvehId);
return;
}
......@@ -436,10 +440,6 @@ public class LightAuctionPoollingBidService {
log.info("自动出价触发价格异常:拍卖车辆{} {}", aucvehId, autoBidTrigger);
return;
}
if (autoBidRange == null || autoBidRange <= 0) {
log.info("自动出价幅度异常:拍卖车辆{} {}", aucvehId, autoBidRange);
return;
}
long curr = System.currentTimeMillis();
long auctionVehicleEndTime = getAuctionVehicleEndTime(aucvehId);
if (auctionVehicleEndTime <= 0 || auctionVehicleEndTime - curr > autoBidTrigger.longValue() * 1000) {
......@@ -503,8 +503,8 @@ public class LightAuctionPoollingBidService {
}
String[] split = orderStr.split(",");
Integer nextId = null;
for (int i = index; i < 100000; i++) {
String s = split[i];
while (index < split.length) {
String s = split[index];
int id = Integer.parseInt(s);
AuctionVehicle item = auctionVehicleDao.findTopByAucvehId(id);
index++;
......@@ -513,7 +513,10 @@ public class LightAuctionPoollingBidService {
break;
}
}
double remainSecond = (nextAuctionVehicleStartTime - System.currentTimeMillis()) / 1000d;
Double remainSecond = null;
if (nextId != null) {
remainSecond = (nextAuctionVehicleStartTime - System.currentTimeMillis()) / 1000d;
}
result.setAucvehId(nextId);
result.setRemainSecond(remainSecond);
return result;
......@@ -531,8 +534,11 @@ public class LightAuctionPoollingBidService {
long resetEndTime = auctionVehicleEndTime + delay * 60 * 1000L;
// 重置时间
redisCacheUtil.setCacheWithExpire(String.format(END_TIME_KEY, auctionVehicle.getAucvehId()), resetEndTime, 24, TimeUnit.HOURS);
Auction auction = auctionVehicle.getAuction();
String extraJson = auction.getExtraJson();
LightPollingBidConfigDTO lightPollingBidConfigDTO = LightPollingBidConfigDTO.fromJson(extraJson);
// 明拍竞价 拍卖车辆间隔时间 秒
int lightPoolingBidAucVehDur = systemConfigRedisCache.getConfigValueAsInt("light_pooling_bid_auc_veh_dur", 5);
int lightPoolingBidAucVehDur = lightPollingBidConfigDTO.getBidAucVehDuration();
long nextAuctionVehicleStartTimeMillis = resetEndTime + lightPoolingBidAucVehDur * 1000L;
// 更新下一辆车上场时间
redisCacheUtil.setCacheWithExpire(String.format(NEXT_AUCTION_VEHICLE_START_TIME_KEY, auctionVehicle.getAuction().getAuctionId()), nextAuctionVehicleStartTimeMillis, 24, TimeUnit.HOURS);
......@@ -544,7 +550,16 @@ public class LightAuctionPoollingBidService {
d = delay + d;
redisCacheUtil.setCacheWithExpire(String.format(AUCTION_VEHICLE_DELAY_TIME_KEY, aucvehId), d, 24, TimeUnit.HOURS);
}
}
/**
* 添加待拍卖车辆
*/
public void addVehicle(AuctionVehicle av, Auction auction) {
String orderStr = redisCacheUtil.getCache(String.format(AUCTION_ORDER_KEY, auction.getAuctionId()), String.class);
String[] list = orderStr.split(",");
List<String> l = new ArrayList<>(Arrays.asList(list));
l.add(String.valueOf(av.getAucvehId()));
redisCacheUtil.setCacheWithExpire(String.format(AUCTION_ORDER_KEY, auction.getAuctionId()), StringUtils.join(l, ","), 24, TimeUnit.HOURS);
}
}
......@@ -14,6 +14,10 @@ public class VehicleAutoBidVO {
*/
private int vehicleId;
/**
* 拍场id
*/
private int auctionId;
/**
* 系统自动加价开关 1 开启 0 关闭 默认关闭
*/
private Integer autoBidSwitch;
......
package com.glsx.usedcar.module.vehicle.service;
import com.glsx.usedcar.module.analysis.domain.NameCount;
import com.glsx.usedcar.module.auction.dao.AuctionDao;
import com.glsx.usedcar.module.auction.entity.Auction;
import com.glsx.usedcar.module.auction.entity.Auction.AuctionType;
import com.glsx.usedcar.module.auction.entity.dto.LightPollingBidConfigDTO;
import com.glsx.usedcar.module.vehicle.dao.VehicleDao;
import com.glsx.usedcar.module.vehicle.dao.VehicleHistoryDao;
import com.glsx.usedcar.module.vehicle.domain.CarImage;
import com.glsx.usedcar.module.vehicle.domain.VehicleHistoryProjection;
import com.glsx.usedcar.module.vehicle.domain.VehicleVenue;
import com.glsx.usedcar.module.vehicle.domain.*;
import com.glsx.usedcar.module.vehicle.entity.*;
import com.glsx.usedcar.module.vehicle.entity.vo.VehicleAutoBidVO;
import com.glsx.usedcar.module.venue.dao.AreaDao;
import com.glsx.usedcar.module.venue.dao.VenueDao;
import com.glsx.usedcar.module.venue.dao.WarehousingDao;
import com.glsx.usedcar.module.venue.entity.Area;
import com.glsx.usedcar.module.venue.entity.Venue;
import com.glsx.usedcar.module.venue.entity.Warehousing;
import com.glsx.usedcar.module.venue.dao.*;
import com.glsx.usedcar.module.venue.entity.*;
import com.glsx.usedcar.resp.BaseResp;
import com.glsx.usedcar.util.CoderGenerator;
import jakarta.annotation.Resource;
import org.hibernate.ObjectNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
......@@ -57,6 +56,9 @@ public class VehicleService {
@Resource
private WarehousingDao warehousingDao;
@Autowired
private AuctionDao auctionDao;
/**
* 通过ID查询一个库存车辆
*
......@@ -336,6 +338,27 @@ public class VehicleService {
) {
return BaseResp.fail("车辆状态异常.");
}
// 自动出价触发秒数必须小于拍卖重置秒数
int auctionId = vehicleAutoBidVO.getAuctionId();
Optional<Auction> auctionOptional = auctionDao.findById(auctionId);
if (auctionOptional.isEmpty()) {
return BaseResp.fail("拍场不存在.");
}
Auction auction = auctionOptional.get();
if (auction.getAuctionState() != Auction.AuctionState.AUCTIONING
&& auction.getAuctionState() != Auction.AuctionState.WAIT_AUCTION
&& auction.getAuctionState() != Auction.AuctionState.PREVIEW) {
return BaseResp.fail("拍场状态异常.");
}
if (auction.getAuctionType() != AuctionType.LIGHT || auction.getAuctionMode() != 2) {
return BaseResp.fail("暂时不支持配置");
}
String extraJson = auction.getExtraJson();
LightPollingBidConfigDTO lightPollingBidConfigDTO = LightPollingBidConfigDTO.fromJson(extraJson);
Integer resetDelay = lightPollingBidConfigDTO.getResetDelay();
if (resetDelay < vehicleAutoBidVO.getAutoBidTrigger()) {
return BaseResp.fail("自动出价触发秒数必须小于拍卖重置秒数.");
}
vehicle.setAutoBidSwitch(vehicleAutoBidVO.getAutoBidSwitch());
vehicle.setAutoBidRange(vehicleAutoBidVO.getAutoBidRange());
vehicle.setAutoBidTrigger(vehicleAutoBidVO.getAutoBidTrigger());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!