最近搜索

以前ssm框架常用的返回值。 1对多 1对1

浏览:401
管理员 2022-03-19 11:04


image.png

package com.java456.util;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;


public class ResponseUtil {

	public static void write(HttpServletResponse response,Object o)throws Exception{
		response.setContentType("text/html;charset=utf-8");
		PrintWriter out=response.getWriter();
		out.println(o.toString());
		out.flush();
		out.close();
	}
}




<resultMap type="ExchangeBill" id="ExchangeBillResult">
		<result property="unionpay" column="unionpay" />
		<result property="youhui" column="youhui" />
		<result property="headId" column="headId" />
		
		<collection property="datas"  column="id"  
            select="com.java456.dao.ExchangeBillDataDao.list"></collection>
	</resultMap>
	
	
	
	
	<select id="list" parameterType="Integer" resultMap="ExchangeBillDataResult">
		select * from t_jyz_z_exchange_bill_data  where  exchangeBillId = #{exchangeBillId} 
		ORDER BY bianma
	</select>
	


联系站长

站长微信:xiaomao0055

站长QQ:14496453