记得上下班打卡 | git大法好,push需谨慎

Commit 9ed0a5eb authored by 胡佳晨's avatar 胡佳晨

汇付回调

parent 5347b9ab
......@@ -10,12 +10,13 @@ import java.util.*;
public abstract class DateUtil {
public static final String DATE_FULL_STR = "yyyy-MM-dd HH:mm:ss";
public static final String DATEFULLSTR = "yyyyMMddHHmmss";
public static final String DATE_SMALL_STR = "yyyy-MM-dd";
public static final SimpleDateFormat SDF_YMD_HMS = new SimpleDateFormat(DATE_FULL_STR);
public static final SimpleDateFormat SDF_YMD = new SimpleDateFormat(DATE_SMALL_STR);
public static final DateTimeFormatter DTF_YMD_HMS = DateTimeFormatter.ofPattern(DATE_FULL_STR);
public static final DateTimeFormatter DTFYMDHMS = DateTimeFormatter.ofPattern(DATEFULLSTR);
/**
* 日期格式化器
......
......@@ -15,7 +15,6 @@ import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
import com.liquidnet.service.goblin.param.GoblinAppOrderRefundParam;
import com.liquidnet.service.goblin.service.IGoblinOrderAppService;
import com.liquidnet.service.goblin.util.*;
import io.github.classgraph.json.JSONUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -24,12 +23,13 @@ import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
import static com.liquidnet.commons.lang.util.DateUtil.DTFYMDHMS;
@Service
@Slf4j
......@@ -303,7 +303,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
String payCode = dataObj.getString("mer_ord_id");
String paymentType = dataObj.getString("trans_type");
String paymentId = dataObj.getString("hf_seq_id");
String paymentAt = dataObj.getString("trans_time");
String paymentAt = dataObj.getString("end_time");
if ("00000000".equals(subRespCode)) {
log.debug("SYNC PARAM = " + responseData);
//支付时间
......@@ -323,7 +323,7 @@ public class GoblinOrderAppServiceImpl implements IGoblinOrderAppService {
storeOrder.setPaymentType(paymentType);
storeOrder.setPaymentId(paymentId);
storeOrder.setPayCode(payCode);
LocalDateTime payTime = LocalDateTime.parse(paymentAt, DTF_YMD_HMS);
LocalDateTime payTime = LocalDateTime.parse(paymentAt, DTFYMDHMS);
storeOrder.setPayTime(payTime);
if (orderVo.getWriteOffCode().equals("EMPTY")) {
storeOrder.setWriteOffCode(IDGenerator.getWriteOffCode());
......
......@@ -689,7 +689,8 @@ public class GoblinRedisUtils {
public void removeGoblinOrder(String randomKey, String orderId) {
if (randomKey == null) {
for (int i = 0; i < randomMax; i++) {
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_UN_PAY.concat(i + "");
randomKey = i+"";
String redisKey = GoblinRedisConst.REDIS_GOBLIN_ORDER_UN_PAY.concat(randomKey);
List<String> list = getUnPayOrder(randomKey);
if (list.contains(orderId)) {
list.remove(orderId);
......
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