数据层

mybatis 支持输出的打印

mybatis:
  mapper-locations: classpath:mapper/*.xml
  type-aliases-package: com.dtyy.pojo
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

这个错误就是某个字段为nil了,或者某个字段超过长度限制了

Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@43a67c8c] was not registered for synchronization because synchronization is not active
JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@3bbc5cc8] will not be managed by Spring

用户相关





    

    

    
        insert into t_users (user_id,password,username,avatar,gender,role,register_time,mail) values (#{user_id},#{password},#{username},#{avatar},#{gender},#{role},#{register_time},#{mail})
    

    
        delete from t_users where user_id = #{user_id}
    

    
        update t_users set password = #{password},username = #{username},avatar = #{avatar},gender = #{gender},role = #{role},register_time = #{register_time},mail = #{mail} where user_id = #{user_id}
    


option相关




    

    

    
        insert into t_options (option_id,name,description) values (#{option_id},#{name},#{description})
    

    
        delete from t_options where option_id = #{option_id}
    

    
        update t_options set name = #{name},description = #{description} where option_id = #{option_id}
    


数据层,service层暂时告一段落, 下一步开始写接口,页面,界面交互

你可能感兴趣的:(数据层)