关联表 查下拉框的数据

1.jsp写入下拉框

 <li class="activity-box">
                        <label class="mini-label"><span class="required">*</span>所属活动 :</label>
                        <div class="mini-combobox" required="true" id="fkActivityId" name="fkActivityId" textName="fkActivityName" textField="name" valueField="id" label="所属活动"></div>
                    </li>
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<NameVo> nameVos = ((BaseRecruitmentActivityDao) this.dao).queryNameVos();
	        return GsonUtil.toJsonByDateTime24(nameVos);
	}
5.dao

@Override
	public List<NameVo> 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);
	}





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值