<?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.youbus.springbootdemo.dao.UserMapper" >
<resultMap id="BaseResultMap" type="com.youbus.springbootdemo.pojo.User" >
<constructor >
<idArg column="ID" jdbcType="INTEGER" javaType="java.lang.Integer" />
<arg column="USER_NAME" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="PASSWORD" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="EMAIL" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="PHONE" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="QUESTION" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="ANSWER" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="ROLE" jdbcType="INTEGER" javaType="java.lang.Integer" />
<arg column="IS_DELETE" jdbcType="BIT" javaType="java.lang.Boolean" />
<arg column="CREATE_TIME" jdbcType="TIMESTAMP" javaType="java.util.Date" />
<arg column="CREATE_BY" jdbcType="INTEGER" javaType="java.lang.Integer" />
<arg column="UPDATE_TIME" jdbcType="TIMESTAMP" javaType="java.util.Date" />
<arg column="UPDATE_BY" jdbcType="INTEGER" javaType="java.lang.Integer" />
</constructor>
</resultMap>
<sql id="Base_Column_List" >
ID, USER_NAME, PASSWORD, EMAIL, PHONE, QUESTION, ANSWER, ROLE, IS_DELETE, CREATE_TIME,
CREATE_BY, UPDATE_TIME, UPDATE_BY
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from hw_user
where ID = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from hw_user
where ID = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.youbus.springbootdemo.pojo.User" >
insert into hw_user (ID, USER_NAME, PASSWORD,
EMAIL, PHONE, QUESTION,
ANSWER, ROLE, IS_DELETE,
CREATE_TIME, CREATE_BY, UPDATE_TIME,
UPDATE_BY)
values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR},
#{answer,jdbcType=VARCHAR}, #{role,jdbcType=INTEGER}, #{isDelete,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.youbus.springbootdemo.pojo.User" >
insert into hw_user
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="userName != null" >
USER_NAME,
</if>
<if test="password != null" >
PASSWORD,
</if>
<if test="email != null" >
EMAIL,
</if>
<if test="phone != null" >
PHONE,
</if>
<if test="question != null" >
QUESTION,
</if>
<if test="answer != null" >
ANSWER,
</if>
<if test="role != null" >
ROLE,
</if>
<if test="isDelete != null" >
IS_DELETE,
</if>
<if test="createTime != null" >
CREATE_TIME,
</if>
<if test="createBy != null" >
CREATE_BY,
</if>
<if test="updateTime != null" >
UPDATE_TIME,
</if>
<if test="updateBy != null" >
UPDATE_BY,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="userName != null" >
#{userName,jdbcType=VARCHAR},
</if>
<if test="password != null" >
#{password,jdbcType=VARCHAR},
</if>
<if test="email != null" >
#{email,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
#{phone,jdbcType=VARCHAR},
</if>
<if test="question != null" >
#{question,jdbcType=VARCHAR},
</if>
<if test="answer != null" >
#{answer,jdbcType=VARCHAR},
</if>
<if test="role != null" >
#{role,jdbcType=INTEGER},
</if>
<if test="isDelete != null" >
#{isDelete,jdbcType=BIT},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null" >
#{createBy,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null" >
#{updateBy,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.youbus.springbootdemo.pojo.User" >
update hw_user
<set >
<if test="userName != null" >
USER_NAME = #{userName,jdbcType=VARCHAR},
</if>
<if test="password != null" >
PASSWORD = #{password,jdbcType=VARCHAR},
</if>
<if test="email != null" >
EMAIL = #{email,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
PHONE = #{phone,jdbcType=VARCHAR},
</if>
<if test="question != null" >
QUESTION = #{question,jdbcType=VARCHAR},
</if>
<if test="answer != null" >
ANSWER = #{answer,jdbcType=VARCHAR},
</if>
<if test="role != null" >
ROLE = #{role,jdbcType=INTEGER},
</if>
<if test="isDelete != null" >
IS_DELETE = #{isDelete,jdbcType=BIT},
</if>
<if test="createTime != null" >
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createBy != null" >
CREATE_BY = #{createBy,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null" >
UPDATE_BY = #{updateBy,jdbcType=INTEGER},
</if>
</set>
where ID = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.youbus.springbootdemo.pojo.User" >
update hw_user
set USER_NAME = #{userName,jdbcType=VARCHAR},
PASSWORD = #{password,jdbcType=VARCHAR},
EMAIL = #{email,jdbcType=VARCHAR},
PHONE = #{phone,jdbcType=VARCHAR},
QUESTION = #{question,jdbcType=VARCHAR},
ANSWER = #{answer,jdbcType=VARCHAR},
ROLE = #{role,jdbcType=INTEGER},
IS_DELETE = #{isDelete,jdbcType=BIT},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
CREATE_BY = #{createBy,jdbcType=INTEGER},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{updateBy,jdbcType=INTEGER}
where ID = #{id,jdbcType=INTEGER}
</update>
</mapper>
没有合适的资源?快使用搜索试试~ 我知道了~
springboot项目demo
共73个文件
jar:44个
class:18个
xml:4个
2星 需积分: 50 76 下载量 175 浏览量
2018-06-29
15:48:37
上传
评论 4
收藏 41.29MB RAR 举报
温馨提示
承接我的上一篇博客《springboot项目部署到tomcat容器》,这是完整的demo代码,包括pom文件中依赖的引入,mybatis的配置,日志的配置,mybatis自动生成代码的配置,部署到tomcat的配置。 还有各种接口返回:String对象,单个对象,多个不同对象,List对象的返回。非常全面
资源推荐
资源详情
资源评论
收起资源包目录
springbootdemo.rar (73个子文件)
WEB-INF
classes
generatorConfig.xml 3KB
application-dev.yml 370B
application-prod.yml 109B
application-qa.yml 419B
com
youbus
springbootdemo
service
impl
UserServiceImpl.class 2KB
IUserService.class 350B
pojo
User.class 4KB
OrderDetail.class 4KB
Category.class 3KB
Order.class 5KB
Cart.class 3KB
Shop.class 3KB
PayInfo.class 3KB
RedAdd.class 4KB
Product.class 4KB
SpringbootdemoApplication.class 1KB
controller
UserController.class 1KB
HelloController.class 1KB
dao
UserMapper.class 428B
UserMapper.xml 7KB
enums
ResultEnum.class 2KB
vo
ResultVo.class 3KB
untils
ResultVoUtil.class 1KB
datasource.properties 874B
logback.xml 2KB
application.yml 34B
lib
spring-expression-5.0.7.RELEASE.jar 273KB
mybatis-3.4.6.jar 1.55MB
spring-webmvc-5.0.7.RELEASE.jar 771KB
mybatis-spring-1.3.0.jar 52KB
snakeyaml-1.19.jar 291KB
jackson-core-2.9.6.jar 316KB
jsqlparser-0.9.4.jar 295KB
spring-jdbc-5.0.7.RELEASE.jar 392KB
spring-boot-2.0.3.RELEASE.jar 909KB
logback-core-1.1.2.jar 418KB
HikariCP-2.7.9.jar 140KB
slf4j-api-1.7.25.jar 40KB
spring-aop-5.0.7.RELEASE.jar 358KB
logback-classic-1.1.2.jar 264KB
classmate-1.3.4.jar 64KB
mysql-connector-java-5.1.6.jar 687KB
log4j-api-2.10.0.jar 249KB
spring-boot-starter-2.0.3.RELEASE.jar 592B
jackson-module-parameter-names-2.9.6.jar 8KB
spring-context-5.0.7.RELEASE.jar 1.04MB
javax.annotation-api-1.3.2.jar 26KB
spring-core-5.0.7.RELEASE.jar 1.17MB
spring-boot-starter-web-2.0.3.RELEASE.jar 588B
spring-boot-starter-logging-2.0.3.RELEASE.jar 613B
jul-to-slf4j-1.7.25.jar 4KB
mybatis-spring-boot-autoconfigure-1.3.2.jar 15KB
spring-boot-autoconfigure-2.0.3.RELEASE.jar 1.11MB
mybatis-paginator-1.2.17.jar 45KB
spring-tx-5.0.7.RELEASE.jar 249KB
pagehelper-4.1.0.jar 65KB
jboss-logging-3.3.2.Final.jar 65KB
spring-beans-5.0.7.RELEASE.jar 645KB
jackson-datatype-jdk8-2.9.6.jar 33KB
spring-web-5.0.7.RELEASE.jar 1.2MB
jackson-annotations-2.9.0.jar 65KB
jackson-datatype-jsr310-2.9.6.jar 98KB
spring-jcl-5.0.7.RELEASE.jar 21KB
jackson-databind-2.9.6.jar 1.29MB
log4j-to-slf4j-2.10.0.jar 17KB
validation-api-2.0.1.Final.jar 91KB
mybatis-spring-boot-starter-1.3.2.jar 3KB
spring-boot-starter-jdbc-2.0.3.RELEASE.jar 597B
spring-boot-starter-json-2.0.3.RELEASE.jar 645B
hibernate-validator-6.0.10.Final.jar 1.08MB
META-INF
MANIFEST.MF 327B
maven
com.youbus
springbootdemo
pom.properties 103B
pom.xml 4KB
共 73 条
- 1
资源评论
- qq_255896972019-05-17看了评论之后 我还不相信的 买下来下载...结果 真的浪费积分 无奈......这LZ 真的很坑.. 实体类连 get set 都没有 log 报错. 处理完成之后 项目也根本启动不了 ..并且分析代码 也没什么值得学习的 都运行不起来.... 不知道哪里有错误 奉劝各位还是不要入坑下载 浪费....日月星辰ACE2019-05-18下载过感觉好用的同学,麻烦给个好评吧,这是我的心血啊。日月星辰ACE2019-05-18log 是使用的 lombok 中的 @Slf4j 这个注解,麻烦同学再看一下。idea中安装lombok插件即可使用。pom文件中已引入。日月星辰ACE2019-05-18同学,lombok插件了解一下,看到上边的 @Data 注解没,这就是 lombok 注解中的一种,不需要 get set 方法,lombok主要就是简化代码,idea中使用lombok需要安装插件,这个网上有很多教程,然后pom问加你中引入一下就好了,我这个代码的pom文件中有的,不用更改。
- qq_282052332019-04-08这个文件真不错日月星辰ACE2019-04-12还有没有之前下载过感觉好用的同学,帮我给个好评啊,我的心血啊,被人给抹黑了。日月星辰ACE2019-04-12谢谢您的夸赞。
- 编程求索人2019-01-16真的用不了,不要这样坑人,tomcat启动报错日月星辰ACE2019-02-27下载过感觉好用的同学,出来给我评价一下啊,这俩人是过来捣乱的吧,这是我的心血啊。日月星辰ACE2019-01-17是不是环境没搭好?日月星辰ACE2019-01-17报什么错,我给你解决。
- 我是刀客19852018-11-12浪费我的积分,各种错误。日月星辰ACE2019-02-27下载过感觉好用的同学,出来给我评价一下啊,这俩人是过来捣乱的吧,这是我的心血啊。日月星辰ACE2019-01-17是不是环境没搭好?日月星辰ACE2019-01-17报什么错,我给你解决
日月星辰ACE
- 粉丝: 3
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 多机调度问题贪心算法:理论探索与实践应用.zip
- 探索tecreate:软件开发的未来之星.zip
- 打标机项目C#源码连接扫码
- 基于SSM的房屋租赁系统的设计与实现
- xyctf:从入门到精通的实用指南.zip
- mmqrcode1714153659780.png
- Screenshot_2024-04-27-06-08-58-486_com.baidu.xin.aiqicha.jpg
- 基于Javaweb+Tomcat+MySQL的大学生公寓管理系统+sql文件.zip
- 实训作业基于javaweb的订单管理系统源码+数据库+实训报告.zip
- 多机调度问题贪心算法基于最小堆和贪心算法求解多机调度问题.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功