|
@@ -1,20 +1,17 @@
|
|
package com.ym.mec.web.controller;
|
|
package com.ym.mec.web.controller;
|
|
|
|
|
|
|
|
+import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle;
|
|
|
|
+import com.ym.mec.biz.service.VipGroupDefaultClassesCycleService;
|
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
-
|
|
|
|
-import java.util.Date;
|
|
|
|
-
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle;
|
|
|
|
-import com.ym.mec.biz.service.VipGroupDefaultClassesCycleService;
|
|
|
|
-import com.ym.mec.common.controller.BaseController;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
|
|
|
@Api(tags = "vip课默认排课周期")
|
|
@Api(tags = "vip课默认排课周期")
|
|
@RequestMapping("vipGroupDefaultClassesCycle")
|
|
@RequestMapping("vipGroupDefaultClassesCycle")
|
|
@@ -25,29 +22,26 @@ public class VipGroupDefaultClassesCycleController extends BaseController {
|
|
private VipGroupDefaultClassesCycleService vipGroupDefaultClassesCycleService;
|
|
private VipGroupDefaultClassesCycleService vipGroupDefaultClassesCycleService;
|
|
|
|
|
|
@ApiOperation("单查询")
|
|
@ApiOperation("单查询")
|
|
- @GetMapping(value = "/query", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @GetMapping(value = "/query")
|
|
public Object query(int id) {
|
|
public Object query(int id) {
|
|
return succeed(vipGroupDefaultClassesCycleService.get(id));
|
|
return succeed(vipGroupDefaultClassesCycleService.get(id));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("全查询")
|
|
@ApiOperation("全查询")
|
|
- @GetMapping(value = "/queryAll", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @GetMapping(value = "/queryAll")
|
|
public Object queryAll() {
|
|
public Object queryAll() {
|
|
return succeed(vipGroupDefaultClassesCycleService.findAll(null));
|
|
return succeed(vipGroupDefaultClassesCycleService.findAll(null));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("新增")
|
|
@ApiOperation("新增")
|
|
- @PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @PostMapping(value = "/add")
|
|
public Object add(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
|
|
public Object add(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
|
|
- Date date = new Date();
|
|
|
|
- vipGroupDefaultClassesCycle.setCreateTime(date);
|
|
|
|
- vipGroupDefaultClassesCycle.setUpdateTime(date);
|
|
|
|
vipGroupDefaultClassesCycleService.insert(vipGroupDefaultClassesCycle);
|
|
vipGroupDefaultClassesCycleService.insert(vipGroupDefaultClassesCycle);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("修改")
|
|
@ApiOperation("修改")
|
|
- @PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @PostMapping(value = "/update")
|
|
public Object update(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
|
|
public Object update(VipGroupDefaultClassesCycle vipGroupDefaultClassesCycle) {
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
vipGroupDefaultClassesCycle.setUpdateTime(date);
|
|
vipGroupDefaultClassesCycle.setUpdateTime(date);
|
|
@@ -56,7 +50,7 @@ public class VipGroupDefaultClassesCycleController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("删除")
|
|
@ApiOperation("删除")
|
|
- @PostMapping(value = "/delete", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @PostMapping(value = "/delete")
|
|
public Object delete(int id) {
|
|
public Object delete(int id) {
|
|
vipGroupDefaultClassesCycleService.delete(id);
|
|
vipGroupDefaultClassesCycleService.delete(id);
|
|
return succeed();
|
|
return succeed();
|