|  | @@ -1,11 +1,14 @@
 | 
											
												
													
														|  |  package com.zanxiang.sdk.controller;
 |  |  package com.zanxiang.sdk.controller;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +import com.zanxiang.module.util.JsonUtil;
 | 
											
												
													
														|  |  import com.zanxiang.module.util.pojo.ResultVO;
 |  |  import com.zanxiang.module.util.pojo.ResultVO;
 | 
											
												
													
														|  |  import com.zanxiang.sdk.annotation.UnSignCheck;
 |  |  import com.zanxiang.sdk.annotation.UnSignCheck;
 | 
											
												
													
														|  |  import com.zanxiang.sdk.domain.dto.PlatformOrderDTO;
 |  |  import com.zanxiang.sdk.domain.dto.PlatformOrderDTO;
 | 
											
												
													
														|  | 
 |  | +import com.zanxiang.sdk.domain.params.ProductPayParam;
 | 
											
												
													
														|  | 
 |  | +import com.zanxiang.sdk.domain.params.UserData;
 | 
											
												
													
														|  |  import com.zanxiang.sdk.domain.vo.GameShareVO;
 |  |  import com.zanxiang.sdk.domain.vo.GameShareVO;
 | 
											
												
													
														|  | 
 |  | +import com.zanxiang.sdk.service.IOrderPayService;
 | 
											
												
													
														|  |  import com.zanxiang.sdk.service.IOrderService;
 |  |  import com.zanxiang.sdk.service.IOrderService;
 | 
											
												
													
														|  | -import com.zanxiang.sdk.service.IPayApplicationService;
 |  | 
 | 
											
												
													
														|  |  import com.zanxiang.sdk.service.pay.WxPayService;
 |  |  import com.zanxiang.sdk.service.pay.WxPayService;
 | 
											
												
													
														|  |  import io.swagger.annotations.Api;
 |  |  import io.swagger.annotations.Api;
 | 
											
												
													
														|  |  import io.swagger.annotations.ApiResponse;
 |  |  import io.swagger.annotations.ApiResponse;
 | 
											
										
											
												
													
														|  | @@ -25,15 +28,15 @@ import org.springframework.web.bind.annotation.RestController;
 | 
											
												
													
														|  |  @RequestMapping(value = "/api/test")
 |  |  @RequestMapping(value = "/api/test")
 | 
											
												
													
														|  |  public class TestController {
 |  |  public class TestController {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    @Autowired
 |  | 
 | 
											
												
													
														|  | -    private IPayApplicationService payApplicationService;
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private WxPayService wxPayService;
 |  |      private WxPayService wxPayService;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private IOrderService orderService;
 |  |      private IOrderService orderService;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private IOrderPayService orderPayService;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @UnSignCheck
 |  |      @UnSignCheck
 | 
											
												
													
														|  |      @GetMapping("/close/order")
 |  |      @GetMapping("/close/order")
 | 
											
												
													
														|  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameShareVO.class)})
 |  |      @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameShareVO.class)})
 | 
											
										
											
												
													
														|  | @@ -42,4 +45,20 @@ public class TestController {
 | 
											
												
													
														|  |          wxPayService.closeOrder(platformOrderDTO);
 |  |          wxPayService.closeOrder(platformOrderDTO);
 | 
											
												
													
														|  |          return ResultVO.ok();
 |  |          return ResultVO.ok();
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    @UnSignCheck
 | 
											
												
													
														|  | 
 |  | +    @GetMapping("/pay/order")
 | 
											
												
													
														|  | 
 |  | +    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameShareVO.class)})
 | 
											
												
													
														|  | 
 |  | +    public ResultVO payOrder() {
 | 
											
												
													
														|  | 
 |  | +        String param = "{\"payWay\":1,\"payDevice\":2,\"productId\":\"0.1元\",\"productName\":\"1元宝\",\"productDesc\":\"充值1元购买100元宝\",\"amount\":0.1,\"serverId\":\"2\",\"serverName\":\"二区\",\"roleId\":\"132\",\"roleName\":\"oHaTi5bsKYQKlbWEHcfr7UWk_Wtk\",\"roleLevel\":1,\"extension\":\"\"}";
 | 
											
												
													
														|  | 
 |  | +        ProductPayParam productPayParam = JsonUtil.toObj(param, ProductPayParam.class);
 | 
											
												
													
														|  | 
 |  | +        UserData userData = UserData.builder()
 | 
											
												
													
														|  | 
 |  | +                .gameId(21L)
 | 
											
												
													
														|  | 
 |  | +                .userId(132L)
 | 
											
												
													
														|  | 
 |  | +                .deviceSystem("ios")
 | 
											
												
													
														|  | 
 |  | +                .ip("125.121.234.254")
 | 
											
												
													
														|  | 
 |  | +                .build();
 | 
											
												
													
														|  | 
 |  | +        orderPayService.payCreate(productPayParam, userData);
 | 
											
												
													
														|  | 
 |  | +        return ResultVO.ok();
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |  }
 |  |  }
 |