|
@@ -1,15 +1,14 @@
|
|
|
package com.ym.mec.student.controller;
|
|
|
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
-import com.ym.mec.biz.dal.dto.ConditionDto;
|
|
|
-import com.ym.mec.biz.dal.dto.QueryConditionDto;
|
|
|
-import com.ym.mec.biz.dal.dto.VipGroupBuyParamsDto;
|
|
|
+import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.page.StudentVipGroupQueryInfo;
|
|
|
import com.ym.mec.biz.service.SubjectService;
|
|
|
import com.ym.mec.biz.service.SysUserService;
|
|
|
import com.ym.mec.biz.service.VipGroupCategoryService;
|
|
|
import com.ym.mec.biz.service.VipGroupService;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.yonge.log.model.AuditLogAnnotation;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -42,7 +41,7 @@ public class StudentVipGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "获取vip课列表筛选条件")
|
|
|
@GetMapping(value = "/findQueryCondition")
|
|
|
- public Object findQueryCondition(){
|
|
|
+ public HttpResponseResult<List<QueryConditionDto>> findQueryCondition(){
|
|
|
List<QueryConditionDto> conditions=new ArrayList<>();
|
|
|
conditions.add(new QueryConditionDto("乐器选择","subjectId",subjectService.findSubjectConditions()));
|
|
|
conditions.add(new QueryConditionDto("课程类型","categoryId",vipGroupCategoryService.findConditionCategorys()));
|
|
@@ -55,7 +54,7 @@ public class StudentVipGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "获取vip课列表")
|
|
|
@PostMapping(value = "/queryVipGroups")
|
|
|
- public Object queryVipGroups(@RequestBody StudentVipGroupQueryInfo queryInfo){
|
|
|
+ public HttpResponseResult<Map<String, Object>> queryVipGroups(@RequestBody StudentVipGroupQueryInfo queryInfo){
|
|
|
SysUser sysUser = sysUserService.getUser();
|
|
|
queryInfo.setOrganId(sysUser.getOrganId());
|
|
|
queryInfo.setUserId(sysUser.getId());
|
|
@@ -67,7 +66,7 @@ public class StudentVipGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "获取可购买vip、网管课列表")
|
|
|
@RequestMapping(value = "/queryVipPracticeGroups")
|
|
|
- public Object queryVipPracticeGroups(@RequestBody StudentVipGroupQueryInfo queryInfo){
|
|
|
+ public HttpResponseResult<List<StudentVipGroupShowListDto>> queryVipPracticeGroups(@RequestBody StudentVipGroupQueryInfo queryInfo){
|
|
|
SysUser sysUser = sysUserService.getUser();
|
|
|
queryInfo.setOrganId(sysUser.getOrganId());
|
|
|
queryInfo.setUserId(sysUser.getId());
|
|
@@ -76,13 +75,13 @@ public class StudentVipGroupController extends BaseController {
|
|
|
|
|
|
@ApiOperation(value = "获取学生端vip、网管课显示详情")
|
|
|
@RequestMapping(value = "/getVipGroupShowDetail")
|
|
|
- public Object getVipGroupShowDetail(Long vipGroupId,String groupType){
|
|
|
+ public HttpResponseResult<StudentVipGroupDetailDto> getVipGroupShowDetail(Long vipGroupId, String groupType){
|
|
|
return succeed(vipGroupService.getVipGroupShowDetail(vipGroupId,groupType));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "检测vip课成能否购买")
|
|
|
@GetMapping(value = "/enableBuyGroup")
|
|
|
- public Object enableBuyGroup(Long vipGroupId,String groupType){
|
|
|
+ public HttpResponseResult enableBuyGroup(Long vipGroupId, String groupType){
|
|
|
vipGroupService.enableBuyVipGroup(vipGroupId,sysUserService.getUserId(),groupType);
|
|
|
return succeed();
|
|
|
}
|
|
@@ -90,7 +89,7 @@ public class StudentVipGroupController extends BaseController {
|
|
|
@ApiOperation(value = "vip课购买")
|
|
|
@PostMapping("/buyVipGroup")
|
|
|
@AuditLogAnnotation(operateName = "vip课购买")
|
|
|
- public Object buyVipGroup(VipGroupBuyParamsDto vipGroupBuyParams) throws Exception {
|
|
|
+ public HttpResponseResult buyVipGroup(VipGroupBuyParamsDto vipGroupBuyParams) throws Exception {
|
|
|
vipGroupBuyParams.setUserId(sysUserService.getUserId());
|
|
|
return vipGroupService.buyVipGroup(vipGroupBuyParams);
|
|
|
}
|
|
@@ -98,14 +97,14 @@ public class StudentVipGroupController extends BaseController {
|
|
|
@ApiOperation(value = "vip课退课")
|
|
|
@PostMapping("/applyRefund")
|
|
|
@AuditLogAnnotation(operateName = "vip课退课")
|
|
|
- public Object applyRefund(Long vipGroupId) {
|
|
|
+ public HttpResponseResult applyRefund(Long vipGroupId) {
|
|
|
vipGroupService.applyRefund(vipGroupId);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "获取vip购买信息")
|
|
|
@PostMapping("/getVipGroupPayInfo")
|
|
|
- public Object getVipGroupPayInfo(Integer vipGroupId){
|
|
|
+ public HttpResponseResult<VipGroupPayInfoDto> getVipGroupPayInfo(Integer vipGroupId){
|
|
|
return succeed(vipGroupService.getVipGroupPayInfo(vipGroupId,sysUserService.getUserId()));
|
|
|
}
|
|
|
|