Commit 0985556d authored by shiyu's avatar shiyu

保证金缴纳3

parent 354b2487
......@@ -27,6 +27,8 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Service
......@@ -61,7 +63,9 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
earnestOrder.setUpdateTime(new Date());
earnestOrder.setState(EarnestEnum.EarnestOrderStateEnum.PRE_PAY.getCode());
earnestOrderDao.insert(earnestOrder);
return Result.success();
Map<String, String> map = new HashMap<>();
map.put("earnestOrderId", earnestOrderId);
return Result.success(map);
} catch (Exception e) {
logger.error("创建支付保证金订单 error : {}", e);
}
......
......@@ -87,7 +87,10 @@ public class EarnestRecordServiceImpl implements EarnestRecordService {
earnestRecordRequestDto.setType(EarnestEnum.TypeEnum.OCCUPY.getCode());
earnestRecordRequestDto.setState(EarnestEnum.StateEnum.VALID.getCode());
long occupyAmount = earnestRecordDao.sumForOccupy(earnestRecordRequestDto);
map.put("usedAmount", PriceUtil.convertPriceFenToYuan(occupyAmount));
//已用保证金
map.put("usedEarnestAmount", PriceUtil.convertPriceFenToYuan(occupyAmount));
//已用出价
map.put("usedAuctionAmount", PriceUtil.convertPriceFenToYuan(occupyAmount * 20));
//查询用户的保证金账户
UserAccount userAccount = userAccountDao.findByUserId(dto.getUserId());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment