|
@@ -77,8 +77,7 @@ public class WxNotifyController {
|
|
|
public WxNotifyReturnDTO wxpayNotify(@RequestBody FilmWxpayDTO filmWxpayDTO, HttpServletRequest request) throws GeneralSecurityException, IOException {
|
|
|
|
|
|
String bodyString = getBodyString(request);
|
|
|
- Boolean pass = validate(request,bodyString);
|
|
|
- if (!pass){
|
|
|
+ if (!validate(request,bodyString)){
|
|
|
throw new CustomException("签名失败");
|
|
|
}
|
|
|
String resourceString = getSourString(filmWxpayDTO);
|
|
@@ -156,7 +155,11 @@ public class WxNotifyController {
|
|
|
*/
|
|
|
@PostMapping(value = "/refund")
|
|
|
@ApiOperation("微信退款回调")
|
|
|
- public WxNotifyReturnDTO refundNotify(@RequestBody FilmWxpayDTO filmWxpayDTO) throws GeneralSecurityException, IOException {
|
|
|
+ public WxNotifyReturnDTO refundNotify(@RequestBody FilmWxpayDTO filmWxpayDTO, HttpServletRequest request) throws GeneralSecurityException, IOException {
|
|
|
+ String bodyString = getBodyString(request);
|
|
|
+// if (!validate(request,bodyString)){
|
|
|
+// throw new CustomException("签名失败");
|
|
|
+// }
|
|
|
String resourceString = getSourString(filmWxpayDTO);
|
|
|
log.info(resourceString);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(resourceString);
|
|
@@ -186,38 +189,6 @@ public class WxNotifyController {
|
|
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 电影下单测试
|
|
|
- */
|
|
|
- @PostMapping(value = "/wxOrder-test")
|
|
|
- @ApiOperation("电影订单下单测试")
|
|
|
- public Response<String> wxOrderNotifytest(String outTradeNo) throws GeneralSecurityException, IOException {
|
|
|
- String s = "";
|
|
|
- WxOrder wxOrder1 = wxOrderService.getByOutTradeNo(outTradeNo);
|
|
|
- FilmDTO filmDTO = new FilmDTO();
|
|
|
- filmDTO.setUrl("api/order/create");
|
|
|
- StringBuffer paramData = new StringBuffer();
|
|
|
- WxOrderJsonData wxOrderJsonData = JSONObject.parseObject(wxOrder1.getOrderDataJson(), WxOrderJsonData.class);
|
|
|
- WxOrderCreateDTO wxOrder = wxOrderJsonData.getWxOrderCreateDTO();
|
|
|
- paramData.append("showId="+wxOrder.getShowId()+"&");
|
|
|
- paramData.append("seat="+wxOrder.getSeat()+"&");
|
|
|
- if (wxOrder.getReservedPhone() != null){
|
|
|
- paramData.append("reservedPhone="+wxOrder.getReservedPhone()+"&");
|
|
|
- }
|
|
|
- paramData.append("thirdOrderId="+wxOrder.getThirdOrderId()+"&");
|
|
|
- paramData.append("notifyUrl="+notifyUrl+"&");
|
|
|
- if (wxOrder.getSeatId() != null){
|
|
|
- paramData.append("seatId="+wxOrder.getSeatId()+"&");
|
|
|
- }
|
|
|
- if (wxOrder.getSeatNo() != null){
|
|
|
- paramData.append("seatNo="+wxOrder.getSeatNo()+"&");
|
|
|
- }
|
|
|
- paramData.append("acceptChangeSeat="+wxOrder.getAcceptChangeSeat());
|
|
|
- filmDTO.setParamData(paramData.toString());
|
|
|
- s = wxOrderService.excuteFilmApi(filmDTO);
|
|
|
- log.info("电影下单返回值:"+s);
|
|
|
- return Response.success(s);
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
@@ -248,7 +219,7 @@ public class WxNotifyController {
|
|
|
}
|
|
|
//如果订单还未下过电影票订单,则异步调用电影下单api
|
|
|
String orderDataJson= wxOrder.getOrderDataJson();
|
|
|
- WxOrderJsonData wxOrderJsonData = JSONObject.parseObject(orderDataJson, WxOrderJsonData.class);
|
|
|
+ FilmWxOrderJsonData wxOrderJsonData = JSONObject.parseObject(orderDataJson, FilmWxOrderJsonData.class);
|
|
|
if (wxOrderJsonData != null && wxOrderJsonData.getWxOrderNotifyDTO() == null){
|
|
|
threadPoolTaskExecutor.execute(new Runnable() {
|
|
|
@Override
|