Commit 559c5e83 by XiaHou

权星商品相关接口

parent e42ffb16
package com.macro.mall.mapper;
import com.macro.mall.model.PmsSupplierAudit;
import com.macro.mall.model.PmsSupplierAuditExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PmsSupplierAuditMapper {
long countByExample(PmsSupplierAuditExample example);
int deleteByExample(PmsSupplierAuditExample example);
int deleteByPrimaryKey(Long id);
int insert(PmsSupplierAudit record);
int insertSelective(PmsSupplierAudit record);
List<PmsSupplierAudit> selectByExample(PmsSupplierAuditExample example);
PmsSupplierAudit selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") PmsSupplierAudit record, @Param("example") PmsSupplierAuditExample example);
int updateByExample(@Param("record") PmsSupplierAudit record, @Param("example") PmsSupplierAuditExample example);
int updateByPrimaryKeySelective(PmsSupplierAudit record);
int updateByPrimaryKey(PmsSupplierAudit record);
}
\ No newline at end of file
package com.macro.mall.mapper;
import com.macro.mall.model.PmsSupplierAuditProduct;
import com.macro.mall.model.PmsSupplierAuditProductExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface PmsSupplierAuditProductMapper {
long countByExample(PmsSupplierAuditProductExample example);
int deleteByExample(PmsSupplierAuditProductExample example);
int deleteByPrimaryKey(Long id);
int insert(PmsSupplierAuditProduct record);
int insertSelective(PmsSupplierAuditProduct record);
List<PmsSupplierAuditProduct> selectByExample(PmsSupplierAuditProductExample example);
PmsSupplierAuditProduct selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") PmsSupplierAuditProduct record, @Param("example") PmsSupplierAuditProductExample example);
int updateByExample(@Param("record") PmsSupplierAuditProduct record, @Param("example") PmsSupplierAuditProductExample example);
int updateByPrimaryKeySelective(PmsSupplierAuditProduct record);
int updateByPrimaryKey(PmsSupplierAuditProduct record);
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class PmsSupplierAudit implements Serializable {
@ApiModelProperty(value = "id")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "品牌名称")
private String brandName;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "经营许可证")
private String businessLicense;
@ApiModelProperty(value = "营业执照")
private String business;
@ApiModelProperty(value = "注册商标")
private String trademark;
@ApiModelProperty(value = "其他材料")
private String otherMaterials;
@ApiModelProperty(value = "电话")
private String phone;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "审核状态 0待审核 1审核通过 2审核不通过")
private Integer status;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "删除标识0 未删除 1已删除")
private Integer deleteStatus;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
@ApiModelProperty(value = "更新时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatetime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getBusiness() {
return business;
}
public void setBusiness(String business) {
this.business = business;
}
public String getTrademark() {
return trademark;
}
public void setTrademark(String trademark) {
this.trademark = trademark;
}
public String getOtherMaterials() {
return otherMaterials;
}
public void setOtherMaterials(String otherMaterials) {
this.otherMaterials = otherMaterials;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Integer getDeleteStatus() {
return deleteStatus;
}
public void setDeleteStatus(Integer deleteStatus) {
this.deleteStatus = deleteStatus;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
@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(", brandName=").append(brandName);
sb.append(", companyName=").append(companyName);
sb.append(", businessLicense=").append(businessLicense);
sb.append(", business=").append(business);
sb.append(", trademark=").append(trademark);
sb.append(", otherMaterials=").append(otherMaterials);
sb.append(", phone=").append(phone);
sb.append(", password=").append(password);
sb.append(", status=").append(status);
sb.append(", remarks=").append(remarks);
sb.append(", deleteStatus=").append(deleteStatus);
sb.append(", createtime=").append(createtime);
sb.append(", updatetime=").append(updatetime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class PmsSupplierAuditProduct implements Serializable {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "关联账号审核表id")
private Long auditId;
@ApiModelProperty(value = "商品主图")
private String productPic;
@ApiModelProperty(value = "商品标题")
private String productTitle;
@ApiModelProperty(value = "商品库存量")
private Integer productStock;
@ApiModelProperty(value = "商品销售价格")
private BigDecimal price;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAuditId() {
return auditId;
}
public void setAuditId(Long auditId) {
this.auditId = auditId;
}
public String getProductPic() {
return productPic;
}
public void setProductPic(String productPic) {
this.productPic = productPic;
}
public String getProductTitle() {
return productTitle;
}
public void setProductTitle(String productTitle) {
this.productTitle = productTitle;
}
public Integer getProductStock() {
return productStock;
}
public void setProductStock(Integer productStock) {
this.productStock = productStock;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
@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(", auditId=").append(auditId);
sb.append(", productPic=").append(productPic);
sb.append(", productTitle=").append(productTitle);
sb.append(", productStock=").append(productStock);
sb.append(", price=").append(price);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
<?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.macro.mall.mapper.PmsSupplierAuditProductMapper">
<resultMap id="BaseResultMap" type="com.macro.mall.model.PmsSupplierAuditProduct">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
<result column="product_pic" jdbcType="VARCHAR" property="productPic" />
<result column="product_title" jdbcType="VARCHAR" property="productTitle" />
<result column="product_stock" jdbcType="INTEGER" property="productStock" />
<result column="price" jdbcType="DECIMAL" property="price" />
</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, audit_id, product_pic, product_title, product_stock, price
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.PmsSupplierAuditProductExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from pms_supplier_audit_product
<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.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pms_supplier_audit_product
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from pms_supplier_audit_product
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.macro.mall.model.PmsSupplierAuditProductExample">
delete from pms_supplier_audit_product
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.macro.mall.model.PmsSupplierAuditProduct">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into pms_supplier_audit_product (audit_id, product_pic, product_title,
product_stock, price)
values (#{auditId,jdbcType=BIGINT}, #{productPic,jdbcType=VARCHAR}, #{productTitle,jdbcType=VARCHAR},
#{productStock,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsSupplierAuditProduct">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into pms_supplier_audit_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditId != null">
audit_id,
</if>
<if test="productPic != null">
product_pic,
</if>
<if test="productTitle != null">
product_title,
</if>
<if test="productStock != null">
product_stock,
</if>
<if test="price != null">
price,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditId != null">
#{auditId,jdbcType=BIGINT},
</if>
<if test="productPic != null">
#{productPic,jdbcType=VARCHAR},
</if>
<if test="productTitle != null">
#{productTitle,jdbcType=VARCHAR},
</if>
<if test="productStock != null">
#{productStock,jdbcType=INTEGER},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.PmsSupplierAuditProductExample" resultType="java.lang.Long">
select count(*) from pms_supplier_audit_product
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update pms_supplier_audit_product
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.auditId != null">
audit_id = #{record.auditId,jdbcType=BIGINT},
</if>
<if test="record.productPic != null">
product_pic = #{record.productPic,jdbcType=VARCHAR},
</if>
<if test="record.productTitle != null">
product_title = #{record.productTitle,jdbcType=VARCHAR},
</if>
<if test="record.productStock != null">
product_stock = #{record.productStock,jdbcType=INTEGER},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update pms_supplier_audit_product
set id = #{record.id,jdbcType=BIGINT},
audit_id = #{record.auditId,jdbcType=BIGINT},
product_pic = #{record.productPic,jdbcType=VARCHAR},
product_title = #{record.productTitle,jdbcType=VARCHAR},
product_stock = #{record.productStock,jdbcType=INTEGER},
price = #{record.price,jdbcType=DECIMAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.PmsSupplierAuditProduct">
update pms_supplier_audit_product
<set>
<if test="auditId != null">
audit_id = #{auditId,jdbcType=BIGINT},
</if>
<if test="productPic != null">
product_pic = #{productPic,jdbcType=VARCHAR},
</if>
<if test="productTitle != null">
product_title = #{productTitle,jdbcType=VARCHAR},
</if>
<if test="productStock != null">
product_stock = #{productStock,jdbcType=INTEGER},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.PmsSupplierAuditProduct">
update pms_supplier_audit_product
set audit_id = #{auditId,jdbcType=BIGINT},
product_pic = #{productPic,jdbcType=VARCHAR},
product_title = #{productTitle,jdbcType=VARCHAR},
product_stock = #{productStock,jdbcType=INTEGER},
price = #{price,jdbcType=DECIMAL}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment