铺货单bug修复

20230922-ljl-fixBug
cxxxxxxx详 1 year ago
parent 153fc22d5a
commit 9c95ffade7

@ -60,12 +60,13 @@ public class AddMoveProductItemService extends SPIBaseService implements Extensi
}
JSONObject productInfo = resObj.getJSONObject("productInfo");
microMoveProductItem.setProductId(Long.valueOf(fields.getProductId()));
if (!ObjectUtil.isEmpty(productInfo.getJSONObject("productImgUrls"))) {
microMoveProductItem.setProductImgUrls(productInfo.getJSONArray("productImgUrls").toJSONString());
if (!ObjectUtil.isEmpty(productInfo.getJSONArray("image_paths"))) {
microMoveProductItem.setProductImgUrls(productInfo.getJSONArray("image_paths").get(0).toString());
}
microMoveProductItem.setPrice(productInfo.getDouble("jd_price"));
microMoveProductItem.setSkuMap(productInfo.getJSONObject("skuMap").toJSONString());
microMoveProductItem.setShopId(shopId);
microMoveProductItem.setSourceName(productInfo.getString("shopName"));
microMoveProductItem.setSourceName(productInfo.getString("shop_name"));
microMoveProductItem.setTitle(productInfo.getString("title"));
microMoveProductItemService.insert(microMoveProductItem);
} catch (Exception e) {

@ -32,6 +32,11 @@ public class MicroMoveProductItem implements Serializable {
*/
private Long shopId;
/**
*
*/
private Double price;
/**
* sku
*/
@ -128,6 +133,20 @@ public class MicroMoveProductItem implements Serializable {
this.skuMap = skuMap;
}
/**
*
*/
public Double getPrice() {
return price;
}
/**
* sku
*/
public void setPrice(Double price) {
this.price = price;
}
/**
*
*/
@ -160,6 +179,7 @@ public class MicroMoveProductItem implements Serializable {
&& (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.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getSourceName() == null ? other.getSourceName() == null : this.getSourceName().equals(other.getSourceName()));
}
@ -173,6 +193,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 + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getSourceName() == null) ? 0 : getSourceName().hashCode());
return result;
}
@ -189,6 +210,7 @@ public class MicroMoveProductItem implements Serializable {
sb.append(", title=").append(title);
sb.append(", shopId=").append(shopId);
sb.append(", skuMap=").append(skuMap);
sb.append(", price=").append(price);
sb.append(", sourceName=").append(sourceName);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");

@ -12,11 +12,12 @@
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="skuMap" column="sku_map" jdbcType="VARCHAR"/>
<result property="sourceName" column="source_name" jdbcType="VARCHAR"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
</resultMap>
<sql id="Base_Column_List">
distribution_order_id,product_img_urls,product_id,
title,shop_id,sku_map,source_name
title,shop_id,sku_map,source_name,price
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -47,10 +48,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,source_name
,title,shop_id,sku_map,source_name,price
)
values (#{distributionOrderId,jdbcType=BIGINT},#{productImgUrls,jdbcType=VARCHAR},#{productId,jdbcType=BIGINT}
,#{title,jdbcType=VARCHAR},#{shopId,jdbcType=BIGINT},#{skuMap,jdbcType=VARCHAR},#{sourceName,jdbcType=VARCHAR}
,#{title,jdbcType=VARCHAR},#{shopId,jdbcType=BIGINT},#{skuMap,jdbcType=VARCHAR},#{sourceName,jdbcType=VARCHAR},#{price,jdbcType=DECIMAL}
)
</insert>
<insert id="insertSelective" keyColumn="distribution_order_id" keyProperty="distributionOrderId" parameterType="com.ms.dal.entity.MicroMoveProductItem" useGeneratedKeys="true">
@ -63,6 +64,7 @@
<if test="shopId != null">shop_id,</if>
<if test="skuMap != null">sku_map,</if>
<if test="sourceName != null">source_name,</if>
<if test="price != null">price,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="distributionOrderId != null">#{distributionOrderId,jdbcType=BIGINT},</if>
@ -72,6 +74,7 @@
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="skuMap != null">#{skuMap,jdbcType=VARCHAR},</if>
<if test="sourceName != null">#{sourceName,jdbcType=VARCHAR},</if>
<if test="price != null">#{price,jdbcType=DECIMAL},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.MicroMoveProductItem">
@ -95,6 +98,9 @@
<if test="sourceName != null">
source_name = #{sourceName,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
</set>
where distribution_order_id = #{distributionOrderId,jdbcType=BIGINT}
</update>
@ -107,6 +113,7 @@
shop_id = #{shopId,jdbcType=BIGINT},
sku_map = #{skuMap,jdbcType=VARCHAR}
source_name = #{sourceName,jdbcType=VARCHAR}
price = #{price,jdbcType=DECIMAL}
where distribution_order_id = #{distributionOrderId,jdbcType=BIGINT}
</update>

Loading…
Cancel
Save