fangmingyue hace 2 años
padre
commit
030f5e0b27

+ 1
- 1
db/.back_文明创办/文明创办-backup-202317202536.pdma.json Ver fichero

@@ -5605,7 +5605,7 @@
5605 5605
       "env": {
5606 5606
         "base": {
5607 5607
           "nameSpace": "com.example.civilizedcity",
5608
-          "codeRoot": "TdLocQuestion"
5608
+          "codeRoot": "TdQuestion"
5609 5609
         },
5610 5610
         "template": {
5611 5611
           "JavaMybatisPlus": {

+ 1
- 1
db/.back_文明创办/文明创办-backup-202318151432.pdma.json Ver fichero

@@ -5639,7 +5639,7 @@
5639 5639
       "env": {
5640 5640
         "base": {
5641 5641
           "nameSpace": "com.example.civilizedcity",
5642
-          "codeRoot": "TdLocQuestion"
5642
+          "codeRoot": "TdQuestion"
5643 5643
         },
5644 5644
         "template": {
5645 5645
           "JavaMybatisPlus": {

+ 1
- 1
db/.back_文明创办/文明创办-backup-202318151439.pdma.json Ver fichero

@@ -5639,7 +5639,7 @@
5639 5639
       "env": {
5640 5640
         "base": {
5641 5641
           "nameSpace": "com.example.civilizedcity",
5642
-          "codeRoot": "TdLocQuestion"
5642
+          "codeRoot": "TdQuestion"
5643 5643
         },
5644 5644
         "template": {
5645 5645
           "JavaMybatisPlus": {

+ 1
- 1
db/文明创办.pdma.json Ver fichero

@@ -5639,7 +5639,7 @@
5639 5639
       "env": {
5640 5640
         "base": {
5641 5641
           "nameSpace": "com.example.civilizedcity",
5642
-          "codeRoot": "TdLocQuestion"
5642
+          "codeRoot": "TdQuestion"
5643 5643
         },
5644 5644
         "template": {
5645 5645
           "JavaMybatisPlus": {

+ 16
- 16
src/main/java/com/example/civilizedcity/controller/TdQuAnswerController.java Ver fichero

@@ -23,7 +23,7 @@ import com.example.civilizedcity.service.TdQuAnswerService;
23 23
 public class TdQuAnswerController extends BaseController {
24 24
     
25 25
     @Autowired
26
-    private TdQuAnswerService tdLocQuAnswerService;
26
+    private TdQuAnswerService tdQuAnswerService;
27 27
     
28 28
     /** 
29 29
      * 通过ID查询单条数据 
@@ -32,9 +32,9 @@ public class TdQuAnswerController extends BaseController {
32 32
      * @return 实例对象
33 33
      */
34 34
     @ApiOperation("通过ID查询单条数据")
35
-    @GetMapping("/tdLocQuAnswer/{id}")
35
+    @GetMapping("/tdQuAnswer/{id}")
36 36
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
37
-        return ResponseBean.success(tdLocQuAnswerService.getById(id));
37
+        return ResponseBean.success(tdQuAnswerService.getById(id));
38 38
     }
39 39
     
40 40
     /** 
@@ -45,14 +45,14 @@ public class TdQuAnswerController extends BaseController {
45 45
      * @return 查询结果
46 46
      */
47 47
     @ApiOperation("分页查询")
48
-    @GetMapping("/tdLocQuAnswer")
48
+    @GetMapping("/tdQuAnswer")
49 49
     public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
50 50
                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
51 51
         
52 52
         IPage<TdQuAnswer> pg = new Page<>(pageNum, pageSize);
53 53
         // QueryWrapper<TdLocQuAnswer> queryWrapper = new QueryWrapper<>();
54 54
         // queryWrapper.orderByDesc("create_date");
55
-        IPage<TdQuAnswer> result = tdLocQuAnswerService.page(pg);
55
+        IPage<TdQuAnswer> result = tdQuAnswerService.page(pg);
56 56
         
57 57
         return ResponseBean.success(result);
58 58
     }
@@ -60,28 +60,28 @@ public class TdQuAnswerController extends BaseController {
60 60
     /** 
61 61
      * 新增数据
62 62
      *
63
-     * @param tdLocQuAnswer 实例对象
63
+     * @param tdQuAnswer 实例对象
64 64
      * @return 实例对象
65 65
      */
66 66
     @ApiOperation("新增数据")
67 67
     @PostMapping("/tdLocQuAnswer")
68
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuAnswer tdLocQuAnswer) throws Exception {
69
-        tdLocQuAnswerService.save(tdLocQuAnswer);
70
-        return ResponseBean.success(tdLocQuAnswer);
68
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuAnswer tdQuAnswer) throws Exception {
69
+        tdQuAnswerService.save(tdQuAnswer);
70
+        return ResponseBean.success(tdQuAnswer);
71 71
     }
72 72
     
73 73
     /** 
74 74
      * 更新数据
75 75
      *
76
-     * @param tdLocQuAnswer 实例对象
76
+     * @param tdQuAnswer 实例对象
77 77
      * @return 实例对象
78 78
      */
79 79
     @ApiOperation("更新数据")
80
-    @PutMapping("/tdLocQuAnswer/{id}")
81
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuAnswer tdLocQuAnswer,
80
+    @PutMapping("/tdQuAnswer/{id}")
81
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuAnswer tdQuAnswer,
82 82
                             @ApiParam("对象ID") @PathVariable String id ) throws Exception {
83
-        tdLocQuAnswerService.updateById(tdLocQuAnswer);
84
-        return ResponseBean.success(tdLocQuAnswer);
83
+        tdQuAnswerService.updateById(tdQuAnswer);
84
+        return ResponseBean.success(tdQuAnswer);
85 85
     }
86 86
     
87 87
     /** 
@@ -91,9 +91,9 @@ public class TdQuAnswerController extends BaseController {
91 91
      * @return 是否成功
92 92
      */
93 93
     @ApiOperation("通过主键删除数据")
94
-    @DeleteMapping("/tdLocQuAnswer/{id}")
94
+    @DeleteMapping("/tdQuAnswer/{id}")
95 95
     public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
96
-        tdLocQuAnswerService.removeLogicById(id);
96
+        tdQuAnswerService.removeLogicById(id);
97 97
         return ResponseBean.success("success");
98 98
     }
99 99
 }

+ 23
- 23
src/main/java/com/example/civilizedcity/controller/TdQuestionController.java Ver fichero

@@ -16,7 +16,7 @@ import com.example.civilizedcity.entity.TdQuestion;
16 16
 import com.example.civilizedcity.service.TdQuestionService;
17 17
 
18 18
  /**
19
- * 点位问题;(td_loc_question)表控制层
19
+ * 点位问题;(td_question)表控制层
20 20
  * @author : http://njyunzhi.com
21 21
  * @date : 2022-12-13
22 22
  */
@@ -26,10 +26,10 @@ import com.example.civilizedcity.service.TdQuestionService;
26 26
 public class TdQuestionController extends BaseController {
27 27
     
28 28
     @Autowired
29
-    private TdQuestionService tdLocQuestionService;
29
+    private TdQuestionService tdQuestionService;
30 30
 
31 31
      @Autowired
32
-     private TdQuAnswerService tdLocQuAnswerService;
32
+     private TdQuAnswerService tdQuAnswerService;
33 33
     
34 34
     /** 
35 35
      * 通过ID查询单条数据 
@@ -38,9 +38,9 @@ public class TdQuestionController extends BaseController {
38 38
      * @return 实例对象
39 39
      */
40 40
     @ApiOperation("通过ID查询单条数据")
41
-    @GetMapping("/tdLocQuestion/{id}")
41
+    @GetMapping("/tdQuestion/{id}")
42 42
     public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
43
-        return ResponseBean.success(tdLocQuestionService.getById(id));
43
+        return ResponseBean.success(tdQuestionService.getById(id));
44 44
     }
45 45
     
46 46
     /** 
@@ -51,14 +51,14 @@ public class TdQuestionController extends BaseController {
51 51
      * @return 查询结果
52 52
      */
53 53
     @ApiOperation("分页查询")
54
-    @GetMapping("/tdLocQuestion")
54
+    @GetMapping("/tdQuestion")
55 55
     public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56 56
                             @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
57 57
         
58 58
         IPage<TdQuestion> pg = new Page<>(pageNum, pageSize);
59
-        // QueryWrapper<TdLocQuestion> queryWrapper = new QueryWrapper<>();
59
+        // QueryWrapper<TdQuestion> queryWrapper = new QueryWrapper<>();
60 60
         // queryWrapper.orderByDesc("create_date");
61
-        IPage<TdQuestion> result = tdLocQuestionService.page(pg);
61
+        IPage<TdQuestion> result = tdQuestionService.page(pg);
62 62
         
63 63
         return ResponseBean.success(result);
64 64
     }
@@ -66,37 +66,37 @@ public class TdQuestionController extends BaseController {
66 66
     /** 
67 67
      * 新增数据
68 68
      *
69
-     * @param tdLocQuestion 实例对象
69
+     * @param tdQuestion 实例对象
70 70
      * @return 实例对象
71 71
      */
72 72
     @ApiOperation("新增数据")
73
-    @PostMapping("/tdLocQuestion")
74
-    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuestion tdLocQuestion) throws Exception {
75
-        String quId = tdLocQuestion.getQuId();
73
+    @PostMapping("/tdQuestion")
74
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TdQuestion tdQuestion) throws Exception {
75
+        String quId = tdQuestion.getQuId();
76 76
 
77 77
         if (StringUtils.isEmpty(quId)) {
78 78
             // 新增
79
-            tdLocQuestionService.save(tdLocQuestion);
79
+            tdQuestionService.save(tdQuestion);
80 80
         } else {
81
-            tdLocQuestionService.updateById(tdLocQuestion);
81
+            tdQuestionService.updateById(tdQuestion);
82 82
         }
83 83
 
84
-        tdLocQuAnswerService.mergeData(tdLocQuestion.getQuId(), tdLocQuestion.getQuAnswerList());
85
-        return ResponseBean.success(tdLocQuestion);
84
+        tdQuAnswerService.mergeData(tdQuestion.getQuId(), tdQuestion.getQuAnswerList());
85
+        return ResponseBean.success(tdQuestion);
86 86
     }
87 87
     
88 88
     /** 
89 89
      * 更新数据
90 90
      *
91
-     * @param tdLocQuestion 实例对象
91
+     * @param tdQuestion 实例对象
92 92
      * @return 实例对象
93 93
      */
94 94
     @ApiOperation("更新数据")
95
-    @PutMapping("/tdLocQuestion/{id}")
96
-    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuestion tdLocQuestion,
95
+    @PutMapping("/tdQuestion/{id}")
96
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TdQuestion tdQuestion,
97 97
                             @ApiParam("对象ID") @PathVariable String id ) throws Exception {
98
-        tdLocQuestionService.updateById(tdLocQuestion);
99
-        return ResponseBean.success(tdLocQuestion);
98
+        tdQuestionService.updateById(tdQuestion);
99
+        return ResponseBean.success(tdQuestion);
100 100
     }
101 101
     
102 102
     /** 
@@ -106,9 +106,9 @@ public class TdQuestionController extends BaseController {
106 106
      * @return 是否成功
107 107
      */
108 108
     @ApiOperation("通过主键删除数据")
109
-    @DeleteMapping("/tdLocQuestion/{id}")
109
+    @DeleteMapping("/tdQuestion/{id}")
110 110
     public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
111
-        tdLocQuestionService.removeLogicById(id);
111
+        tdQuestionService.removeLogicById(id);
112 112
         return ResponseBean.success("success");
113 113
     }
114 114
 }