美好的一天工垃圾填埋场 开始!!!
遇到BUG了,卡了好几个小时
遇到问题
我们需要查询 的是 没有这个实体类,但数据库中有这个数据
在 mybits中,
返回数据类型
resultType=“java.util.Map”
-- classMapper.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.userMapper">
<resultMap type="user" id="userResult">
<result property="username" column="user_name"/>
<result property="usersex" column="user_Sex" />
</resultMap>
<select id="UserList" parameterType="user" resultMap="userResult">
select user_name,user_Sex from user_msg where user_name = #{username}
</select>
<select id="upTime" parameterType="String" resultType="java.util.Map">
select time as uploadTime ,user_id as userId from time_user where user_name=#{username}
</select>
</mapper>
.Mapper
public List<Map<String,Object>> upTime(String username);
[{uploadTime=2021-06-19 12:03:03,userId=110},
{uploadTime=2021-06-19 18:03:03 ,userId=110}]