diff --git a/README.md b/README.md index 630f89e1..8f39fd9b 100644 --- a/README.md +++ b/README.md @@ -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\"}" }' diff --git a/ms-biz/src/main/java/com/ms/api/spi/move/AddMoveProductItemService.java b/ms-biz/src/main/java/com/ms/api/spi/move/AddMoveProductItemService.java index 2d890806..d26c07d5 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/move/AddMoveProductItemService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/move/AddMoveProductItemService.java @@ -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) { diff --git a/ms-dal/src/main/java/com/ms/dal/entity/MicroMoveProductItem.java b/ms-dal/src/main/java/com/ms/dal/entity/MicroMoveProductItem.java index 2f74456b..d8d288b7 100644 --- a/ms-dal/src/main/java/com/ms/dal/entity/MicroMoveProductItem.java +++ b/ms-dal/src/main/java/com/ms/dal/entity/MicroMoveProductItem.java @@ -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(); diff --git a/ms-dal/src/main/resources/mapper/MicroMoveProductItemMapper.xml b/ms-dal/src/main/resources/mapper/MicroMoveProductItemMapper.xml index 0dc199c4..bf9d0631 100644 --- a/ms-dal/src/main/resources/mapper/MicroMoveProductItemMapper.xml +++ b/ms-dal/src/main/resources/mapper/MicroMoveProductItemMapper.xml @@ -11,11 +11,12 @@ + distribution_order_id,product_img_urls,product_id, - title,shop_id,sku_map + title,shop_id,sku_map,source_name