You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/05/13 00:59:45 UTC

[GitHub] [dolphinscheduler] JunjianS commented on issue #5454: BindingException:Invalid bound statement(not found)

JunjianS commented on issue #5454:
URL: https://github.com/apache/dolphinscheduler/issues/5454#issuecomment-840206178


   > @JunjianS It's better to show all your changes about the new mapper
   @chengshiwen thanks for your reply.
   I add a new method in ProcessDefinitionMapper.java, a select in ProcessDefinitionMapper.xml, and corresponding method in service and controller.
   
       @ApiOperation(value = "queryProcessDefinitionListByState", notes = "QUERY_PROCESS_DEFINITION_LIST_BY_STATE_NOTES")
       @GetMapping(value = "/list-state")
       @ResponseStatus(HttpStatus.OK)
       @ApiException(QUERY_PROCESS_DEFINITION_LIST)
       public Result queryProcessDefinitionListByState(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                                       @RequestParam("releaseState") Integer releaseState
       ) {
           logger.info("query process definition list by release state, login user:{}",
                   loginUser.getUserName());
           Map<String, Object> result = processDefinitionService.queryProcessDefinitionListByState(releaseState);
           return returnDataList(result);
       }
   
       /**
        * list process definition by release state
        * @param releaseState release state
        * @return map
        */
       public Map<String, Object>  queryProcessDefinitionListByState(Integer releaseState){
           HashMap<String, Object> result = new HashMap<>(5);
   
           List<ProcessDefinition> processDefinitionList = processDefineMapper.queryDefinitionListByState(releaseState);
           result.put(Constants.DATA_LIST, processDefinitionList);
           putMsg(result, Status.SUCCESS);
   
           return result;
       }
   
       /**
        * list all process definition by release state
        * @param releaseState release state
        * @return process definition list
        */
       List<ProcessDefinition> queryDefinitionListByState(@Param("releaseState") int releaseState);
   
       <select id="queryDefinitionListByState" resultType="org.apache.dolphinscheduler.dao.entity.ProcessDefinition">
           select * from t_ds_process_definition where release_state = #{releaseState}
       </select>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org