完成商品交易中心大广告位,小广告展示,按照类型搜索,商品模糊搜索等
parent
92db96ae65
commit
0a757f0eb0
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
package com.sztzjy.trade.mapper;
|
||||
|
||||
import com.sztzjy.trade.entity.StuGoodSalesManage;
|
||||
import com.sztzjy.trade.entity.StuGoodSalesManageExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface StuGoodSalesManageMapper {
|
||||
long countByExample(StuGoodSalesManageExample example);
|
||||
|
||||
int deleteByExample(StuGoodSalesManageExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(StuGoodSalesManage record);
|
||||
|
||||
int insertSelective(StuGoodSalesManage record);
|
||||
|
||||
List<StuGoodSalesManage> selectByExample(StuGoodSalesManageExample example);
|
||||
|
||||
StuGoodSalesManage selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") StuGoodSalesManage record, @Param("example") StuGoodSalesManageExample example);
|
||||
|
||||
int updateByExample(@Param("record") StuGoodSalesManage record, @Param("example") StuGoodSalesManageExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(StuGoodSalesManage record);
|
||||
|
||||
int updateByPrimaryKey(StuGoodSalesManage record);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.sztzjy.trade.mapper;
|
||||
|
||||
import com.sztzjy.trade.entity.StuGoodsInfo;
|
||||
import com.sztzjy.trade.entity.StuGoodsInfoExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface StuGoodsInfoMapper {
|
||||
long countByExample(StuGoodsInfoExample example);
|
||||
|
||||
int deleteByExample(StuGoodsInfoExample example);
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(StuGoodsInfo record);
|
||||
|
||||
int insertSelective(StuGoodsInfo record);
|
||||
|
||||
List<StuGoodsInfo> selectByExampleWithBLOBs(StuGoodsInfoExample example);
|
||||
|
||||
List<StuGoodsInfo> selectByExample(StuGoodsInfoExample example);
|
||||
|
||||
StuGoodsInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") StuGoodsInfo record, @Param("example") StuGoodsInfoExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") StuGoodsInfo record, @Param("example") StuGoodsInfoExample example);
|
||||
|
||||
int updateByExample(@Param("record") StuGoodsInfo record, @Param("example") StuGoodsInfoExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(StuGoodsInfo record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(StuGoodsInfo record);
|
||||
|
||||
int updateByPrimaryKey(StuGoodsInfo record);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.sztzjy.trade.service;
|
||||
|
||||
import com.sztzjy.trade.util.ResultEntity;
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2024-10-28 09:15
|
||||
*/
|
||||
public interface StuGoodsTradingCenterService {
|
||||
ResultEntity getSmallAdPlacement(String userId);
|
||||
|
||||
//所有商品查询
|
||||
ResultEntity AllProductInquiries(String userId);
|
||||
|
||||
//商品查询
|
||||
ResultEntity getProductInquiry(String userId, String keyWord);
|
||||
|
||||
//大广告招租
|
||||
ResultEntity getBigAdPlacement(String userId);
|
||||
|
||||
//根据类型展示数据
|
||||
ResultEntity getTypeQuery(String userId, String type);
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package com.sztzjy.trade.service.impl;
|
||||
|
||||
import com.sztzjy.trade.entity.StuGoodSalesManage;
|
||||
import com.sztzjy.trade.entity.StuGoodSalesManageExample;
|
||||
import com.sztzjy.trade.entity.StuGoodsInfo;
|
||||
import com.sztzjy.trade.entity.StuGoodsInfoExample;
|
||||
import com.sztzjy.trade.mapper.StuGoodSalesManageMapper;
|
||||
import com.sztzjy.trade.mapper.StuGoodsInfoMapper;
|
||||
import com.sztzjy.trade.service.StuGoodsTradingCenterService;
|
||||
import com.sztzjy.trade.util.ResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @author 17803
|
||||
* @date 2024-10-28 09:15
|
||||
*/
|
||||
@Service
|
||||
public class StuGoodsTradingCenterServiceImpl implements StuGoodsTradingCenterService {
|
||||
|
||||
@Autowired
|
||||
private StuGoodSalesManageMapper stuGoodSalesManageMapper;
|
||||
|
||||
@Autowired
|
||||
private StuGoodsInfoMapper stuGoodsInfoMapper;
|
||||
|
||||
//小广告位招租
|
||||
@Override
|
||||
public ResultEntity getSmallAdPlacement(String userId) {
|
||||
//查询用户商品销售管理数据
|
||||
|
||||
StuGoodSalesManageExample goodSalesManageExample = new StuGoodSalesManageExample();
|
||||
goodSalesManageExample.createCriteria().andUserIdEqualTo(userId).andStateEqualTo(1);
|
||||
List<StuGoodSalesManage> goodSalesManageList = stuGoodSalesManageMapper.selectByExample(goodSalesManageExample);
|
||||
|
||||
//如果为空 默认展示前十位数据,不为空按照销量展示数据
|
||||
if (goodSalesManageList != null && goodSalesManageList.size() > 0) {
|
||||
|
||||
List<StuGoodSalesManage> manageSaleTenList = goodSalesManageList.stream().
|
||||
sorted(Comparator.comparing(StuGoodSalesManage::getSoldQuantity).reversed())
|
||||
.limit(10)
|
||||
.collect(Collectors.toList());
|
||||
return new ResultEntity<>(HttpStatus.OK,manageSaleTenList);
|
||||
}
|
||||
//内置16个商品以及相关信息,一般不为空
|
||||
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//所有商品查询
|
||||
@Override
|
||||
public ResultEntity AllProductInquiries(String userId) {
|
||||
|
||||
StuGoodsInfoExample example = new StuGoodsInfoExample();
|
||||
example.createCriteria().andUserIdEqualTo(userId).andOnlineStateEqualTo(1);
|
||||
List<StuGoodsInfo> stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example);
|
||||
|
||||
if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) {
|
||||
return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList);
|
||||
}else {
|
||||
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//商品查询
|
||||
@Override
|
||||
public ResultEntity getProductInquiry(String userId, String keyWord) {
|
||||
|
||||
StuGoodsInfoExample example = new StuGoodsInfoExample();
|
||||
example.createCriteria().andUserIdEqualTo(userId).andOnlineStateEqualTo(1);
|
||||
if(keyWord!=null && keyWord.length()>0){
|
||||
example.createCriteria().andGoodsNameLike("%"+keyWord+"%");
|
||||
}
|
||||
List<StuGoodsInfo> stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example);
|
||||
if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) {
|
||||
return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList);
|
||||
}else {
|
||||
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//大广告招租
|
||||
@Override
|
||||
public ResultEntity getBigAdPlacement(String userId) {
|
||||
//查询用户商品销售管理数据
|
||||
|
||||
StuGoodSalesManageExample goodSalesManageExample = new StuGoodSalesManageExample();
|
||||
goodSalesManageExample.createCriteria().andUserIdEqualTo(userId).andStateEqualTo(1);
|
||||
List<StuGoodSalesManage> goodSalesManageList = stuGoodSalesManageMapper.selectByExample(goodSalesManageExample);
|
||||
if (goodSalesManageList != null && goodSalesManageList.size() > 0) {
|
||||
|
||||
if (goodSalesManageList.size() >= 2) {
|
||||
Collections.shuffle(goodSalesManageList, new Random(System.currentTimeMillis()));
|
||||
List<StuGoodSalesManage> goodSalesManageList1 = goodSalesManageList.subList(0, 2);
|
||||
return new ResultEntity<>(HttpStatus.OK,goodSalesManageList1);
|
||||
}else {
|
||||
return new ResultEntity<>(goodSalesManageList);
|
||||
}
|
||||
}
|
||||
|
||||
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
//根据类型展示数据
|
||||
@Override
|
||||
public ResultEntity getTypeQuery(String userId, String type) {
|
||||
|
||||
|
||||
StuGoodsInfoExample example = new StuGoodsInfoExample();
|
||||
example.createCriteria().andUserIdEqualTo(userId).andOnlineStateEqualTo(1);
|
||||
if(type!=null && type.length()>0){
|
||||
example.createCriteria().andGoodsNameLike("%"+type+"%");
|
||||
}
|
||||
List<StuGoodsInfo> stuGoodsInfoList = stuGoodsInfoMapper.selectByExample(example);
|
||||
if (stuGoodsInfoList != null && stuGoodsInfoList.size() > 0) {
|
||||
return new ResultEntity<>(HttpStatus.OK,stuGoodsInfoList);
|
||||
}else {
|
||||
return new ResultEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,403 @@
|
||||
<?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.sztzjy.trade.mapper.StuGoodSalesManageMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodSalesManage">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="goods_id" jdbcType="INTEGER" property="goodsId" />
|
||||
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
|
||||
<result column="goods_type" jdbcType="VARCHAR" property="goodsType" />
|
||||
<result column="goods_subclass" jdbcType="VARCHAR" property="goodsSubclass" />
|
||||
<result column="online_total" jdbcType="VARCHAR" property="onlineTotal" />
|
||||
<result column="available_inventory_quantity" jdbcType="INTEGER" property="availableInventoryQuantity" />
|
||||
<result column="sold_quantity" jdbcType="VARCHAR" property="soldQuantity" />
|
||||
<result column="sales_volume" jdbcType="VARCHAR" property="salesVolume" />
|
||||
<result column="gross_margin" jdbcType="VARCHAR" property="grossMargin" />
|
||||
<result column="number_of_comments" jdbcType="INTEGER" property="numberOfComments" />
|
||||
<result column="number_of_likes" jdbcType="INTEGER" property="numberOfLikes" />
|
||||
<result column="number_of_collections" jdbcType="INTEGER" property="numberOfCollections" />
|
||||
<result column="number_of_shares" jdbcType="INTEGER" property="numberOfShares" />
|
||||
<result column="online_time" jdbcType="TIMESTAMP" property="onlineTime" />
|
||||
<result column="state" jdbcType="INTEGER" property="state" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
</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, goods_id, goods_name, goods_type, goods_subclass, online_total, available_inventory_quantity,
|
||||
sold_quantity, sales_volume, gross_margin, number_of_comments, number_of_likes, number_of_collections,
|
||||
number_of_shares, online_time, state, user_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuGoodSalesManageExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from stu_goods_sales_manage
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from stu_goods_sales_manage
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from stu_goods_sales_manage
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuGoodSalesManageExample">
|
||||
delete from stu_goods_sales_manage
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodSalesManage">
|
||||
insert into stu_goods_sales_manage (id, goods_id, goods_name,
|
||||
goods_type, goods_subclass, online_total,
|
||||
available_inventory_quantity, sold_quantity,
|
||||
sales_volume, gross_margin, number_of_comments,
|
||||
number_of_likes, number_of_collections, number_of_shares,
|
||||
online_time, state, user_id
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{goodsId,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR},
|
||||
#{goodsType,jdbcType=VARCHAR}, #{goodsSubclass,jdbcType=VARCHAR}, #{onlineTotal,jdbcType=VARCHAR},
|
||||
#{availableInventoryQuantity,jdbcType=INTEGER}, #{soldQuantity,jdbcType=VARCHAR},
|
||||
#{salesVolume,jdbcType=VARCHAR}, #{grossMargin,jdbcType=VARCHAR}, #{numberOfComments,jdbcType=INTEGER},
|
||||
#{numberOfLikes,jdbcType=INTEGER}, #{numberOfCollections,jdbcType=INTEGER}, #{numberOfShares,jdbcType=INTEGER},
|
||||
#{onlineTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodSalesManage">
|
||||
insert into stu_goods_sales_manage
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="goodsId != null">
|
||||
goods_id,
|
||||
</if>
|
||||
<if test="goodsName != null">
|
||||
goods_name,
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
goods_type,
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
goods_subclass,
|
||||
</if>
|
||||
<if test="onlineTotal != null">
|
||||
online_total,
|
||||
</if>
|
||||
<if test="availableInventoryQuantity != null">
|
||||
available_inventory_quantity,
|
||||
</if>
|
||||
<if test="soldQuantity != null">
|
||||
sold_quantity,
|
||||
</if>
|
||||
<if test="salesVolume != null">
|
||||
sales_volume,
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
gross_margin,
|
||||
</if>
|
||||
<if test="numberOfComments != null">
|
||||
number_of_comments,
|
||||
</if>
|
||||
<if test="numberOfLikes != null">
|
||||
number_of_likes,
|
||||
</if>
|
||||
<if test="numberOfCollections != null">
|
||||
number_of_collections,
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
number_of_shares,
|
||||
</if>
|
||||
<if test="onlineTime != null">
|
||||
online_time,
|
||||
</if>
|
||||
<if test="state != null">
|
||||
state,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="goodsId != null">
|
||||
#{goodsId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="goodsName != null">
|
||||
#{goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
#{goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
#{goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="onlineTotal != null">
|
||||
#{onlineTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="availableInventoryQuantity != null">
|
||||
#{availableInventoryQuantity,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="soldQuantity != null">
|
||||
#{soldQuantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesVolume != null">
|
||||
#{salesVolume,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
#{grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="numberOfComments != null">
|
||||
#{numberOfComments,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfLikes != null">
|
||||
#{numberOfLikes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfCollections != null">
|
||||
#{numberOfCollections,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
#{numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="onlineTime != null">
|
||||
#{onlineTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="state != null">
|
||||
#{state,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuGoodSalesManageExample" resultType="java.lang.Long">
|
||||
select count(*) from stu_goods_sales_manage
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update stu_goods_sales_manage
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.goodsId != null">
|
||||
goods_id = #{record.goodsId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.goodsName != null">
|
||||
goods_name = #{record.goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsType != null">
|
||||
goods_type = #{record.goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsSubclass != null">
|
||||
goods_subclass = #{record.goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.onlineTotal != null">
|
||||
online_total = #{record.onlineTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.availableInventoryQuantity != null">
|
||||
available_inventory_quantity = #{record.availableInventoryQuantity,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.soldQuantity != null">
|
||||
sold_quantity = #{record.soldQuantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.salesVolume != null">
|
||||
sales_volume = #{record.salesVolume,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.grossMargin != null">
|
||||
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.numberOfComments != null">
|
||||
number_of_comments = #{record.numberOfComments,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.numberOfLikes != null">
|
||||
number_of_likes = #{record.numberOfLikes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.numberOfCollections != null">
|
||||
number_of_collections = #{record.numberOfCollections,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.numberOfShares != null">
|
||||
number_of_shares = #{record.numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.onlineTime != null">
|
||||
online_time = #{record.onlineTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.state != null">
|
||||
state = #{record.state,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update stu_goods_sales_manage
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
goods_id = #{record.goodsId,jdbcType=INTEGER},
|
||||
goods_name = #{record.goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{record.goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{record.goodsSubclass,jdbcType=VARCHAR},
|
||||
online_total = #{record.onlineTotal,jdbcType=VARCHAR},
|
||||
available_inventory_quantity = #{record.availableInventoryQuantity,jdbcType=INTEGER},
|
||||
sold_quantity = #{record.soldQuantity,jdbcType=VARCHAR},
|
||||
sales_volume = #{record.salesVolume,jdbcType=VARCHAR},
|
||||
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
|
||||
number_of_comments = #{record.numberOfComments,jdbcType=INTEGER},
|
||||
number_of_likes = #{record.numberOfLikes,jdbcType=INTEGER},
|
||||
number_of_collections = #{record.numberOfCollections,jdbcType=INTEGER},
|
||||
number_of_shares = #{record.numberOfShares,jdbcType=INTEGER},
|
||||
online_time = #{record.onlineTime,jdbcType=TIMESTAMP},
|
||||
state = #{record.state,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.StuGoodSalesManage">
|
||||
update stu_goods_sales_manage
|
||||
<set>
|
||||
<if test="goodsId != null">
|
||||
goods_id = #{goodsId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="goodsName != null">
|
||||
goods_name = #{goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
goods_type = #{goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
goods_subclass = #{goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="onlineTotal != null">
|
||||
online_total = #{onlineTotal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="availableInventoryQuantity != null">
|
||||
available_inventory_quantity = #{availableInventoryQuantity,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="soldQuantity != null">
|
||||
sold_quantity = #{soldQuantity,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="salesVolume != null">
|
||||
sales_volume = #{salesVolume,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
gross_margin = #{grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="numberOfComments != null">
|
||||
number_of_comments = #{numberOfComments,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfLikes != null">
|
||||
number_of_likes = #{numberOfLikes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfCollections != null">
|
||||
number_of_collections = #{numberOfCollections,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
number_of_shares = #{numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="onlineTime != null">
|
||||
online_time = #{onlineTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="state != null">
|
||||
state = #{state,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuGoodSalesManage">
|
||||
update stu_goods_sales_manage
|
||||
set goods_id = #{goodsId,jdbcType=INTEGER},
|
||||
goods_name = #{goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{goodsSubclass,jdbcType=VARCHAR},
|
||||
online_total = #{onlineTotal,jdbcType=VARCHAR},
|
||||
available_inventory_quantity = #{availableInventoryQuantity,jdbcType=INTEGER},
|
||||
sold_quantity = #{soldQuantity,jdbcType=VARCHAR},
|
||||
sales_volume = #{salesVolume,jdbcType=VARCHAR},
|
||||
gross_margin = #{grossMargin,jdbcType=VARCHAR},
|
||||
number_of_comments = #{numberOfComments,jdbcType=INTEGER},
|
||||
number_of_likes = #{numberOfLikes,jdbcType=INTEGER},
|
||||
number_of_collections = #{numberOfCollections,jdbcType=INTEGER},
|
||||
number_of_shares = #{numberOfShares,jdbcType=INTEGER},
|
||||
online_time = #{onlineTime,jdbcType=TIMESTAMP},
|
||||
state = #{state,jdbcType=INTEGER},
|
||||
user_id = #{userId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,679 @@
|
||||
<?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.sztzjy.trade.mapper.StuGoodsInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
|
||||
<result column="goods_type" jdbcType="VARCHAR" property="goodsType" />
|
||||
<result column="goods_subclass" jdbcType="VARCHAR" property="goodsSubclass" />
|
||||
<result column="pricing_unit" jdbcType="VARCHAR" property="pricingUnit" />
|
||||
<result column="unit_cost_price" jdbcType="DECIMAL" property="unitCostPrice" />
|
||||
<result column="gross_margin" jdbcType="VARCHAR" property="grossMargin" />
|
||||
<result column="goods_main_image" jdbcType="VARCHAR" property="goodsMainImage" />
|
||||
<result column="carousel_image" jdbcType="VARCHAR" property="carouselImage" />
|
||||
<result column="pricing_category_name" jdbcType="VARCHAR" property="pricingCategoryName" />
|
||||
<result column="weight" jdbcType="DOUBLE" property="weight" />
|
||||
<result column="promotion_cost_price" jdbcType="DECIMAL" property="promotionCostPrice" />
|
||||
<result column="maximum_price" jdbcType="DECIMAL" property="maximumPrice" />
|
||||
<result column="fix_a_price" jdbcType="DECIMAL" property="fixAPrice" />
|
||||
<result column="matching_groups" jdbcType="VARCHAR" property="matchingGroups" />
|
||||
<result column="goods_url" jdbcType="VARCHAR" property="goodsUrl" />
|
||||
<result column="number_of_shares" jdbcType="INTEGER" property="numberOfShares" />
|
||||
<result column="share_discounts" jdbcType="VARCHAR" property="shareDiscounts" />
|
||||
<result column="share_commission" jdbcType="VARCHAR" property="shareCommission" />
|
||||
<result column="short_video_commission" jdbcType="VARCHAR" property="shortVideoCommission" />
|
||||
<result column="content_commission" jdbcType="VARCHAR" property="contentCommission" />
|
||||
<result column="product_keyword" jdbcType="VARCHAR" property="productKeyword" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="online_state" jdbcType="INTEGER" property="onlineState" />
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
<result column="goods_Introduction" jdbcType="LONGVARCHAR" property="goodsIntroduction" />
|
||||
<result column="specification_packaging" jdbcType="LONGVARCHAR" property="specificationPackaging" />
|
||||
</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, goods_name, goods_type, goods_subclass, pricing_unit, unit_cost_price, gross_margin,
|
||||
goods_main_image, carousel_image, pricing_category_name, weight, promotion_cost_price,
|
||||
maximum_price, fix_a_price, matching_groups, goods_url, number_of_shares, share_discounts,
|
||||
share_commission, short_video_commission, content_commission, product_keyword, create_time,
|
||||
update_time, online_state, user_id, school_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
goods_Introduction, specification_packaging
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.trade.entity.StuGoodsInfoExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from stu_goods_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.trade.entity.StuGoodsInfoExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from stu_goods_info
|
||||
<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.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from stu_goods_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from stu_goods_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.trade.entity.StuGoodsInfoExample">
|
||||
delete from stu_goods_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
insert into stu_goods_info (id, goods_name, goods_type,
|
||||
goods_subclass, pricing_unit, unit_cost_price,
|
||||
gross_margin, goods_main_image, carousel_image,
|
||||
pricing_category_name, weight, promotion_cost_price,
|
||||
maximum_price, fix_a_price, matching_groups,
|
||||
goods_url, number_of_shares, share_discounts,
|
||||
share_commission, short_video_commission,
|
||||
content_commission, product_keyword, create_time,
|
||||
update_time, online_state, user_id,
|
||||
school_id, goods_Introduction, specification_packaging
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{goodsName,jdbcType=VARCHAR}, #{goodsType,jdbcType=VARCHAR},
|
||||
#{goodsSubclass,jdbcType=VARCHAR}, #{pricingUnit,jdbcType=VARCHAR}, #{unitCostPrice,jdbcType=DECIMAL},
|
||||
#{grossMargin,jdbcType=VARCHAR}, #{goodsMainImage,jdbcType=VARCHAR}, #{carouselImage,jdbcType=VARCHAR},
|
||||
#{pricingCategoryName,jdbcType=VARCHAR}, #{weight,jdbcType=DOUBLE}, #{promotionCostPrice,jdbcType=DECIMAL},
|
||||
#{maximumPrice,jdbcType=DECIMAL}, #{fixAPrice,jdbcType=DECIMAL}, #{matchingGroups,jdbcType=VARCHAR},
|
||||
#{goodsUrl,jdbcType=VARCHAR}, #{numberOfShares,jdbcType=INTEGER}, #{shareDiscounts,jdbcType=VARCHAR},
|
||||
#{shareCommission,jdbcType=VARCHAR}, #{shortVideoCommission,jdbcType=VARCHAR},
|
||||
#{contentCommission,jdbcType=VARCHAR}, #{productKeyword,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{onlineState,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR},
|
||||
#{schoolId,jdbcType=VARCHAR}, #{goodsIntroduction,jdbcType=LONGVARCHAR}, #{specificationPackaging,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
insert into stu_goods_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="goodsName != null">
|
||||
goods_name,
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
goods_type,
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
goods_subclass,
|
||||
</if>
|
||||
<if test="pricingUnit != null">
|
||||
pricing_unit,
|
||||
</if>
|
||||
<if test="unitCostPrice != null">
|
||||
unit_cost_price,
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
gross_margin,
|
||||
</if>
|
||||
<if test="goodsMainImage != null">
|
||||
goods_main_image,
|
||||
</if>
|
||||
<if test="carouselImage != null">
|
||||
carousel_image,
|
||||
</if>
|
||||
<if test="pricingCategoryName != null">
|
||||
pricing_category_name,
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
weight,
|
||||
</if>
|
||||
<if test="promotionCostPrice != null">
|
||||
promotion_cost_price,
|
||||
</if>
|
||||
<if test="maximumPrice != null">
|
||||
maximum_price,
|
||||
</if>
|
||||
<if test="fixAPrice != null">
|
||||
fix_a_price,
|
||||
</if>
|
||||
<if test="matchingGroups != null">
|
||||
matching_groups,
|
||||
</if>
|
||||
<if test="goodsUrl != null">
|
||||
goods_url,
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
number_of_shares,
|
||||
</if>
|
||||
<if test="shareDiscounts != null">
|
||||
share_discounts,
|
||||
</if>
|
||||
<if test="shareCommission != null">
|
||||
share_commission,
|
||||
</if>
|
||||
<if test="shortVideoCommission != null">
|
||||
short_video_commission,
|
||||
</if>
|
||||
<if test="contentCommission != null">
|
||||
content_commission,
|
||||
</if>
|
||||
<if test="productKeyword != null">
|
||||
product_keyword,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="onlineState != null">
|
||||
online_state,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id,
|
||||
</if>
|
||||
<if test="goodsIntroduction != null">
|
||||
goods_Introduction,
|
||||
</if>
|
||||
<if test="specificationPackaging != null">
|
||||
specification_packaging,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="goodsName != null">
|
||||
#{goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
#{goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
#{goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pricingUnit != null">
|
||||
#{pricingUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitCostPrice != null">
|
||||
#{unitCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
#{grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsMainImage != null">
|
||||
#{goodsMainImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="carouselImage != null">
|
||||
#{carouselImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pricingCategoryName != null">
|
||||
#{pricingCategoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
#{weight,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="promotionCostPrice != null">
|
||||
#{promotionCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="maximumPrice != null">
|
||||
#{maximumPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="fixAPrice != null">
|
||||
#{fixAPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="matchingGroups != null">
|
||||
#{matchingGroups,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsUrl != null">
|
||||
#{goodsUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
#{numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shareDiscounts != null">
|
||||
#{shareDiscounts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareCommission != null">
|
||||
#{shareCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortVideoCommission != null">
|
||||
#{shortVideoCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contentCommission != null">
|
||||
#{contentCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productKeyword != null">
|
||||
#{productKeyword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="onlineState != null">
|
||||
#{onlineState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
#{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsIntroduction != null">
|
||||
#{goodsIntroduction,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specificationPackaging != null">
|
||||
#{specificationPackaging,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.trade.entity.StuGoodsInfoExample" resultType="java.lang.Long">
|
||||
select count(*) from stu_goods_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update stu_goods_info
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.goodsName != null">
|
||||
goods_name = #{record.goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsType != null">
|
||||
goods_type = #{record.goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsSubclass != null">
|
||||
goods_subclass = #{record.goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pricingUnit != null">
|
||||
pricing_unit = #{record.pricingUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.unitCostPrice != null">
|
||||
unit_cost_price = #{record.unitCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.grossMargin != null">
|
||||
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsMainImage != null">
|
||||
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.carouselImage != null">
|
||||
carousel_image = #{record.carouselImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pricingCategoryName != null">
|
||||
pricing_category_name = #{record.pricingCategoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.weight != null">
|
||||
weight = #{record.weight,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.promotionCostPrice != null">
|
||||
promotion_cost_price = #{record.promotionCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.maximumPrice != null">
|
||||
maximum_price = #{record.maximumPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.fixAPrice != null">
|
||||
fix_a_price = #{record.fixAPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.matchingGroups != null">
|
||||
matching_groups = #{record.matchingGroups,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsUrl != null">
|
||||
goods_url = #{record.goodsUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.numberOfShares != null">
|
||||
number_of_shares = #{record.numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.shareDiscounts != null">
|
||||
share_discounts = #{record.shareDiscounts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.shareCommission != null">
|
||||
share_commission = #{record.shareCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.shortVideoCommission != null">
|
||||
short_video_commission = #{record.shortVideoCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.contentCommission != null">
|
||||
content_commission = #{record.contentCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.productKeyword != null">
|
||||
product_keyword = #{record.productKeyword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.onlineState != null">
|
||||
online_state = #{record.onlineState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.schoolId != null">
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.goodsIntroduction != null">
|
||||
goods_Introduction = #{record.goodsIntroduction,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.specificationPackaging != null">
|
||||
specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update stu_goods_info
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
goods_name = #{record.goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{record.goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{record.goodsSubclass,jdbcType=VARCHAR},
|
||||
pricing_unit = #{record.pricingUnit,jdbcType=VARCHAR},
|
||||
unit_cost_price = #{record.unitCostPrice,jdbcType=DECIMAL},
|
||||
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
|
||||
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
|
||||
carousel_image = #{record.carouselImage,jdbcType=VARCHAR},
|
||||
pricing_category_name = #{record.pricingCategoryName,jdbcType=VARCHAR},
|
||||
weight = #{record.weight,jdbcType=DOUBLE},
|
||||
promotion_cost_price = #{record.promotionCostPrice,jdbcType=DECIMAL},
|
||||
maximum_price = #{record.maximumPrice,jdbcType=DECIMAL},
|
||||
fix_a_price = #{record.fixAPrice,jdbcType=DECIMAL},
|
||||
matching_groups = #{record.matchingGroups,jdbcType=VARCHAR},
|
||||
goods_url = #{record.goodsUrl,jdbcType=VARCHAR},
|
||||
number_of_shares = #{record.numberOfShares,jdbcType=INTEGER},
|
||||
share_discounts = #{record.shareDiscounts,jdbcType=VARCHAR},
|
||||
share_commission = #{record.shareCommission,jdbcType=VARCHAR},
|
||||
short_video_commission = #{record.shortVideoCommission,jdbcType=VARCHAR},
|
||||
content_commission = #{record.contentCommission,jdbcType=VARCHAR},
|
||||
product_keyword = #{record.productKeyword,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
online_state = #{record.onlineState,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
||||
goods_Introduction = #{record.goodsIntroduction,jdbcType=LONGVARCHAR},
|
||||
specification_packaging = #{record.specificationPackaging,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update stu_goods_info
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
goods_name = #{record.goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{record.goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{record.goodsSubclass,jdbcType=VARCHAR},
|
||||
pricing_unit = #{record.pricingUnit,jdbcType=VARCHAR},
|
||||
unit_cost_price = #{record.unitCostPrice,jdbcType=DECIMAL},
|
||||
gross_margin = #{record.grossMargin,jdbcType=VARCHAR},
|
||||
goods_main_image = #{record.goodsMainImage,jdbcType=VARCHAR},
|
||||
carousel_image = #{record.carouselImage,jdbcType=VARCHAR},
|
||||
pricing_category_name = #{record.pricingCategoryName,jdbcType=VARCHAR},
|
||||
weight = #{record.weight,jdbcType=DOUBLE},
|
||||
promotion_cost_price = #{record.promotionCostPrice,jdbcType=DECIMAL},
|
||||
maximum_price = #{record.maximumPrice,jdbcType=DECIMAL},
|
||||
fix_a_price = #{record.fixAPrice,jdbcType=DECIMAL},
|
||||
matching_groups = #{record.matchingGroups,jdbcType=VARCHAR},
|
||||
goods_url = #{record.goodsUrl,jdbcType=VARCHAR},
|
||||
number_of_shares = #{record.numberOfShares,jdbcType=INTEGER},
|
||||
share_discounts = #{record.shareDiscounts,jdbcType=VARCHAR},
|
||||
share_commission = #{record.shareCommission,jdbcType=VARCHAR},
|
||||
short_video_commission = #{record.shortVideoCommission,jdbcType=VARCHAR},
|
||||
content_commission = #{record.contentCommission,jdbcType=VARCHAR},
|
||||
product_keyword = #{record.productKeyword,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
online_state = #{record.onlineState,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
update stu_goods_info
|
||||
<set>
|
||||
<if test="goodsName != null">
|
||||
goods_name = #{goodsName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsType != null">
|
||||
goods_type = #{goodsType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsSubclass != null">
|
||||
goods_subclass = #{goodsSubclass,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pricingUnit != null">
|
||||
pricing_unit = #{pricingUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="unitCostPrice != null">
|
||||
unit_cost_price = #{unitCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="grossMargin != null">
|
||||
gross_margin = #{grossMargin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsMainImage != null">
|
||||
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="carouselImage != null">
|
||||
carousel_image = #{carouselImage,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pricingCategoryName != null">
|
||||
pricing_category_name = #{pricingCategoryName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
weight = #{weight,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="promotionCostPrice != null">
|
||||
promotion_cost_price = #{promotionCostPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="maximumPrice != null">
|
||||
maximum_price = #{maximumPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="fixAPrice != null">
|
||||
fix_a_price = #{fixAPrice,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="matchingGroups != null">
|
||||
matching_groups = #{matchingGroups,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsUrl != null">
|
||||
goods_url = #{goodsUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="numberOfShares != null">
|
||||
number_of_shares = #{numberOfShares,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shareDiscounts != null">
|
||||
share_discounts = #{shareDiscounts,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shareCommission != null">
|
||||
share_commission = #{shareCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shortVideoCommission != null">
|
||||
short_video_commission = #{shortVideoCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contentCommission != null">
|
||||
content_commission = #{contentCommission,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productKeyword != null">
|
||||
product_keyword = #{productKeyword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="onlineState != null">
|
||||
online_state = #{onlineState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id = #{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="goodsIntroduction != null">
|
||||
goods_Introduction = #{goodsIntroduction,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="specificationPackaging != null">
|
||||
specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
update stu_goods_info
|
||||
set goods_name = #{goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{goodsSubclass,jdbcType=VARCHAR},
|
||||
pricing_unit = #{pricingUnit,jdbcType=VARCHAR},
|
||||
unit_cost_price = #{unitCostPrice,jdbcType=DECIMAL},
|
||||
gross_margin = #{grossMargin,jdbcType=VARCHAR},
|
||||
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
|
||||
carousel_image = #{carouselImage,jdbcType=VARCHAR},
|
||||
pricing_category_name = #{pricingCategoryName,jdbcType=VARCHAR},
|
||||
weight = #{weight,jdbcType=DOUBLE},
|
||||
promotion_cost_price = #{promotionCostPrice,jdbcType=DECIMAL},
|
||||
maximum_price = #{maximumPrice,jdbcType=DECIMAL},
|
||||
fix_a_price = #{fixAPrice,jdbcType=DECIMAL},
|
||||
matching_groups = #{matchingGroups,jdbcType=VARCHAR},
|
||||
goods_url = #{goodsUrl,jdbcType=VARCHAR},
|
||||
number_of_shares = #{numberOfShares,jdbcType=INTEGER},
|
||||
share_discounts = #{shareDiscounts,jdbcType=VARCHAR},
|
||||
share_commission = #{shareCommission,jdbcType=VARCHAR},
|
||||
short_video_commission = #{shortVideoCommission,jdbcType=VARCHAR},
|
||||
content_commission = #{contentCommission,jdbcType=VARCHAR},
|
||||
product_keyword = #{productKeyword,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
online_state = #{onlineState,jdbcType=INTEGER},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
school_id = #{schoolId,jdbcType=VARCHAR},
|
||||
goods_Introduction = #{goodsIntroduction,jdbcType=LONGVARCHAR},
|
||||
specification_packaging = #{specificationPackaging,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.trade.entity.StuGoodsInfo">
|
||||
update stu_goods_info
|
||||
set goods_name = #{goodsName,jdbcType=VARCHAR},
|
||||
goods_type = #{goodsType,jdbcType=VARCHAR},
|
||||
goods_subclass = #{goodsSubclass,jdbcType=VARCHAR},
|
||||
pricing_unit = #{pricingUnit,jdbcType=VARCHAR},
|
||||
unit_cost_price = #{unitCostPrice,jdbcType=DECIMAL},
|
||||
gross_margin = #{grossMargin,jdbcType=VARCHAR},
|
||||
goods_main_image = #{goodsMainImage,jdbcType=VARCHAR},
|
||||
carousel_image = #{carouselImage,jdbcType=VARCHAR},
|
||||
pricing_category_name = #{pricingCategoryName,jdbcType=VARCHAR},
|
||||
weight = #{weight,jdbcType=DOUBLE},
|
||||
promotion_cost_price = #{promotionCostPrice,jdbcType=DECIMAL},
|
||||
maximum_price = #{maximumPrice,jdbcType=DECIMAL},
|
||||
fix_a_price = #{fixAPrice,jdbcType=DECIMAL},
|
||||
matching_groups = #{matchingGroups,jdbcType=VARCHAR},
|
||||
goods_url = #{goodsUrl,jdbcType=VARCHAR},
|
||||
number_of_shares = #{numberOfShares,jdbcType=INTEGER},
|
||||
share_discounts = #{shareDiscounts,jdbcType=VARCHAR},
|
||||
share_commission = #{shareCommission,jdbcType=VARCHAR},
|
||||
short_video_commission = #{shortVideoCommission,jdbcType=VARCHAR},
|
||||
content_commission = #{contentCommission,jdbcType=VARCHAR},
|
||||
product_keyword = #{productKeyword,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
online_state = #{onlineState,jdbcType=INTEGER},
|
||||
user_id = #{userId,jdbcType=VARCHAR},
|
||||
school_id = #{schoolId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue