kimi
2020-05-27 c007f0ca1785db093d48f4846cda82fe8e955765
src/main/java/com/highdatas/mdm/controller/RuleMappingController.java
@@ -13,12 +13,10 @@
import com.highdatas.mdm.service.ITQualityRuleService;
import com.highdatas.mdm.util.Constant;
import com.highdatas.mdm.util.DbUtils;
import com.highdatas.mdm.util.RuleClient;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.MessageFormat;
@@ -29,7 +27,7 @@
 * <p>
 *  前端控制器
 * </p>
 *
 * @descrpition 规则接口
 * @author kimi
 * @since 2019-12-21
 */
@@ -45,7 +43,10 @@
    @Autowired
    ISysFieldService fieldService;
    @Autowired
    RuleClient ruleClient;
    @Deprecated
    @RequestMapping(value = "delete/{id}", method = RequestMethod.GET)
    public Result delete(@PathVariable String id, HttpServletRequest request) {
        boolean delete = ruleMappingService.deleteById(id);
@@ -56,6 +57,16 @@
        }
    }
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Result list(@RequestParam String tableName, @RequestParam String isTemp, HttpServletRequest request) {
        String maintainId = request.getParameter("maintainId");
        if (StringUtils.isEmpty(maintainId)) {
            return ruleClient.getRuleByTable(tableName,isTemp,null);
        }
        return ruleClient.getRuleByTable(tableName,isTemp,maintainId);
    }
    @Deprecated
    @RequestMapping(value = "/add", method = RequestMethod.GET)
    public Result add(HttpServletRequest request) {
        String tableName = request.getParameter("tableName");