关联表 查下拉框的数据

1.jsp写入下拉框

 
  • 2.js中引入
      mini.get('fkActivityId').setUrl(contextPath + '/district/recruitmentActivity-recruitmentactivity/recruitmentactivity-selected-load-data.html');
    3.action( 这个action为关联表的action

     @Action("/district/recruitmentActivity-recruitmentactivity/recruitmentactivity-selected-load-data")
        public void baseactivity() {
            try {
                sendResponseMsg(this.recruitmentActivityService.queryNameVos());
            } catch (final Throwable e) {
                LOGGER.error("Action:RecruitmentActivityAction Method:basePhenologicalPeriodNames error ", e);
                sendFailMsg("", "查询失败!");
            }
        }
    4.service

    @Override
    	public String queryNameVos() {
    		  List nameVos = ((BaseRecruitmentActivityDao) this.dao).queryNameVos();
    	        return GsonUtil.toJsonByDateTime24(nameVos);
    	}
    5.dao

    @Override
    	public List queryNameVos() {
    		String sql = "SELECT ID id,NAME name FROM base_recruitment_activity WHERE base_recruitment_activity.DICT_DELETED_VALUE=1110040000000002";
            return this.iCustomDao.queryBySQL(sql, null, NameVo.class);
    	}





    你可能感兴趣的:(关联表 查下拉框的数据)