|
@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.type.CollectionType;
|
|
import com.fasterxml.jackson.databind.type.CollectionType;
|
|
-import com.free.annotation.PassToken;
|
|
|
|
import com.free.config.CustomizationException;
|
|
import com.free.config.CustomizationException;
|
|
import com.free.config.ExceptionEnum;
|
|
import com.free.config.ExceptionEnum;
|
|
import com.free.config.ResponseFormat;
|
|
import com.free.config.ResponseFormat;
|
|
@@ -40,7 +39,6 @@ public class QuestionController {
|
|
@Autowired
|
|
@Autowired
|
|
private QuestionService service;
|
|
private QuestionService service;
|
|
|
|
|
|
- @PassToken
|
|
|
|
/** 创建数据 */
|
|
/** 创建数据 */
|
|
@ApiOperation("创建数据")
|
|
@ApiOperation("创建数据")
|
|
@PostMapping("")
|
|
@PostMapping("")
|
|
@@ -54,7 +52,6 @@ public class QuestionController {
|
|
}
|
|
}
|
|
|
|
|
|
/** 修改数据 */
|
|
/** 修改数据 */
|
|
- @PassToken
|
|
|
|
@ApiOperation("修改数据")
|
|
@ApiOperation("修改数据")
|
|
@PostMapping("/{id}")
|
|
@PostMapping("/{id}")
|
|
public Object update(@PathVariable String id, @RequestBody Question data) {
|
|
public Object update(@PathVariable String id, @RequestBody Question data) {
|
|
@@ -71,7 +68,6 @@ public class QuestionController {
|
|
}
|
|
}
|
|
|
|
|
|
/** 列表查询 */
|
|
/** 列表查询 */
|
|
- @PassToken
|
|
|
|
@ApiOperation("查询数据列表")
|
|
@ApiOperation("查询数据列表")
|
|
@SuppressWarnings({ "unchecked" })
|
|
@SuppressWarnings({ "unchecked" })
|
|
@GetMapping()
|
|
@GetMapping()
|
|
@@ -112,7 +108,6 @@ public class QuestionController {
|
|
}
|
|
}
|
|
|
|
|
|
/** 根据id查询 */
|
|
/** 根据id查询 */
|
|
- @PassToken
|
|
|
|
@ApiOperation("查询数据")
|
|
@ApiOperation("查询数据")
|
|
@GetMapping("/{id}")
|
|
@GetMapping("/{id}")
|
|
public Object fetch(@PathVariable String id) {
|
|
public Object fetch(@PathVariable String id) {
|
|
@@ -121,7 +116,6 @@ public class QuestionController {
|
|
}
|
|
}
|
|
|
|
|
|
/** 根据id删除数据 */
|
|
/** 根据id删除数据 */
|
|
- @PassToken
|
|
|
|
@ApiOperation("删除数据")
|
|
@ApiOperation("删除数据")
|
|
@DeleteMapping("/{id}")
|
|
@DeleteMapping("/{id}")
|
|
public Object delete(@PathVariable String id) {
|
|
public Object delete(@PathVariable String id) {
|
|
@@ -134,7 +128,6 @@ public class QuestionController {
|
|
service.removeById(id);
|
|
service.removeById(id);
|
|
return ResponseFormat.success();
|
|
return ResponseFormat.success();
|
|
}
|
|
}
|
|
- @PassToken
|
|
|
|
@ApiOperation("初始化问题")
|
|
@ApiOperation("初始化问题")
|
|
@PostMapping("/initData")
|
|
@PostMapping("/initData")
|
|
public Object initData() throws JsonProcessingException {
|
|
public Object initData() throws JsonProcessingException {
|