Althars123 3 سال پیش
والد
کامیت
012cfa5b89

+ 0 - 83
twzd-admin/src/main/java/com/miaxis/app/controller/wx/VipController.java

@@ -1,83 +0,0 @@
-package com.miaxis.app.controller.wx;
-
-import com.alibaba.fastjson.JSONObject;
-import com.miaxis.common.config.WxpayConfig;
-import com.miaxis.common.constant.Constants;
-import com.miaxis.common.core.controller.BaseController;
-import com.miaxis.common.core.domain.Response;
-import com.miaxis.system.service.ISysDictDataService;
-import com.miaxis.wx.dto.WxOrderDTO;
-import com.miaxis.wx.service.IWxOrderService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.http.client.HttpClient;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 【小程序-微信支付】Controller
- *
- * @author miaxis
- * @date 2021-03-10
- */
-@RestController
-@RequiredArgsConstructor
-@RequestMapping(Constants.VIP_PREFIX+"/wx")
-@Api(tags = {"【VIP-接口】"})
-@Slf4j
-public class VipController extends BaseController {
-
-    @Autowired
-    private HttpClient httpClient;
-
-    @Autowired
-    private WxpayConfig wxpayConfig;
-
-    @Autowired
-    private IWxOrderService wxOrderService;
-
-
-    @Autowired
-    private ISysDictDataService dictDataService;
-
-    @Value("${app.appid}")
-    private String appid;
-    @Value("${wxpay.notifyUrl}")
-    private  String notifyUrl ;
-
-
-
-
-
-
-    /**
-     * 微信支付获取预订单id
-     */
-    @PostMapping(value = "/prepareOrder")
-    @ApiOperation("微信支付下单")
-    public Response<JSONObject> getPrepareOrder(@RequestBody WxOrderDTO wxOrderDTO) throws Exception{
-
-            return Response.success();
-
-
-    }
-
-
-
-
-
-
-
-
-
-
-
-
-
-}

+ 3 - 3
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxNotifyController.java

@@ -75,9 +75,9 @@ public class WxNotifyController {
     @ApiOperation("微信支付回调")
     public WxNotifyReturnDTO wxpayNotify(@RequestBody WxpayNotifyDTO wxpayNotifyDTO, HttpServletRequest request) throws GeneralSecurityException, IOException {
         String bodyString = getBodyString(request);
-//        if (!validate(request,bodyString)){
-//            throw new CustomException("签名失败");
-//        }
+        if (!validate(request,bodyString)){
+            throw new CustomException("签名失败");
+        }
         String resourceString = getSourString(wxpayNotifyDTO);
         log.info("微信支付回调数据"+resourceString);
         JSONObject jsonObject = JSONObject.parseObject(resourceString);