Ver código fonte

抖音小程序 下单

Althars123 3 anos atrás
pai
commit
2b498c4256

+ 6 - 5
sdjk-admin/src/main/java/com/miaxis/app/controller/tt/TtNotifyController.java

@@ -9,6 +9,7 @@ import com.miaxis.common.core.domain.entity.UserInfo;
 import com.miaxis.common.exception.CustomException;
 import com.miaxis.common.utils.AesUtil;
 import com.miaxis.tt.domain.TtOrder;
+import com.miaxis.tt.dto.TtNotifyReturnDTO;
 import com.miaxis.tt.dto.TtpayNotifyDTO;
 import com.miaxis.tt.service.ITtOrderService;
 import com.miaxis.user.service.IUserInfoService;
@@ -81,7 +82,7 @@ public class TtNotifyController {
      */
     @PostMapping(value = "/ttpay")
     @ApiOperation("头条支付回调")
-    public WxNotifyReturnDTO wxpayNotify(@RequestBody TtpayNotifyDTO ttpayNotifyDTO) throws GeneralSecurityException, IOException {
+    public TtNotifyReturnDTO wxpayNotify(@RequestBody TtpayNotifyDTO ttpayNotifyDTO) {
 
         //将回调数据写入数据库
         writeNotifyDataToDb(ttpayNotifyDTO);
@@ -90,10 +91,10 @@ public class TtNotifyController {
         //激活用户
         avtivityCode(ttpayNotifyDTO.getMsg().getCp_orderno(),code);
 
-        WxNotifyReturnDTO wxNotifyReturnDTO = new WxNotifyReturnDTO();
-        wxNotifyReturnDTO.setCode("SUCCESS");
-        wxNotifyReturnDTO.setMessage("成功");
-        return wxNotifyReturnDTO;
+        TtNotifyReturnDTO ttNotifyReturnDTO = new TtNotifyReturnDTO();
+        ttNotifyReturnDTO.setErr_no(0);
+        ttNotifyReturnDTO.setErr_tips("success");
+        return ttNotifyReturnDTO;
     }
 
     private void avtivityCode(String outTradeNo, String vipCode) {

+ 9 - 0
sdjk-service/src/main/java/com/miaxis/tt/dto/TtNotifyReturnDTO.java

@@ -0,0 +1,9 @@
+package com.miaxis.tt.dto;
+
+import lombok.Data;
+
+@Data
+public class TtNotifyReturnDTO {
+    Integer err_no;
+    String err_tips;
+}