|
@@ -40,7 +40,7 @@ public class SporadicChargeInfoController extends BaseController {
|
|
|
@ApiOperation(value = "单查询")
|
|
|
@GetMapping("/get")
|
|
|
public Object get(Integer id, Integer userId) {
|
|
|
- return succeed(sporadicChargeInfoService.findDetail(id,userId));
|
|
|
+ return succeed(sporadicChargeInfoService.findDetail(id, userId));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -68,6 +68,13 @@ public class SporadicChargeInfoController extends BaseController {
|
|
|
return failed(HttpStatus.CONTINUE, "您有待支付的订单");
|
|
|
}
|
|
|
}
|
|
|
+ SporadicChargeInfo info = sporadicChargeInfoService.get(sporadicPayDto.getSporadicId());
|
|
|
+ if (info.getMaxNum() != null) {
|
|
|
+ int max = 100, min = 1;
|
|
|
+ int ran2 = (int) (Math.random() * (max - min) + min);
|
|
|
+ Thread.sleep(ran2);
|
|
|
+ }
|
|
|
+
|
|
|
Map payMap = musicGroupService.sporadicPay(sporadicPayDto);
|
|
|
if (payMap.containsKey("tradeState")) {
|
|
|
return failed(HttpStatus.CREATED, "恭喜您,支付成功!");
|
|
@@ -93,7 +100,7 @@ public class SporadicChargeInfoController extends BaseController {
|
|
|
return failed("参数不合法");
|
|
|
}
|
|
|
SporadicChargeInfo chargeInfo = sporadicChargeInfoService.findByOrganIdAndType(organId, type);
|
|
|
- if(chargeInfo == null){
|
|
|
+ if (chargeInfo == null) {
|
|
|
return failed("分部活动不存在");
|
|
|
}
|
|
|
return succeed(chargeInfo);
|