优化jd店铺商品
This commit is contained in:
parent
de6bc6e9a8
commit
4376b87fdf
|
|
@ -1,10 +1,7 @@
|
|||
package cn.qihangerp.api.jd.controller;
|
||||
|
||||
|
||||
import cn.qihangerp.common.AjaxResult;
|
||||
import cn.qihangerp.common.PageQuery;
|
||||
import cn.qihangerp.common.PageResult;
|
||||
import cn.qihangerp.common.TableDataInfo;
|
||||
import cn.qihangerp.common.*;
|
||||
import cn.qihangerp.domain.bo.LinkErpGoodsSkuBo;
|
||||
import cn.qihangerp.module.goods.domain.OGoodsSku;
|
||||
import cn.qihangerp.module.goods.service.OGoodsSkuService;
|
||||
|
|
@ -57,14 +54,10 @@ public class JdGoodsController extends BaseController {
|
|||
if(StringUtils.isBlank(bo.getErpGoodsSkuId())){
|
||||
return AjaxResult.error(500,"缺少参数oGoodsSkuId");
|
||||
}
|
||||
OGoodsSku oGoodsSku = oGoodsSkuService.getById(bo.getErpGoodsSkuId());
|
||||
|
||||
if(oGoodsSku == null) return AjaxResult.error(1500,"未找到系统商品sku");
|
||||
JdGoodsSku sku = new JdGoodsSku();
|
||||
sku.setId(bo.getId().toString());
|
||||
sku.setOGoodsSkuId(Long.parseLong(bo.getErpGoodsSkuId()));
|
||||
skuService.updateById(sku);
|
||||
return success();
|
||||
ResultVo resultVo = skuService.linkErpGoodsSku(bo);
|
||||
if(resultVo.getCode()==0)
|
||||
return success();
|
||||
else return AjaxResult.error(resultVo.getMsg());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package cn.qihangerp.module.goods.service;
|
||||
|
||||
|
||||
import cn.qihangerp.common.ResultVo;
|
||||
import cn.qihangerp.domain.bo.LinkErpGoodsSkuBo;
|
||||
import cn.qihangerp.module.goods.domain.OGoodsSku;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
@ -13,4 +15,5 @@ import java.util.List;
|
|||
*/
|
||||
public interface OGoodsSkuService extends IService<OGoodsSku> {
|
||||
List<OGoodsSku> searchGoodsSpec(String keyword);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package cn.qihangerp.module.goods.service.impl;
|
||||
|
||||
|
||||
import cn.qihangerp.common.ResultVo;
|
||||
import cn.qihangerp.domain.bo.LinkErpGoodsSkuBo;
|
||||
import cn.qihangerp.module.goods.domain.OGoodsSku;
|
||||
import cn.qihangerp.module.goods.mapper.OGoodsSkuMapper;
|
||||
import cn.qihangerp.module.goods.service.OGoodsSkuService;
|
||||
|
|
@ -21,6 +23,7 @@ import java.util.List;
|
|||
public class OGoodsSkuServiceImpl extends ServiceImpl<OGoodsSkuMapper, OGoodsSku>
|
||||
implements OGoodsSkuService {
|
||||
private final OGoodsSkuMapper skuMapper;
|
||||
|
||||
@Override
|
||||
public List<OGoodsSku> searchGoodsSpec(String keyword) {
|
||||
LambdaQueryWrapper<OGoodsSku> queryWrapper =
|
||||
|
|
@ -34,6 +37,8 @@ public class OGoodsSkuServiceImpl extends ServiceImpl<OGoodsSkuMapper, OGoodsSku
|
|||
queryWrapper.last("LIMIT 10");
|
||||
return skuMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
package cn.qihangerp.module.open.jd.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName jd_goods
|
||||
* 京东商品表
|
||||
* @TableName oms_jd_goods
|
||||
*/
|
||||
@TableName("oms_jd_goods")
|
||||
@TableName(value ="oms_jd_goods")
|
||||
@Data
|
||||
public class JdGoods implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -52,12 +57,12 @@ public class JdGoods implements Serializable {
|
|||
/**
|
||||
* 商品最后一次修改时间
|
||||
*/
|
||||
private Date modified;
|
||||
private String modified;
|
||||
|
||||
/**
|
||||
* 商品创建时间,只读属性
|
||||
*/
|
||||
private Date created;
|
||||
private String created;
|
||||
|
||||
/**
|
||||
* 最后下架时间
|
||||
|
|
@ -87,7 +92,7 @@ public class JdGoods implements Serializable {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private Float weight;
|
||||
private Double weight;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -149,11 +154,6 @@ public class JdGoods implements Serializable {
|
|||
*/
|
||||
private Integer stockNum;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -168,572 +168,23 @@ public class JdGoods implements Serializable {
|
|||
*
|
||||
*/
|
||||
private String spuId;
|
||||
|
||||
/**
|
||||
* 店铺id(sys_shop表id)
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 商品id(o_goods外键)
|
||||
*/
|
||||
private Long erpGoodsId;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<JdGoodsSku> skuList;
|
||||
|
||||
public List<JdGoodsSku> getSkuList() {
|
||||
return skuList;
|
||||
}
|
||||
|
||||
public void setSkuList(List<JdGoodsSku> skuList) {
|
||||
this.skuList = skuList;
|
||||
}
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
public Long getWareId() {
|
||||
return wareId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
public void setWareId(Long wareId) {
|
||||
this.wareId = wareId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品状态 -1:删除 1:从未上架 2:自主下架 4:系统下架 8:上架 513:从未上架待审 514:自主下架待审 516:系统下架待审 520:上架待审核 1028:系统下架审核失败
|
||||
*/
|
||||
public Integer getWareStatus() {
|
||||
return wareStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品状态 -1:删除 1:从未上架 2:自主下架 4:系统下架 8:上架 513:从未上架待审 514:自主下架待审 516:系统下架待审 520:上架待审核 1028:系统下架审核失败
|
||||
*/
|
||||
public void setWareStatus(Integer wareStatus) {
|
||||
this.wareStatus = wareStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品外部ID,商家自行设置的ID(便于关联京东商品)
|
||||
*/
|
||||
public String getOuterId() {
|
||||
return outerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品外部ID,商家自行设置的ID(便于关联京东商品)
|
||||
*/
|
||||
public void setOuterId(String outerId) {
|
||||
this.outerId = outerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品货号
|
||||
*/
|
||||
public String getItemNum() {
|
||||
return itemNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品货号
|
||||
*/
|
||||
public void setItemNum(String itemNum) {
|
||||
this.itemNum = itemNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品的条形码.UPC码,SN码,PLU码统称为条形码
|
||||
*/
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品的条形码.UPC码,SN码,PLU码统称为条形码
|
||||
*/
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品最后一次修改时间
|
||||
*/
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品最后一次修改时间
|
||||
*/
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品创建时间,只读属性
|
||||
*/
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品创建时间,只读属性
|
||||
*/
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后下架时间
|
||||
*/
|
||||
public Date getOfflineTime() {
|
||||
return offlineTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后下架时间
|
||||
*/
|
||||
public void setOfflineTime(Date offlineTime) {
|
||||
this.offlineTime = offlineTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后上架时间
|
||||
*/
|
||||
public Date getOnlineTime() {
|
||||
return onlineTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后上架时间
|
||||
*/
|
||||
public void setOnlineTime(Date onlineTime) {
|
||||
this.onlineTime = onlineTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货地
|
||||
*/
|
||||
public String getDelivery() {
|
||||
return delivery;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货地
|
||||
*/
|
||||
public void setDelivery(String delivery) {
|
||||
this.delivery = delivery;
|
||||
}
|
||||
|
||||
/**
|
||||
* 包装清单
|
||||
*/
|
||||
public String getPackListing() {
|
||||
return packListing;
|
||||
}
|
||||
|
||||
/**
|
||||
* 包装清单
|
||||
*/
|
||||
public void setPackListing(String packListing) {
|
||||
this.packListing = packListing;
|
||||
}
|
||||
|
||||
/**
|
||||
* 包装规格
|
||||
*/
|
||||
public String getWrap() {
|
||||
return wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 包装规格
|
||||
*/
|
||||
public void setWrap(String wrap) {
|
||||
this.wrap = wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Float getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setWeight(Float weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setWidth(Integer width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setHeight(Integer height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setLength(Integer length) {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getMobileDesc() {
|
||||
return mobileDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setMobileDesc(String mobileDesc) {
|
||||
this.mobileDesc = mobileDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getIntroduction() {
|
||||
return introduction;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setIntroduction(String introduction) {
|
||||
this.introduction = introduction;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getAfterSales() {
|
||||
return afterSales;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setAfterSales(String afterSales) {
|
||||
this.afterSales = afterSales;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public BigDecimal getMarketPrice() {
|
||||
return marketPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setMarketPrice(BigDecimal marketPrice) {
|
||||
this.marketPrice = marketPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public BigDecimal getCostPrice() {
|
||||
return costPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setCostPrice(BigDecimal costPrice) {
|
||||
this.costPrice = costPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public BigDecimal getJdPrice() {
|
||||
return jdPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setJdPrice(BigDecimal jdPrice) {
|
||||
this.jdPrice = jdPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getBrandName() {
|
||||
return brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getStockNum() {
|
||||
return stockNum;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setStockNum(Integer stockNum) {
|
||||
this.stockNum = stockNum;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getSellPoint() {
|
||||
return sellPoint;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setSellPoint(String sellPoint) {
|
||||
this.sellPoint = sellPoint;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getAfterSaleDesc() {
|
||||
return afterSaleDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setAfterSaleDesc(String afterSaleDesc) {
|
||||
this.afterSaleDesc = afterSaleDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public String getSpuId() {
|
||||
return spuId;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setSpuId(String spuId) {
|
||||
this.spuId = spuId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
JdGoods other = (JdGoods) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getWareId() == null ? other.getWareId() == null : this.getWareId().equals(other.getWareId()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getWareStatus() == null ? other.getWareStatus() == null : this.getWareStatus().equals(other.getWareStatus()))
|
||||
&& (this.getOuterId() == null ? other.getOuterId() == null : this.getOuterId().equals(other.getOuterId()))
|
||||
&& (this.getItemNum() == null ? other.getItemNum() == null : this.getItemNum().equals(other.getItemNum()))
|
||||
&& (this.getBarCode() == null ? other.getBarCode() == null : this.getBarCode().equals(other.getBarCode()))
|
||||
&& (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified()))
|
||||
&& (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
|
||||
&& (this.getOfflineTime() == null ? other.getOfflineTime() == null : this.getOfflineTime().equals(other.getOfflineTime()))
|
||||
&& (this.getOnlineTime() == null ? other.getOnlineTime() == null : this.getOnlineTime().equals(other.getOnlineTime()))
|
||||
&& (this.getDelivery() == null ? other.getDelivery() == null : this.getDelivery().equals(other.getDelivery()))
|
||||
&& (this.getPackListing() == null ? other.getPackListing() == null : this.getPackListing().equals(other.getPackListing()))
|
||||
&& (this.getWrap() == null ? other.getWrap() == null : this.getWrap().equals(other.getWrap()))
|
||||
&& (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
|
||||
&& (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
|
||||
&& (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
|
||||
&& (this.getLength() == null ? other.getLength() == null : this.getLength().equals(other.getLength()))
|
||||
&& (this.getMobileDesc() == null ? other.getMobileDesc() == null : this.getMobileDesc().equals(other.getMobileDesc()))
|
||||
&& (this.getIntroduction() == null ? other.getIntroduction() == null : this.getIntroduction().equals(other.getIntroduction()))
|
||||
&& (this.getAfterSales() == null ? other.getAfterSales() == null : this.getAfterSales().equals(other.getAfterSales()))
|
||||
&& (this.getLogo() == null ? other.getLogo() == null : this.getLogo().equals(other.getLogo()))
|
||||
&& (this.getMarketPrice() == null ? other.getMarketPrice() == null : this.getMarketPrice().equals(other.getMarketPrice()))
|
||||
&& (this.getCostPrice() == null ? other.getCostPrice() == null : this.getCostPrice().equals(other.getCostPrice()))
|
||||
&& (this.getJdPrice() == null ? other.getJdPrice() == null : this.getJdPrice().equals(other.getJdPrice()))
|
||||
&& (this.getBrandName() == null ? other.getBrandName() == null : this.getBrandName().equals(other.getBrandName()))
|
||||
&& (this.getStockNum() == null ? other.getStockNum() == null : this.getStockNum().equals(other.getStockNum()))
|
||||
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
|
||||
&& (this.getSellPoint() == null ? other.getSellPoint() == null : this.getSellPoint().equals(other.getSellPoint()))
|
||||
&& (this.getAfterSaleDesc() == null ? other.getAfterSaleDesc() == null : this.getAfterSaleDesc().equals(other.getAfterSaleDesc()))
|
||||
&& (this.getSpuId() == null ? other.getSpuId() == null : this.getSpuId().equals(other.getSpuId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getWareId() == null) ? 0 : getWareId().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getWareStatus() == null) ? 0 : getWareStatus().hashCode());
|
||||
result = prime * result + ((getOuterId() == null) ? 0 : getOuterId().hashCode());
|
||||
result = prime * result + ((getItemNum() == null) ? 0 : getItemNum().hashCode());
|
||||
result = prime * result + ((getBarCode() == null) ? 0 : getBarCode().hashCode());
|
||||
result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode());
|
||||
result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
|
||||
result = prime * result + ((getOfflineTime() == null) ? 0 : getOfflineTime().hashCode());
|
||||
result = prime * result + ((getOnlineTime() == null) ? 0 : getOnlineTime().hashCode());
|
||||
result = prime * result + ((getDelivery() == null) ? 0 : getDelivery().hashCode());
|
||||
result = prime * result + ((getPackListing() == null) ? 0 : getPackListing().hashCode());
|
||||
result = prime * result + ((getWrap() == null) ? 0 : getWrap().hashCode());
|
||||
result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
|
||||
result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
|
||||
result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
|
||||
result = prime * result + ((getLength() == null) ? 0 : getLength().hashCode());
|
||||
result = prime * result + ((getMobileDesc() == null) ? 0 : getMobileDesc().hashCode());
|
||||
result = prime * result + ((getIntroduction() == null) ? 0 : getIntroduction().hashCode());
|
||||
result = prime * result + ((getAfterSales() == null) ? 0 : getAfterSales().hashCode());
|
||||
result = prime * result + ((getLogo() == null) ? 0 : getLogo().hashCode());
|
||||
result = prime * result + ((getMarketPrice() == null) ? 0 : getMarketPrice().hashCode());
|
||||
result = prime * result + ((getCostPrice() == null) ? 0 : getCostPrice().hashCode());
|
||||
result = prime * result + ((getJdPrice() == null) ? 0 : getJdPrice().hashCode());
|
||||
result = prime * result + ((getBrandName() == null) ? 0 : getBrandName().hashCode());
|
||||
result = prime * result + ((getStockNum() == null) ? 0 : getStockNum().hashCode());
|
||||
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
|
||||
result = prime * result + ((getSellPoint() == null) ? 0 : getSellPoint().hashCode());
|
||||
result = prime * result + ((getAfterSaleDesc() == null) ? 0 : getAfterSaleDesc().hashCode());
|
||||
result = prime * result + ((getSpuId() == null) ? 0 : getSpuId().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", wareId=").append(wareId);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", wareStatus=").append(wareStatus);
|
||||
sb.append(", outerId=").append(outerId);
|
||||
sb.append(", itemNum=").append(itemNum);
|
||||
sb.append(", barCode=").append(barCode);
|
||||
sb.append(", modified=").append(modified);
|
||||
sb.append(", created=").append(created);
|
||||
sb.append(", offlineTime=").append(offlineTime);
|
||||
sb.append(", onlineTime=").append(onlineTime);
|
||||
sb.append(", delivery=").append(delivery);
|
||||
sb.append(", packListing=").append(packListing);
|
||||
sb.append(", wrap=").append(wrap);
|
||||
sb.append(", weight=").append(weight);
|
||||
sb.append(", width=").append(width);
|
||||
sb.append(", height=").append(height);
|
||||
sb.append(", length=").append(length);
|
||||
sb.append(", mobileDesc=").append(mobileDesc);
|
||||
sb.append(", introduction=").append(introduction);
|
||||
sb.append(", afterSales=").append(afterSales);
|
||||
sb.append(", logo=").append(logo);
|
||||
sb.append(", marketPrice=").append(marketPrice);
|
||||
sb.append(", costPrice=").append(costPrice);
|
||||
sb.append(", jdPrice=").append(jdPrice);
|
||||
sb.append(", brandName=").append(brandName);
|
||||
sb.append(", stockNum=").append(stockNum);
|
||||
sb.append(", shopId=").append(shopId);
|
||||
sb.append(", sellPoint=").append(sellPoint);
|
||||
sb.append(", afterSaleDesc=").append(afterSaleDesc);
|
||||
sb.append(", spuId=").append(spuId);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +1,29 @@
|
|||
package cn.qihangerp.module.open.jd.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName jd_goods_sku
|
||||
* 京东商品SKU表
|
||||
* @TableName oms_jd_goods_sku
|
||||
*/
|
||||
@TableName("oms_jd_goods_sku")
|
||||
@TableName(value ="oms_jd_goods_sku")
|
||||
@Data
|
||||
public class JdGoodsSku implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
*
|
||||
* 平台商品id
|
||||
*/
|
||||
private Long wareId;
|
||||
|
||||
|
|
@ -31,8 +32,6 @@ public class JdGoodsSku implements Serializable {
|
|||
*/
|
||||
private Long skuId;
|
||||
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -89,15 +88,20 @@ public class JdGoodsSku implements Serializable {
|
|||
private String currencySpuId;
|
||||
|
||||
/**
|
||||
* erp商品id
|
||||
* 商品id(o_goods外键)
|
||||
*/
|
||||
private String oGoodsId;
|
||||
private Long erpGoodsId;
|
||||
|
||||
/**
|
||||
* erp商品sku id
|
||||
* 商品skuid(o_goods_sku外键)
|
||||
*/
|
||||
private Long oGoodsSkuId;
|
||||
private Long erpGoodsSkuId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,13 @@
|
|||
package cn.qihangerp.module.open.jd.mapper;
|
||||
|
||||
|
||||
import cn.qihangerp.module.open.jd.domain.JdGoods;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qilip
|
||||
* @description 针对表【jd_goods】的数据库操作Mapper
|
||||
* @createDate 2024-03-09 11:29:59
|
||||
* @Entity cn.qihangerp.jd.domain.JdGoods
|
||||
* @description 针对表【oms_jd_goods(京东商品表)】的数据库操作Mapper
|
||||
* @createDate 2025-05-19 18:49:18
|
||||
* @Entity cn.qihangerp.module.open.jd.domain.JdGoods
|
||||
*/
|
||||
public interface JdGoodsMapper extends BaseMapper<JdGoods> {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,16 @@ package cn.qihangerp.module.open.jd.mapper;
|
|||
|
||||
import cn.qihangerp.module.open.jd.domain.JdGoodsSku;
|
||||
import cn.qihangerp.module.open.jd.domain.vo.JdGoodsSkuListVo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author qilip
|
||||
* @description 针对表【jd_goods_sku】的数据库操作Mapper
|
||||
* @createDate 2024-03-09 20:44:11
|
||||
* @Entity cn.qihangerp.jd.domain.JdGoodsSku
|
||||
* @description 针对表【oms_jd_goods_sku(京东商品SKU表)】的数据库操作Mapper
|
||||
* @createDate 2025-05-19 18:50:56
|
||||
* @Entity cn.qihangerp.module.open.jd.domain.JdGoodsSku
|
||||
*/
|
||||
public interface JdGoodsSkuMapper extends BaseMapper<JdGoodsSku> {
|
||||
IPage<JdGoodsSkuListVo> selectSkuPageList(Page<JdGoodsSku> page,
|
||||
|
|
@ -22,7 +20,7 @@ public interface JdGoodsSkuMapper extends BaseMapper<JdGoodsSku> {
|
|||
@Param("skuId") Long skuId,
|
||||
@Param("outerId") String outerId,
|
||||
@Param("hasLink") Integer hasLink
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package cn.qihangerp.module.open.jd.service;
|
|||
|
||||
import cn.qihangerp.common.PageQuery;
|
||||
import cn.qihangerp.common.PageResult;
|
||||
import cn.qihangerp.common.ResultVo;
|
||||
import cn.qihangerp.domain.bo.LinkErpGoodsSkuBo;
|
||||
import cn.qihangerp.module.open.jd.domain.JdGoodsSku;
|
||||
import cn.qihangerp.module.open.jd.domain.bo.JdGoodsBo;
|
||||
import cn.qihangerp.module.open.jd.domain.vo.JdGoodsSkuListVo;
|
||||
|
|
@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface JdGoodsSkuService extends IService<JdGoodsSku> {
|
||||
PageResult<JdGoodsSkuListVo> queryPageList(JdGoodsBo bo, PageQuery pageQuery);
|
||||
ResultVo linkErpGoodsSku(LinkErpGoodsSkuBo bo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ public class JdGoodsServiceImpl extends ServiceImpl<JdGoodsMapper, JdGoods>
|
|||
if(StringUtils.isNotEmpty(item.getOuterId())) {
|
||||
List<OGoodsSku> oGoodsSkus = goodsSkuMapper.selectList(new LambdaQueryWrapper<OGoodsSku>().eq(OGoodsSku::getSkuCode, item.getOuterId()));
|
||||
if(oGoodsSkus!=null && !oGoodsSkus.isEmpty()){
|
||||
item.setOGoodsId(oGoodsSkus.get(0).getGoodsId().toString());
|
||||
item.setOGoodsSkuId(Long.parseLong(oGoodsSkus.get(0).getId().toString()));
|
||||
item.setErpGoodsId(oGoodsSkus.get(0).getGoodsId());
|
||||
item.setErpGoodsSkuId(oGoodsSkus.get(0).getId());
|
||||
}
|
||||
}
|
||||
skuMapper.insert(item);
|
||||
|
|
@ -92,8 +92,8 @@ public class JdGoodsServiceImpl extends ServiceImpl<JdGoodsMapper, JdGoods>
|
|||
if(StringUtils.isNotEmpty(goodsSku.getOuterId())) {
|
||||
List<OGoodsSku> oGoodsSkus = goodsSkuMapper.selectList(new LambdaQueryWrapper<OGoodsSku>().eq(OGoodsSku::getSkuCode, goodsSku.getOuterId()));
|
||||
if(oGoodsSkus!=null && !oGoodsSkus.isEmpty()){
|
||||
goodsSku.setOGoodsId(oGoodsSkus.get(0).getGoodsId().toString());
|
||||
goodsSku.setOGoodsSkuId(Long.parseLong(oGoodsSkus.get(0).getId().toString()));
|
||||
goodsSku.setErpGoodsId(oGoodsSkus.get(0).getGoodsId());
|
||||
goodsSku.setErpGoodsSkuId(oGoodsSkus.get(0).getId());
|
||||
}
|
||||
}
|
||||
skuMapper.insert(goodsSku);
|
||||
|
|
@ -104,8 +104,8 @@ public class JdGoodsServiceImpl extends ServiceImpl<JdGoodsMapper, JdGoods>
|
|||
if(StringUtils.isNotEmpty(goodsSku.getOuterId())) {
|
||||
List<OGoodsSku> oGoodsSkus = goodsSkuMapper.selectList(new LambdaQueryWrapper<OGoodsSku>().eq(OGoodsSku::getSkuCode, goodsSku.getOuterId()));
|
||||
if(oGoodsSkus!=null && !oGoodsSkus.isEmpty()){
|
||||
goodsSku.setOGoodsId(oGoodsSkus.get(0).getGoodsId().toString());
|
||||
goodsSku.setOGoodsSkuId(Long.parseLong(oGoodsSkus.get(0).getId().toString()));
|
||||
goodsSku.setErpGoodsId(oGoodsSkus.get(0).getGoodsId());
|
||||
goodsSku.setErpGoodsSkuId(oGoodsSkus.get(0).getId());
|
||||
}
|
||||
}
|
||||
goodsSku.setShopId(shopId);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
package cn.qihangerp.module.open.jd.service.impl;
|
||||
|
||||
import cn.qihangerp.common.ResultVo;
|
||||
import cn.qihangerp.domain.bo.LinkErpGoodsSkuBo;
|
||||
import cn.qihangerp.module.goods.domain.OGoodsSku;
|
||||
import cn.qihangerp.module.goods.service.OGoodsSkuService;
|
||||
import cn.qihangerp.module.open.jd.domain.JdGoods;
|
||||
import cn.qihangerp.module.open.jd.mapper.JdGoodsMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import cn.qihangerp.common.PageQuery;
|
||||
|
|
@ -11,8 +19,11 @@ import cn.qihangerp.module.open.jd.service.JdGoodsSkuService;
|
|||
import cn.qihangerp.module.open.jd.mapper.JdGoodsSkuMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author qilip
|
||||
* @description 针对表【jd_goods_sku】的数据库操作Service实现
|
||||
|
|
@ -23,6 +34,8 @@ import org.springframework.util.StringUtils;
|
|||
public class JdGoodsSkuServiceImpl extends ServiceImpl<JdGoodsSkuMapper, JdGoodsSku>
|
||||
implements JdGoodsSkuService{
|
||||
private final JdGoodsSkuMapper mapper;
|
||||
private final JdGoodsMapper jdGoodsMapper;
|
||||
private final OGoodsSkuService oGoodsSkuService;
|
||||
@Override
|
||||
public PageResult<JdGoodsSkuListVo> queryPageList(JdGoodsBo bo, PageQuery pageQuery) {
|
||||
if(StringUtils.hasText(bo.getOuterId())){
|
||||
|
|
@ -31,6 +44,33 @@ public class JdGoodsSkuServiceImpl extends ServiceImpl<JdGoodsSkuMapper, JdGoods
|
|||
IPage<JdGoodsSkuListVo> result = mapper.selectSkuPageList(pageQuery.build(), bo.getShopId(),bo.getWareId(),bo.getSkuId(),bo.getOuterId(),bo.getHasLink());
|
||||
return PageResult.build(result);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public ResultVo linkErpGoodsSku(LinkErpGoodsSkuBo bo) {
|
||||
OGoodsSku oGoodsSku = oGoodsSkuService.getById(bo.getErpGoodsSkuId());
|
||||
if(oGoodsSku == null) return ResultVo.error("未找到系统商品sku");
|
||||
JdGoodsSku taoGoodsSku = mapper.selectById(bo.getId());
|
||||
if(taoGoodsSku == null) {
|
||||
return ResultVo.error("JD商品sku数据不存在");
|
||||
}
|
||||
List<JdGoods> jdGoods = jdGoodsMapper.selectList(new LambdaQueryWrapper<JdGoods>().eq(JdGoods::getWareId, taoGoodsSku.getWareId()));
|
||||
if(jdGoods==null||jdGoods.size()==0){
|
||||
return ResultVo.error("JD商品数据不存在");
|
||||
}
|
||||
|
||||
JdGoodsSku sku = new JdGoodsSku();
|
||||
sku.setId(bo.getId());
|
||||
sku.setErpGoodsId(oGoodsSku.getGoodsId());
|
||||
sku.setErpGoodsSkuId(oGoodsSku.getId());
|
||||
mapper.updateById(sku);
|
||||
|
||||
JdGoods goodsUp=new JdGoods();
|
||||
goodsUp.setId(jdGoods.get(0).getId());
|
||||
goodsUp.setErpGoodsId(oGoodsSku.getGoodsId());
|
||||
jdGoodsMapper.updateById(goodsUp);
|
||||
return ResultVo.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -113,10 +113,12 @@ public class JdOrderServiceImpl extends ServiceImpl<JdOrderMapper, JdOrder>
|
|||
|
||||
// 添加item
|
||||
for (var item : order.getItems()) {
|
||||
List<JdGoodsSku> pddGoodsSku = goodsSkuMapper.selectList(new LambdaQueryWrapper<JdGoodsSku>().eq(JdGoodsSku::getSkuId, item.getSkuId()));
|
||||
List<JdGoodsSku> pddGoodsSku = goodsSkuMapper.selectList(
|
||||
new LambdaQueryWrapper<JdGoodsSku>()
|
||||
.eq(JdGoodsSku::getSkuId, item.getSkuId()));
|
||||
if (pddGoodsSku != null && !pddGoodsSku.isEmpty()) {
|
||||
item.setoGoodsId(pddGoodsSku.get(0).getOGoodsId());
|
||||
item.setoGoodsSkuId(pddGoodsSku.get(0).getOGoodsSkuId());
|
||||
item.setoGoodsId(pddGoodsSku.get(0).getErpGoodsId().toString());
|
||||
item.setoGoodsSkuId(pddGoodsSku.get(0).getErpGoodsId());
|
||||
}
|
||||
item.setOrderId(jdOrders.get(0).getId());
|
||||
itemMapper.insert(item);
|
||||
|
|
@ -158,8 +160,8 @@ public class JdOrderServiceImpl extends ServiceImpl<JdOrderMapper, JdOrder>
|
|||
for (var item : order.getItems()) {
|
||||
List<JdGoodsSku> pddGoodsSku = goodsSkuMapper.selectList(new LambdaQueryWrapper<JdGoodsSku>().eq(JdGoodsSku::getSkuId, item.getSkuId()));
|
||||
if (pddGoodsSku != null && !pddGoodsSku.isEmpty()) {
|
||||
item.setoGoodsId(pddGoodsSku.get(0).getOGoodsId());
|
||||
item.setoGoodsSkuId(pddGoodsSku.get(0).getOGoodsSkuId());
|
||||
item.setoGoodsId(pddGoodsSku.get(0).getErpGoodsId().toString());
|
||||
item.setoGoodsSkuId(pddGoodsSku.get(0).getErpGoodsId());
|
||||
}
|
||||
item.setOrderId(order.getId());
|
||||
itemMapper.insert(item);
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ public class JdRefundServiceImpl extends ServiceImpl<JdRefundMapper, JdRefund>
|
|||
}
|
||||
List<JdGoodsSku> jdGoodsSkus = goodsSkuMapper.selectList(new LambdaQueryWrapper<JdGoodsSku>().eq(JdGoodsSku::getSkuId, after.getSkuId()));
|
||||
if(!jdGoodsSkus.isEmpty()){
|
||||
after.setOGoodsId(jdGoodsSkus.get(0).getOGoodsId());
|
||||
after.setOGoodsSkuId(jdGoodsSkus.get(0).getOGoodsSkuId());
|
||||
after.setOGoodsId(jdGoodsSkus.get(0).getErpGoodsId().toString());
|
||||
after.setOGoodsSkuId(jdGoodsSkus.get(0).getErpGoodsSkuId());
|
||||
}
|
||||
}else {
|
||||
update.setServiceStatus(after.getServiceStatus());
|
||||
|
|
@ -126,8 +126,8 @@ public class JdRefundServiceImpl extends ServiceImpl<JdRefundMapper, JdRefund>
|
|||
}
|
||||
List<JdGoodsSku> jdGoodsSkus = goodsSkuMapper.selectList(new LambdaQueryWrapper<JdGoodsSku>().eq(JdGoodsSku::getSkuId, after.getSkuId()));
|
||||
if(!jdGoodsSkus.isEmpty()){
|
||||
after.setOGoodsId(jdGoodsSkus.get(0).getOGoodsId());
|
||||
after.setOGoodsSkuId(jdGoodsSkus.get(0).getOGoodsSkuId());
|
||||
after.setOGoodsId(jdGoodsSkus.get(0).getErpGoodsId().toString());
|
||||
after.setOGoodsSkuId(jdGoodsSkus.get(0).getErpGoodsSkuId());
|
||||
}
|
||||
}
|
||||
mapper.insert(after);
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.module.open.jd.domain.JdGoods">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="wareId" column="ware_id" jdbcType="VARCHAR"/>
|
||||
<result property="wareId" column="ware_id" jdbcType="BIGINT"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="wareStatus" column="ware_status" jdbcType="VARCHAR"/>
|
||||
<result property="wareStatus" column="ware_status" jdbcType="INTEGER"/>
|
||||
<result property="outerId" column="outer_id" jdbcType="VARCHAR"/>
|
||||
<result property="itemNum" column="item_num" jdbcType="VARCHAR"/>
|
||||
<result property="barCode" column="bar_code" jdbcType="VARCHAR"/>
|
||||
<result property="modified" column="modified" jdbcType="DATE"/>
|
||||
<result property="created" column="created" jdbcType="DATE"/>
|
||||
<result property="offlineTime" column="offline_time" jdbcType="DATE"/>
|
||||
<result property="onlineTime" column="online_time" jdbcType="DATE"/>
|
||||
<result property="modified" column="modified" jdbcType="VARCHAR"/>
|
||||
<result property="created" column="created" jdbcType="VARCHAR"/>
|
||||
<result property="offlineTime" column="offline_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="onlineTime" column="online_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="delivery" column="delivery" jdbcType="VARCHAR"/>
|
||||
<result property="packListing" column="pack_listing" jdbcType="VARCHAR"/>
|
||||
<result property="wrap" column="wrap" jdbcType="VARCHAR"/>
|
||||
|
|
@ -32,10 +32,11 @@
|
|||
<result property="jdPrice" column="jd_price" jdbcType="DECIMAL"/>
|
||||
<result property="brandName" column="brand_name" jdbcType="VARCHAR"/>
|
||||
<result property="stockNum" column="stock_num" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="sellPoint" column="sell_point" jdbcType="VARCHAR"/>
|
||||
<result property="afterSaleDesc" column="after_sale_desc" jdbcType="VARCHAR"/>
|
||||
<result property="spuId" column="spu_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="BIGINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
|
|
@ -48,7 +49,7 @@
|
|||
mobile_desc,introduction,after_sales,
|
||||
logo,market_price,cost_price,
|
||||
jd_price,brand_name,stock_num,
|
||||
jd_shop_id,sell_point,after_sale_desc,
|
||||
spu_id
|
||||
sell_point,after_sale_desc,spu_id,
|
||||
shop_id,erp_goods_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.module.open.jd.domain.JdGoodsSku">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<!-- <result property="goodsId" column="goods_id" jdbcType="BIGINT"/>-->
|
||||
<result property="wareId" column="ware_id" jdbcType="BIGINT"/>
|
||||
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
|
|
@ -20,18 +19,20 @@
|
|||
<result property="modified" column="modified" jdbcType="TIMESTAMP"/>
|
||||
<result property="created" column="created" jdbcType="TIMESTAMP"/>
|
||||
<result property="currencySpuId" column="currency_spu_id" jdbcType="VARCHAR"/>
|
||||
<result property="oGoodsId" column="o_goods_id" jdbcType="BIGINT"/>
|
||||
<result property="oGoodsSkuId" column="o_goods_sku_id" jdbcType="BIGINT"/>
|
||||
<result property="erpGoodsId" column="erp_goods_id" jdbcType="BIGINT"/>
|
||||
<result property="erpGoodsSkuId" column="erp_goods_sku_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,goods_id,ware_id,
|
||||
sku_id,status,jd_price,
|
||||
outer_id,bar_code,logo,
|
||||
sale_attrs,sku_name,stock_num,
|
||||
modified,created,currency_spu_id,
|
||||
o_goods_id,o_goods_sku_id
|
||||
id,ware_id,sku_id,
|
||||
status,jd_price,outer_id,
|
||||
bar_code,logo,sale_attrs,
|
||||
sku_name,stock_num,modified,
|
||||
created,currency_spu_id,erp_goods_id,
|
||||
erp_goods_sku_id,shop_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSkuPageList" resultType="cn.qihangerp.module.open.jd.domain.vo.JdGoodsSkuListVo">
|
||||
SELECT sku.*,ogs.outer_erp_sku_id FROM oms_jd_goods_sku sku
|
||||
|
||||
|
|
|
|||
|
|
@ -55,26 +55,30 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList" >
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="商品ID" align="center" prop="wareId" />
|
||||
<el-table-column label="Sku Id" align="center" prop="skuId" />
|
||||
<el-table-column label="sku名称" align="center" prop="skuName" />
|
||||
<!-- <el-table-column label="图片" align="center" prop="logo" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.logo" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{categoryList.find(x=>x.id === scope.row.categoryId).name}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="商家编码" align="center" prop="outerId" />
|
||||
<el-table-column label="京东价" align="center" prop="jdPrice" />
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.logo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标题" align="left" prop="title" />
|
||||
<el-table-column label="平台商品ID" align="center" prop="wareId" />
|
||||
<!-- <el-table-column label="商家编码" align="center" prop="outerId" />-->
|
||||
<el-table-column label="商家编码" align="center" prop="itemNum" />
|
||||
<el-table-column label="京东价" align="center" prop="jdPrice" :formatter="amountFormatter"/>
|
||||
<el-table-column label="SKU" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-info"
|
||||
@click="handleViewSkuList(scope.row)"
|
||||
>{{scope.row.skus.length +' 个SKU'}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ERP商品ID" align="center" prop="erpGoodsId" />
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.status === 1">销售中</el-tag>
|
||||
|
|
@ -127,6 +131,7 @@ import {listGoods,getGoodsSku,linkErpGoodsSkuId,pullGoodsList} from "@/api/jd/go
|
|||
import {listShop} from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
import {amountFormatter} from "@/utils/zhijian";
|
||||
|
||||
export default {
|
||||
name: "GoodsListJd",
|
||||
|
|
@ -188,6 +193,13 @@ export default {
|
|||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
amountFormatter,
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue