| | |
| | | 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; |
| | |
| | | |
| | | @Autowired |
| | | ISysFieldService fieldService; |
| | | @Autowired |
| | | RuleClient ruleClient; |
| | | |
| | | @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) |
| | | public Result delete(@PathVariable String id, HttpServletRequest request) { |
| | |
| | | } |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @RequestMapping(value = "/add", method = RequestMethod.GET) |
| | | public Result add(HttpServletRequest request) { |
| | | String tableName = request.getParameter("tableName"); |