|
@@ -3,7 +3,6 @@ package com.txz.mall.service.impl;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
-import cn.hutool.core.lang.Snowflake;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
@@ -41,8 +40,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.time.DateUtils;
|
|
import org.apache.commons.lang.time.DateUtils;
|
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.ibatis.annotations.SelectKey;
|
|
|
|
|
-import org.apache.ibatis.session.ExecutorType;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
@@ -60,12 +57,10 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
-import java.text.DateFormat;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
-import static com.txz.mall.util.OrderUtils.getDateTime;
|
|
|
|
|
import static org.springframework.data.jpa.domain.AbstractPersistable_.id;
|
|
import static org.springframework.data.jpa.domain.AbstractPersistable_.id;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1836,7 +1831,7 @@ public class StoreOrderServiceImpl extends AbstractService<StoreOrder> implement
|
|
|
log.info("accountDubboServiceClient.getWalletAccount result" + JSONObject.toJSONString(result));
|
|
log.info("accountDubboServiceClient.getWalletAccount result" + JSONObject.toJSONString(result));
|
|
|
if (result.getCode().equals(ResultCode.SUCCESS.getCode())) {
|
|
if (result.getCode().equals(ResultCode.SUCCESS.getCode())) {
|
|
|
AccountDTO accountDTO = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), AccountDTO.class);
|
|
AccountDTO accountDTO = JSONObject.parseObject(JSONObject.toJSONString(result.getData()), AccountDTO.class);
|
|
|
- if (accountDTO.getBalance().compareTo(storeOrder.getPayPrice()) < 0) {
|
|
|
|
|
|
|
+ if (accountDTO.getPayPrice().compareTo(storeOrder.getPayPrice()) < 0) {
|
|
|
// throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE);
|
|
// throw new ServiceException(ResultCode.INSUFFICIENT_BALANCE);
|
|
|
log.info("ResultGenerator.genFailResult"+JSONObject.toJSONString(result));
|
|
log.info("ResultGenerator.genFailResult"+JSONObject.toJSONString(result));
|
|
|
return ResultGenerator.genFailResult(ResultCode.INSUFFICIENT_BALANCE);
|
|
return ResultGenerator.genFailResult(ResultCode.INSUFFICIENT_BALANCE);
|