Procházet zdrojové kódy

修复业务参数配置模块部分bug.

zhuoning před 3 roky
rodič
revize
b614e0ffd8

+ 13 - 9
huimv-manage/src/main/java/com/huimv/manage/eartag/controller/BusinessConfigController.java

@@ -2,11 +2,9 @@ package com.huimv.manage.eartag.controller;
 
 import com.huimv.manage.eartag.service.impl.BusinessConfigService;
 import com.huimv.manage.util.Result;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Date;
@@ -19,7 +17,9 @@ import java.util.Date;
  * @Author : ZhuoNing
  * @Create : 2020-12-25
  **/
+@CrossOrigin
 @RestController
+@Slf4j
 @RequestMapping(value = "/system/config")
 public class BusinessConfigController {
     @Autowired
@@ -35,13 +35,17 @@ public class BusinessConfigController {
      * @Date        : 2021/11/10       
      * @Time        : 20:57
      */
-    @RequestMapping(value = "/listEarmark",method = RequestMethod.GET)
-    public Result listEarmark(
+    @RequestMapping(value = "/listConfigParam",method = RequestMethod.GET)
+    public Result listConfigParam(
             @RequestParam(value = "paramType",required = false) String paramType,
             @RequestParam(value = "pageSize",required = true) Integer pageSize,
             @RequestParam(value = "pageNum", required = true) Integer pageNo){
+        log.info("输入参数-->");
+        log.info("paramType="+paramType);
+        log.info("pageSize="+pageSize);
+        log.info("pageNum="+pageNo);
         //
-        return configService.listEarmark(paramType,pageSize,pageNo);
+        return configService.listConfigParam(paramType,pageSize,pageNo);
     }
 
     /**
@@ -57,7 +61,7 @@ public class BusinessConfigController {
     @RequestMapping(value = "/addConfigParam",method = RequestMethod.GET)
     public Result addConfigParam(@RequestParam(value = "paramName") String paramName,
                                  @RequestParam(value = "paramId") String paramId,
-                                 @RequestParam(value = "aramValue") String paramValue,
+                                 @RequestParam(value = "paramValue") String paramValue,
                                  @RequestParam(value = "paramType") String paramType,
                                  @RequestParam(value = "remark") String remark){
         //
@@ -78,7 +82,7 @@ public class BusinessConfigController {
     public Result editConfigParam(@RequestParam(value = "id") Integer id,
                                   @RequestParam(value = "paramName") String paramName,
                                   @RequestParam(value = "paramId") String paramId,
-                                  @RequestParam(value = "aramValue") String aramValue,
+                                  @RequestParam(value = "paramValue") String aramValue,
                                   @RequestParam(value = "paramType") String paramType,
                                   @RequestParam(value = "remark") String remark){
         //

+ 1 - 1
huimv-manage/src/main/java/com/huimv/manage/eartag/service/IBusinessConfigService.java

@@ -5,7 +5,7 @@ import com.huimv.manage.util.Result;
 public interface IBusinessConfigService {
 
     //
-    Result listEarmark(String paramType, Integer pageSize, Integer pageNo);
+    Result listConfigParam(String paramType, Integer pageSize, Integer pageNo);
 
     //
     Result addConfigParam(String paramName, String paramId, String aramValue, String paramType, String remark);

+ 3 - 3
huimv-manage/src/main/java/com/huimv/manage/eartag/service/impl/BusinessConfigService.java

@@ -35,7 +35,7 @@ public class BusinessConfigService implements IBusinessConfigService {
     private SysBusiConfigParamRepo configParamRepo;
 
     /**
-     * @Method      : listEarmark
+     * @Method      : listConfigParam
      * @Description : 
      * @Params      : [paramType, pageSize, pageNo]
      * @Return      : com.huimv.manage.util.Result
@@ -45,12 +45,12 @@ public class BusinessConfigService implements IBusinessConfigService {
      * @Time        : 21:18
      */
     @Override
-    public Result listEarmark(String paramType, Integer pageSize, Integer pageNo) {
+    public Result listConfigParam(String paramType, Integer pageSize, Integer pageNo) {
         Specification<SysBusiConfigParamEntity> sf = (Specification<SysBusiConfigParamEntity>) (root, criteriaQuery, criteriaBuilder) -> {
             //
             List<Predicate> predList = new ArrayList<>();
             if (null != paramType) {
-                predList.add(criteriaBuilder.equal(root.get("paramType").as(Integer.class), paramType));
+                predList.add(criteriaBuilder.equal(root.get("paramType").as(String.class), paramType));
             }
             //
             Predicate[] pred = new Predicate[predList.size()];