mybatis增删改查mapper文件写法


  
  
   
      
      
      
      
      
      
      
      
      
      
      
      
   


    
    
    
    
    
    
    
    
    
    
    
    
    
        
    



    id, consumer_name,icon_url, mobilephone, password, salt, md5_password, gender, consumer_level, status, last_modify, create_time







    update t_consumer set status=0 where id = #{id}



    update t_consumer set status=0 where id in
    
        id = #{id}
    



    insert into t_consumer (id, consumer_name, icon_url, mobilephone,password, salt, md5_password,
        gender, consumer_level, status)
    values (#{id,jdbcType=INTEGER}, #{consumerName,jdbcType=VARCHAR}, #{iconUrl,jdbcType=VARCHAR},#{mobilephone,jdbcType=VARCHAR},
        #{password,jdbcType=VARCHAR},#{salt,jdbcType=VARCHAR},#{md5Password,jdbcType=VARCHAR},
        #{gender,jdbcType=INTEGER}, #{consumerLevel,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER})



    update t_consumer
    
        
            job = #{job},
        
        
            last_login_time = #{lastLoginTime},
        
        
            consumer_name = #{consumerName},
        
        
            icon_url = #{iconUrl},
        
        
            mobilephone = #{mobilephone},
        
        
            password = #{password},
        
        
            salt = #{salt},
        
        
            md5_password = #{md5Password},
        
        
            gender = #{gender},
        
        
            consumer_level = #{consumerLevel},
        
        
            status = #{status},
        
        
            last_modify = now(),
        
    
    where id = #{id}

你可能感兴趣的:(mybatis增删改查mapper文件写法)