|
@@ -13,6 +13,7 @@ import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
|
+import com.ym.mec.util.string.IdWorker;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -92,7 +93,7 @@ public class MusicGroupController extends BaseController {
|
|
@ApiOperation(value = "乐团报名支付")
|
|
@ApiOperation(value = "乐团报名支付")
|
|
@PostMapping("/pay")
|
|
@PostMapping("/pay")
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
- public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) {
|
|
|
|
|
|
+ public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) throws Exception {
|
|
|
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
Integer userId = sysUser.getId();
|
|
Integer userId = sysUser.getId();
|
|
@@ -137,16 +138,13 @@ public class MusicGroupController extends BaseController {
|
|
if (amount.compareTo(orderAmount) != 0) {
|
|
if (amount.compareTo(orderAmount) != 0) {
|
|
return failed("商品价格不符");
|
|
return failed("商品价格不符");
|
|
}
|
|
}
|
|
- Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
|
|
|
|
- rqMap.put("merNo", "07654478");
|
|
|
|
- rqMap.put("version", "v1");
|
|
|
|
- rqMap.put("notifyUrl", "https://notify.cpm");
|
|
|
|
- rqMap.put("timestamp", new Date().getTime());
|
|
|
|
- rqMap.put("apiContent", "ap");
|
|
|
|
- rqMap.put("signType", "signType");
|
|
|
|
- rqMap.put("sign", "sign");
|
|
|
|
- rqMap.put("payUrl", "http://pay.url");
|
|
|
|
- return succeed(rqMap);
|
|
|
|
|
|
+
|
|
|
|
+ IdWorker idWorker = new IdWorker(0, 0);
|
|
|
|
+ String orderNo = idWorker.nextId();
|
|
|
|
+
|
|
|
|
+ Map payMap = payService.getPayMap(orderAmount,orderNo,"https://pay.dayaedu.com/yqpay/notify","http://dev.dayaedu.com","测试订单","测试订单");
|
|
|
|
+
|
|
|
|
+ return succeed(payMap);
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/test")
|
|
@GetMapping("/test")
|