|
@@ -36,7 +36,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/index", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改首页配置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> indexEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editIndex(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.INDEX);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -45,7 +45,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取首页配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> indexGet(){
|
|
|
+ private Response<JSONObject> getIndex(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.INDEX);
|
|
|
logger.debug("{}", entity);
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -53,7 +53,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/place", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改考点设置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> placeEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editPlace(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.PLACE);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -62,7 +62,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/place", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取考点配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> placeGet(){
|
|
|
+ private Response<JSONObject> getPlace(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.PLACE);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -71,7 +71,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/sentence", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改长难句设置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> sentenceEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editSentence(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.SENTENCE);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -80,7 +80,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/sentence", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取长难句配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> sentenceGet(){
|
|
|
+ private Response<JSONObject> getSentence(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.SENTENCE);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -89,7 +89,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/exercise_time", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改做题时间设置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> exerciseTimeEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editExerciseTime(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.EXERCISE_TIME);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -98,14 +98,14 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/exercise_time", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取做题时间配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> exerciseTimeGet(){
|
|
|
+ private Response<JSONObject> getExerciseTime(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.EXERCISE_TIME);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
|
}
|
|
|
@RequestMapping(value = "/examination_time", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改做题时间设置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> examinationTimeEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editExaminationTime(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.EXAMINATION_TIME);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -114,7 +114,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/examination_time", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取做题时间配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> examinationTimeGet(){
|
|
|
+ private Response<JSONObject> getExaminationTime(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.EXAMINATION_TIME);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -122,7 +122,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/filter_time", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改剔除时间设置", httpMethod = "PUT")
|
|
|
- private Response<Boolean> filterTimeEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editFilterTime(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.FILTER_TIME);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -131,7 +131,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/filter_time", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取做题时间配置", httpMethod = "GET")
|
|
|
- private Response<JSONObject> filterTimeGet(){
|
|
|
+ private Response<JSONObject> getFilterTime(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.FILTER_TIME);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -139,7 +139,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/tips", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改结构说明", httpMethod = "PUT")
|
|
|
- private Response<Boolean> tipsEdit(@RequestBody @Validated JSONObject dto){
|
|
|
+ private Response<Boolean> editTips(@RequestBody @Validated JSONObject dto){
|
|
|
Setting entity = settingService.getByKey(SettingKey.TIPS);
|
|
|
entity.setValue(dto);
|
|
|
settingService.edit(entity);
|
|
@@ -148,7 +148,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/tips", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取结构说明", httpMethod = "GET")
|
|
|
- private Response<JSONObject> tipsGet(){
|
|
|
+ private Response<JSONObject> getTips(){
|
|
|
Setting entity = settingService.getByKey(SettingKey.TIPS);
|
|
|
|
|
|
return ResponseHelp.success(entity.getValue());
|
|
@@ -156,7 +156,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/rank/add", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "添加排行", httpMethod = "POST")
|
|
|
- private Response<Boolean> rankAdd(@RequestBody @Validated RankDto dto){
|
|
|
+ private Response<Boolean> addRank(@RequestBody @Validated RankDto dto){
|
|
|
Rank entity = Transform.dtoToEntity(dto);
|
|
|
rankService.add(entity);
|
|
|
return ResponseHelp.success(true);
|
|
@@ -164,7 +164,7 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/rank/edit", method = RequestMethod.PUT)
|
|
|
@ApiOperation(value = "修改排行", httpMethod = "PUT")
|
|
|
- private Response<Boolean> rankEdit(@RequestBody @Validated RankDto dto){
|
|
|
+ private Response<Boolean> editRank(@RequestBody @Validated RankDto dto){
|
|
|
Rank entity = Transform.dtoToEntity(dto);
|
|
|
rankService.edit(entity);
|
|
|
return ResponseHelp.success(true);
|
|
@@ -172,14 +172,14 @@ public class SettingController {
|
|
|
|
|
|
@RequestMapping(value = "/rank/delete", method = RequestMethod.DELETE)
|
|
|
@ApiOperation(value = "删除排行", httpMethod = "DELETE")
|
|
|
- private Response<Boolean> rankDelete(@RequestParam int id){
|
|
|
+ private Response<Boolean> deleteRank(@RequestParam int id){
|
|
|
rankService.delete(id);
|
|
|
return ResponseHelp.success(true);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/rank/list", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "获取排行设置", httpMethod = "GET")
|
|
|
- private Response<List<Rank>> rankGet(){
|
|
|
+ private Response<List<Rank>> getRank(){
|
|
|
List<Rank> rankList = rankService.all();
|
|
|
return ResponseHelp.success(rankList);
|
|
|
}
|