Merge remote-tracking branch 'origin/master'

20230922-ljl-fixBug
daixiaogang 1 year ago
commit c50e2698bd

@ -6,7 +6,7 @@ curl --location --request POST 'localhost:8080/base/cloud/spi' \
"appId":"7264840234423027259",
"authId":"4463798",
"method":"addMoveProductItem",
"data":"{\"productId\":\"680213754079\",\"pageSize\":\"20\"}"
"data":"{\"productId\":\"682805686164\",\"pageSize\":\"20\"}"
}'

@ -65,6 +65,7 @@ public class AddMoveProductItemService extends SPIBaseService implements Extensi
}
microMoveProductItem.setSkuMap(productInfo.getJSONObject("skuMap").toJSONString());
microMoveProductItem.setShopId(shopId);
microMoveProductItem.setSourceName(productInfo.getString("shopName"));
microMoveProductItem.setTitle(productInfo.getString("title"));
microMoveProductItemService.insert(microMoveProductItem);
} catch (Exception e) {

@ -37,6 +37,11 @@ public class MicroMoveProductItem implements Serializable {
*/
private String skuMap;
/**
*
*/
private String sourceName;
private static final long serialVersionUID = 1L;
/**
@ -123,6 +128,20 @@ public class MicroMoveProductItem implements Serializable {
this.skuMap = skuMap;
}
/**
*
*/
public String getSourceName() {
return sourceName;
}
/**
*
*/
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -140,7 +159,8 @@ public class MicroMoveProductItem implements Serializable {
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
&& (this.getSkuMap() == null ? other.getSkuMap() == null : this.getSkuMap().equals(other.getSkuMap()));
&& (this.getSkuMap() == null ? other.getSkuMap() == null : this.getSkuMap().equals(other.getSkuMap()))
&& (this.getSourceName() == null ? other.getSourceName() == null : this.getSourceName().equals(other.getSourceName()));
}
@Override
@ -153,6 +173,7 @@ public class MicroMoveProductItem implements Serializable {
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
result = prime * result + ((getSkuMap() == null) ? 0 : getSkuMap().hashCode());
result = prime * result + ((getSourceName() == null) ? 0 : getSourceName().hashCode());
return result;
}
@ -168,6 +189,7 @@ public class MicroMoveProductItem implements Serializable {
sb.append(", title=").append(title);
sb.append(", shopId=").append(shopId);
sb.append(", skuMap=").append(skuMap);
sb.append(", sourceName=").append(sourceName);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -11,11 +11,12 @@
<result property="title" column="title" jdbcType="VARCHAR"/>
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="skuMap" column="sku_map" jdbcType="VARCHAR"/>
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
distribution_order_id,product_img_urls,product_id,
title,shop_id,sku_map
title,shop_id,sku_map,source_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -46,10 +47,10 @@
<insert id="insert" keyColumn="distribution_order_id" keyProperty="distributionOrderId" parameterType="com.ms.dal.entity.MicroMoveProductItem" useGeneratedKeys="true">
insert into micro_move_product_item
( distribution_order_id,product_img_urls,product_id
,title,shop_id,sku_map
,title,shop_id,sku_map,source_name
)
values (#{distributionOrderId,jdbcType=BIGINT},#{productImgUrls,jdbcType=VARCHAR},#{productId,jdbcType=BIGINT}
,#{title,jdbcType=VARCHAR},#{shopId,jdbcType=BIGINT},#{skuMap,jdbcType=VARCHAR}
,#{title,jdbcType=VARCHAR},#{shopId,jdbcType=BIGINT},#{skuMap,jdbcType=VARCHAR},#{sourceName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="distribution_order_id" keyProperty="distributionOrderId" parameterType="com.ms.dal.entity.MicroMoveProductItem" useGeneratedKeys="true">
@ -61,6 +62,7 @@
<if test="title != null">title,</if>
<if test="shopId != null">shop_id,</if>
<if test="skuMap != null">sku_map,</if>
<if test="sourceName != null">source_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="distributionOrderId != null">#{distributionOrderId,jdbcType=BIGINT},</if>
@ -69,6 +71,7 @@
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="skuMap != null">#{skuMap,jdbcType=VARCHAR},</if>
<if test="sourceName != null">#{sourceName,jdbcType=VARCHAR},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.MicroMoveProductItem">
@ -89,6 +92,9 @@
<if test="skuMap != null">
sku_map = #{skuMap,jdbcType=VARCHAR},
</if>
<if test="sourceName != null">
source_name = #{sourceName,jdbcType=VARCHAR},
</if>
</set>
where distribution_order_id = #{distributionOrderId,jdbcType=BIGINT}
</update>
@ -100,6 +106,7 @@
title = #{title,jdbcType=VARCHAR},
shop_id = #{shopId,jdbcType=BIGINT},
sku_map = #{skuMap,jdbcType=VARCHAR}
source_name = #{sourceName,jdbcType=VARCHAR}
where distribution_order_id = #{distributionOrderId,jdbcType=BIGINT}
</update>

Loading…
Cancel
Save