فهرست منبع

添加restcontroller

yq 4 سال پیش
والد
کامیت
77de89f123
12فایلهای تغییر یافته به همراه25 افزوده شده و 12 حذف شده
  1. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwFeedbackController.java
  2. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogController.java
  3. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogInfoController.java
  4. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsController.java
  5. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsNewController.java
  6. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwUserController.java
  7. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionController.java
  8. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionKeyController.java
  9. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageController.java
  10. 2 1
      mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageRecordController.java
  11. 1 1
      mhfire-model/src/main/java/com/bizmatics/mhfire/model/bulehelp/BmfwLawsCatalogInfo.java
  12. 4 1
      mhfire-service/src/main/java/com/bizmatics/mhfire/service/bulehelp/impl/BmfwLawsCatalogInfoServiceImpl.java

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwFeedbackController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwFeedback")
 public class BmfwFeedbackController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author liangcy
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwLawsCatalog")
 public class BmfwLawsCatalogController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsCatalogInfoController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author liangcy
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwLawsCatalogInfo")
 public class BmfwLawsCatalogInfoController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsController.java

@@ -4,6 +4,7 @@ package com.bizmatics.mhfire.controller.web.bulehelp;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author liangcy
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwLaws")
 public class BmfwLawsController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwLawsNewController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwLawsNew")
 public class BmfwLawsNewController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/BmfwUserController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author liangcy
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/bmfwUser")
 public class BmfwUserController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/robotQuestion")
 public class RobotQuestionController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionKeyController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/robotQuestionKey")
 public class RobotQuestionKeyController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/robotQuestionMessage")
 public class RobotQuestionMessageController {
 

+ 2 - 1
mhfire-controller/src/main/java/com/bizmatics/mhfire/controller/web/bulehelp/RobotQuestionMessageRecordController.java

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -21,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yq
  * @since 2021-06-15
  */
-@Controller
+@RestController
 @RequestMapping("/bule/robotQuestionMessageRecord")
 public class RobotQuestionMessageRecordController {
 

+ 1 - 1
mhfire-model/src/main/java/com/bizmatics/mhfire/model/bulehelp/BmfwLawsCatalogInfo.java

@@ -52,7 +52,7 @@ public class BmfwLawsCatalogInfo implements Serializable {
      * 法规目录名称
      */
     @TableField(exist = false)
-    private String catalogName;
+    private BmfwLawsCatalog bmfwLawsCatalog;
 
 
 }

+ 4 - 1
mhfire-service/src/main/java/com/bizmatics/mhfire/service/bulehelp/impl/BmfwLawsCatalogInfoServiceImpl.java

@@ -11,6 +11,7 @@ import com.bizmatics.common.core.bean.CommonPage;
 import com.bizmatics.common.core.util.StringUtils;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
 import com.bizmatics.mhfire.model.bulehelp.BmfwFeedback;
+import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalog;
 import com.bizmatics.mhfire.model.bulehelp.BmfwLawsCatalogInfo;
 import com.bizmatics.mhfire.persistence.mapper.bulehelp.BmfwLawsCatalogInfoMapper;
 import com.bizmatics.mhfire.service.bulehelp.BmfwLawsCatalogInfoService;
@@ -41,7 +42,9 @@ public class BmfwLawsCatalogInfoServiceImpl extends AbstractCrudService<BmfwLaws
                 .eq(null != catalogId,BmfwLawsCatalogInfo::getCatalogId,catalogId);
         IPage<BmfwLawsCatalogInfo> page = new Page<>(current, size);
         page = baseMapper.selectPage(page, productLambdaQueryWrapper);
-        page.getRecords().forEach(bmfwLawsCatalogInfo -> bmfwLawsCatalogInfo.setCatalogName(bmfwLawsCatalogService.getById(bmfwLawsCatalogInfo.getCatalogId()).getName()));
+        for (BmfwLawsCatalogInfo bmfwLawsCatalogInfo:page.getRecords()) {
+            bmfwLawsCatalogInfo.setBmfwLawsCatalog(bmfwLawsCatalogService.getById(bmfwLawsCatalogInfo.getCatalogId()));
+        }
         return this.ToCommonPage(page);
     }
 }