<insert id="register" parameterType="com.hans.entity.User" useGeneratedKeys="true" keyProperty="id">
    	INSERT INTO USER (usercode,PASSWORD,phone,NAME)
	VALUES (#{phone},#{password},#{phone},#{name})
</insert>

添加useGeneratedKeys="true" keyProperty="id"后会将id列存入入参的User实体里面