软件环境
spring springmvc mybatis
数据库:mysql
报错信息:
mybatis 修改关联表报错Parameter 'key_dm' not found. Available parameters are [0, member, param1, param2]
代码提示:
//mybatis.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.app.dao.mapper.MemberPermissionMapper"> <resultMap type="MemberPermission" id="MemberPermission"> <id column="id" property="id"/> <result column="member_id" property="member_id"/> <result column="ttys" property="ttys"/> <result column="key_dm" property="key_dm"/> <result column="lose_time" property="lose_time"/> <result column="note" property="note"/> <result column="update_time" property="update_time"/> <!-- 关联member表 --> <association property="member" javaType="com.app.bean.Member"> <id column="member_id" property="id"/> <result column="phone" property="phone"/> <result column="name" property="name"/> <result column="password" property="password"/> </association> </resultMap> <update id="updateMemberLoginPermission" parameterType="MemberPermission"> UPDATE dt_member_permission AS t1 LEFT JOIN dt_member AS t2 ON t1.member_id=t2.id <set> <if test="key_dm!=null and key_dm !=''">t1.key_dm=#{_key_dm}, </if> </set> WHERE t1.ttys=#{ttys} AND t2.phone=#{phone} AND t2.password=#{password} </update>
动漫人物
慕森卡
相关分类