|
@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.redisson.api.RedissonClient;
|
|
import org.redisson.api.RedissonClient;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -36,6 +37,10 @@ public class OmsPortalOrderController {
|
|
private OmsPortalOrderService portalOrderService;
|
|
private OmsPortalOrderService portalOrderService;
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @Value("${message.debugMode}")
|
|
|
|
+ private boolean debugMode;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private RedissonClient redissonClient;
|
|
private RedissonClient redissonClient;
|
|
|
|
|
|
@@ -167,6 +172,9 @@ public class OmsPortalOrderController {
|
|
@RequestMapping(value = "/paySuccess/test", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/paySuccess/test", method = RequestMethod.GET)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public CommonResult paySuccessTest(@RequestParam Long orderId,@RequestParam Integer payType) {
|
|
public CommonResult paySuccessTest(@RequestParam Long orderId,@RequestParam Integer payType) {
|
|
|
|
+ if (!debugMode) {
|
|
|
|
+ return CommonResult.failed("当前环境不可使用");
|
|
|
|
+ }
|
|
OmsOrder omsOrder = portalOrderService.getOrderById(orderId);
|
|
OmsOrder omsOrder = portalOrderService.getOrderById(orderId);
|
|
if (omsOrder == null) {
|
|
if (omsOrder == null) {
|
|
return CommonResult.failed("未找到订单");
|
|
return CommonResult.failed("未找到订单");
|
|
@@ -190,6 +198,10 @@ public class OmsPortalOrderController {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public CommonResult cancelUserOrderTest(@RequestParam Long orderId) {
|
|
public CommonResult cancelUserOrderTest(@RequestParam Long orderId) {
|
|
|
|
|
|
|
|
+ if (!debugMode) {
|
|
|
|
+ return CommonResult.failed("当前环境不可使用");
|
|
|
|
+ }
|
|
|
|
+
|
|
OmsOrder omsOrder = portalOrderService.getOrderById(orderId);
|
|
OmsOrder omsOrder = portalOrderService.getOrderById(orderId);
|
|
if (omsOrder == null) {
|
|
if (omsOrder == null) {
|
|
return CommonResult.failed("未找到订单");
|
|
return CommonResult.failed("未找到订单");
|