|
@@ -102,10 +102,10 @@ public class MusicGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "乐团报名缴费状态查询")
|
|
@ApiOperation(value = "乐团报名缴费状态查询")
|
|
@GetMapping("/getMusicGroupStatus")
|
|
@GetMapping("/getMusicGroupStatus")
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String")})
|
|
|
|
- public HttpResponseResult getMusicGroupStatus(String musicGroupId) throws Exception {
|
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
- Integer userId = sysUser.getId();
|
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团id", required = true, dataType = "String"),
|
|
|
|
+ @ApiImplicitParam(name = "userId", value = "用户id", required = true, dataType = "int")
|
|
|
|
+ })
|
|
|
|
+ public HttpResponseResult getMusicGroupStatus(String musicGroupId,Integer userId) throws Exception {
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
if (musicGroup == null) {
|
|
if (musicGroup == null) {
|
|
return failed("乐团不存在");
|
|
return failed("乐团不存在");
|
|
@@ -184,13 +184,13 @@ public class MusicGroupController extends BaseController {
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) throws Exception {
|
|
public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) throws Exception {
|
|
|
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
- Integer userId = sysUser.getId();
|
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
- if (!studentRegistration.getUserId().equals(userId)) {
|
|
|
|
|
|
+ if (studentRegistration == null) {
|
|
return failed("报名信息有误,请核查");
|
|
return failed("报名信息有误,请核查");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Integer userId = studentRegistration.getUserId();
|
|
|
|
+
|
|
StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
|
|
StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
|
|
if (ApplyOrder != null) {
|
|
if (ApplyOrder != null) {
|
|
return failed("您已支付成功,请勿重复支付");
|
|
return failed("您已支付成功,请勿重复支付");
|
|
@@ -272,13 +272,13 @@ public class MusicGroupController extends BaseController {
|
|
@PostMapping("/rePay")
|
|
@PostMapping("/rePay")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
public HttpResponseResult rePay(@RequestBody RegisterPayDto registerPayDto) throws Exception {
|
|
public HttpResponseResult rePay(@RequestBody RegisterPayDto registerPayDto) throws Exception {
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
- Integer userId = sysUser.getId();
|
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
- if (!studentRegistration.getUserId().equals(userId)) {
|
|
|
|
|
|
+ if (studentRegistration == null) {
|
|
return failed("报名信息有误,请核查");
|
|
return failed("报名信息有误,请核查");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ Integer userId = studentRegistration.getUserId();
|
|
|
|
+
|
|
StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId().toString(), DealStatusEnum.SUCCESS);
|
|
StudentPaymentOrder ApplyOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(userId, studentRegistration.getMusicGroupId().toString(), DealStatusEnum.SUCCESS);
|
|
if (ApplyOrder != null) {
|
|
if (ApplyOrder != null) {
|
|
return failed("您已支付成功,请勿重复支付");
|
|
return failed("您已支付成功,请勿重复支付");
|
|
@@ -356,22 +356,6 @@ public class MusicGroupController extends BaseController {
|
|
return succeed(payMap);
|
|
return succeed(payMap);
|
|
}
|
|
}
|
|
|
|
|
|
- @GetMapping("/test")
|
|
|
|
- public Object test() throws Exception {
|
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserByMobile("15829292961");
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-// Map query = payService.query("1017201910111756231647562047");
|
|
|
|
-//
|
|
|
|
-// System.out.println(query);
|
|
|
|
-//
|
|
|
|
- String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
|
- BigDecimal amount = new BigDecimal("0.01");
|
|
|
|
- String payChannel = PayChannelEnum.ALIPAY_QR.getCode();
|
|
|
|
- Map map = payService.getPayMap(amount, orderNo, "http://47.99.212.176:8000/studentOrder/notify", "https://baodiu.com", "测试订单", "测试订单");
|
|
|
|
- return succeed(map);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@ApiOperation(value = "订单状态查询")
|
|
@ApiOperation(value = "订单状态查询")
|
|
@GetMapping("/getOrderStatus")
|
|
@GetMapping("/getOrderStatus")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "orderNo", value = "订单号", required = true, dataType = "String")})
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "orderNo", value = "订单号", required = true, dataType = "String")})
|