1. 程式人生 > >mybatis xml語句返回map型別

mybatis xml語句返回map型別

 <select id="selectByPrimaryKey" resultType="java.util.Map" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from pub_user
    where ID = #{id,jdbcType=VARCHAR}
  </select>
{
code: 0,
count: null,
data: {
SEX: "男",
REAL_NAME: "周潤發替身",
PUBTIME: "2018-11-09 10:50:35",
CARD: "1580079845046465",
STATUS: "Delete",
PASSWORD: "839051",
USERNAME: "周潤發替身",
ID: "009730ba809a43748de17c42b40b1650",
MODTIME: "2018-11-09 10:50:35",
PERSON_TYPE: "SchoolManager",
DEMO: "大明星",
SMALL_HEADER_IMG: "static/upload/userPic/bbd8d87c7ba34df3a280c9fb159fd0b3.jpg",
MOBILE: "15800798450"
},
msg: "載入成功"
}

map集合過濾空值