|
@@ -2,15 +2,25 @@ package com.ym.mec.student.controller;
|
|
|
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
|
|
|
+import com.ym.mec.biz.dal.dto.RegisterPayDto;
|
|
|
import com.ym.mec.biz.service.MusicGroupService;
|
|
|
+import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
@RequestMapping("musicGroup")
|
|
|
@Api(tags = "乐团服务")
|
|
|
@RestController
|
|
@@ -20,6 +30,8 @@ public class MusicGroupController extends BaseController {
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
@Autowired
|
|
|
private MusicGroupService musicGroupService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
|
|
|
|
|
|
@ApiOperation("获取学生所在乐团列表")
|
|
|
@GetMapping(value = "/queryUserMusicGroups")
|
|
@@ -50,4 +62,30 @@ public class MusicGroupController extends BaseController {
|
|
|
}
|
|
|
return succeed(musicGroupService.findTeachersByStuId(sysUser.getId()));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取乐团声部费用信息及乐器和辅件")
|
|
|
+ @GetMapping("/getSubjectGoodsAndInfo")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
|
|
|
+ public HttpResponseResult getSubjectGoodsAndInfo(Integer musicGroupId) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ MusicGroupSubjectGoodsAndInfoDto subjectGoodsAndInfo = musicGroupSubjectPlanService.getSubjectGoodsAndInfo(musicGroupId, 1);
|
|
|
+ return succeed(subjectGoodsAndInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "乐团报名支付")
|
|
|
+ @GetMapping("/pay")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
|
|
|
+ public HttpResponseResult pay(RegisterPayDto registerPayDto) {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
}
|