1
0
mirror of https://gitee.com/coder-xiaomo/flashsale synced 2025-01-10 11:48:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

商品模型2-MyBatisGenerator自动生成

This commit is contained in:
程序员小墨 2022-03-03 13:04:39 +08:00
parent ff76e441e4
commit 8bd1474f0d
8 changed files with 695 additions and 29 deletions

View File

@ -0,0 +1,53 @@
package com.cxyxiaomo.flashsale.dao;
import com.cxyxiaomo.flashsale.dataobject.ItemDO;
public interface ItemDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int insert(ItemDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int insertSelective(ItemDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
ItemDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int updateByPrimaryKeySelective(ItemDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_info
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int updateByPrimaryKey(ItemDO record);
}

View File

@ -0,0 +1,53 @@
package com.cxyxiaomo.flashsale.dao;
import com.cxyxiaomo.flashsale.dataobject.ItemStockDO;
public interface ItemStockDOMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int insert(ItemStockDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int insertSelective(ItemStockDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
ItemStockDO selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int updateByPrimaryKeySelective(ItemStockDO record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
int updateByPrimaryKey(ItemStockDO record);
}

View File

@ -0,0 +1,201 @@
package com.cxyxiaomo.flashsale.dataobject;
public class ItemDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.title
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private String title;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.price
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Long price;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.description
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private String description;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.sales
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Integer sales;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_info.img_url
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private String imgUrl;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.id
*
* @return the value of item_info.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.id
*
* @param id the value for item_info.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.title
*
* @return the value of item_info.title
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public String getTitle() {
return title;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.title
*
* @param title the value for item_info.title
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.price
*
* @return the value of item_info.price
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Long getPrice() {
return price;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.price
*
* @param price the value for item_info.price
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setPrice(Long price) {
this.price = price;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.description
*
* @return the value of item_info.description
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public String getDescription() {
return description;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.description
*
* @param description the value for item_info.description
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.sales
*
* @return the value of item_info.sales
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Integer getSales() {
return sales;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.sales
*
* @param sales the value for item_info.sales
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setSales(Integer sales) {
this.sales = sales;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_info.img_url
*
* @return the value of item_info.img_url
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public String getImgUrl() {
return imgUrl;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_info.img_url
*
* @param imgUrl the value for item_info.img_url
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl == null ? null : imgUrl.trim();
}
}

View File

@ -0,0 +1,102 @@
package com.cxyxiaomo.flashsale.dataobject;
public class ItemStockDO {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_stock.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_stock.stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Integer stock;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column item_stock.item_id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
private Integer itemId;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_stock.id
*
* @return the value of item_stock.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_stock.id
*
* @param id the value for item_stock.id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_stock.stock
*
* @return the value of item_stock.stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Integer getStock() {
return stock;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_stock.stock
*
* @param stock the value for item_stock.stock
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setStock(Integer stock) {
this.stock = stock;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column item_stock.item_id
*
* @return the value of item_stock.item_id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public Integer getItemId() {
return itemId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column item_stock.item_id
*
* @param itemId the value for item_stock.item_id
*
* @mbg.generated Thu Mar 03 13:00:43 CST 2022
*/
public void setItemId(Integer itemId) {
this.itemId = itemId;
}
}

View File

@ -0,0 +1,146 @@
<?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.cxyxiaomo.flashsale.dao.ItemDOMapper">
<resultMap id="BaseResultMap" type="com.cxyxiaomo.flashsale.dataobject.ItemDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="sales" jdbcType="INTEGER" property="sales" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
id, title, price, description, sales, img_url
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
select
<include refid="Base_Column_List" />
from item_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
delete from item_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into item_info (id, title, price,
description, sales, img_url
)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL},
#{description,jdbcType=VARCHAR}, #{sales,jdbcType=INTEGER}, #{imgUrl,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into item_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="title != null">
title,
</if>
<if test="price != null">
price,
</if>
<if test="description != null">
description,
</if>
<if test="sales != null">
sales,
</if>
<if test="imgUrl != null">
img_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="sales != null">
#{sales,jdbcType=INTEGER},
</if>
<if test="imgUrl != null">
#{imgUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update item_info
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="sales != null">
sales = #{sales,jdbcType=INTEGER},
</if>
<if test="imgUrl != null">
img_url = #{imgUrl,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update item_info
set title = #{title,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
sales = #{sales,jdbcType=INTEGER},
img_url = #{imgUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,111 @@
<?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.cxyxiaomo.flashsale.dao.ItemStockDOMapper">
<resultMap id="BaseResultMap" type="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="stock" jdbcType="INTEGER" property="stock" />
<result column="item_id" jdbcType="INTEGER" property="itemId" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
id, stock, item_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
select
<include refid="Base_Column_List" />
from item_stock
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
delete from item_stock
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into item_stock (id, stock, item_id
)
values (#{id,jdbcType=INTEGER}, #{stock,jdbcType=INTEGER}, #{itemId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into item_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="stock != null">
stock,
</if>
<if test="itemId != null">
item_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="stock != null">
#{stock,jdbcType=INTEGER},
</if>
<if test="itemId != null">
#{itemId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update item_stock
<set>
<if test="stock != null">
stock = #{stock,jdbcType=INTEGER},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.cxyxiaomo.flashsale.dataobject.ItemStockDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update item_stock
set stock = #{stock,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -5,7 +5,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
@ -19,21 +19,15 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
id, name, gender, age, telephone, register_mode, third_party_id
</sql>
<select id="selectByTelephone" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_info
where telephone = #{telephone,jdbcType=VARCHAR}
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
select
<include refid="Base_Column_List" />
@ -44,7 +38,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
delete from user_info
where id = #{id,jdbcType=INTEGER}
@ -53,7 +47,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into user_info (id, name, gender,
age, telephone, register_mode,
@ -62,11 +56,11 @@
#{age,jdbcType=INTEGER}, #{telephone,jdbcType=VARCHAR}, #{registerMode,jdbcType=VARCHAR},
#{thirdPartyId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO" keyProperty="id" useGeneratedKeys="true">
<insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.UserDO">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -120,7 +114,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update user_info
<set>
@ -149,7 +143,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update user_info
set name = #{name,jdbcType=VARCHAR},
@ -160,4 +154,10 @@
third_party_id = #{thirdPartyId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByTelephone" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_info
where telephone = #{telephone,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -5,7 +5,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="encrypt_password" jdbcType="VARCHAR" property="encryptPassword" />
@ -15,7 +15,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
id, encrypt_password, user_id
</sql>
@ -23,24 +23,18 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
select
<include refid="Base_Column_List" />
from user_password
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_password
where user_id = #{userId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
delete from user_password
where id = #{id,jdbcType=INTEGER}
@ -49,7 +43,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into user_password (id, encrypt_password, user_id
)
@ -60,7 +54,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
insert into user_password
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -90,7 +84,7 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update user_password
<set>
@ -107,11 +101,17 @@
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Tue Mar 01 14:58:29 CST 2022.
This element was generated on Thu Mar 03 13:03:11 CST 2022.
-->
update user_password
set encrypt_password = #{encryptPassword,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByUserId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_password
where user_id = #{userId,jdbcType=INTEGER}
</select>
</mapper>