团购卷回调 支付时间回填

This commit is contained in:
2024-05-20 16:24:43 +08:00
parent 6991cbaa00
commit 30ee2b1b86
2 changed files with 7 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.chaozhanggui.system.cashierservice.interceptor.RequestWrapper;
import com.chaozhanggui.system.cashierservice.service.PayService;
import com.chaozhanggui.system.cashierservice.util.DateUtils;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
@@ -81,7 +83,8 @@ public class NotifyController {
JSONObject object=JSONUtil.parseObj(map.get("data"));
if(ObjectUtil.isNotEmpty(object)&&object.containsKey("status")&&"1".equals(object.getStr("status"))){
String orderNo=object.getStr("orderNumber");
return payService.callBackGroupPay(orderNo);
String payTime = object.getStr("payTime");
return payService.callBackGroupPay(orderNo,payTime);
}
}
return null;
@@ -95,7 +98,7 @@ public class NotifyController {
JSONObject object = JSONUtil.parseObj(map.get("bizData"));
if (ObjectUtil.isNotEmpty(object) && object.containsKey("state") && "TRADE_SUCCESS".equals(object.getStr("state"))) {
String orderNo = object.getStr("payOrderId");
return payService.callBackGroupPay(orderNo);
return payService.callBackGroupPay(orderNo, DateUtils.getTime(new Date()));
}
}
return null;