代码生成
parent
dd39422212
commit
996cfcc114
@ -0,0 +1,21 @@
|
||||
package com.ms.api.service;
|
||||
|
||||
import com.ms.dal.entity.ProductToDsItemFail;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface ProductToDsItemFailService {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(ProductToDsItemFail record);
|
||||
|
||||
int insertSelective(ProductToDsItemFail record);
|
||||
|
||||
ProductToDsItemFail selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(ProductToDsItemFail record);
|
||||
|
||||
int updateByPrimaryKey(ProductToDsItemFail record);
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.ms.api.service.impl;
|
||||
|
||||
import com.ms.dal.entity.ProductToDsItemFail;
|
||||
import com.ms.api.service.ProductToDsItemFailService;
|
||||
import com.ms.dal.mapper.ProductToDsItemFailMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class ProductToDsItemFailServiceImpl implements ProductToDsItemFailService{
|
||||
|
||||
@Autowired
|
||||
private ProductToDsItemFailMapper productToDsItemFailMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return productToDsItemFailMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ProductToDsItemFail record) {
|
||||
return productToDsItemFailMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ProductToDsItemFail record) {
|
||||
return productToDsItemFailMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductToDsItemFail selectByPrimaryKey(Long id) {
|
||||
return productToDsItemFailMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ProductToDsItemFail record) {
|
||||
return productToDsItemFailMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ProductToDsItemFail record) {
|
||||
return productToDsItemFailMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.ms.dal.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 1688商品与抖店商品分销关系失败记录用于重试
|
||||
* @TableName product_to_ds_item_fail
|
||||
*/
|
||||
@Data
|
||||
public class ProductToDsItemFail implements Serializable {
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
private Long productToDsItemFailId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 抖店商品id
|
||||
*/
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 1688商品id
|
||||
*/
|
||||
private String sourceItemId;
|
||||
|
||||
/**
|
||||
* 1688卖家id
|
||||
*/
|
||||
private String sourceSellerId;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 货源平台
|
||||
*/
|
||||
private String sourcePlatform;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import com.ms.dal.entity.ProductToDsItemFail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Entity com.ms.dal.entity.ProductToDsItemFail
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductToDsItemFailMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(ProductToDsItemFail record);
|
||||
|
||||
int insertOrUpdate(ProductToDsItemFail record);
|
||||
|
||||
int insertSelective(ProductToDsItemFail record);
|
||||
|
||||
ProductToDsItemFail selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(ProductToDsItemFail record);
|
||||
|
||||
int updateByPrimaryKey(ProductToDsItemFail record);
|
||||
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
<?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.ms.dal.mapper.ProductToDsItemFailMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ms.dal.entity.ProductToDsItemFail">
|
||||
<id property="productToDsItemFailId" column="product_to_ds_item_fail_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="productId" column="product_id" jdbcType="VARCHAR"/>
|
||||
<result property="sourceItemId" column="source_item_id" jdbcType="VARCHAR"/>
|
||||
<result property="sourceSellerId" column="source_seller_id" jdbcType="VARCHAR"/>
|
||||
<result property="source" column="source" jdbcType="VARCHAR"/>
|
||||
<result property="sourcePlatform" column="source_platform" jdbcType="VARCHAR"/>
|
||||
<result property="gmtCreate" column="gmt_create" jdbcType="TIMESTAMP"/>
|
||||
<result property="gmtModified" column="gmt_modified" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
product_to_ds_item_fail_id,shop_id,product_id,
|
||||
source_item_id,source_seller_id,source,
|
||||
source_platform,gmt_create,gmt_modified
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from product_to_ds_item_fail
|
||||
where product_to_ds_item_fail_id = #{productToDsItemFailId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from product_to_ds_item_fail
|
||||
where product_to_ds_item_fail_id = #{productToDsItemFailId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="product_to_ds_item_fail_id" keyProperty="productToDsItemFailId" parameterType="com.ms.dal.entity.ProductToDsItemFail" useGeneratedKeys="true">
|
||||
insert into product_to_ds_item_fail
|
||||
( product_to_ds_item_fail_id,shop_id,product_id
|
||||
,source_item_id,source_seller_id,source
|
||||
,source_platform,gmt_create,gmt_modified
|
||||
)
|
||||
values (#{productToDsItemFailId,jdbcType=BIGINT},#{shopId,jdbcType=BIGINT},#{productId,jdbcType=VARCHAR}
|
||||
,#{sourceItemId,jdbcType=VARCHAR},#{sourceSellerId,jdbcType=VARCHAR},#{source,jdbcType=VARCHAR}
|
||||
,#{sourcePlatform,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<update id="insertOrUpdate" keyColumn="product_to_ds_item_fail_id" keyProperty="productToDsItemFailId" parameterType="com.ms.dal.entity.ProductToDsItemFail"
|
||||
useGeneratedKeys="true">
|
||||
insert into product_to_ds_item_fail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productToDsItemFailId != null">product_to_ds_item_fail_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="sourceItemId != null">source_item_id,</if>
|
||||
<if test="sourceSellerId != null">source_seller_id,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="sourcePlatform != null">source_platform,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productToDsItemFailId != null">#{productToDsItemFailId,jdbcType=BIGINT},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="productId != null">#{productId,jdbcType=VARCHAR},</if>
|
||||
<if test="sourceItemId != null">#{sourceItemId,jdbcType=VARCHAR},</if>
|
||||
<if test="sourceSellerId != null">#{sourceSellerId,jdbcType=VARCHAR},</if>
|
||||
<if test="source != null">#{source,jdbcType=VARCHAR},</if>
|
||||
<if test="sourcePlatform != null">#{sourcePlatform,jdbcType=VARCHAR},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id = #{productId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceItemId != null">
|
||||
source_item_id = #{sourceItemId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceSellerId != null">
|
||||
source_seller_id = #{sourceSellerId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourcePlatform != null">
|
||||
source_platform = #{sourcePlatform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gmtCreate != null">
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="gmtModified != null">
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</update>
|
||||
<insert id="insertSelective" keyColumn="product_to_ds_item_fail_id" keyProperty="productToDsItemFailId" parameterType="com.ms.dal.entity.ProductToDsItemFail" useGeneratedKeys="true">
|
||||
insert into product_to_ds_item_fail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productToDsItemFailId != null">product_to_ds_item_fail_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="sourceItemId != null">source_item_id,</if>
|
||||
<if test="sourceSellerId != null">source_seller_id,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="sourcePlatform != null">source_platform,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productToDsItemFailId != null">#{productToDsItemFailId,jdbcType=BIGINT},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="productId != null">#{productId,jdbcType=VARCHAR},</if>
|
||||
<if test="sourceItemId != null">#{sourceItemId,jdbcType=VARCHAR},</if>
|
||||
<if test="sourceSellerId != null">#{sourceSellerId,jdbcType=VARCHAR},</if>
|
||||
<if test="source != null">#{source,jdbcType=VARCHAR},</if>
|
||||
<if test="sourcePlatform != null">#{sourcePlatform,jdbcType=VARCHAR},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.ProductToDsItemFail">
|
||||
update product_to_ds_item_fail
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id = #{productId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceItemId != null">
|
||||
source_item_id = #{sourceItemId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceSellerId != null">
|
||||
source_seller_id = #{sourceSellerId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourcePlatform != null">
|
||||
source_platform = #{sourcePlatform,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gmtCreate != null">
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="gmtModified != null">
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where product_to_ds_item_fail_id = #{productToDsItemFailId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.ProductToDsItemFail">
|
||||
update product_to_ds_item_fail
|
||||
set
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
product_id = #{productId,jdbcType=VARCHAR},
|
||||
source_item_id = #{sourceItemId,jdbcType=VARCHAR},
|
||||
source_seller_id = #{sourceSellerId,jdbcType=VARCHAR},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
source_platform = #{sourcePlatform,jdbcType=VARCHAR},
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
where product_to_ds_item_fail_id = #{productToDsItemFailId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue