51 changed files with 2459 additions and 603 deletions
@ -0,0 +1,31 @@ |
|||
package cc.hiver.mall.dao.mapper; |
|||
|
|||
import cc.hiver.mall.entity.Customer; |
|||
import cc.hiver.mall.entity.CustomerExample; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface CustomerMapper { |
|||
long countByExample(CustomerExample example); |
|||
|
|||
int deleteByExample(CustomerExample example); |
|||
|
|||
int deleteByPrimaryKey(String id); |
|||
|
|||
int insert(Customer record); |
|||
|
|||
int insertSelective(Customer record); |
|||
|
|||
List<Customer> selectByExample(CustomerExample example); |
|||
|
|||
Customer selectByPrimaryKey(String id); |
|||
|
|||
int updateByExampleSelective(@Param("record") Customer record, @Param("example") CustomerExample example); |
|||
|
|||
int updateByExample(@Param("record") Customer record, @Param("example") CustomerExample example); |
|||
|
|||
int updateByPrimaryKeySelective(Customer record); |
|||
|
|||
int updateByPrimaryKey(Customer record); |
|||
} |
|||
@ -0,0 +1,175 @@ |
|||
package cc.hiver.mall.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
@ApiModel(value = "客户表") |
|||
@TableName(value = "t_customer", autoResultMap = true) |
|||
public class Customer implements Serializable { |
|||
private String id; |
|||
|
|||
private String createBy; |
|||
|
|||
private Date createTime; |
|||
|
|||
private Integer delFlag; |
|||
|
|||
private String updateBy; |
|||
|
|||
private Date updateTime; |
|||
|
|||
@ApiModelProperty(value = "姓名") |
|||
private String name; |
|||
|
|||
@ApiModelProperty(value = "手机号") |
|||
private String phone; |
|||
|
|||
@ApiModelProperty(value = "地址") |
|||
private String address; |
|||
|
|||
@ApiModelProperty(value = "密码") |
|||
private String password; |
|||
|
|||
@ApiModelProperty(value = "省") |
|||
private String province; |
|||
|
|||
@ApiModelProperty(value = "市") |
|||
private String city; |
|||
|
|||
@ApiModelProperty(value = "县区") |
|||
private String area; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getCreateBy() { |
|||
return createBy; |
|||
} |
|||
|
|||
public void setCreateBy(String createBy) { |
|||
this.createBy = createBy; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
public Integer getDelFlag() { |
|||
return delFlag; |
|||
} |
|||
|
|||
public void setDelFlag(Integer delFlag) { |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getUpdateBy() { |
|||
return updateBy; |
|||
} |
|||
|
|||
public void setUpdateBy(String updateBy) { |
|||
this.updateBy = updateBy; |
|||
} |
|||
|
|||
public Date getUpdateTime() { |
|||
return updateTime; |
|||
} |
|||
|
|||
public void setUpdateTime(Date updateTime) { |
|||
this.updateTime = updateTime; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getPhone() { |
|||
return phone; |
|||
} |
|||
|
|||
public void setPhone(String phone) { |
|||
this.phone = phone; |
|||
} |
|||
|
|||
public String getAddress() { |
|||
return address; |
|||
} |
|||
|
|||
public void setAddress(String address) { |
|||
this.address = address; |
|||
} |
|||
|
|||
public String getPassword() { |
|||
return password; |
|||
} |
|||
|
|||
public void setPassword(String password) { |
|||
this.password = password; |
|||
} |
|||
|
|||
public String getProvince() { |
|||
return province; |
|||
} |
|||
|
|||
public void setProvince(String province) { |
|||
this.province = province; |
|||
} |
|||
|
|||
public String getCity() { |
|||
return city; |
|||
} |
|||
|
|||
public void setCity(String city) { |
|||
this.city = city; |
|||
} |
|||
|
|||
public String getArea() { |
|||
return area; |
|||
} |
|||
|
|||
public void setArea(String area) { |
|||
this.area = area; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", createBy=").append(createBy); |
|||
sb.append(", createTime=").append(createTime); |
|||
sb.append(", delFlag=").append(delFlag); |
|||
sb.append(", updateBy=").append(updateBy); |
|||
sb.append(", updateTime=").append(updateTime); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", phone=").append(phone); |
|||
sb.append(", address=").append(address); |
|||
sb.append(", password=").append(password); |
|||
sb.append(", province=").append(province); |
|||
sb.append(", city=").append(city); |
|||
sb.append(", area=").append(area); |
|||
sb.append(", serialVersionUID=").append(serialVersionUID); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,338 @@ |
|||
<?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="cc.hiver.mall.dao.mapper.CustomerMapper"> |
|||
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.Customer"> |
|||
<id column="id" jdbcType="VARCHAR" property="id" /> |
|||
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
|||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|||
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
|||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|||
<result column="address" jdbcType="VARCHAR" property="address" /> |
|||
<result column="password" jdbcType="VARCHAR" property="password" /> |
|||
<result column="province" jdbcType="VARCHAR" property="province" /> |
|||
<result column="city" jdbcType="VARCHAR" property="city" /> |
|||
<result column="area" jdbcType="VARCHAR" property="area" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, create_by, create_time, del_flag, update_by, update_time, name, phone, address, |
|||
password, province, city, area |
|||
</sql> |
|||
<select id="selectByExample" parameterType="cc.hiver.mall.entity.CustomerExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_customer |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_customer |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
|||
delete from t_customer |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="cc.hiver.mall.entity.CustomerExample"> |
|||
delete from t_customer |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="cc.hiver.mall.entity.Customer"> |
|||
insert into t_customer (id, create_by, create_time, |
|||
del_flag, update_by, update_time, |
|||
name, phone, address, |
|||
password, province, city, |
|||
area) |
|||
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
|||
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
|||
#{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, |
|||
#{password,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, |
|||
#{area,jdbcType=VARCHAR}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="cc.hiver.mall.entity.Customer"> |
|||
insert into t_customer |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
create_by, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone, |
|||
</if> |
|||
<if test="address != null"> |
|||
address, |
|||
</if> |
|||
<if test="password != null"> |
|||
password, |
|||
</if> |
|||
<if test="province != null"> |
|||
province, |
|||
</if> |
|||
<if test="city != null"> |
|||
city, |
|||
</if> |
|||
<if test="area != null"> |
|||
area, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createBy != null"> |
|||
#{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
#{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
#{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
#{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
#{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
#{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="address != null"> |
|||
#{address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null"> |
|||
#{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
#{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
#{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="area != null"> |
|||
#{area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="cc.hiver.mall.entity.CustomerExample" resultType="java.lang.Long"> |
|||
select count(*) from t_customer |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_customer |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createBy != null"> |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.createTime != null"> |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.delFlag != null"> |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.updateBy != null"> |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.updateTime != null"> |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.phone != null"> |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.address != null"> |
|||
address = #{record.address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.password != null"> |
|||
password = #{record.password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.province != null"> |
|||
province = #{record.province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.city != null"> |
|||
city = #{record.city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.area != null"> |
|||
area = #{record.area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_customer |
|||
set id = #{record.id,jdbcType=VARCHAR}, |
|||
create_by = #{record.createBy,jdbcType=VARCHAR}, |
|||
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
|||
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
address = #{record.address,jdbcType=VARCHAR}, |
|||
password = #{record.password,jdbcType=VARCHAR}, |
|||
province = #{record.province,jdbcType=VARCHAR}, |
|||
city = #{record.city,jdbcType=VARCHAR}, |
|||
area = #{record.area,jdbcType=VARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.entity.Customer"> |
|||
update t_customer |
|||
<set> |
|||
<if test="createBy != null"> |
|||
create_by = #{createBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="createTime != null"> |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="delFlag != null"> |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="updateBy != null"> |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="updateTime != null"> |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="address != null"> |
|||
address = #{address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="password != null"> |
|||
password = #{password,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="province != null"> |
|||
province = #{province,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="city != null"> |
|||
city = #{city,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="area != null"> |
|||
area = #{area,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.entity.Customer"> |
|||
update t_customer |
|||
set create_by = #{createBy,jdbcType=VARCHAR}, |
|||
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|||
del_flag = #{delFlag,jdbcType=INTEGER}, |
|||
update_by = #{updateBy,jdbcType=VARCHAR}, |
|||
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
address = #{address,jdbcType=VARCHAR}, |
|||
password = #{password,jdbcType=VARCHAR}, |
|||
province = #{province,jdbcType=VARCHAR}, |
|||
city = #{city,jdbcType=VARCHAR}, |
|||
area = #{area,jdbcType=VARCHAR} |
|||
where id = #{id,jdbcType=VARCHAR} |
|||
</update> |
|||
</mapper> |
|||
Loading…
Reference in new issue